You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pr...@apache.org on 2012/11/16 11:00:32 UTC

[39/50] 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.

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/52a9d0e6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/52a9d0e6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/52a9d0e6

Branch: refs/heads/master
Commit: 52a9d0e64b1892d273f14264d99c5a5323eedae8
Parents: a7508c1
Author: Jessica Wang <je...@citrix.com>
Authored: Fri Aug 10 13:53:22 2012 -0700
Committer: Vijay Venkatachalam <vi...@citrix.com>
Committed: Fri Nov 16 10:56:51 2012 +0530

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


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/52a9d0e6/ui/scripts/network.js
----------------------------------------------------------------------
diff --git a/ui/scripts/network.js b/ui/scripts/network.js
index ef9cfbe..192dda2 100644
--- a/ui/scripts/network.js
+++ b/ui/scripts/network.js
@@ -2697,8 +2697,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,