[pve-devel] [PATCH widget-toolkit v3 1/3] Proxmox.window.Edit: Introduce separate submitUrl
Dominic Jäger
d.jaeger at proxmox.com
Tue Aug 25 11:24:47 CEST 2020
Signed-off-by: Dominic Jäger <d.jaeger at proxmox.com>
---
v2->v3:
- Use a more general approach in the shared code base instead of coding
specifically for importdisk
src/window/Edit.js | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/window/Edit.js b/src/window/Edit.js
index d7972b6..45b380a 100644
--- a/src/window/Edit.js
+++ b/src/window/Edit.js
@@ -128,7 +128,16 @@ Ext.define('Proxmox.window.Edit', {
values.background_delay = me.backgroundDelay;
}
- let url = me.url;
+ /*
+ * Usually Proxmox.window.Edit windows read a guest configuration from
+ * nodes/{node}/qemu/{vmid}/config and write changes (clicking the
+ * submit button) to the same path.
+ * Use submitUrl to change only the write path to something different.
+ * Example: importdisk reuses the PVE.qemu.HDEdit window and reads from
+ * nodes/{node}/qemu/{vmid}/config but needs to write to
+ * nodes/{node}/qemu/{vmid}/importdisk
+ */
+ let url = me.submitUrl || me.url;
if (me.method === 'DELETE') {
url = url + "?" + Ext.Object.toQueryString(values);
values = undefined;
--
2.20.1
More information about the pve-devel
mailing list