Skip to content

Commit ff58052

Browse files
author
Jessica Wang
committed
CLOUDSTACK-747: internal LB in VPC - internal LB detailView - add rules tab, assignedVMs tab.
1 parent 9e0733c commit ff58052

1 file changed

Lines changed: 46 additions & 3 deletions

File tree

‎ui/scripts/vpc.js‎

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,7 @@
482482
},
483483
dataType: 'json',
484484
async: true,
485-
success: function(data) {
486-
debugger;
485+
success: function(data) {
487486
var jid = data.assigntoloadbalancerruleresponse.jobid;
488487
args.response.success({
489488
_custom: { jobId: jid }
@@ -519,7 +518,51 @@
519518
}
520519
});
521520
}
522-
}
521+
},
522+
rules: {
523+
title: 'label.rules',
524+
multiple: true,
525+
fields: [
526+
{
527+
sourceport: { label: 'Source Port' },
528+
instanceport: { label: 'Instance Port' }
529+
}
530+
],
531+
dataProvider: function(args) {
532+
$.ajax({
533+
url: createURL('listLoadBalancers'),
534+
data: {
535+
id: args.context.internalLoadBalancers[0].id
536+
},
537+
success: function(json) {
538+
var item = json.listloadbalancerssresponse.loadbalancer[0];
539+
args.response.success({ data: item.loadbalancerrule });
540+
}
541+
});
542+
}
543+
} ,
544+
assignedVms: {
545+
title: 'Assigned VMs',
546+
multiple: true,
547+
fields: [
548+
{
549+
name: { label: 'label.name' },
550+
ipaddress: { label: 'label.ip.address' }
551+
}
552+
],
553+
dataProvider: function(args) {
554+
$.ajax({
555+
url: createURL('listLoadBalancers'),
556+
data: {
557+
id: args.context.internalLoadBalancers[0].id
558+
},
559+
success: function(json) {
560+
var item = json.listloadbalancerssresponse.loadbalancer[0];
561+
args.response.success({ data: item.loadbalancerinstance });
562+
}
563+
});
564+
}
565+
}
523566
}
524567
}
525568
}

0 commit comments

Comments
 (0)