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 2012/08/10 23:07:44 UTC

git commit: cloudstack 3.0 UI - autoscale - LB rules - (1) hide AddVMs button on LB rules created by Autoscale. (2) hide Autoscale button on LB rules created by AddVMs.

Updated Branches:
  refs/heads/autoscale 47939c42b -> 7495b22aa


cloudstack 3.0 UI - autoscale - LB rules - (1) hide AddVMs button on LB rules created by Autoscale. (2) hide Autoscale button on LB rules created by AddVMs.


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

Branch: refs/heads/autoscale
Commit: 7495b22aa5ea75e616330985b4fe5d4a7e6ddcd1
Parents: 47939c4
Author: Jessica Wang <je...@citrix.com>
Authored: Fri Aug 10 13:53:22 2012 -0700
Committer: Jessica Wang <je...@citrix.com>
Committed: Fri Aug 10 14:07:07 2012 -0700

----------------------------------------------------------------------
 ui/scripts/network.js |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7495b22a/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index 2b78a65..afba211 100644
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -2288,8 +2288,26 @@
 
                             // Passing _hideFields array will disable specified fields for this row
                             //item._hideFields = ['autoScale'];
-
-                            // Get sticky data
+                            
+														$.ajax({
+															url: createURL('listAutoScaleVmGroups'),
+															data: {
+																listAll: true,
+																lbruleid: item.id
+															},	
+                              async: false,															
+															success: function(json) {			
+															  //debugger;
+                                if(json.listautoscalevmgroupsresponse.autoscalevmgroup != null && json.listautoscalevmgroupsresponse.autoscalevmgroup.length > 0) { //from 'autoScale' button
+																  item._hideFields = ['add-vm'];
+																}
+																else { //from 'add-vm' button
+																  item._hideFields = ['autoScale'];
+																} 
+															}
+														});
+																												
+														// Get sticky data
                             $.ajax({
                               url: createURL('listLBStickinessPolicies'),
                               async: false,