initComponent: function() {
var me = this;
+ var vm = me.pveSelNode.data;
- var nodename = me.pveSelNode.data.node;
+ var nodename = vm.node;
if (!nodename) {
throw "no node name specified";
}
- var vmid = me.pveSelNode.data.vmid;
+ var vmid = vm.vmid;
if (!vmid) {
throw "no VM ID specified";
}
- var template = !!me.pveSelNode.data.template;
+ var template = !!vm.template;
- var running = !!me.pveSelNode.data.uptime;
+ var running = !!vm.uptime;
var caps = Ext.state.Manager.get('GuiCap');
hidden: !caps.nodes['Sys.Console'],
text: gettext('Manage HA'),
handler: function() {
- var ha = me.pveSelNode.data.hastate;
+ var ha = vm.hastate;
Ext.create('PVE.ha.VMResourceEdit', {
vmid: vmid,
isCreate: (!ha || ha === 'unmanaged')
iconCls: 'fa fa-power-off'
});
- var vm = me.pveSelNode.data;
-
var consoleBtn = Ext.create('PVE.button.ConsoleButton', {
disabled: !caps.vms['VM.Console'],
hidden: template,