throw "no VM ID specified";
}
- var template = me.pveSelNode.data.template;
+ var template = !!me.pveSelNode.data.template;
var running = !!me.pveSelNode.data.uptime;
var startBtn = Ext.create('Ext.Button', {
text: gettext('Start'),
disabled: !caps.vms['VM.PowerMgmt'] || running,
+ hidden: template,
handler: function() {
vm_command('start');
},
var shutdownBtn = Ext.create('PVE.button.Split', {
text: gettext('Shutdown'),
disabled: !caps.vms['VM.PowerMgmt'] || !running,
+ hidden: template,
confirmMsg: Proxmox.Utils.format_task_description('vzshutdown', vmid),
handler: function() {
vm_command('shutdown');
disabled: !caps.vms['VM.Console'],
consoleType: 'lxc',
consoleName: vm.name,
+ hidden: template,
nodename: nodename,
vmid: vmid
});
]
});
- if (caps.vms['VM.Console']) {
+ if (caps.vms['VM.Console'] && !template) {
me.items.push(
{
title: gettext('Console'),
});
}
- if (caps.vms['VM.Snapshot'] || caps.vms['VM.Snapshot.Rollback']) {
+ if ((caps.vms['VM.Snapshot'] || caps.vms['VM.Snapshot.Rollback']) && !template) {
me.items.push({
title: gettext('Snapshots'),
iconCls: 'fa fa-history',