]>
git.proxmox.com Git - pve-manager.git/blob - www/manager6/panel/BackupAdvancedOptions.js
785c991fab4e7c2e1db2b163ddfe6bf88b6ea0ff
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 if (!disabled
&& value
=== 'zstd') {
63 this.lookup('zstdThreadCount').setDisabled(false);
65 this.lookup('zstdThreadCount').setDisabled(true);
71 xtype
: 'pveTwoColumnContainer',
73 xtype
: 'pveBandwidthField',
75 fieldLabel
: gettext('Bandwidth Limit'),
76 emptyText
: gettext('Fallback'),
82 'data-qtip': Ext
.String
.format(gettext('Use {0} for unlimited'), 0),
87 xtype
: 'displayfield',
88 value
: `${gettext('Limit I/O bandwidth.')} ${Ext.String.format(gettext("Schema default: {0}"), 0)}`,
92 xtype
: 'pveTwoColumnContainer',
94 xtype
: 'proxmoxintegerfield',
96 reference
: 'zstdThreadCount',
97 fieldLabel
: Ext
.String
.format(gettext('{0} Threads'), 'Zstd'),
98 fieldStyle
: 'text-align: right',
99 emptyText
: gettext('Fallback'),
102 deleteEmpty
: '{!isCreate}',
106 'data-qtip': gettext('With 0, half of the available cores are used'),
111 xtype
: 'displayfield',
112 value
: `${gettext('Threads used for zstd compression (non-PBS).')} ${Ext.String.format(gettext("Schema default: {0}"), 1)}`,
116 xtype
: 'pveTwoColumnContainer',
118 xtype
: 'proxmoxintegerfield',
122 fieldLabel
: gettext('IO-Workers'),
123 fieldStyle
: 'text-align: right',
124 emptyText
: gettext('Fallback'),
126 deleteEmpty
: '{!isCreate}',
131 xtype
: 'displayfield',
132 value
: `${gettext('I/O workers in the QEMU process (VMs only).')} ${Ext.String.format(gettext("Schema default: {0}"), 16)}`,
136 // It's part of the 'performance' property string, so have a field to preserve the
137 // value, but don't expose it. It's a rather niche setting and difficult to
138 // convey/understand what it does.
139 xtype
: 'proxmoxintegerfield',
140 name
: 'pbs-entries-max',
143 fieldStyle
: 'text-align: right',
146 deleteEmpty
: '{!isCreate}',
150 xtype
: 'pveTwoColumnContainer',
152 xtype
: 'proxmoxcheckbox',
153 fieldLabel
: gettext('Repeat missed'),
154 name
: 'repeat-missed',
158 deleteDefaultValue
: '{!isCreate}',
163 xtype
: 'displayfield',
164 value
: gettext("Run jobs as soon as possible if they couldn't start on schedule, for example, due to the node being offline."),
170 html
: `<span class="pmx-hint">${gettext('Note')}</span>: ${
171 gettext("The node-specific 'vzdump.conf' or, if this is not set, the default from the config schema is used to determine fallback values.")}`,