cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anim...@apache.org
Subject [2/2] git commit: updated refs/heads/4.2 to 261c86a
Date Thu, 22 Aug 2013 06:46:39 GMT
CLOUDSTACK-4428: UI > volume > when hypervisor is KVM and kvm.snapshot.enabled configuration
is false, still show Take Snapshot option if VM State is Stopped.
(cherry picked from commit 57070b1dc2cc725b5cdab516eee6a935165e1f12)

Signed-off-by: animesh <animesh@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/261c86a3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/261c86a3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/261c86a3

Branch: refs/heads/4.2
Commit: 261c86a390469652c8177e92c6707ee24f3fa77f
Parents: 5d90c60
Author: Jessica Wang <jessicawang@apache.org>
Authored: Wed Aug 21 16:29:14 2013 -0700
Committer: animesh <animesh@apache.org>
Committed: Wed Aug 21 23:38:39 2013 -0700

----------------------------------------------------------------------
 ui/scripts/storage.js | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/261c86a3/ui/scripts/storage.js
----------------------------------------------------------------------
diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js
index a4d00c6..ec63e15 100644
--- a/ui/scripts/storage.js
+++ b/ui/scripts/storage.js
@@ -1864,13 +1864,21 @@
             return ["remove"];
         }
 
-        if (jsonObj.hypervisor != "Ovm" && jsonObj.state == "Ready") {
-        	if(jsonObj.hypervisor != 'KVM' 
-        		|| (jsonObj.hypervisor == 'KVM' && g_KVMsnapshotenabled == true) ) {
-	            allowedActions.push("takeSnapshot");
+        if (jsonObj.hypervisor != "Ovm" && jsonObj.state == "Ready") {        	
+        	if (jsonObj.hypervisor == 'KVM') { 
+        		if (g_KVMsnapshotenabled == true) {
+        			allowedActions.push("takeSnapshot");
+    	            allowedActions.push("recurringSnapshot");
+        		} else {        			
+        			if(jsonObj.vmstate == 'Stopped') {
+        				allowedActions.push("takeSnapshot");
+        			}
+        		}
+        	} else {
+        		allowedActions.push("takeSnapshot");
 	            allowedActions.push("recurringSnapshot");
-        	}            
-            
+        	}
+        	            
             if (jsonObj.type == "DATADISK") {
                 allowedActions.push("resize");
             }


Mime
View raw message