Skip to content

Commit c33ecde

Browse files
author
Jessica Wang
committed
bug 14368: cloudstack 3.0 UI - domain page - add "Update Resource Count" action ("Update Resource Count" is different from "Update Resource Limit")
1 parent a8ab24b commit c33ecde

1 file changed

Lines changed: 31 additions & 3 deletions

File tree

ui/scripts/domains.js

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,35 @@
192192
}
193193
}
194194
}
195-
}
195+
},
196+
197+
updateResourceCount: {
198+
label: 'label.action.update.resource.count',
199+
messages: {
200+
confirm: function(args) {
201+
return 'message.update.resource.count';
202+
},
203+
notification: function(args) {
204+
return 'label.action.update.resource.count';
205+
}
206+
},
207+
action: function(args) {
208+
$.ajax({
209+
url: createURL("updateResourceCount&domainid=" + args.context.domains[0].id),
210+
dataType: "json",
211+
async: true,
212+
success: function(json) {
213+
//var resourcecounts= json.updateresourcecountresponse.resourcecount; //do nothing
214+
args.response.success();
215+
}
216+
});
217+
},
218+
notification: {
219+
poll: function(args) {
220+
args.complete();
221+
}
222+
}
223+
}
196224
},
197225
tabs: {
198226
details: {
@@ -362,11 +390,11 @@
362390
if(isAdmin()) {
363391
allowedActions.push("create");
364392
if(jsonObj.level != 0) { //ROOT domain (whose level is 0) is not allowed to edit or delete
365-
allowedActions.push("edit"); //merge updateResourceCount into edit
393+
allowedActions.push("edit"); //merge updateResourceLimit into edit
366394
allowedActions.push("delete");
367395
}
368396
}
369-
//allowedActions.push("updateResourceCount");
397+
allowedActions.push("updateResourceCount");
370398
return allowedActions;
371399
}
372400

0 commit comments

Comments
 (0)