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 a4e61b7
Date Thu, 11 Apr 2013 19:41:10 GMT
Updated Branches:
  refs/heads/master 76d1ee54d -> a4e61b71c


CLOUDSTACK-1910: cloudstack UI - Regions menu - create GSLB - (1) pass gslbstickysessionmethodname
parameter to createGlobalLoadBalancerRule API. (2) Take async Job response.


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

Branch: refs/heads/master
Commit: a4e61b71cc32b68f15dafa36147033b9844df4eb
Parents: 76d1ee5
Author: Jessica Wang <jessica.wang@citrix.com>
Authored: Thu Apr 11 12:39:43 2013 -0700
Committer: Jessica Wang <jessica.wang@citrix.com>
Committed: Thu Apr 11 12:40:48 2013 -0700

----------------------------------------------------------------------
 ui/scripts/regions.js |   43 +++++++++++++++++++++++++------------------
 1 files changed, 25 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4e61b71/ui/scripts/regions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/regions.js b/ui/scripts/regions.js
index 129fc7a..10057a6 100644
--- a/ui/scripts/regions.js
+++ b/ui/scripts/regions.js
@@ -214,10 +214,10 @@
           id: 'GSLB',
           label: 'GSLB',
           fields: {
-            name: { label: 'label.name' }
-          },
-					
-					//???
+            name: { label: 'label.name' },
+						gslbdomainname: { label: 'GSLB Domain Name' },
+						gslblbmethod: { label: 'Algorithm' }
+          },										
 					actions: {
             add: {
               label: 'Add GSLB',
@@ -241,6 +241,7 @@
                   description: {
                     label: 'label.description'  
                   }, 
+									/*
 									domainid: {					
 										label: 'Domain',					
 										select: function(args) {
@@ -287,6 +288,7 @@
 												return true;
 										}			
 									},
+									*/
 									gslblbmethod: {					
 										label: 'Algorithm',					
 										select: function(args) {
@@ -297,7 +299,7 @@
 										}
 									},
 									gslbdomainname: {
-                    label: 'Domain Name',
+                    label: 'GSLB Domain Name',
                     validation: { required: true }										
                   }, 								
 									gslbservicetype: {					
@@ -317,38 +319,43 @@
 								  name: args.data.name,									
 									regionid: args.context.regions[0].id,
 									gslblbmethod: args.data.gslblbmethod,
+									gslbstickysessionmethodname: 'sourceip',
 									gslbdomainname: args.data.gslbdomainname,
 									gslbservicetype: args.data.gslbservicetype
 								};	
                 if(args.data.description != null && args.data.description.length
> 0)
-								  $.extend(data, { description: args.data.description });                  
+								  $.extend(data, { description: args.data.description });  
+                /*									
                 if(args.data.domainid != null && args.data.domainid.length > 0)
 								  $.extend(data, { domainid: args.data.domainid });  								  		
                 if(args.data.account != null && args.data.account.length > 0)
-								  $.extend(data, { account: args.data.account });                   											
-
+								  $.extend(data, { account: args.data.account });   
+								*/	
                 $.ajax({
                   url: createURL('createGlobalLoadBalancerRule'),
                   data: data,                 
-                  success: function(json) {									
-                    var item = json.creategloballoadbalancerruleresponse.globalloadbalancerrule;
-                    args.response.success({data: item});
-                  },
-                  error: function(data) {
-                    args.response.error(parseXMLHttpResponse(data));
+                  success: function(json) {		
+										var jid = json.creategloballoadbalancerruleresponse.jobid;
+										args.response.success(
+											{_custom:
+											 {jobId: jid,
+												getUpdatedItem: function(json) {												  
+													return json.queryasyncjobresultresponse.jobresult.globalloadbalancerrule;
+												}
+											 }
+											}
+										);										
                   }
                 });
               },
-
               notification: {
                 poll: function(args) {
-                  args.complete();
+                  poll: pollAsyncJobResult
                 }
               }
             }
           },
-					//???
-					
+										
           dataProvider: function(args) {
             if('regions' in args.context) {
               var data = {


Mime
View raw message