public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Dominic Jäger" <d.jaeger@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH widget-toolkit v3 1/3] Proxmox.window.Edit: Introduce separate submitUrl
Date: Tue, 25 Aug 2020 11:24:47 +0200	[thread overview]
Message-ID: <20200825092449.49410-2-d.jaeger@proxmox.com> (raw)
In-Reply-To: <20200825092449.49410-1-d.jaeger@proxmox.com>

Signed-off-by: Dominic Jäger <d.jaeger@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




  reply	other threads:[~2020-08-25  9:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-25  9:24 [pve-devel] [PATCH v3 0/3] Close #2886: Add GUI for importdisk Dominic Jäger
2020-08-25  9:24 ` Dominic Jäger [this message]
2020-09-03 13:37   ` [pve-devel] [PATCH widget-toolkit v3 1/3] Proxmox.window.Edit: Introduce separate submitUrl Dominik Csapak
2020-08-25  9:24 ` [pve-devel] [PATCH qemu-server v3 2/3] Move importdisk from qm to API Dominic Jäger
2020-09-03 13:52   ` Dominik Csapak
2020-09-04  9:10     ` Thomas Lamprecht
2020-08-25  9:24 ` [pve-devel] [PATCH manager v3 3/3] Hardware View: Add GUI for importdisk Dominic Jäger
2020-09-03 14:29   ` Dominik Csapak

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=20200825092449.49410-2-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal