[pve-devel] [PATCH manager 6/6 v2] importdisk gui: Make storages selectable again
Dominic Jäger
d.jaeger at proxmox.com
Fri Nov 20 10:38:12 CET 2020
And fix parameters for the API
Signed-off-by: Dominic Jäger <d.jaeger at proxmox.com>
---
v2: Added
www/manager6/qemu/HDEdit.js | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/www/manager6/qemu/HDEdit.js b/www/manager6/qemu/HDEdit.js
index f8e811e1..0c5603ab 100644
--- a/www/manager6/qemu/HDEdit.js
+++ b/www/manager6/qemu/HDEdit.js
@@ -137,6 +137,8 @@ Ext.define('PVE.qemu.HDInputPanel', {
} else {
console.assert(me.isImport,
"Returning multiple key/values is only allowed in import");
+ delete me.drive.file; // TODO make this nesting mess less
+ delete me.drive.format;
params.device_options = PVE.Parser.printPropertyString(me.drive);
params.source = this.getSourceValue(values);
params.device = values.controller + values.deviceid;
@@ -226,7 +228,11 @@ Ext.define('PVE.qemu.HDInputPanel', {
me.advancedColumn1 = [];
me.advancedColumn2 = [];
- let nodename = this.getViewModel().get('nodename'); // TODO hacky whacky
+ /*
+ * If the panel is part of a wizard (ImportWizard), then it gets the value from the viewmodel
+ * If the panel is part of a PVE.qemu.HDEdit window then it gets the nodename assigned from the window
+ */
+ let nodename = this.getViewModel().get('nodename') || me.nodename;
if (!me.confid || me.unused) {
@@ -532,6 +538,7 @@ Ext.define('PVE.qemu.HDEdit', {
unused: unused,
isCreate: me.isCreate,
showSourcePathTextfield: me.isImport,
+ isImport: me.isImport,
returnSingleKey: !me.isImport,
});
--
2.20.1
More information about the pve-devel
mailing list