[pve-devel] [PATCH manager 1/5] gui: CmdMenu: hide the start and suspend button conditionally

Dominik Csapak d.csapak at proxmox.com
Fri Mar 29 10:44:33 CET 2019


only to disable them wastes space for no reason and might confuse users

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/qemu/CmdMenu.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www/manager6/qemu/CmdMenu.js b/www/manager6/qemu/CmdMenu.js
index bbcbffba..80e551dd 100644
--- a/www/manager6/qemu/CmdMenu.js
+++ b/www/manager6/qemu/CmdMenu.js
@@ -57,6 +57,7 @@ Ext.define('PVE.qemu.CmdMenu', {
 	    {
 		text: gettext('Start'),
 		iconCls: 'fa fa-fw fa-play',
+		hidden: running || suspended,
 		disabled: running || suspended,
 		handler: function() {
 		    vm_command('start');
@@ -65,7 +66,7 @@ Ext.define('PVE.qemu.CmdMenu', {
 	    {
 		text: gettext('Suspend'),
 		iconCls: 'fa fa-fw fa-pause',
-		hidden: suspended,
+		hidden: stopped || suspended,
 		disabled: stopped || suspended,
 		handler: function() {
 		    var msg = Proxmox.Utils.format_task_description('qmsuspend', vmid);
-- 
2.11.0




More information about the pve-devel mailing list