mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-2351: object store - UI - cloudstack.js - replace listS3s, listSwiftsAPI with new API listImageStores.
This commit is contained in:
parent
d9733e900d
commit
e0fa8e1e93
@ -186,22 +186,26 @@
|
||||
|
||||
if (userValid && isAdmin()) {
|
||||
$.ajax({
|
||||
url: createURL("listSwifts"),
|
||||
dataType: "json",
|
||||
url: createURL("listImageStores"),
|
||||
data: {
|
||||
provider: 'Swift'
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var items = json.listswiftsresponse.swift;
|
||||
var items = json.listimagestoreresponse.imagestore;
|
||||
if(items != null && items.length > 0)
|
||||
havingSwift = true;
|
||||
}
|
||||
});
|
||||
if (havingSwift == false) {
|
||||
$.ajax({
|
||||
url: createURL("listS3s"),
|
||||
dataType: "json",
|
||||
url: createURL("listImageStores"),
|
||||
data: {
|
||||
provider: 'S3'
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var items = json.lists3sresponse.s3;
|
||||
var items = json.listimagestoreresponse.imagestore;
|
||||
if (items != null && items.length > 0) {
|
||||
havingS3 = true;
|
||||
}
|
||||
@ -328,22 +332,26 @@
|
||||
|
||||
if (isAdmin()) {
|
||||
$.ajax({
|
||||
url: createURL("listSwifts"),
|
||||
dataType: "json",
|
||||
url: createURL("listImageStores"),
|
||||
data:{
|
||||
provider: 'Swift'
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var items = json.listswiftsresponse.swift;
|
||||
var items = json.listimagestoreresponse.imagestore;
|
||||
if(items != null && items.length > 0)
|
||||
havingSwift = true;
|
||||
}
|
||||
});
|
||||
if (havingSwift = false) {
|
||||
$.ajax({
|
||||
url: createURL("listS3s"),
|
||||
dataType: "json",
|
||||
url: createURL("listImageStores"),
|
||||
data: {
|
||||
provider: 'S3'
|
||||
},
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var items = json.lists3sresponse.s3;
|
||||
var items = json.listimagestoreresponse.imagestore;
|
||||
if (items != null && items.length > 0) {
|
||||
havingS3 = true;
|
||||
}
|
||||
|
||||
@ -266,7 +266,6 @@
|
||||
$.ajax({
|
||||
url: createURL('listImageStores'),
|
||||
data: {
|
||||
type: 'image',
|
||||
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.
|
||||
},
|
||||
@ -5455,7 +5454,7 @@
|
||||
|
||||
$.ajax({
|
||||
url: createURL('listImageStores' + searchByArgs),
|
||||
data: { type: 'image', page: args.page, pageSize: pageSize, listAll: true },
|
||||
data: { page: args.page, pageSize: pageSize, listAll: true },
|
||||
success: function (json) {
|
||||
args.response.success({ data: json.listimagestoreresponse.imagestore });
|
||||
},
|
||||
@ -10321,7 +10320,7 @@
|
||||
}
|
||||
}
|
||||
$.ajax({
|
||||
url: createURL("listImageStores&type=image&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
|
||||
url: createURL("listImageStores&page=" + args.page + "&pagesize=" + pageSize + array1.join("")),
|
||||
dataType: "json",
|
||||
async: true,
|
||||
success: function(json) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user