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()) {
|
if (userValid && isAdmin()) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL("listSwifts"),
|
url: createURL("listImageStores"),
|
||||||
dataType: "json",
|
data: {
|
||||||
|
provider: 'Swift'
|
||||||
|
},
|
||||||
async: false,
|
async: false,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
var items = json.listswiftsresponse.swift;
|
var items = json.listimagestoreresponse.imagestore;
|
||||||
if(items != null && items.length > 0)
|
if(items != null && items.length > 0)
|
||||||
havingSwift = true;
|
havingSwift = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (havingSwift == false) {
|
if (havingSwift == false) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL("listS3s"),
|
url: createURL("listImageStores"),
|
||||||
dataType: "json",
|
data: {
|
||||||
|
provider: 'S3'
|
||||||
|
},
|
||||||
async: false,
|
async: false,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
var items = json.lists3sresponse.s3;
|
var items = json.listimagestoreresponse.imagestore;
|
||||||
if (items != null && items.length > 0) {
|
if (items != null && items.length > 0) {
|
||||||
havingS3 = true;
|
havingS3 = true;
|
||||||
}
|
}
|
||||||
@ -328,22 +332,26 @@
|
|||||||
|
|
||||||
if (isAdmin()) {
|
if (isAdmin()) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL("listSwifts"),
|
url: createURL("listImageStores"),
|
||||||
dataType: "json",
|
data:{
|
||||||
|
provider: 'Swift'
|
||||||
|
},
|
||||||
async: false,
|
async: false,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
var items = json.listswiftsresponse.swift;
|
var items = json.listimagestoreresponse.imagestore;
|
||||||
if(items != null && items.length > 0)
|
if(items != null && items.length > 0)
|
||||||
havingSwift = true;
|
havingSwift = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (havingSwift = false) {
|
if (havingSwift = false) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL("listS3s"),
|
url: createURL("listImageStores"),
|
||||||
dataType: "json",
|
data: {
|
||||||
|
provider: 'S3'
|
||||||
|
},
|
||||||
async: false,
|
async: false,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
var items = json.lists3sresponse.s3;
|
var items = json.listimagestoreresponse.imagestore;
|
||||||
if (items != null && items.length > 0) {
|
if (items != null && items.length > 0) {
|
||||||
havingS3 = true;
|
havingS3 = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -266,7 +266,6 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL('listImageStores'),
|
url: createURL('listImageStores'),
|
||||||
data: {
|
data: {
|
||||||
type: 'image',
|
|
||||||
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.
|
||||||
},
|
},
|
||||||
@ -5455,7 +5454,7 @@
|
|||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL('listImageStores' + searchByArgs),
|
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) {
|
success: function (json) {
|
||||||
args.response.success({ data: json.listimagestoreresponse.imagestore });
|
args.response.success({ data: json.listimagestoreresponse.imagestore });
|
||||||
},
|
},
|
||||||
@ -10321,7 +10320,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.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",
|
dataType: "json",
|
||||||
async: true,
|
async: true,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user