lxc: add reboot button

to right-click menu and dropdown menu

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
This commit is contained in:
Oguz Bektas 2019-11-20 15:49:41 +01:00 committed by Thomas Lamprecht
parent 2f13fde351
commit 6aee12f1fc
2 changed files with 25 additions and 0 deletions

View File

@ -112,6 +112,22 @@ Ext.define('PVE.lxc.CmdMenu', {
});
}
},
{
text: gettext('Reboot'),
iconCls: 'fa fa-fw fa-refresh',
disabled: stopped,
tooltip: Ext.String.format(gettext('Reboot {0}'), 'CT'),
handler: function() {
var msg = Proxmox.Utils.format_task_description('vzreboot', vmid);
Ext.Msg.confirm(gettext('Confirm'), msg, function(btn) {
if (btn !== 'yes') {
return;
}
vm_command("reboot");
});
}
},
{
xtype: 'menuseparator',
hidden: standalone || !caps.vms['VM.Migrate']

View File

@ -71,6 +71,15 @@ Ext.define('PVE.lxc.Config', {
vm_command("stop");
},
iconCls: 'fa fa-stop'
},{
text: gettext('Reboot'),
disabled: !caps.vms['VM.PowerMgmt'],
confirmMsg: Proxmox.Utils.format_task_description('vzreboot', vmid),
tooltip: Ext.String.format(gettext('Reboot {0}'), 'CT'),
handler: function() {
vm_command("reboot");
},
iconCls: 'fa fa-refresh'
}]
},
iconCls: 'fa fa-power-off'