public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 2/2] gui: reorder with advanced section
Date: Mon, 17 Oct 2022 15:56:32 +0200	[thread overview]
Message-ID: <20221017135632.569782-2-d.tschlatscher@proxmox.com> (raw)
In-Reply-To: <20221017135632.569782-1-d.tschlatscher@proxmox.com>

The new MTU field and the rate limit field are now in the advanced
section of the NetworkInputPanel to parallel the layout of the
NetworkEdit for VMs.

Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
---

While the layout now is the same as in the VM NetworkEdit, I just feel
like the advanced column does not create such a nice UI flow here.
Therefore, I included this as an optional patch, as it still has some
merit, but may be dropped if deemed unnecessary.

 www/manager6/lxc/Network.js | 42 +++++++++++++++++++++----------------
 1 file changed, 24 insertions(+), 18 deletions(-)

diff --git a/www/manager6/lxc/Network.js b/www/manager6/lxc/Network.js
index d6a35a49..e9c32334 100644
--- a/www/manager6/lxc/Network.js
+++ b/www/manager6/lxc/Network.js
@@ -122,30 +122,12 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
 		name: 'tag',
 		value: cdata.tag,
 	    },
-	    {
-		xtype: 'numberfield',
-		name: 'rate',
-		fieldLabel: gettext('Rate limit') + ' (MB/s)',
-		minValue: 0,
-		maxValue: 10*1024,
-		value: cdata.rate,
-		emptyText: 'unlimited',
-		allowBlank: true,
-	    },
 	    {
 		xtype: 'proxmoxcheckbox',
 		fieldLabel: gettext('Firewall'),
 		name: 'firewall',
 		value: cdata.firewall,
 	    },
-	    {
-		xtype: 'proxmoxintegerfield',
-		fieldLabel: gettext('MTU'),
-		name: 'mtu',
-		value: cdata.mtu,
-		minValue: 64,
-		maxValue: 65535,
-	    },
 	];
 
 	let dhcp4 = cdata.ip === 'dhcp';
@@ -290,6 +272,30 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
 	    },
 	];
 
+	me.advancedColumn1 = [
+	    {
+		xtype: 'proxmoxintegerfield',
+		fieldLabel: gettext('MTU'),
+		name: 'mtu',
+		value: cdata.mtu,
+		minValue: 64,
+		maxValue: 65535,
+	    },
+	];
+
+	me.advancedColumn2 = [
+	    {
+		xtype: 'numberfield',
+		name: 'rate',
+		fieldLabel: gettext('Rate limit') + ' (MB/s)',
+		minValue: 0,
+		maxValue: 10*1024,
+		value: cdata.rate,
+		emptyText: 'unlimited',
+		allowBlank: true,
+	    },
+	];
+
 	me.callParent();
     },
 });
-- 
2.30.2





  reply	other threads:[~2022-10-17 13:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17 13:56 [pve-devel] [PATCH manager 1/2] fix #3719: gui: expose MTU option for containers in web UI Daniel Tschlatscher
2022-10-17 13:56 ` Daniel Tschlatscher [this message]
2022-10-19  5:49 ` 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=20221017135632.569782-2-d.tschlatscher@proxmox.com \
    --to=d.tschlatscher@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