]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
add reboot button to right-click menu for VMs
authorOguz Bektas <o.bektas@proxmox.com>
Fri, 29 Nov 2019 16:44:44 +0000 (17:44 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 30 Nov 2019 13:31:22 +0000 (14:31 +0100)
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
www/manager6/qemu/CmdMenu.js

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