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 81949ec
Date Tue, 12 Nov 2013 23:34:19 GMT
Updated Branches:
  refs/heads/master f091b6ae1 -> 81949ec64


CLOUDSTACK-3980: UI > Regions > GSLB > detailView > implement Edit action.


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

Branch: refs/heads/master
Commit: 81949ec64489a0146c177abf78d2b5138076ac3e
Parents: f091b6a
Author: Jessica Wang <jessicawang@apache.org>
Authored: Tue Nov 12 15:31:16 2013 -0800
Committer: Jessica Wang <jessicawang@apache.org>
Committed: Tue Nov 12 15:34:10 2013 -0800

----------------------------------------------------------------------
 ui/scripts/regions.js | 50 ++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 46 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/81949ec6/ui/scripts/regions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/regions.js b/ui/scripts/regions.js
index 28f241c..ac573b7 100644
--- a/ui/scripts/regions.js
+++ b/ui/scripts/regions.js
@@ -475,8 +475,33 @@
                             path: 'regions.lbUnderGSLB',
                             label: 'assigned load balancing'
                         },
-                        actions: {
-                            remove: {
+                        actions: {                            
+                        	edit: {
+                                label: 'label.edit',
+                                action: function(args) {                                

+                                    var data = {
+                                    	id: args.context.GSLB[0].id,
+                                    	description: args.data.description,
+                                    	gslblbmethod: args.data.gslblbmethod
+                                    };                                    
+                                    $.ajax({
+                                        url: createURL('updateGlobalLoadBalancerRule'),
+                                        data: data,
+                                        success: function(json) {                       
                	
+                                            var jid = json.updategloballoadbalancerruleresponse.jobid;
                                          
+                                            args.response.success({
+                                                _custom: {
+                                                    jobId: jid
+                                                }
+                                            });                                         
  
+                                        }
+                                    });
+                                },                                
+                                notification: {
+                                    poll: pollAsyncJobResult
+                                }
+                            },                        	
+                        	remove: {
                                 label: 'delete GSLB',
                                 messages: {
                                     confirm: function(args) {
@@ -517,13 +542,30 @@
                                     }
                                 }, {
                                     description: {
-                                        label: 'label.description'
+                                        label: 'label.description',
+                                        isEditable: true
                                     },
                                     gslbdomainname: {
                                         label: 'GSLB Domain Name'
                                     },
                                     gslblbmethod: {
-                                        label: 'Algorithm'
+                                        label: 'Algorithm',
+                                        isEditable: true,
+                                        select: function(args) {
+                                            var array1 = [{
+                                                id: 'roundrobin',
+                                                description: 'roundrobin'
+                                            }, {
+                                                id: 'leastconn',
+                                                description: 'leastconn'
+                                            }, {
+                                                id: 'proximity',
+                                                description: 'proximity'
+                                            }];
+                                            args.response.success({
+                                                data: array1
+                                            });
+                                        }
                                     },
                                     gslbservicetype: {
                                         label: 'Service Type'


Mime
View raw message