Commit 72937a07 authored by Dietmar Maurer's avatar Dietmar Maurer

Display 'Resume' button when VM is 'paused'

parent db05e682
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 ...@@ -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', { ...@@ -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', { ...@@ -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', { ...@@ -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');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment