mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-13 12:01:58 +00:00
ui: qemu: set correct disabled state for start button
If a guest's QEMU process is 'running', but QMP says 'shutdown' or 'prelaunch', the VM is ready to be booted anew, so we can show the button. The 'shutdown' button is intentionally not touched, as we always want to give the user the ability to 'stop' a VM (and thus kill any potentially leftover processes). Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
This commit is contained in:
parent
7828eef6f2
commit
6a073b92e9
@ -411,7 +411,10 @@ Ext.define('PVE.qemu.Config', {
|
||||
|
||||
statusTxt.update({ lock: lock });
|
||||
|
||||
startBtn.setDisabled(!caps.vms['VM.PowerMgmt'] || status === 'running' || template);
|
||||
let guest_running = status === 'running' &&
|
||||
!(qmpstatus === "shutdown" || qmpstatus === "prelaunch");
|
||||
startBtn.setDisabled(!caps.vms['VM.PowerMgmt'] || template || guest_running);
|
||||
|
||||
shutdownBtn.setDisabled(!caps.vms['VM.PowerMgmt'] || status !== 'running');
|
||||
me.down('#removeBtn').setDisabled(!caps.vms['VM.Allocate'] || status !== 'stopped');
|
||||
consoleBtn.setDisabled(template);
|
||||
|
Loading…
Reference in New Issue
Block a user