mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-06 17:10:35 +00:00
acme: account: hide TOS checkbox during load and reuse field references
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
e023535e15
commit
1d5c5ba19a
@ -83,6 +83,15 @@ sub update_storage_status {
|
||||
return assemble($class, $txn, $data, $ctime, "storages.$nodename.$storeid");
|
||||
}
|
||||
|
||||
sub _send_batch_size {
|
||||
my ($class, $cfg) = @_;
|
||||
my $proto = $cfg->{proto} || 'udp';
|
||||
if ($proto eq 'tcp') {
|
||||
return 56000;
|
||||
}
|
||||
return $class->SUPER::_send_batch_size($cfg);
|
||||
}
|
||||
|
||||
sub _connect {
|
||||
my ($class, $cfg) = @_;
|
||||
|
||||
|
@ -69,7 +69,7 @@ sub _disconnect {
|
||||
# UDP cannot do more than 64k at once. Overwrite for different protocol limits.
|
||||
sub _send_batch_size {
|
||||
my ($class, $cfg) = @_;
|
||||
return 1200; # FIXME: why??? MTU fragmentation should be handled by layer2
|
||||
return 1450; # assume 1500 MTU, empty IPv6 UDP packet needs 48 bytes overhead
|
||||
}
|
||||
|
||||
# call with the smalles $data chunks possible
|
||||
@ -77,7 +77,7 @@ sub add_metric_data {
|
||||
my ($class, $txn, $data) = @_;
|
||||
return if !defined($data);
|
||||
|
||||
my $batch_size = $class->_send_batch_size();
|
||||
my $batch_size = $class->_send_batch_size($txn->{cfg});
|
||||
my $data_length = length($data) // 0;
|
||||
my $dataq_len = length($txn->{data}) // 0;
|
||||
|
||||
|
@ -76,6 +76,7 @@ Ext.define('PVE.node.ACMEAccountCreate', {
|
||||
disp.setValue(gettext('Loading'));
|
||||
field.setValue(undefined);
|
||||
checkbox.setValue(undefined);
|
||||
checkbox.setHidden(true);
|
||||
|
||||
Proxmox.Utils.API2Request({
|
||||
url: '/cluster/acme/tos',
|
||||
@ -84,8 +85,9 @@ Ext.define('PVE.node.ACMEAccountCreate', {
|
||||
directory: value
|
||||
},
|
||||
success: function(response, opt) {
|
||||
me.up('window').down('#tos_url').setValue(response.result.data);
|
||||
me.up('window').down('#tos_url_display').setValue(response.result.data);
|
||||
field.setValue(response.result.data);
|
||||
disp.setValue(response.result.data);
|
||||
checkbox.setHidden(false);
|
||||
},
|
||||
failure: function(response, opt) {
|
||||
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
|
||||
|
Loading…
Reference in New Issue
Block a user