+
- Zone 1
+ <%=t.t("zone")%>
@@ -131,51 +131,11 @@
- Guest VLAN 1000 -1001
+ Guest VLAN
-
-
-
-
-
-
-
-
- VM Group:
-
VLAN 10
-
-
-
- IP:
-
10.101.24.231
-
-
-
-
-
-
-
-
-
-
-
-
-
- VM Group:
-
VLAN 10
-
-
-
- IP:
-
10.101.24.231
-
-
-
-
-
-
+
@@ -923,3 +883,47 @@
+
+
+
+
+
+
diff --git a/ui/new/scripts/cloud.core2.resource.js b/ui/new/scripts/cloud.core2.resource.js
index eacdbd856a0..2965af4c652 100644
--- a/ui/new/scripts/cloud.core2.resource.js
+++ b/ui/new/scripts/cloud.core2.resource.js
@@ -193,7 +193,8 @@ function afterLoadResourceJSP() {
target.parent().parent().parent().addClass("selected");
showPage($zonePage);
var jsonObj = target.data("jsonObj");
- zoneJsonToDetailsTab(jsonObj);
+ zoneJsonToDetailsTab(jsonObj);
+ zoneJsonToNetworkTab(jsonObj);
break;
@@ -317,6 +318,42 @@ function afterLoadResourceJSP() {
$detailsTab.find("#vlan").text(fromdb(jsonObj.vlan));
$detailsTab.find("#guestcidraddress").text(fromdb(jsonObj.guestcidraddress));
}
+
+ function zoneJsonToNetworkTab(jsonObj) {
+ var $networkTab = $zonePage.find("#tab_content_network");
+ $networkTab.find("#zone_cloud").find("#zone_name").text(jsonObj.name);
+ $networkTab.find("#zone_vlan").text(jsonObj.vlan);
+
+ $.ajax({
+ data: createURL("command=listVlanIpRanges&zoneId="+jsonObj.id),
+ dataType: "json",
+ success: function(json) {
+ var items = json.listvlaniprangesresponse.vlaniprange;
+ var $vlanContainer = $networkTab.find("#vlan_container").empty();
+ if (items != null && items.length > 0) {
+ for (var i = 0; i < items.length; i++) {
+ var item = items[i];
+
+ var $template1;
+ if(item.forvirtualnetwork == "false")
+ $template1 = $("#direct_vlan_template").clone();
+ else
+ $template1 = $("#virtual_vlan_template").clone();
+
+ vlanjsontotemplate(item, $template1);
+ $vlanContainer.append($template1.show());
+ }
+ }
+ }
+ });
+ }
+
+ function vlanjsontotemplate(jsonObj, $template1) {
+ $template1.data("jsonObj", jsonObj);
+ $template1.find("#vlan_id").text(jsonObj.vlan);
+ $template1.find("#ipaddress").text(jsonObj.description);
+ }
+
//***** zone page (end) *******************************************************************************************************
//***** pod page (begin) ******************************************************************************************************