The option to set the mtu parameter for lxc containers already exists
in the backend. It just has to be exposed in the web UI as well.

Signed-off-by: Daniel Tschlatscher <d.tschlatsc...@proxmox.com>
---
Changes from v1:
* fieldLabel for MTU textfield no longer uses gettext()
* text field has an emptyText now
* the minimum value for the MTU is 576 in the frontend now

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

diff --git a/www/manager6/lxc/Network.js b/www/manager6/lxc/Network.js
index 7b6437c5..c6c40934 100644
--- a/www/manager6/lxc/Network.js
+++ b/www/manager6/lxc/Network.js
@@ -282,6 +282,18 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
            },
        ];
 
+       me.advancedColumn1 = [
+           {
+               xtype: 'proxmoxintegerfield',
+               fieldLabel: 'MTU',
+               emptyText: gettext('Same as bridge'),
+               name: 'mtu',
+               value: cdata.mtu,
+               minValue: 576,
+               maxValue: 65535,
+           },
+       ];
+
        me.callParent();
     },
 });
@@ -519,6 +531,11 @@ Ext.define('PVE.lxc.NetworkView', {
                        }
                    },
                },
+               {
+                   header: gettext('MTU'),
+                   width: 80,
+                   dataIndex: 'mtu',
+               },
            ],
            listeners: {
                activate: me.load,
@@ -543,6 +560,7 @@ Ext.define('PVE.lxc.NetworkView', {
            'gw6',
            'tag',
            'firewall',
+           'mtu',
        ],
     });
 });
-- 
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