CLOUDSTACK-2351: object store - UI - infrastructure menu - secondary storages - detailView - delete action - replace deleteHost API with new API deleteImageStore.

This commit is contained in:
Jessica Wang 2013-05-07 11:38:31 -07:00
parent 79935f6eee
commit d9733e900d

View File

@ -224,16 +224,7 @@
dataFns.hostCount($.extend(data, { dataFns.hostCount($.extend(data, {
clusterCount: json.listclustersresponse.count ? clusterCount: json.listclustersresponse.count ?
json.listclustersresponse.count : 0 json.listclustersresponse.count : 0
})); }));
//comment the 4 lines above and uncomment the following 4 lines if listHosts API still responds slowly.
/*
dataFns.primaryStorageCount($.extend(data, {
clusterCount: json.listclustersresponse.count ?
json.listclustersresponse.count : 0
}));
*/
} }
}); });
}, },
@ -266,16 +257,7 @@
dataFns.secondaryStorageCount($.extend(data, { dataFns.secondaryStorageCount($.extend(data, {
primaryStorageCount: json.liststoragepoolsresponse.count ? primaryStorageCount: json.liststoragepoolsresponse.count ?
json.liststoragepoolsresponse.count : 0 json.liststoragepoolsresponse.count : 0
})); }));
//comment the 4 lines above and uncomment the following 4 lines if listHosts API still responds slowly.
/*
dataFns.systemVmCount($.extend(data, {
primaryStorageCount: json.liststoragepoolsresponse.count ?
json.liststoragepoolsresponse.count : 0
}));
*/
} }
}); });
}, },
@ -9282,8 +9264,7 @@
url: createURL("deleteHost&id=" + args.context.hosts[0].id + array1.join("")), url: createURL("deleteHost&id=" + args.context.hosts[0].id + array1.join("")),
dataType: "json", dataType: "json",
async: true, async: true,
success: function(json) { success: function(json) {
//{ "deletehostresponse" : { "success" : "true"} }
args.response.success({data:{}}); args.response.success({data:{}});
} }
}); });
@ -10651,9 +10632,10 @@
}, },
action: function(args) { action: function(args) {
$.ajax({ $.ajax({
url: createURL("deleteHost&id=" + args.context.secondarystorages[0].id), url: createURL('deleteImageStore'),
dataType: "json", data: {
async: true, id: args.context.secondarystorages[0].id
},
success: function(json) { success: function(json) {
args.response.success(); args.response.success();
} }
@ -10681,7 +10663,7 @@
dataProvider: function(args) { dataProvider: function(args) {
$.ajax({ $.ajax({
url: createURL("listImageStores&type=image&id=" + args.context.secondarystorages[0].id), url: createURL("listImageStores&id=" + args.context.secondarystorages[0].id),
dataType: "json", dataType: "json",
async: true, async: true,
success: function(json) { success: function(json) {