From 24c55f4143bb96a90c00149281da19e000de3bbf Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 3 Dec 2019 10:51:10 +0100 Subject: [PATCH] ui: backup restore: add start-after-restore checkbox Restore may be a long running operation, as it goes over the common create API path we can reuse the "start after create" for a "start after restore" for free. Add this as hbox layout, as else it looks like a lot of wasted space in the right side of the window, especially when restoring a CT backup (were the "unprivileged" checkbox is additionally there). Signed-off-by: Thomas Lamprecht --- www/manager6/window/Restore.js | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/www/manager6/window/Restore.js b/www/manager6/window/Restore.js index 4eaf25f6..fe40fa2e 100644 --- a/www/manager6/window/Restore.js +++ b/www/manager6/window/Restore.js @@ -62,16 +62,29 @@ Ext.define('PVE.window.Restore', { } }, { - xtype: 'proxmoxcheckbox', - name: 'unique', - fieldLabel: gettext('Unique'), - hidden: !!me.vmid, - autoEl: { - tag: 'div', - 'data-qtip': gettext('Autogenerate unique properties, e.g., MAC addresses') + xtype: 'fieldcontainer', + layout: 'hbox', + items: [{ + xtype: 'proxmoxcheckbox', + name: 'unique', + fieldLabel: gettext('Unique'), + hidden: !!me.vmid, + flex: 1, + autoEl: { + tag: 'div', + 'data-qtip': gettext('Autogenerate unique properties, e.g., MAC addresses') + }, + checked: false }, - checked: false - } + { + xtype: 'proxmoxcheckbox', + name: 'start', + flex: 1, + fieldLabel: gettext('Start after restore'), + labelWidth: 105, + checked: false + }], + }, ]; /*jslint confusion: true*/ @@ -130,6 +143,7 @@ Ext.define('PVE.window.Restore', { force: me.vmid ? 1 : 0 }; if (values.unique) { params.unique = 1; } + if (values.start) { params.start = 1; } if (values.bwlimit !== undefined) { params.bwlimit = values.bwlimit * 1024;