[pve-devel] [PATCH manager 08/11] qemu/CreateWizard: add advanced options on general tab
Dominik Csapak
d.csapak at proxmox.com
Thu Apr 5 16:03:53 CEST 2018
add start on boot, guest agent and boot order fields
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/qemu/CreateWizard.js | 69 ++++++++++++++++++++++++++++++++++++---
1 file changed, 64 insertions(+), 5 deletions(-)
diff --git a/www/manager6/qemu/CreateWizard.js b/www/manager6/qemu/CreateWizard.js
index f425a49f..c9c0023a 100644
--- a/www/manager6/qemu/CreateWizard.js
+++ b/www/manager6/qemu/CreateWizard.js
@@ -62,13 +62,72 @@ Ext.define('PVE.qemu.CreateWizard', {
allowBlank: true
}
],
- onGetValues: function(values) {
- if (!values.name) {
- delete values.name;
+ advancedColumn1: [
+ {
+ xtype: 'proxmoxcheckbox',
+ name: 'onboot',
+ uncheckedValue: 0,
+ defaultValue: 0,
+ deleteDefaultValue: true,
+ fieldLabel: gettext('Start at boot')
+ },
+ {
+ xtype: 'proxmoxcheckbox',
+ name: 'agent',
+ uncheckedValue: 0,
+ defaultValue: 0,
+ deleteDefaultValue: true,
+ fieldLabel: gettext('Qemu Agent')
+ }
+ ],
+ advancedColumn2: [
+ {
+ xtype: 'textfield',
+ name: 'order',
+ defaultValue: '',
+ emptyText: 'any',
+ labelWidth: 120,
+ fieldLabel: gettext('Start/Shutdown order')
+ },
+ {
+ xtype: 'textfield',
+ name: 'up',
+ defaultValue: '',
+ emptyText: 'default',
+ labelWidth: 120,
+ fieldLabel: gettext('Startup delay')
+ },
+ {
+ xtype: 'textfield',
+ name: 'down',
+ defaultValue: '',
+ emptyText: 'default',
+ labelWidth: 120,
+ fieldLabel: gettext('Shutdown timeout')
}
- if (!values.pool) {
- delete values.pool;
+ ],
+ onGetValues: function(values) {
+
+ ['name', 'pool', 'onboot', 'agent'].forEach(function(field) {
+ if (!values[field]) {
+ delete values[field];
+ }
+ });
+
+ var res = PVE.Parser.printStartup({
+ order: values.order,
+ up: values.up,
+ down: values.down
+ });
+
+ if (res) {
+ values.startup = res;
}
+
+ delete values.order;
+ delete values.up;
+ delete values.down;
+
return values;
}
},
--
2.11.0
More information about the pve-devel
mailing list