public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] fix #3470: ui: qemu/CmdMenu: fix confirm message for 'pause' cmd
@ 2021-06-16  6:01 Dominik Csapak
  2021-06-18 15:22 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2021-06-16  6:01 UTC (permalink / raw)
  To: pve-devel

while the command itself is 'suspend', the task description
is 'qmpause', so simply add a parameter and overwrite it for the pause
menu item

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

diff --git a/www/manager6/qemu/CmdMenu.js b/www/manager6/qemu/CmdMenu.js
index fa75ad82..ccc5f74d 100644
--- a/www/manager6/qemu/CmdMenu.js
+++ b/www/manager6/qemu/CmdMenu.js
@@ -21,8 +21,9 @@ Ext.define('PVE.qemu.CmdMenu', {
 		failure: (response, opts) => Ext.Msg.alert(gettext('Error'), response.htmlStatus),
 	    });
 	};
-	let confirmedVMCommand = (cmd, params) => {
-	    let msg = Proxmox.Utils.format_task_description(`qm${cmd}`, info.vmid);
+	let confirmedVMCommand = (cmd, params, confirmTask) => {
+	    let task = confirmTask || `qm${cmd}`;
+	    let msg = Proxmox.Utils.format_task_description(task, info.vmid);
 	    Ext.Msg.confirm(gettext('Confirm'), msg, btn => {
 		if (btn === 'yes') {
 		    vm_command(cmd, params);
@@ -65,7 +66,7 @@ Ext.define('PVE.qemu.CmdMenu', {
 		iconCls: 'fa fa-fw fa-pause',
 		hidden: stopped || suspended,
 		disabled: stopped || suspended,
-		handler: () => confirmedVMCommand('suspend'),
+		handler: () => confirmedVMCommand('suspend', undefined, 'qmpause'),
 	    },
 	    {
 		text: gettext('Hibernate'),
-- 
2.20.1





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-18 15:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16  6:01 [pve-devel] [PATCH manager] fix #3470: ui: qemu/CmdMenu: fix confirm message for 'pause' cmd Dominik Csapak
2021-06-18 15:22 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal