Skip to content

Commit d9733e9

Browse files
author
Jessica Wang
committed
CLOUDSTACK-2351: object store - UI - infrastructure menu - secondary storages - detailView - delete action - replace deleteHost API with new API deleteImageStore.
1 parent 79935f6 commit d9733e9

1 file changed

Lines changed: 8 additions & 26 deletions

File tree

‎ui/scripts/system.js‎

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -224,16 +224,7 @@
224224
dataFns.hostCount($.extend(data, {
225225
clusterCount: json.listclustersresponse.count ?
226226
json.listclustersresponse.count : 0
227-
}));
228-
229-
//comment the 4 lines above and uncomment the following 4 lines if listHosts API still responds slowly.
230-
231-
/*
232-
dataFns.primaryStorageCount($.extend(data, {
233-
clusterCount: json.listclustersresponse.count ?
234-
json.listclustersresponse.count : 0
235-
}));
236-
*/
227+
}));
237228
}
238229
});
239230
},
@@ -266,16 +257,7 @@
266257
dataFns.secondaryStorageCount($.extend(data, {
267258
primaryStorageCount: json.liststoragepoolsresponse.count ?
268259
json.liststoragepoolsresponse.count : 0
269-
}));
270-
271-
//comment the 4 lines above and uncomment the following 4 lines if listHosts API still responds slowly.
272-
273-
/*
274-
dataFns.systemVmCount($.extend(data, {
275-
primaryStorageCount: json.liststoragepoolsresponse.count ?
276-
json.liststoragepoolsresponse.count : 0
277-
}));
278-
*/
260+
}));
279261
}
280262
});
281263
},
@@ -9282,8 +9264,7 @@
92829264
url: createURL("deleteHost&id=" + args.context.hosts[0].id + array1.join("")),
92839265
dataType: "json",
92849266
async: true,
9285-
success: function(json) {
9286-
//{ "deletehostresponse" : { "success" : "true"} }
9267+
success: function(json) {
92879268
args.response.success({data:{}});
92889269
}
92899270
});
@@ -10651,9 +10632,10 @@
1065110632
},
1065210633
action: function(args) {
1065310634
$.ajax({
10654-
url: createURL("deleteHost&id=" + args.context.secondarystorages[0].id),
10655-
dataType: "json",
10656-
async: true,
10635+
url: createURL('deleteImageStore'),
10636+
data: {
10637+
id: args.context.secondarystorages[0].id
10638+
},
1065710639
success: function(json) {
1065810640
args.response.success();
1065910641
}
@@ -10681,7 +10663,7 @@
1068110663

1068210664
dataProvider: function(args) {
1068310665
$.ajax({
10684-
url: createURL("listImageStores&type=image&id=" + args.context.secondarystorages[0].id),
10666+
url: createURL("listImageStores&id=" + args.context.secondarystorages[0].id),
1068510667
dataType: "json",
1068610668
async: true,
1068710669
success: function(json) {

0 commit comments

Comments
 (0)