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 9807f86
Date Thu, 08 Aug 2013 17:36:06 GMT
Updated Branches:
  refs/heads/master 5f2f5181e -> 9807f8661


CLOUDSTACK-4102: UI > Intances menu > when user VM is running, hide scaleUp action if
hypervisor is KVM.


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

Branch: refs/heads/master
Commit: 9807f866190e3d33ccc101d0720ca470e003d0b8
Parents: 5f2f518
Author: Jessica Wang <jessicawang@apache.org>
Authored: Thu Aug 8 10:25:09 2013 -0700
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Thu Aug 8 10:35:56 2013 -0700

----------------------------------------------------------------------
 ui/scripts/instances.js |  8 ++++++--
 ui/scripts/system.js    | 23 ++++++++++++++++++++---
 2 files changed, 26 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9807f866/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index d3c333e..b98452b 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -1861,7 +1861,11 @@
             allowedActions.push("snapshot");
             allowedActions.push("destroy");            
             allowedActions.push("reset");
-            allowedActions.push("scaleUp");
+             
+            //when userVm is running, scaleUp is not supported for KVM
+            if (jsonObj.hypervisor != 'KVM') {
+            	allowedActions.push("scaleUp");
+            }              
 
             if (isAdmin())
                 allowedActions.push("migrate");
@@ -1884,7 +1888,7 @@
             allowedActions.push("destroy");
             allowedActions.push("reset");
             allowedActions.push("snapshot");
-            allowedActions.push("scaleUp");
+            allowedActions.push("scaleUp");  //when vm is stopped, scaleUp is supported for
all hypervisors 
             allowedActions.push("changeAffinity");
 
             if (isAdmin())

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9807f866/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 87fa463..9eac340 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -16101,8 +16101,16 @@
 
         if (jsonObj.state == 'Running') {
             allowedActions.push("stop");
+            
+            //when systemVm is running, scaleUp is not supported for KVM and XenServer.
+            //however, listRouters API doesn't return hypervisor property....
+            /*
+            if (jsonObj.hypervisor != 'KVM' && jsonObj.hypervisor != 'XenServer')
{
+            	allowedActions.push("scaleUp");
+            }  
+            */
             allowedActions.push("scaleUp");
-            //	if(jsonObj.vpcid != null)
+            
             allowedActions.push("restart");
 
             allowedActions.push("viewConsole");
@@ -16110,7 +16118,7 @@
                 allowedActions.push("migrate");
         } else if (jsonObj.state == 'Stopped') {
             allowedActions.push("start");
-            allowedActions.push("scaleUp");
+            allowedActions.push("scaleUp");  //when vm is stopped, scaleUp is supported for
all hypervisors 
             allowedActions.push("remove");
         }
         return allowedActions;
@@ -16140,13 +16148,22 @@
             allowedActions.push("stop");
             allowedActions.push("restart");
             allowedActions.push("remove");
+            
+            //when systemVm is running, scaleUp is not supported for KVM and XenServer. 
          
+            //however, listSystemVms API doesn't return hypervisor property....
+            /*
+            if (jsonObj.hypervisor != 'KVM' && jsonObj.hypervisor != 'XenServer')
{
+            	allowedActions.push("scaleUp");
+            }  
+            */
             allowedActions.push("scaleUp");
+            
             allowedActions.push("viewConsole");
             if (isAdmin())
                 allowedActions.push("migrate");
         } else if (jsonObj.state == 'Stopped') {
             allowedActions.push("start");
-            allowedActions.push("scaleUp");            
+            allowedActions.push("scaleUp");  //when vm is stopped, scaleUp is supported for
all hypervisors           
             allowedActions.push("remove");
         } else if (jsonObj.state == 'Error') {
             allowedActions.push("remove");


Mime
View raw message