You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pr...@apache.org on 2013/05/28 09:59:26 UTC
[41/50] git commit: updated refs/heads/master to b03e419
CLOUDSTACK-747: UI - VPC tier - implement count of Public LB IP.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bc7d7e64
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bc7d7e64
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bc7d7e64
Branch: refs/heads/master
Commit: bc7d7e64c0f4cbcf3960b2387caa7cfff88e9c77
Parents: d515602
Author: Jessica Wang <je...@apache.org>
Authored: Thu May 23 11:39:27 2013 -0700
Committer: Jessica Wang <je...@apache.org>
Committed: Thu May 23 11:39:27 2013 -0700
----------------------------------------------------------------------
ui/scripts/vpc.js | 37 +++++++++++++++++++++++++------------
1 files changed, 25 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bc7d7e64/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index 923c510..ae3001a 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -582,10 +582,10 @@
}
}
},
- publicLoadBalancers: {
+ publicLbIps: {
title: 'Public LB',
listView: {
- id: 'publicLoadBalancers',
+ id: 'publicLbIps',
fields: {
ipaddress: { label: 'label.ip.address' },
type: { label: 'label.type' }
@@ -3268,7 +3268,7 @@
}
],
tiers: $(networks).map(function(index, tier) {
- var internalLoadBalancers, publicLoadBalancers, virtualMachines, staticNatIps;
+ var internalLoadBalancers, publicLbIps, virtualMachines, staticNatIps;
// Get internal load balancers
$.ajax({
@@ -3283,19 +3283,19 @@
}
});
- // Get VMs
+ // Get Public LB IPs
$.ajax({
- url: createURL('listVirtualMachines'),
+ url: createURL('listPublicIpAddresses'),
async: false,
- data: { networkid: tier.id },
+ data: { networkid: tier.id, forloadbalancing: true },
success: function(json) {
- virtualMachines = json.listvirtualmachinesresponse;
+ publicLbIps = json.listpublicipaddressesresponse;
},
error: function(json) {
error = true;
}
- });
-
+ });
+
// Get static NAT IPs
$.ajax({
url: createURL('listPublicIpAddresses'),
@@ -3309,6 +3309,19 @@
}
});
+ // Get VMs
+ $.ajax({
+ url: createURL('listVirtualMachines'),
+ async: false,
+ data: { networkid: tier.id },
+ success: function(json) {
+ virtualMachines = json.listvirtualmachinesresponse;
+ },
+ error: function(json) {
+ error = true;
+ }
+ });
+
return $.extend(tier, {
_dashboardItems: [
{
@@ -3317,9 +3330,9 @@
total: internalLoadBalancers.count
},
{
- id: 'publicLoadBalancers',
- name: 'Public LB',
- total: 0
+ id: 'publicLbIps',
+ name: 'Public LB IP',
+ total: publicLbIps.count
},
{
id: 'tierStaticNATs',