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.tschlatsc...@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



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to