From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 1/2] ui: restore: group override settings in a fieldset
Date: Thu, 28 Apr 2022 09:04:08 +0200 [thread overview]
Message-ID: <20220428070409.16418-1-f.ebner@proxmox.com> (raw)
Signed-off-by: Fabian Ebner <f.ebner@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
next reply other threads:[~2022-04-28 7:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-28 7:04 Fabian Ebner [this message]
2022-04-28 7:04 ` [pve-devel] [PATCH manager 2/2] ui: restore: display "Hostname" for container Fabian Ebner
2022-04-28 9:15 ` [pve-devel] applied: " Thomas Lamprecht
2022-04-28 7:07 ` [pve-devel] [PATCH manager 1/2] ui: restore: group override settings in a fieldset Fabian Ebner
2022-04-28 9:15 ` [pve-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220428070409.16418-1-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.