cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: updated refs/heads/master to dac66d7
Date Wed, 21 Aug 2013 23:43:07 GMT
Updated Branches:
  refs/heads/master 96a17cc03 -> dac66d74d


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.


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

Branch: refs/heads/master
Commit: dac66d74df1fbc4976e520ea1f9b829b6aacb1d2
Parents: 96a17cc
Author: Jessica Wang <jessicawang@apache.org>
Authored: Wed Aug 21 16:29:14 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Wed Aug 21 16:42:29 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dac66d74/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