]>
git.proxmox.com Git - pve-manager.git/blob - www/manager6/panel/BackupAdvancedOptions.js
d29c7ddbaa1e969ede73acbf1f3188ced9fe0799
2 * Input panel for advanced backup options intended to be used as part of an edit/create window.
4 Ext
.define('PVE.panel.BackupAdvancedOptions', {
5 extend
: 'Proxmox.panel.InputPanel',
6 xtype
: 'pveBackupAdvancedOptionsPanel',
7 mixins
: ['Proxmox.Mixin.CBind'],
9 cbindData: function() {
11 me
.isCreate
= !!me
.isCreate
;
16 xclass
: 'Ext.app.ViewController',
19 onGetValues: function(formValues
) {
20 if (this.needMask
) { // isMasked() may not yet be true if not rendered once
24 let options
= { 'delete': [] };
27 let performanceOptions
= ['max-workers', 'pbs-entries-max'];
29 for (const [key
, value
] of Object
.entries(formValues
)) {
30 if (performanceOptions
.includes(key
)) {
31 performance
[key
] = value
;
32 // deleteEmpty is not currently implemented for pveBandwidthField
33 } else if (key
=== 'bwlimit' && value
=== '') {
34 options
.delete.push('bwlimit');
35 } else if (key
=== 'delete') {
36 if (Array
.isArray(value
)) {
37 value
.filter(opt
=> !performanceOptions
.includes(opt
)).forEach(
38 opt
=> options
.delete.push(opt
),
40 } else if (!performanceOptions
.includes(formValues
.delete)) {
41 options
.delete.push(value
);
48 if (Object
.keys(performance
).length
> 0) {
49 options
.performance
= PVE
.Parser
.printPropertyString(performance
);
51 options
.delete.push('performance');
55 delete options
.delete;
61 updateCompression: function(value
, disabled
) {
62 this.lookup('zstdThreadCount').setDisabled(disabled
|| value
!== 'zstd');
67 xtype
: 'pveTwoColumnContainer',
69 xtype
: 'pveBandwidthField',
71 fieldLabel
: gettext('Bandwidth Limit'),
72 emptyText
: gettext('Fallback'),
78 'data-qtip': Ext
.String
.format(gettext('Use {0} for unlimited'), 0),
83 xtype
: 'displayfield',
84 value
: `${gettext('Limit I/O bandwidth.')} ${Ext.String.format(gettext("Schema default: {0}"), 0)}`,
88 xtype
: 'pveTwoColumnContainer',
90 xtype
: 'proxmoxintegerfield',
92 reference
: 'zstdThreadCount',
93 fieldLabel
: Ext
.String
.format(gettext('{0} Threads'), 'Zstd'),
94 fieldStyle
: 'text-align: right',
95 emptyText
: gettext('Fallback'),
98 deleteEmpty
: '{!isCreate}',
102 'data-qtip': gettext('With 0, half of the available cores are used'),
107 xtype
: 'displayfield',
108 value
: `${gettext('Threads used for zstd compression (non-PBS).')} ${Ext.String.format(gettext("Schema default: {0}"), 1)}`,
112 xtype
: 'pveTwoColumnContainer',
114 xtype
: 'proxmoxintegerfield',
118 fieldLabel
: gettext('IO-Workers'),
119 fieldStyle
: 'text-align: right',
120 emptyText
: gettext('Fallback'),
122 deleteEmpty
: '{!isCreate}',
127 xtype
: 'displayfield',
128 value
: `${gettext('I/O workers in the QEMU process (VMs only).')} ${Ext.String.format(gettext("Schema default: {0}"), 16)}`,
132 // It's part of the 'performance' property string, so have a field to preserve the
133 // value, but don't expose it. It's a rather niche setting and difficult to
134 // convey/understand what it does.
135 xtype
: 'proxmoxintegerfield',
136 name
: 'pbs-entries-max',
139 fieldStyle
: 'text-align: right',
142 deleteEmpty
: '{!isCreate}',
146 xtype
: 'pveTwoColumnContainer',
148 xtype
: 'proxmoxcheckbox',
149 fieldLabel
: gettext('Repeat missed'),
150 name
: 'repeat-missed',
154 deleteDefaultValue
: '{!isCreate}',
159 xtype
: 'displayfield',
160 value
: gettext("Run jobs as soon as possible if they couldn't start on schedule, for example, due to the node being offline."),
166 html
: `<span class="pmx-hint">${gettext('Note')}</span>: ${
167 gettext("The node-specific 'vzdump.conf' or, if this is not set, the default from the config schema is used to determine fallback values.")}`,