implement the disconnect nic button on the network edit pannel.

Signed-off-by: Wolfgang Link <wolfgang@linksystems.org>
This commit is contained in:
Wolfgang Link 2014-12-22 13:35:59 +01:00 committed by Dietmar Maurer
parent eab837c4c4
commit caea0c7925
3 changed files with 13 additions and 0 deletions

View File

@ -1,4 +1,6 @@
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)

View File

@ -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: {
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;
}, },

View File

@ -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', {
value: '', value: '',
emptyText: 'unlimited', emptyText: 'unlimited',
allowBlank: true allowBlank: true
},
{
xtype: 'pvecheckbox',
fieldLabel: gettext('Disconnect'),
name: 'disconnect'
} }
]; ];