From fb18ba9f0c12ff42a4db59075772ee2da13eb4b1 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Mon, 31 Jan 2011 11:32:39 -0800 Subject: [PATCH] Network page - External Firewall tab, External Load Balancer tab - API has changed to return individual properties instead of a single URL property. Here is related UI change. --- ui/jsp/network.jsp | 100 ++++++++++++++++++++++++++++--- ui/scripts/cloud.core.network.js | 21 +++++-- 2 files changed, 110 insertions(+), 11 deletions(-) diff --git a/ui/jsp/network.jsp b/ui/jsp/network.jsp index 0a30ce10dfc..fcd9495fbc0 100644 --- a/ui/jsp/network.jsp +++ b/ui/jsp/network.jsp @@ -496,19 +496,77 @@ dictionary = {
- - +
+
+
+ :
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
@@ -560,18 +618,46 @@ dictionary = { - +
+
+
+ :
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
diff --git a/ui/scripts/cloud.core.network.js b/ui/scripts/cloud.core.network.js index 1489e6cbe7b..f5ce7d0d296 100644 --- a/ui/scripts/cloud.core.network.js +++ b/ui/scripts/cloud.core.network.js @@ -283,6 +283,7 @@ function publicNetworkJsonToFirewallTab() { }); } +/* function publicNetworkParseUrl(url, $template) { if(url == null) return; @@ -319,13 +320,21 @@ function publicNetworkParseUrl(url, $template) { } } } +*/ function publicNetworkFirewallJsonToTemplate(jsonObj, $template) { $template.data("jsonObj", jsonObj); $template.attr("id", "publicNetworkFirewall_" + jsonObj.id); $template.find("#id").text(fromdb(jsonObj.id)); - publicNetworkParseUrl(jsonObj.url, $template); - + //publicNetworkParseUrl(jsonObj.url, $template); + $template.find("#ip").text(fromdb(jsonObj.ipaddress)); + $template.find("#username").text(fromdb(jsonObj.username)); + $template.find("#publicinterface").text(fromdb(jsonObj.publicinterface)); + $template.find("#privateinterface").text(fromdb(jsonObj.privateinterface)); + $template.find("#usageinterface").text(fromdb(jsonObj.usageinterface)); + $template.find("#publiczone").text(fromdb(jsonObj.publiczone)); + $template.find("#privatezone").text(fromdb(jsonObj.privatezone)); + var $actionLink = $template.find("#firewall_action_link"); $actionLink.bind("mouseover", function(event) { $(this).find("#firewall_action_menu").show(); @@ -395,8 +404,12 @@ function publicNetworkLoadBalancerJsonToTemplate(jsonObj, $template) { $template.find("#grid_header_title").text(fromdb(jsonObj.url)); $template.find("#id").text(fromdb(jsonObj.id)); - publicNetworkParseUrl(jsonObj.url, $template); - + //publicNetworkParseUrl(jsonObj.url, $template); + $template.find("#ip").text(fromdb(jsonObj.ipaddress)); + $template.find("#username").text(fromdb(jsonObj.username)); + $template.find("#publicinterface").text(fromdb(jsonObj.publicinterface)); + $template.find("#privateinterface").text(fromdb(jsonObj.privateinterface)); + var $actionLink = $template.find("#loadbalancer_action_link"); $actionLink.bind("mouseover", function(event) { $(this).find("#loadbalancer_action_menu").show();