mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-13 09:30:54 +00:00
ui: ct: fix displaying nic firewall if explicitly 0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
8b030d0848
commit
95e77b22cc
@ -379,12 +379,15 @@ Ext.define('PVE.Parser', { statics: {
|
|||||||
if (!p || p.match(/^\s*$/)) {
|
if (!p || p.match(/^\s*$/)) {
|
||||||
return; // continue
|
return; // continue
|
||||||
}
|
}
|
||||||
var match_res = p.match(/^(bridge|hwaddr|mtu|name|ip|ip6|gw|gw6|firewall|tag|rate)=(\S+)$/);
|
var match_res = p.match(/^(bridge|hwaddr|mtu|name|ip|ip6|gw|gw6|tag|rate)=(\S+)$/);
|
||||||
if (!match_res) {
|
if (match_res) {
|
||||||
|
data[match_res[1]] = match_res[2];
|
||||||
|
} else if ((match_res = p.match(/^firewall=(\d+)$/)) !== null) {
|
||||||
|
data.firewall = match_res[1] !== "0" && match_res[1];
|
||||||
|
} else {
|
||||||
// todo: simply ignore errors ?
|
// todo: simply ignore errors ?
|
||||||
return; // continue
|
return; // continue
|
||||||
}
|
}
|
||||||
data[match_res[1]] = match_res[2];
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
@ -152,7 +152,7 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
|
|||||||
xtype: 'proxmoxcheckbox',
|
xtype: 'proxmoxcheckbox',
|
||||||
fieldLabel: gettext('Firewall'),
|
fieldLabel: gettext('Firewall'),
|
||||||
name: 'firewall',
|
name: 'firewall',
|
||||||
checked: cdata.firewall
|
value: cdata.firewall
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user