[pve-devel] [PATCH manager 1/2] ui: restore: group override settings in a fieldset
Fabian Ebner
f.ebner at proxmox.com
Thu Apr 28 09:04:08 CEST 2022
Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
www/manager6/window/Restore.js | 86 ++++++++++++++++++----------------
1 file changed, 45 insertions(+), 41 deletions(-)
diff --git a/www/manager6/window/Restore.js b/www/manager6/window/Restore.js
index 2d78eb56..9f52c872 100644
--- a/www/manager6/window/Restore.js
+++ b/www/manager6/window/Restore.js
@@ -293,48 +293,52 @@ Ext.define('PVE.window.Restore', {
});
}
- items.push(
- {
- xtype: 'displayfield',
- value: `${gettext('Override Settings')}:`,
- },
- {
- xtype: 'textfield',
- fieldLabel: gettext('Name'),
- name: 'name',
- reference: 'nameField',
- allowBlank: true,
- },
- {
- xtype: 'pveMemoryField',
- fieldLabel: gettext('Memory'),
- name: 'memory',
- reference: 'memoryField',
- value: '',
- allowBlank: true,
+ items.push({
+ xtype: 'fieldset',
+ title: `${gettext('Override Settings')}:`,
+ layout: 'column',
+ defaults: {
+ width: '45%',
+ margin: '0 0 5 10',
},
- {
- xtype: 'proxmoxintegerfield',
- fieldLabel: gettext('Cores'),
- name: 'cores',
- reference: 'coresField',
- minValue: 1,
- maxValue: 128,
- allowBlank: true,
- },
- );
-
- if (me.vmtype === 'qemu') {
- items.push({
- xtype: 'proxmoxintegerfield',
- fieldLabel: gettext('Sockets'),
- name: 'sockets',
- reference: 'socketsField',
- minValue: 1,
- maxValue: 4,
- allowBlank: true,
- });
- }
+ items: [
+ {
+ xtype: 'textfield',
+ fieldLabel: gettext('Name'),
+ name: 'name',
+ reference: 'nameField',
+ allowBlank: true,
+ },
+ {
+ xtype: 'pveMemoryField',
+ fieldLabel: gettext('Memory'),
+ name: 'memory',
+ reference: 'memoryField',
+ value: '',
+ allowBlank: true,
+ },
+ {
+ xtype: 'proxmoxintegerfield',
+ fieldLabel: gettext('Cores'),
+ name: 'cores',
+ reference: 'coresField',
+ minValue: 1,
+ maxValue: 128,
+ allowBlank: true,
+ },
+ {
+ xtype: 'proxmoxintegerfield',
+ fieldLabel: gettext('Sockets'),
+ name: 'sockets',
+ reference: 'socketsField',
+ minValue: 1,
+ maxValue: 4,
+ allowBlank: true,
+ hidden: me.vmtype !== 'qemu',
+ disabled: me.vmtype !== 'qemu',
+ },
+ ],
+ });
let title = gettext('Restore') + ": " + (me.vmtype === 'lxc' ? 'CT' : 'VM');
if (me.vmid) {
--
2.30.2
More information about the pve-devel
mailing list