mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-07 04:24:07 +00:00
Display 'Resume' button when VM is 'paused'
This commit is contained in:
parent
4388ec5cb5
commit
2a29deac1f
6
debian/changelog.Debian
vendored
6
debian/changelog.Debian
vendored
@ -1,3 +1,9 @@
|
|||||||
|
pve-manager (2.3-5) unstable; urgency=low
|
||||||
|
|
||||||
|
* Display 'Resume' button when VM is 'paused'
|
||||||
|
|
||||||
|
-- Proxmox Support Team <support@proxmox.com> Fri, 18 Jan 2013 06:23:06 +0100
|
||||||
|
|
||||||
pve-manager (2.3-4) unstable; urgency=low
|
pve-manager (2.3-4) unstable; urgency=low
|
||||||
|
|
||||||
* add balloon GUI (dynamic memory)
|
* add balloon GUI (dynamic memory)
|
||||||
|
@ -2,7 +2,7 @@ RELEASE=2.3
|
|||||||
|
|
||||||
VERSION=2.3
|
VERSION=2.3
|
||||||
PACKAGE=pve-manager
|
PACKAGE=pve-manager
|
||||||
PACKAGERELEASE=4
|
PACKAGERELEASE=5
|
||||||
|
|
||||||
BINDIR=${DESTDIR}/usr/bin
|
BINDIR=${DESTDIR}/usr/bin
|
||||||
PERLLIBDIR=${DESTDIR}/usr/share/perl5
|
PERLLIBDIR=${DESTDIR}/usr/share/perl5
|
||||||
|
@ -34,7 +34,16 @@ Ext.define('PVE.qemu.Config', {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var startBtn = Ext.create('Ext.Button', {
|
var resumeBtn = Ext.create('Ext.Button', {
|
||||||
|
text: gettext('Resume'),
|
||||||
|
disabled: !caps.vms['VM.PowerMgmt'],
|
||||||
|
visible: false,
|
||||||
|
handler: function() {
|
||||||
|
vm_command('resume');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var startBtn = Ext.create('Ext.Button', {
|
||||||
text: gettext('Start'),
|
text: gettext('Start'),
|
||||||
disabled: !caps.vms['VM.PowerMgmt'],
|
disabled: !caps.vms['VM.PowerMgmt'],
|
||||||
handler: function() {
|
handler: function() {
|
||||||
@ -114,7 +123,7 @@ Ext.define('PVE.qemu.Config', {
|
|||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
title: Ext.String.format(gettext("Virtual Machine {0} on node {1}"), descr, "'" + nodename + "'"),
|
title: Ext.String.format(gettext("Virtual Machine {0} on node {1}"), descr, "'" + nodename + "'"),
|
||||||
hstateid: 'kvmtab',
|
hstateid: 'kvmtab',
|
||||||
tbar: [ startBtn, shutdownBtn, stopBtn, resetBtn,
|
tbar: [ resumeBtn, startBtn, shutdownBtn, stopBtn, resetBtn,
|
||||||
removeBtn, migrateBtn, consoleBtn ],
|
removeBtn, migrateBtn, consoleBtn ],
|
||||||
defaults: { statusStore: me.statusStore },
|
defaults: { statusStore: me.statusStore },
|
||||||
items: [
|
items: [
|
||||||
@ -173,12 +182,24 @@ Ext.define('PVE.qemu.Config', {
|
|||||||
|
|
||||||
me.statusStore.on('load', function(s, records, success) {
|
me.statusStore.on('load', function(s, records, success) {
|
||||||
var status;
|
var status;
|
||||||
|
var qmpstatus;
|
||||||
|
|
||||||
if (!success) {
|
if (!success) {
|
||||||
me.workspace.checkVmMigration(me.pveSelNode);
|
me.workspace.checkVmMigration(me.pveSelNode);
|
||||||
status = 'unknown';
|
status = qmpstatus = 'unknown';
|
||||||
} else {
|
} else {
|
||||||
var rec = s.data.get('status');
|
var rec = s.data.get('status');
|
||||||
status = rec ? rec.data.value : 'unknown';
|
status = rec ? rec.data.value : 'unknown';
|
||||||
|
rec = s.data.get('qmpstatus');
|
||||||
|
qmpstatus = rec ? rec.data.value : 'unknown';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (qmpstatus === 'prelaunch' || qmpstatus === 'paused') {
|
||||||
|
startBtn.setVisible(false);
|
||||||
|
resumeBtn.setVisible(true)
|
||||||
|
} else {
|
||||||
|
startBtn.setVisible(true);
|
||||||
|
resumeBtn.setVisible(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
startBtn.setDisabled(!caps.vms['VM.PowerMgmt'] || status === 'running');
|
startBtn.setDisabled(!caps.vms['VM.PowerMgmt'] || status === 'running');
|
||||||
|
Loading…
Reference in New Issue
Block a user