[pve-devel] [PATCH manager 2/2] lxc: Add `Disconnect` option for network interfaces
Christoph Heiss
c.heiss at proxmox.com
Mon Feb 13 14:57:00 CET 2023
Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
---
www/manager6/Parser.js | 3 +++
www/manager6/lxc/Network.js | 13 +++++++++++++
2 files changed, 16 insertions(+)
diff --git a/www/manager6/Parser.js b/www/manager6/Parser.js
index 9f7b2c84..c3772d3b 100644
--- a/www/manager6/Parser.js
+++ b/www/manager6/Parser.js
@@ -298,6 +298,8 @@ Ext.define('PVE.Parser', {
data[match_res[1]] = match_res[2];
} else if ((match_res = p.match(/^firewall=(\d+)$/)) !== null) {
data.firewall = PVE.Parser.parseBoolean(match_res[1]);
+ } else if ((match_res = p.match(/^link_down=(\d+)$/)) !== null) {
+ data.link_down = PVE.Parser.parseBoolean(match_res[1]);
} else if (!p.match(/^type=\S+$/)) {
console.warn(`could not parse LXC network string ${p}`);
}
@@ -319,6 +321,7 @@ Ext.define('PVE.Parser', {
name: 1,
rate: 1,
tag: 1,
+ link_down: 1,
};
return Object.entries(config)
.filter(([k, v]) => v !== undefined && v !== '' && knownKeys[k])
diff --git a/www/manager6/lxc/Network.js b/www/manager6/lxc/Network.js
index 85033bd8..746924b3 100644
--- a/www/manager6/lxc/Network.js
+++ b/www/manager6/lxc/Network.js
@@ -282,6 +282,12 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
minValue: 576,
maxValue: 65535,
},
+ {
+ xtype: 'proxmoxcheckbox',
+ fieldLabel: gettext('Disconnect'),
+ name: 'link_down',
+ value: cdata.link_down,
+ },
];
me.advancedColumn2 = [
@@ -539,6 +545,12 @@ Ext.define('PVE.lxc.NetworkView', {
width: 80,
dataIndex: 'mtu',
},
+ {
+ header: gettext('Disconnected'),
+ width: 100,
+ dataIndex: 'link_down',
+ renderer: Proxmox.Utils.format_boolean,
+ },
],
listeners: {
activate: me.load,
@@ -564,6 +576,7 @@ Ext.define('PVE.lxc.NetworkView', {
'tag',
'firewall',
'mtu',
+ 'link_down',
],
});
});
--
2.39.1
More information about the pve-devel
mailing list