mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
bug 9419: CloudStack UI - Domain page- add new action "Update Resource Count".
This commit is contained in:
parent
2f77061434
commit
7f05b38e18
@ -8,6 +8,8 @@
|
||||
<script language="javascript">
|
||||
dictionary = {
|
||||
'label.action.edit.domain' : '<fmt:message key="label.action.edit.domain"/>',
|
||||
'label.action.update.resource.count' : '<fmt:message key="label.action.update.resource.count"/>',
|
||||
'label.action.update.resource.count.processing' : '<fmt:message key="label.action.update.resource.count.processing"/>',
|
||||
'label.action.delete.domain' : '<fmt:message key="label.action.delete.domain"/>',
|
||||
'label.action.delete.domain.processing' : '<fmt:message key="label.action.delete.domain.processing"/>',
|
||||
'message.action.delete.domain' : '<fmt:message key="message.action.delete.domain"/>',
|
||||
|
||||
@ -311,7 +311,11 @@ function domainJsonToDetailsTab() {
|
||||
buildActionLinkForTab("label.action.edit.domain", domainActionMap, $actionMenu, $midmenuItem1, $thisTab);
|
||||
buildActionLinkForTab("label.action.delete.domain", domainActionMap, $actionMenu, $midmenuItem1, $thisTab);
|
||||
noAvailableActions = false;
|
||||
}
|
||||
}
|
||||
|
||||
buildActionLinkForTab("label.action.update.resource.count", domainActionMap, $actionMenu, $midmenuItem1, $thisTab);
|
||||
noAvailableActions = false;
|
||||
|
||||
// no available actions
|
||||
if(noAvailableActions == true) {
|
||||
$actionMenu.find("#action_list").append($("#no_available_actions").clone().show());
|
||||
@ -670,6 +674,13 @@ function doEditDomain2($actionLink, $detailsTab, $midmenuItem1, $readonlyFields,
|
||||
$readonlyFields.show();
|
||||
$("#save_button, #cancel_button").hide();
|
||||
}
|
||||
|
||||
function doUpdateResourceCount($actionLink, $detailsTab, $midmenuItem1) {
|
||||
var jsonObj = $midmenuItem1.data("jsonObj");
|
||||
var id = jsonObj.id;
|
||||
var apiCommand = "command=updateResourceCount&domainid="+id;
|
||||
doActionToTab(id, $actionLink, apiCommand, $midmenuItem1, $detailsTab);
|
||||
}
|
||||
|
||||
function doDeleteDomain($actionLink, $detailsTab, $midmenuItem1) {
|
||||
var jsonObj = $midmenuItem1.data("jsonObj");
|
||||
@ -692,7 +703,13 @@ function doDeleteDomain($actionLink, $detailsTab, $midmenuItem1) {
|
||||
var domainActionMap = {
|
||||
"label.action.edit.domain": {
|
||||
dialogBeforeActionFn: doEditDomain
|
||||
},
|
||||
},
|
||||
"label.action.update.resource.count": {
|
||||
isAsyncJob: false,
|
||||
dialogBeforeActionFn : doUpdateResourceCount,
|
||||
inProcessText: "label.action.update.resource.count.processing",
|
||||
afterActionSeccessFn: function(json, $midmenuItem1, id){}
|
||||
},
|
||||
"label.action.delete.domain": {
|
||||
isAsyncJob: true,
|
||||
dialogBeforeActionFn : doDeleteDomain,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user