mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-2120: mixed zone management - UI - system.js - remove obsolete code that has been replaced with new change in global function createURL().
This commit is contained in:
parent
996d2f5a2b
commit
60a8e881c1
@ -185,15 +185,8 @@
|
||||
dataProvider: function(args) {
|
||||
var dataFns = {
|
||||
zoneCount: function(data) {
|
||||
var data = {};
|
||||
if(cloudStack.context.zoneType != null && cloudStack.context.zoneType.length > 0) { //Basic type or Advanced type
|
||||
$.extend(data, {
|
||||
networktype: cloudStack.context.zoneType
|
||||
});
|
||||
}
|
||||
$.ajax({
|
||||
url: createURL('listZones'),
|
||||
data: data,
|
||||
success: function(json) {
|
||||
dataFns.podCount($.extend(data, {
|
||||
zoneCount: json.listzonesresponse.count ?
|
||||
@ -251,11 +244,6 @@
|
||||
page: 1,
|
||||
pagesize: 1 //specifying pagesize as 1 because we don't need any embedded objects to be returned here. The only thing we need from API response is "count" property.
|
||||
};
|
||||
if(cloudStack.context.zoneType != null && cloudStack.context.zoneType.length > 0) { //Basic type or Advanced type
|
||||
$.extend(data2, {
|
||||
zonetype: cloudStack.context.zoneType
|
||||
});
|
||||
}
|
||||
$.ajax({
|
||||
url: createURL('listHosts'),
|
||||
data: data2,
|
||||
@ -273,11 +261,6 @@
|
||||
page: 1,
|
||||
pagesize: 1 //specifying pagesize as 1 because we don't need any embedded objects to be returned here. The only thing we need from API response is "count" property.
|
||||
};
|
||||
if(cloudStack.context.zoneType != null && cloudStack.context.zoneType.length > 0) { //Basic type or Advanced type
|
||||
$.extend(data2, {
|
||||
zonetype: cloudStack.context.zoneType
|
||||
});
|
||||
}
|
||||
$.ajax({
|
||||
url: createURL('listStoragePools'),
|
||||
data: data2,
|
||||
@ -295,11 +278,6 @@
|
||||
page: 1,
|
||||
pagesize: 1 //specifying pagesize as 1 because we don't need any embedded objects to be returned here. The only thing we need from API response is "count" property.
|
||||
};
|
||||
if(cloudStack.context.zoneType != null && cloudStack.context.zoneType.length > 0) { //Basic type or Advanced type
|
||||
$.extend(data2, {
|
||||
zonetype: cloudStack.context.zoneType
|
||||
});
|
||||
}
|
||||
$.ajax({
|
||||
url: createURL('listHosts'),
|
||||
data: data2,
|
||||
@ -334,11 +312,6 @@
|
||||
page: 1,
|
||||
pagesize: 1 //specifying pagesize as 1 because we don't need any embedded objects to be returned here. The only thing we need from API response is "count" property.
|
||||
};
|
||||
if(cloudStack.context.zoneType != null && cloudStack.context.zoneType.length > 0) { //Basic type or Advanced type
|
||||
$.extend(data2, {
|
||||
zonetype: cloudStack.context.zoneType
|
||||
});
|
||||
}
|
||||
$.ajax({
|
||||
url: createURL('listRouters'),
|
||||
data: data2,
|
||||
@ -350,11 +323,6 @@
|
||||
page: 1,
|
||||
pagesize: 1 //specifying pagesize as 1 because we don't need any embedded objects to be returned here. The only thing we need from API response is "count" property.
|
||||
};
|
||||
if(cloudStack.context.zoneType != null && cloudStack.context.zoneType.length > 0) { //Basic type or Advanced type
|
||||
$.extend(data3, {
|
||||
zonetype: cloudStack.context.zoneType
|
||||
});
|
||||
}
|
||||
$.ajax({
|
||||
url: createURL('listRouters'),
|
||||
data: data3,
|
||||
@ -2333,11 +2301,6 @@
|
||||
var data2 = {
|
||||
forvpc: false
|
||||
};
|
||||
if(cloudStack.context.zoneType != null && cloudStack.context.zoneType.length > 0) { //Basic type or Advanced type
|
||||
$.extend(data2, {
|
||||
zonetype: cloudStack.context.zoneType
|
||||
});
|
||||
}
|
||||
var routers = [];
|
||||
$.ajax({
|
||||
url: createURL("listRouters&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
|
||||
@ -2818,11 +2781,6 @@
|
||||
var data2 = {
|
||||
forvpc: true
|
||||
};
|
||||
if(cloudStack.context.zoneType != null && cloudStack.context.zoneType.length > 0) { //Basic type or Advanced type
|
||||
$.extend(data2, {
|
||||
zonetype: cloudStack.context.zoneType
|
||||
});
|
||||
}
|
||||
var routers = [];
|
||||
$.ajax({
|
||||
url: createURL("listRouters&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
|
||||
@ -4709,11 +4667,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(args.context.zoneType != null && args.context.zoneType.length > 0) { //Basic type or Advanced type
|
||||
array1.push("&networktype=" + args.context.zoneType);
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: createURL("listZones&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
|
||||
dataType: "json",
|
||||
@ -5660,12 +5613,12 @@
|
||||
var searchByArgs = args.filterBy.search.value.length ?
|
||||
'&name=' + args.filterBy.search.value : '';
|
||||
|
||||
var data = { page: args.page, pageSize: pageSize, type: 'routing', listAll: true };
|
||||
if(args.context.zoneType != null && args.context.zoneType.length > 0) { //Basic type or Advanced type
|
||||
$.extend(data, {
|
||||
zonetype: args.context.zoneType
|
||||
});
|
||||
}
|
||||
var data = {
|
||||
page: args.page,
|
||||
pageSize: pageSize,
|
||||
type: 'routing',
|
||||
listAll: true
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: createURL('listHosts' + searchByArgs),
|
||||
@ -5714,11 +5667,7 @@
|
||||
pageSize: pageSize,
|
||||
listAll: true
|
||||
};
|
||||
if(args.context.zoneType != null && args.context.zoneType.length > 0) { //Basic type or Advanced type
|
||||
$.extend(data, {
|
||||
zonetype: args.context.zoneType
|
||||
});
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: createURL('listStoragePools' + searchByArgs),
|
||||
data: data,
|
||||
@ -5761,12 +5710,12 @@
|
||||
var searchByArgs = args.filterBy.search.value.length ?
|
||||
'&name=' + args.filterBy.search.value : '';
|
||||
|
||||
var data = { type: 'SecondaryStorage', page: args.page, pageSize: pageSize, listAll: true };
|
||||
if(args.context.zoneType != null && args.context.zoneType.length > 0) { //Basic type or Advanced type
|
||||
$.extend(data, {
|
||||
zonetype: args.context.zoneType
|
||||
});
|
||||
}
|
||||
var data = {
|
||||
type: 'SecondaryStorage',
|
||||
page: args.page,
|
||||
pageSize: pageSize,
|
||||
listAll: true
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
url: createURL('listHosts' + searchByArgs),
|
||||
@ -5852,16 +5801,9 @@
|
||||
var searchByArgs = args.filterBy.search.value.length ?
|
||||
'&name=' + args.filterBy.search.value : '';
|
||||
|
||||
var data2 = {};
|
||||
if(cloudStack.context.zoneType != null && cloudStack.context.zoneType.length > 0) { //Basic type or Advanced type
|
||||
$.extend(data2, {
|
||||
zonetype: cloudStack.context.zoneType
|
||||
});
|
||||
}
|
||||
var routers = [];
|
||||
$.ajax({
|
||||
url: createURL("listRouters&listAll=true&page=" + args.page + "&pagesize=" + pageSize + searchByArgs),
|
||||
data: data2,
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var items = json.listroutersresponse.router ?
|
||||
@ -5874,7 +5816,6 @@
|
||||
// Get project routers
|
||||
$.ajax({
|
||||
url: createURL("listRouters&listAll=true&page=" + args.page + "&pagesize=" + pageSize + "&projectid=-1"),
|
||||
data: data2,
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var items = json.listroutersresponse.router ?
|
||||
@ -5961,11 +5902,7 @@
|
||||
var data2 = {
|
||||
forvpc: false
|
||||
};
|
||||
if(cloudStack.context.zoneType != null && cloudStack.context.zoneType.length > 0) { //Basic type or Advanced type
|
||||
$.extend(data2, {
|
||||
zonetype: cloudStack.context.zoneType
|
||||
});
|
||||
}
|
||||
|
||||
var routers = [];
|
||||
$.ajax({
|
||||
url: createURL("listRouters&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
|
||||
@ -9210,10 +9147,6 @@
|
||||
array1.push("&hostid=" + args.context.instances[0].hostid);
|
||||
}
|
||||
|
||||
if(args.context.zoneType != null && args.context.zoneType.length > 0) { //Basic type or Advanced type
|
||||
array1.push("&zonetype=" + args.context.zoneType);
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: createURL("listHosts&type=Routing" + array1.join("") + "&page=" + args.page + "&pagesize=" + pageSize),
|
||||
dataType: "json",
|
||||
@ -10821,10 +10754,6 @@
|
||||
}
|
||||
array1.push("&zoneid=" + args.context.zones[0].id);
|
||||
|
||||
if(args.context.zoneType != null && args.context.zoneType.length > 0) { //Basic type or Advanced type
|
||||
array1.push("&zonetype=" + args.context.zoneType);
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: createURL("listHosts&type=SecondaryStorage&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
|
||||
dataType: "json",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user