From: "Dominic Jäger" <d.jaeger@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 6/6 v2] importdisk gui: Make storages selectable again
Date: Fri, 20 Nov 2020 10:38:12 +0100 [thread overview]
Message-ID: <20201120093812.65554-7-d.jaeger@proxmox.com> (raw)
In-Reply-To: <20201120093812.65554-1-d.jaeger@proxmox.com>
And fix parameters for the API
Signed-off-by: Dominic Jäger <d.jaeger@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
next prev parent reply other threads:[~2020-11-20 9:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-20 9:38 [pve-devel] [PATCH qemu-server 0/1 v2] Importwizard Dominic Jäger
2020-11-20 9:38 ` [pve-devel] [PATCH qemu-server 1/6 v2] Move importdisk from qm to API Dominic Jäger
2020-11-20 9:38 ` [pve-devel] [PATCH manager 2/6 v2] gui: Hardware View: Add GUI for importdisk Dominic Jäger
2020-11-20 9:38 ` [pve-devel] [PATCH manager 3/6 v2] gui: Add button & cmdmenu Dominic Jäger
2020-11-20 9:38 ` [pve-devel] [PATCH manager 4/6 v2] gui: Add import VM wizard Dominic Jäger
2020-11-20 9:38 ` [pve-devel] [PATCH manager 5/6 v2] importwizard: Move buttons from bottom bar into panel Dominic Jäger
2020-11-20 9:38 ` Dominic Jäger [this message]
2020-11-23 13:21 ` [pve-devel] [PATCH qemu-server 0/1 v2] Importwizard Oguz Bektas
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=20201120093812.65554-7-d.jaeger@proxmox.com \
--to=d.jaeger@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.