You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by we...@apache.org on 2013/11/29 11:18:36 UTC
[2/6] git commit: updated refs/heads/4.2 to 2fc1161
CLOUDSTACK-4428: UI > volume > take snapshot action, recurring snapshot action > for volumes whose hypervisor is KVM and whose VM is not Running, always show the 2 actions regardless value of "kvm.snapshot.enabled".
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/37866b4a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/37866b4a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/37866b4a
Branch: refs/heads/4.2
Commit: 37866b4a42edd38c9e6c673399249e9e1f228249
Parents: 562aa04
Author: Jessica Wang <je...@apache.org>
Authored: Tue Nov 26 15:04:08 2013 -0800
Committer: Wei Zhou <w....@leaseweb.com>
Committed: Fri Nov 29 11:17:50 2013 +0100
----------------------------------------------------------------------
ui/scripts/storage.js | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/37866b4a/ui/scripts/storage.js
----------------------------------------------------------------------
diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js
index 7aef3e9..ba78917 100644
--- a/ui/scripts/storage.js
+++ b/ui/scripts/storage.js
@@ -1866,14 +1866,15 @@
if (jsonObj.hypervisor != "Ovm" && jsonObj.state == "Ready") {
if (jsonObj.hypervisor == 'KVM') {
- if (g_KVMsnapshotenabled == true) {
+ if (json.vmstate == 'Running') {
+ if (g_KVMsnapshotenabled == true) { //"kvm.snapshot.enabled" flag should be taken to account only when snapshot is being created for Running vm (CLOUDSTACK-4428)
+ allowedActions.push("takeSnapshot");
+ allowedActions.push("recurringSnapshot");
+ }
+ } else {
allowedActions.push("takeSnapshot");
allowedActions.push("recurringSnapshot");
- } else {
- if(jsonObj.vmstate == 'Stopped' || jsonObj.virtualmachineid == undefined) { //volume of stopped VM, or detached volume
- allowedActions.push("takeSnapshot");
- }
- }
+ }
} else {
allowedActions.push("takeSnapshot");
allowedActions.push("recurringSnapshot");