You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by je...@apache.org on 2013/05/22 22:19:08 UTC
git commit: updated refs/heads/ui-vpc-redesign to ff58052
Updated Branches:
refs/heads/ui-vpc-redesign 9e0733c83 -> ff58052d2
CLOUDSTACK-747: internal LB in VPC - internal LB detailView - add rules tab, assignedVMs tab.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ff58052d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ff58052d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ff58052d
Branch: refs/heads/ui-vpc-redesign
Commit: ff58052d2cd5f2ed821bef04c18960ef0d18fac2
Parents: 9e0733c
Author: Jessica Wang <je...@apache.org>
Authored: Wed May 22 13:18:24 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Wed May 22 13:18:53 2013 -0700
----------------------------------------------------------------------
ui/scripts/vpc.js | 49 +++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 46 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ff58052d/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index fe3ce13..5c2f026 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -482,8 +482,7 @@
},
dataType: 'json',
async: true,
- success: function(data) {
- debugger;
+ success: function(data) {
var jid = data.assigntoloadbalancerruleresponse.jobid;
args.response.success({
_custom: { jobId: jid }
@@ -519,7 +518,51 @@
}
});
}
- }
+ },
+ rules: {
+ title: 'label.rules',
+ multiple: true,
+ fields: [
+ {
+ sourceport: { label: 'Source Port' },
+ instanceport: { label: 'Instance Port' }
+ }
+ ],
+ dataProvider: function(args) {
+ $.ajax({
+ url: createURL('listLoadBalancers'),
+ data: {
+ id: args.context.internalLoadBalancers[0].id
+ },
+ success: function(json) {
+ var item = json.listloadbalancerssresponse.loadbalancer[0];
+ args.response.success({ data: item.loadbalancerrule });
+ }
+ });
+ }
+ } ,
+ assignedVms: {
+ title: 'Assigned VMs',
+ multiple: true,
+ fields: [
+ {
+ name: { label: 'label.name' },
+ ipaddress: { label: 'label.ip.address' }
+ }
+ ],
+ dataProvider: function(args) {
+ $.ajax({
+ url: createURL('listLoadBalancers'),
+ data: {
+ id: args.context.internalLoadBalancers[0].id
+ },
+ success: function(json) {
+ var item = json.listloadbalancerssresponse.loadbalancer[0];
+ args.response.success({ data: item.loadbalancerinstance });
+ }
+ });
+ }
+ }
}
}
}