mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
CloudStack - pod page - network device tab - populate network devices to grid when this tab is clicked.
This commit is contained in:
parent
6fe9025c89
commit
b8468eab08
@ -201,33 +201,61 @@ function podJsonToNetworkDeviceTab() {
|
|||||||
podClearNetworkDeviceTab();
|
podClearNetworkDeviceTab();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
var $thisTab = $("#right_panel_content #tab_content_networkdevice");
|
||||||
var $thisTab = $("#right_panel_content #tab_content_network_device");
|
|
||||||
$thisTab.find("#tab_container").hide();
|
$thisTab.find("#tab_container").hide();
|
||||||
$thisTab.find("#tab_spinning_wheel").show();
|
$thisTab.find("#tab_spinning_wheel").show();
|
||||||
|
|
||||||
|
var $container = $thisTab.find("#tab_container").empty();
|
||||||
|
|
||||||
|
var array1 = [];
|
||||||
|
array1.push("&networkdeviceparameterlist[0].zoneid=" + fromdb(jsonObj.zoneid));
|
||||||
|
array1.push("&networkdeviceparameterlist[0].podid=" + fromdb(jsonObj.id));
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: createURL("command=listVlanIpRanges&zoneid="+fromdb(jsonObj.zoneid)+"&podid="+fromdb(jsonObj.id)),
|
data: createURL("command=listNetworkDevice&networkdevicetype=ExternalDhcp"+array1.join("")),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(json) {
|
async: false,
|
||||||
var items = json.listvlaniprangesresponse.vlaniprange;
|
success: function(json) {
|
||||||
var $container = $thisTab.find("#tab_container").empty();
|
var items = json.listnetworkdevice.NetworkDevice;
|
||||||
var template = $("#network_tab_template");
|
var template = $("#network_device_tab_template");
|
||||||
if (items != null && items.length > 0) {
|
if (items != null && items.length > 0) {
|
||||||
for (var i = 0; i < items.length; i++) {
|
for (var i = 0; i < items.length; i++) {
|
||||||
var newTemplate = template.clone(true);
|
var newTemplate = template.clone(true);
|
||||||
podNetworkJsonToTemplate(items[i], newTemplate);
|
podNetworkDeviceJsonToTemplate(items[i], newTemplate);
|
||||||
$container.append(newTemplate.show());
|
$container.append(newTemplate.show());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$thisTab.find("#tab_spinning_wheel").hide();
|
}
|
||||||
$thisTab.find("#tab_container").show();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
|
var array1 = [];
|
||||||
|
array1.push("&networkdeviceparameterlist[0].zoneid=" + fromdb(jsonObj.zoneid));
|
||||||
|
array1.push("&networkdeviceparameterlist[0].podid=" + fromdb(jsonObj.id));
|
||||||
|
$.ajax({
|
||||||
|
data: createURL("command=listNetworkDevice&networkdevicetype=PxeServer"+array1.join("")),
|
||||||
|
dataType: "json",
|
||||||
|
async: false,
|
||||||
|
success: function(json) {
|
||||||
|
var items = json.listnetworkdevice.NetworkDevice;
|
||||||
|
var template = $("#network_device_tab_template");
|
||||||
|
if (items != null && items.length > 0) {
|
||||||
|
for (var i = 0; i < items.length; i++) {
|
||||||
|
var newTemplate = template.clone(true);
|
||||||
|
podNetworkDeviceJsonToTemplate(items[i], newTemplate);
|
||||||
|
$container.append(newTemplate.show());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$thisTab.find("#tab_spinning_wheel").hide();
|
||||||
|
$thisTab.find("#tab_container").show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function listNetworkDeviceByType() {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function podClearNetworkTab() {
|
function podClearNetworkTab() {
|
||||||
var $thisTab = $("#right_panel_content #tab_content_ipallocation");
|
var $thisTab = $("#right_panel_content #tab_content_ipallocation");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user