You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2014/09/10 00:19:10 UTC

git commit: updated refs/heads/master to 07c9c02

Repository: cloudstack
Updated Branches:
  refs/heads/master 9b65759f3 -> 07c9c0278


CLOUDSTACK-7261: related UI change after lsitSystemVMs/listRouters API were fixed to return hypervisor property while state is running.


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

Branch: refs/heads/master
Commit: 07c9c02789ac1aeb79b7ca79140e3fff1e0bc956
Parents: 9b65759
Author: Jessica Wang <je...@apache.org>
Authored: Tue Sep 9 15:18:49 2014 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Tue Sep 9 15:18:58 2014 -0700

----------------------------------------------------------------------
 ui/scripts/system.js | 32 ++++++++++++++------------------
 1 file changed, 14 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/07c9c027/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index cf3b9dc..ed53fd2 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -20510,15 +20510,11 @@
         
         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");
+                        
+            //when router is Running, only XenServer, VMware support scaleUp(change service offering)
+            if (jsonObj.hypervisor == 'XenServer' || jsonObj.hypervisor == "VMware") {
+                allowedActions.push("scaleUp");
+            }                         
             
             allowedActions.push("restart");
             
@@ -20527,8 +20523,10 @@
             allowedActions.push("migrate");
         } else if (jsonObj.state == 'Stopped') {
             allowedActions.push("start");
+            
+            //when router is Stopped, all hypervisors support scaleUp(change service offering)
             allowedActions.push("scaleUp");
-            //when vm is stopped, scaleUp is supported for all hypervisors
+                        
             allowedActions.push("remove");
         }
         return allowedActions;
@@ -20559,22 +20557,20 @@
             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");
+            //when systemvm is Running, only XenServer, VMware support scaleUp(change service offering)
+            if (jsonObj.hypervisor == 'XenServer' ||jsonObj.hypervisor == "VMware") {
+                allowedActions.push("scaleUp");
             }
-             */
-            allowedActions.push("scaleUp");
             
             allowedActions.push("viewConsole");
             if (isAdmin())
             allowedActions.push("migrate");
         } else if (jsonObj.state == 'Stopped') {
             allowedActions.push("start");
+            
+            //when systemvm is Stopped, all hypervisors support scaleUp(change service offering)
             allowedActions.push("scaleUp");
-            //when vm is stopped, scaleUp is supported for all hypervisors
+            
             allowedActions.push("remove");
         } else if (jsonObj.state == 'Error') {
             allowedActions.push("remove");