Skip to content

Commit 81949ec

Browse files
author
Jessica Wang
committed
CLOUDSTACK-3980: UI > Regions > GSLB > detailView > implement Edit action.
1 parent f091b6a commit 81949ec

1 file changed

Lines changed: 46 additions & 4 deletions

File tree

ui/scripts/regions.js

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,33 @@
475475
path: 'regions.lbUnderGSLB',
476476
label: 'assigned load balancing'
477477
},
478-
actions: {
479-
remove: {
478+
actions: {
479+
edit: {
480+
label: 'label.edit',
481+
action: function(args) {
482+
var data = {
483+
id: args.context.GSLB[0].id,
484+
description: args.data.description,
485+
gslblbmethod: args.data.gslblbmethod
486+
};
487+
$.ajax({
488+
url: createURL('updateGlobalLoadBalancerRule'),
489+
data: data,
490+
success: function(json) {
491+
var jid = json.updategloballoadbalancerruleresponse.jobid;
492+
args.response.success({
493+
_custom: {
494+
jobId: jid
495+
}
496+
});
497+
}
498+
});
499+
},
500+
notification: {
501+
poll: pollAsyncJobResult
502+
}
503+
},
504+
remove: {
480505
label: 'delete GSLB',
481506
messages: {
482507
confirm: function(args) {
@@ -517,13 +542,30 @@
517542
}
518543
}, {
519544
description: {
520-
label: 'label.description'
545+
label: 'label.description',
546+
isEditable: true
521547
},
522548
gslbdomainname: {
523549
label: 'GSLB Domain Name'
524550
},
525551
gslblbmethod: {
526-
label: 'Algorithm'
552+
label: 'Algorithm',
553+
isEditable: true,
554+
select: function(args) {
555+
var array1 = [{
556+
id: 'roundrobin',
557+
description: 'roundrobin'
558+
}, {
559+
id: 'leastconn',
560+
description: 'leastconn'
561+
}, {
562+
id: 'proximity',
563+
description: 'proximity'
564+
}];
565+
args.response.success({
566+
data: array1
567+
});
568+
}
527569
},
528570
gslbservicetype: {
529571
label: 'Service Type'

0 commit comments

Comments
 (0)