[pve-devel] [PATCH manager 3/4] Hide 'Include RAM' when VM isn't running
Fabian Ebner
f.ebner at proxmox.com
Thu Feb 6 13:26:36 CET 2020
Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
www/manager6/tree/SnapshotTree.js | 3 +++
www/manager6/window/Snapshot.js | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/www/manager6/tree/SnapshotTree.js b/www/manager6/tree/SnapshotTree.js
index 0636ef68..7b5ac3ed 100644
--- a/www/manager6/tree/SnapshotTree.js
+++ b/www/manager6/tree/SnapshotTree.js
@@ -14,6 +14,7 @@ Ext.define('PVE.guest.SnapshotTree', {
snapshotAllowed: false,
rollbackAllowed: false,
snapshotFeature: false,
+ running: false,
selected: '',
load_delay: 3000,
},
@@ -54,6 +55,7 @@ Ext.define('PVE.guest.SnapshotTree', {
isCreate: !edit,
submitText: !edit ? gettext('Take Snapshot') : undefined,
snapname: snapname,
+ running: vm.get('running'),
});
win.show();
me.mon(win, 'destroy', me.reload, me);
@@ -129,6 +131,7 @@ Ext.define('PVE.guest.SnapshotTree', {
item.leaf = true;
item.children = [];
if (item.name === 'current') {
+ vm.set('running', !!item.running);
digest = item.digest + item.running;
item.iconCls = PVE.Utils.get_object_icon_class(vm.get('type'), item);
} else {
diff --git a/www/manager6/window/Snapshot.js b/www/manager6/window/Snapshot.js
index e4355106..1a08637f 100644
--- a/www/manager6/window/Snapshot.js
+++ b/www/manager6/window/Snapshot.js
@@ -45,8 +45,8 @@ Ext.define('PVE.window.Snapshot', {
},
{
xtype: 'proxmoxcheckbox',
- hidden: me.type !== 'qemu' || !me.isCreate,
- disabled: me.type !== 'qemu' || !me.isCreate,
+ hidden: me.type !== 'qemu' || !me.isCreate || !me.running,
+ disabled: me.type !== 'qemu' || !me.isCreate || !me.running,
name: 'vmstate',
uncheckedValue: 0,
defaultValue: 0,
--
2.20.1
More information about the pve-devel
mailing list