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 5/5] vlan edit: Match explicit values to name field
Date: Mon,  8 Feb 2021 13:41:37 +0100	[thread overview]
Message-ID: <20210208124137.125375-5-d.jaeger@proxmox.com> (raw)
In-Reply-To: <20210208124137.125375-1-d.jaeger@proxmox.com>

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
---
 src/node/NetworkEdit.js | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/node/NetworkEdit.js b/src/node/NetworkEdit.js
index 9e56360..d1ac454 100644
--- a/src/node/NetworkEdit.js
+++ b/src/node/NetworkEdit.js
@@ -258,8 +258,22 @@ Ext.define('Proxmox.node.NetworkEdit', {
 			if (Proxmox.Utils.VlanInterface_match.test(value)) {
 			    vlanidField.setDisabled(true);
 			    vlanrawdeviceField.setDisabled(true);
+			    // User defined those values in the `iface` (Name)
+			    // field. Match them (instead of leaving the
+			    // previous value) to make clear what is submitted
+			    // and how the fields `iface`, `vlan-id` and
+			    // `vlan-raw-device` are connected
+			    vlanidField.setValue(
+				value.match(Proxmox.Utils.VlanInterface_match)[2],
+			    );
+			    vlanrawdeviceField.setValue(
+				value.match(Proxmox.Utils.VlanInterface_match)[1],
+			    );
 			} else if (Proxmox.Utils.Vlan_match.test(value)) {
 			    vlanidField.setDisabled(true);
+			    vlanidField.setValue(
+				value.match(Proxmox.Utils.Vlan_match)[1],
+			    );
 			    vlanrawdeviceField.setDisabled(false);
 			} else {
 			    vlanidField.setDisabled(false);
-- 
2.20.1




  parent reply	other threads:[~2021-02-08 12:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08 12:41 [pve-devel] [PATCH widget-toolkit 1/5] vlan edit: Fix automatic field disabling Dominic Jäger
2021-02-08 12:41 ` [pve-devel] [PATCH widget-toolkit 2/5] vlan edit: Forbid blank vlan raw device Dominic Jäger
2021-02-08 12:41 ` [pve-devel] [PATCH widget-toolkit 3/5] vlan edit: Move example from default value to tooltip Dominic Jäger
2021-02-08 12:41 ` [pve-devel] [PATCH widget-toolkit 4/5] vlan edit: Set valid default name Dominic Jäger
2021-02-08 12:41 ` Dominic Jäger [this message]
2021-02-09 13:29 ` [pve-devel] applied-series: [PATCH widget-toolkit 1/5] vlan edit: Fix automatic field disabling Thomas Lamprecht

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=20210208124137.125375-5-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