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) {
|
dataProvider: function(args) {
|
||||||
var dataFns = {
|
var dataFns = {
|
||||||
zoneCount: function(data) {
|
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({
|
$.ajax({
|
||||||
url: createURL('listZones'),
|
url: createURL('listZones'),
|
||||||
data: data,
|
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
dataFns.podCount($.extend(data, {
|
dataFns.podCount($.extend(data, {
|
||||||
zoneCount: json.listzonesresponse.count ?
|
zoneCount: json.listzonesresponse.count ?
|
||||||
@ -251,11 +244,6 @@
|
|||||||
page: 1,
|
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.
|
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({
|
$.ajax({
|
||||||
url: createURL('listHosts'),
|
url: createURL('listHosts'),
|
||||||
data: data2,
|
data: data2,
|
||||||
@ -273,11 +261,6 @@
|
|||||||
page: 1,
|
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.
|
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({
|
$.ajax({
|
||||||
url: createURL('listStoragePools'),
|
url: createURL('listStoragePools'),
|
||||||
data: data2,
|
data: data2,
|
||||||
@ -295,11 +278,6 @@
|
|||||||
page: 1,
|
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.
|
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({
|
$.ajax({
|
||||||
url: createURL('listHosts'),
|
url: createURL('listHosts'),
|
||||||
data: data2,
|
data: data2,
|
||||||
@ -334,11 +312,6 @@
|
|||||||
page: 1,
|
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.
|
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({
|
$.ajax({
|
||||||
url: createURL('listRouters'),
|
url: createURL('listRouters'),
|
||||||
data: data2,
|
data: data2,
|
||||||
@ -350,11 +323,6 @@
|
|||||||
page: 1,
|
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.
|
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({
|
$.ajax({
|
||||||
url: createURL('listRouters'),
|
url: createURL('listRouters'),
|
||||||
data: data3,
|
data: data3,
|
||||||
@ -2333,11 +2301,6 @@
|
|||||||
var data2 = {
|
var data2 = {
|
||||||
forvpc: false
|
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 = [];
|
var routers = [];
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL("listRouters&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
|
url: createURL("listRouters&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
|
||||||
@ -2818,11 +2781,6 @@
|
|||||||
var data2 = {
|
var data2 = {
|
||||||
forvpc: true
|
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 = [];
|
var routers = [];
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL("listRouters&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
|
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({
|
$.ajax({
|
||||||
url: createURL("listZones&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
|
url: createURL("listZones&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
@ -5660,12 +5613,12 @@
|
|||||||
var searchByArgs = args.filterBy.search.value.length ?
|
var searchByArgs = args.filterBy.search.value.length ?
|
||||||
'&name=' + args.filterBy.search.value : '';
|
'&name=' + args.filterBy.search.value : '';
|
||||||
|
|
||||||
var data = { page: args.page, pageSize: pageSize, type: 'routing', listAll: true };
|
var data = {
|
||||||
if(args.context.zoneType != null && args.context.zoneType.length > 0) { //Basic type or Advanced type
|
page: args.page,
|
||||||
$.extend(data, {
|
pageSize: pageSize,
|
||||||
zonetype: args.context.zoneType
|
type: 'routing',
|
||||||
});
|
listAll: true
|
||||||
}
|
};
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL('listHosts' + searchByArgs),
|
url: createURL('listHosts' + searchByArgs),
|
||||||
@ -5714,11 +5667,7 @@
|
|||||||
pageSize: pageSize,
|
pageSize: pageSize,
|
||||||
listAll: true
|
listAll: true
|
||||||
};
|
};
|
||||||
if(args.context.zoneType != null && args.context.zoneType.length > 0) { //Basic type or Advanced type
|
|
||||||
$.extend(data, {
|
|
||||||
zonetype: args.context.zoneType
|
|
||||||
});
|
|
||||||
}
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL('listStoragePools' + searchByArgs),
|
url: createURL('listStoragePools' + searchByArgs),
|
||||||
data: data,
|
data: data,
|
||||||
@ -5761,12 +5710,12 @@
|
|||||||
var searchByArgs = args.filterBy.search.value.length ?
|
var searchByArgs = args.filterBy.search.value.length ?
|
||||||
'&name=' + args.filterBy.search.value : '';
|
'&name=' + args.filterBy.search.value : '';
|
||||||
|
|
||||||
var data = { type: 'SecondaryStorage', page: args.page, pageSize: pageSize, listAll: true };
|
var data = {
|
||||||
if(args.context.zoneType != null && args.context.zoneType.length > 0) { //Basic type or Advanced type
|
type: 'SecondaryStorage',
|
||||||
$.extend(data, {
|
page: args.page,
|
||||||
zonetype: args.context.zoneType
|
pageSize: pageSize,
|
||||||
});
|
listAll: true
|
||||||
}
|
};
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL('listHosts' + searchByArgs),
|
url: createURL('listHosts' + searchByArgs),
|
||||||
@ -5852,16 +5801,9 @@
|
|||||||
var searchByArgs = args.filterBy.search.value.length ?
|
var searchByArgs = args.filterBy.search.value.length ?
|
||||||
'&name=' + args.filterBy.search.value : '';
|
'&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 = [];
|
var routers = [];
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL("listRouters&listAll=true&page=" + args.page + "&pagesize=" + pageSize + searchByArgs),
|
url: createURL("listRouters&listAll=true&page=" + args.page + "&pagesize=" + pageSize + searchByArgs),
|
||||||
data: data2,
|
|
||||||
async: true,
|
async: true,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
var items = json.listroutersresponse.router ?
|
var items = json.listroutersresponse.router ?
|
||||||
@ -5874,7 +5816,6 @@
|
|||||||
// Get project routers
|
// Get project routers
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL("listRouters&listAll=true&page=" + args.page + "&pagesize=" + pageSize + "&projectid=-1"),
|
url: createURL("listRouters&listAll=true&page=" + args.page + "&pagesize=" + pageSize + "&projectid=-1"),
|
||||||
data: data2,
|
|
||||||
async: true,
|
async: true,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
var items = json.listroutersresponse.router ?
|
var items = json.listroutersresponse.router ?
|
||||||
@ -5961,11 +5902,7 @@
|
|||||||
var data2 = {
|
var data2 = {
|
||||||
forvpc: false
|
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 = [];
|
var routers = [];
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL("listRouters&zoneid=" + selectedZoneObj.id + "&listAll=true&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
|
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);
|
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({
|
$.ajax({
|
||||||
url: createURL("listHosts&type=Routing" + array1.join("") + "&page=" + args.page + "&pagesize=" + pageSize),
|
url: createURL("listHosts&type=Routing" + array1.join("") + "&page=" + args.page + "&pagesize=" + pageSize),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
@ -10821,10 +10754,6 @@
|
|||||||
}
|
}
|
||||||
array1.push("&zoneid=" + args.context.zones[0].id);
|
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({
|
$.ajax({
|
||||||
url: createURL("listHosts&type=SecondaryStorage&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
|
url: createURL("listHosts&type=SecondaryStorage&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user