Commit 8b626994 authored by Wolfgang Link's avatar Wolfgang Link Committed by Dietmar Maurer

implement the disconnect nic button on the network edit pannel.

Signed-off-by: 's avatarWolfgang Link <wolfgang@linksystems.org>
parent 8b0470b4
pve-manager (3.3-11) unstable; urgency=low pve-manager (3.3-11) unstable; urgency=low
* New 'disconnect' button on the network edit pannel.
* Fix backup failure at shutdown (stop backup on host shutdown) * Fix backup failure at shutdown (stop backup on host shutdown)
......
...@@ -33,6 +33,8 @@ Ext.define('PVE.Parser', { statics: { ...@@ -33,6 +33,8 @@ Ext.define('PVE.Parser', { statics: {
res.tag = match_res[1]; res.tag = match_res[1];
} else if ((match_res = p.match(/^firewall=(\d+)$/)) !== null) { } else if ((match_res = p.match(/^firewall=(\d+)$/)) !== null) {
res.firewall = match_res[1]; res.firewall = match_res[1];
} else if ((match_res = p.match(/^link_down=(\d+)$/)) !== null) {
res.disconnect = match_res[1];
} else { } else {
errors = true; errors = true;
return false; // break return false; // break
...@@ -64,6 +66,9 @@ Ext.define('PVE.Parser', { statics: { ...@@ -64,6 +66,9 @@ Ext.define('PVE.Parser', { statics: {
if (net.rate) { if (net.rate) {
netstr += ",rate=" + net.rate; netstr += ",rate=" + net.rate;
} }
if (net.disconnect) {
netstr += ",link_down=" + net.disconnect;
}
return netstr; return netstr;
}, },
......
...@@ -18,6 +18,7 @@ Ext.define('PVE.qemu.NetworkInputPanel', { ...@@ -18,6 +18,7 @@ Ext.define('PVE.qemu.NetworkInputPanel', {
me.network.bridge = undefined; me.network.bridge = undefined;
} }
me.network.macaddr = values.macaddr; me.network.macaddr = values.macaddr;
me.network.disconnect = values.disconnect;
if (values.rate) { if (values.rate) {
me.network.rate = values.rate; me.network.rate = values.rate;
...@@ -147,6 +148,11 @@ Ext.define('PVE.qemu.NetworkInputPanel', { ...@@ -147,6 +148,11 @@ Ext.define('PVE.qemu.NetworkInputPanel', {
value: '', value: '',
emptyText: 'unlimited', emptyText: 'unlimited',
allowBlank: true allowBlank: true
},
{
xtype: 'pvecheckbox',
fieldLabel: gettext('Disconnect'),
name: 'disconnect'
} }
]; ];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment