mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
bug 4556: instance page - volume tab - localize subgrid action Detach Disk, Create Template, Take Snapshot.
This commit is contained in:
parent
f8dddd6192
commit
3d394116f0
@ -441,6 +441,13 @@ label.action.reset.password=Reset Password
|
||||
label.action.reset.password.processing=Resetting Password....
|
||||
label.action.change.service=Change Service
|
||||
label.action.change.service.processing=Changing Service....
|
||||
label.action.detach.disk=Detach Disk
|
||||
label.action.detach.disk.processing=Detaching Disk....
|
||||
label.action.create.template=Create Template
|
||||
label.action.create.template.processing=Creating Template....
|
||||
label.action.take.snapshot=Take Snapshot
|
||||
label.action.take.snapshot.processing=Taking Snapshot....
|
||||
|
||||
|
||||
label.action.edit.account=Edit account
|
||||
label.action.resource.limits=Resource limits
|
||||
|
||||
@ -30,7 +30,13 @@ dictionary = {
|
||||
'label.action.reset.password' : '<fmt:message key="label.action.reset.password"/>',
|
||||
'label.action.reset.password.processing' : '<fmt:message key="label.action.reset.password.processing"/>',
|
||||
'label.action.change.service' : '<fmt:message key="label.action.change.service"/>',
|
||||
'label.action.change.service.processing' : '<fmt:message key="label.action.change.service.processing"/>'
|
||||
'label.action.change.service.processing' : '<fmt:message key="label.action.change.service.processing"/>',
|
||||
'label.action.detach.disk' : '<fmt:message key="label.action.detach.disk"/>',
|
||||
'label.action.detach.disk.processing' : '<fmt:message key="label.action.detach.disk.processing"/>',
|
||||
'label.action.create.template' : '<fmt:message key="label.action.create.template"/>',
|
||||
'label.action.create.template.processing' : '<fmt:message key="label.action.create.template.processing"/>',
|
||||
'label.action.take.snapshot' : '<fmt:message key="label.action.take.snapshot"/>',
|
||||
'label.action.take.snapshot.processing' : '<fmt:message key="label.action.take.snapshot.processing"/>'
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@ -1920,29 +1920,29 @@ function vmJsonClearDetailsTab(){
|
||||
|
||||
//***** declaration for volume tab (begin) *********************************************************
|
||||
var vmVolumeActionMap = {
|
||||
"Detach Disk": {
|
||||
"label.action.detach.disk": {
|
||||
api: "detachVolume",
|
||||
isAsyncJob: true,
|
||||
asyncJobResponse: "detachvolumeresponse",
|
||||
inProcessText: "Detaching disk....",
|
||||
inProcessText: "label.action.detach.disk.processing",
|
||||
afterActionSeccessFn: function(json, id, $subgridItem) {
|
||||
$subgridItem.slideUp("slow", function(){
|
||||
$(this).remove();
|
||||
});
|
||||
}
|
||||
},
|
||||
"Create Template": {
|
||||
"label.action.create.template": {
|
||||
isAsyncJob: true,
|
||||
asyncJobResponse: "createtemplateresponse",
|
||||
dialogBeforeActionFn : doCreateTemplateFromVmVolume,
|
||||
inProcessText: "Creating template....",
|
||||
inProcessText: "label.action.create.template.processing",
|
||||
afterActionSeccessFn: function(json, id, $subgridItem) {}
|
||||
},
|
||||
"Take Snapshot": {
|
||||
"label.action.take.snapshot": {
|
||||
isAsyncJob: true,
|
||||
asyncJobResponse: "createsnapshotresponse",
|
||||
dialogBeforeActionFn : doTakeSnapshotFromVmVolume,
|
||||
inProcessText: "Taking Snapshot....",
|
||||
inProcessText: "label.action.take.snapshot.processing",
|
||||
afterActionSeccessFn: function(json, id, $subgridItem) {}
|
||||
}
|
||||
}
|
||||
@ -1985,17 +1985,17 @@ function vmVolumeJSONToTemplate(json, $template) {
|
||||
$actionMenu.find("#action_list").empty();
|
||||
var noAvailableActions = true;
|
||||
|
||||
buildActionLinkForSubgridItem("Take Snapshot", vmVolumeActionMap, $actionMenu, $template);
|
||||
buildActionLinkForSubgridItem("label.action.take.snapshot", vmVolumeActionMap, $actionMenu, $template);
|
||||
noAvailableActions = false;
|
||||
|
||||
if(json.type=="ROOT") { //"create template" is allowed(when stopped), "detach disk" is disallowed.
|
||||
if(json.type=="ROOT") { //"label.action.create.template" is allowed(when stopped), "label.action.detach.disk" is disallowed.
|
||||
if (json.vmstate == "Stopped") {
|
||||
buildActionLinkForSubgridItem("Create Template", vmVolumeActionMap, $actionMenu, $template);
|
||||
buildActionLinkForSubgridItem("label.action.create.template", vmVolumeActionMap, $actionMenu, $template);
|
||||
noAvailableActions = false;
|
||||
}
|
||||
}
|
||||
else { //json.type=="DATADISK": "detach disk" is allowed, "create template" is disallowed.
|
||||
buildActionLinkForSubgridItem("Detach Disk", vmVolumeActionMap, $actionMenu, $template);
|
||||
else { //json.type=="DATADISK": "label.action.detach.disk" is allowed, "label.action.create.template" is disallowed.
|
||||
buildActionLinkForSubgridItem("label.action.detach.disk", vmVolumeActionMap, $actionMenu, $template);
|
||||
noAvailableActions = false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user