diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js index 985627b824e..1eb02b6b525 100644 --- a/ui/scripts/cloudStack.js +++ b/ui/scripts/cloudStack.js @@ -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; } diff --git a/ui/scripts/system.js b/ui/scripts/system.js index abf41a9f73c..fedef35a14f 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -265,8 +265,7 @@ secondaryStorageCount: function(data) { $.ajax({ url: createURL('listImageStores'), - data: { - type: 'image', + data: { 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) {