mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
bug 4556: volume page -details tab - localize all volume actions.
This commit is contained in:
parent
3d394116f0
commit
21018cdb4f
@ -448,6 +448,14 @@ label.action.create.template.processing=Creating Template....
|
||||
label.action.take.snapshot=Take Snapshot
|
||||
label.action.take.snapshot.processing=Taking Snapshot....
|
||||
|
||||
label.action.attach.disk=Attach Disk
|
||||
label.action.attach.disk.processing=Attaching Disk....
|
||||
label.action.delete.volume=Delete Volume
|
||||
label.action.delete.volume.processing=Deleting Volume....
|
||||
label.action.recurring.snapshot=Recurring Snapshot
|
||||
label.action.download.volume=Download Volume
|
||||
label.action.download.volume.processing=Downloading Volume....
|
||||
|
||||
|
||||
label.action.edit.account=Edit account
|
||||
label.action.resource.limits=Resource limits
|
||||
@ -478,6 +486,9 @@ message.action.reboot.instance=Please confirm you want to reboot instance
|
||||
message.action.destroy.instance=Please confirm you want to destroy instance
|
||||
message.action.restore.instance=Please confirm you want to restore instance
|
||||
|
||||
message.action.delete.volume=Please confirm you want to delete volume
|
||||
message.action.take.snapshot=Please confirm you want to take snapshot
|
||||
|
||||
message.edit.limits=Please specify limits to the following resources. A "-1" indicates no limit to the amount of resources create.
|
||||
message.disable.account=Please confirm you want to disable this account. By disabling the account, all users for this account will no longer have access to their cloud resources. All running virtual machines will be immediately shut down.
|
||||
message.lock.account=Please confirm you want to lock this account. By locking the account, all users for this account will no longer be able to manage their cloud resources. Existing resources can still be accessed.
|
||||
@ -540,7 +551,6 @@ message.copy.template=Copy template <b id="copy_template_name_text">XXX</b> from
|
||||
message.create.template.vm=Create VM from template <b id="p_name"></b>
|
||||
message.create.template.volume=Please specify the following information before creating a template of your disk volume: <b><span id="volume_name"></span></b>. Creation of the template can range from several minutes to longer depending on the size of the volume.
|
||||
message.add.template=Please enter the following data to create your new template
|
||||
message.create.snapshot=Please confirm you want to create snapshot for this volume.
|
||||
message.snapshot.schedule=Your snapshot schedule is currently set to
|
||||
message.add.volume=Please fill in the following data to add a new volume.
|
||||
message.attach.volume=Please fill in the following data to attach a new volume. If you are attaching a disk volume to a Windows based virtual machine, you will need to reboot the instance to see the attached disk.
|
||||
|
||||
@ -5,6 +5,25 @@
|
||||
</c:if>
|
||||
<fmt:setBundle basename="resources/messages"/>
|
||||
|
||||
<script language="javascript">
|
||||
dictionary = {
|
||||
'label.action.attach.disk' : '<fmt:message key="label.action.attach.disk"/>',
|
||||
'label.action.attach.disk.processing' : '<fmt:message key="label.action.attach.disk.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.delete.volume' : '<fmt:message key="label.action.delete.volume"/>',
|
||||
'label.action.delete.volume.processing' : '<fmt:message key="label.action.delete.volume.processing"/>',
|
||||
'message.action.delete.volume' : '<fmt:message key="message.action.delete.volume"/>',
|
||||
'label.action.take.snapshot' : '<fmt:message key="label.action.take.snapshot"/>',
|
||||
'label.action.take.snapshot.processing' : '<fmt:message key="label.action.take.snapshot.processing"/>',
|
||||
'message.action.take.snapshot' : '<fmt:message key="message.action.take.snapshot"/>',
|
||||
'label.action.recurring.snapshot' : '<fmt:message key="label.action.recurring.snapshot"/>',
|
||||
'label.action.download.volume' : '<fmt:message key="label.action.download.volume"/>'
|
||||
};
|
||||
</script>
|
||||
|
||||
<!-- volume detail panel (begin) -->
|
||||
<div class="main_title" id="right_panel_header">
|
||||
|
||||
@ -272,12 +291,6 @@
|
||||
</div>
|
||||
<!-- Download Volume Dialog (end) -->
|
||||
|
||||
<!-- Create Snapshot Dialog (begin) -->
|
||||
<div id="dialog_create_snapshot" title="Create Snapshot" style="display: none">
|
||||
<p><fmt:message key="message.create.snapshot"/></p>
|
||||
</div>
|
||||
<!-- Create Snapshot Dialog (end) -->
|
||||
|
||||
<!-- Recurring Snapshots Dialog (begin) -->
|
||||
<div id="dialog_recurring_snapshot" title="Recurring Snapshot" style="display:none;">
|
||||
<div class="dialog_snapshotcontainer">
|
||||
|
||||
@ -387,28 +387,28 @@ function volumeJsonToDetailsTab(){
|
||||
var $actionMenu = $("#right_panel_content #tab_content_details #action_link #action_menu");
|
||||
$actionMenu.find("#action_list").empty();
|
||||
|
||||
buildActionLinkForTab("Take Snapshot", volumeActionMap, $actionMenu, $midmenuItem1, $thisTab); //show take snapshot
|
||||
buildActionLinkForTab("Recurring Snapshot", volumeActionMap, $actionMenu, $midmenuItem1, $thisTab); //show Recurring Snapshot
|
||||
buildActionLinkForTab("Download Volume", volumeActionMap, $actionMenu, $midmenuItem1, $thisTab);
|
||||
buildActionLinkForTab("label.action.take.snapshot", volumeActionMap, $actionMenu, $midmenuItem1, $thisTab); //show take snapshot
|
||||
buildActionLinkForTab("label.action.recurring.snapshot", volumeActionMap, $actionMenu, $midmenuItem1, $thisTab); //show Recurring Snapshot
|
||||
buildActionLinkForTab("label.action.download.volume", volumeActionMap, $actionMenu, $midmenuItem1, $thisTab);
|
||||
|
||||
if(jsonObj.state != "Creating" && jsonObj.state != "Corrupted" && jsonObj.name != "attaching") {
|
||||
if(jsonObj.type=="ROOT") {
|
||||
if (jsonObj.vmstate == "Stopped") {
|
||||
buildActionLinkForTab("Create Template", volumeActionMap, $actionMenu, $midmenuItem1, $thisTab);
|
||||
buildActionLinkForTab("label.action.create.template", volumeActionMap, $actionMenu, $midmenuItem1, $thisTab);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (jsonObj.virtualmachineid != null) {
|
||||
if (jsonObj.storagetype == "shared" && (jsonObj.vmstate == "Running" || jsonObj.vmstate == "Stopped")) {
|
||||
buildActionLinkForTab("Detach Disk", volumeActionMap, $actionMenu, $midmenuItem1, $thisTab);
|
||||
buildActionLinkForTab("label.action.detach.disk", volumeActionMap, $actionMenu, $midmenuItem1, $thisTab);
|
||||
}
|
||||
} else {
|
||||
// Disk not attached
|
||||
if (jsonObj.storagetype == "shared") {
|
||||
buildActionLinkForTab("Attach Disk", volumeActionMap, $actionMenu, $midmenuItem1, $thisTab);
|
||||
buildActionLinkForTab("label.action.attach.disk", volumeActionMap, $actionMenu, $midmenuItem1, $thisTab);
|
||||
|
||||
if(jsonObj.vmname == null || jsonObj.vmname == "none")
|
||||
buildActionLinkForTab("Delete Volume", volumeActionMap, $actionMenu, $midmenuItem1, $thisTab);
|
||||
buildActionLinkForTab("label.action.delete.volume", volumeActionMap, $actionMenu, $midmenuItem1, $thisTab);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -488,7 +488,7 @@ function volumeSnapshotJSONToTemplate(jsonObj, template) {
|
||||
|
||||
buildActionLinkForSubgridItem("Create Volume", volumeSnapshotActionMap, $actionMenu, template);
|
||||
buildActionLinkForSubgridItem("Delete Snapshot", volumeSnapshotActionMap, $actionMenu, template);
|
||||
buildActionLinkForSubgridItem("Create Template", volumeSnapshotActionMap, $actionMenu, template);
|
||||
buildActionLinkForSubgridItem("label.action.create.template", volumeSnapshotActionMap, $actionMenu, template);
|
||||
}
|
||||
|
||||
function volumeClearRightPanel() {
|
||||
@ -512,38 +512,38 @@ function volumeJsonClearDetailsTab(){
|
||||
}
|
||||
|
||||
var volumeActionMap = {
|
||||
"Attach Disk": {
|
||||
"label.action.attach.disk": {
|
||||
isAsyncJob: true,
|
||||
asyncJobResponse: "attachvolumeresponse",
|
||||
dialogBeforeActionFn : doAttachDisk,
|
||||
inProcessText: "Attaching disk....",
|
||||
inProcessText: "label.action.attach.disk.processing",
|
||||
afterActionSeccessFn: function(json, $midmenuItem1, id) {
|
||||
var jsonObj = json.queryasyncjobresultresponse.jobresult.volume;
|
||||
volumeToMidmenu(jsonObj, $midmenuItem1);
|
||||
}
|
||||
},
|
||||
"Detach Disk": {
|
||||
"label.action.detach.disk": {
|
||||
api: "detachVolume",
|
||||
isAsyncJob: true,
|
||||
asyncJobResponse: "detachvolumeresponse",
|
||||
inProcessText: "Detaching disk....",
|
||||
inProcessText: "label.action.detach.disk.processing",
|
||||
afterActionSeccessFn: function(json, $midmenuItem1, id){
|
||||
var jsonObj = json.queryasyncjobresultresponse.jobresult.volume;
|
||||
volumeToMidmenu(jsonObj, $midmenuItem1);
|
||||
}
|
||||
},
|
||||
"Create Template": {
|
||||
"label.action.create.template": {
|
||||
isAsyncJob: true,
|
||||
asyncJobResponse: "createtemplateresponse",
|
||||
dialogBeforeActionFn : doCreateTemplateFromVolume,
|
||||
inProcessText: "Creating template....",
|
||||
inProcessText: "label.action.create.template.processing",
|
||||
afterActionSeccessFn: function(json, $midmenuItem1, id) {}
|
||||
},
|
||||
"Delete Volume": {
|
||||
"label.action.delete.volume": {
|
||||
api: "deleteVolume",
|
||||
isAsyncJob: false,
|
||||
dialogBeforeActionFn : doDeleteVolume,
|
||||
inProcessText: "Deleting volume....",
|
||||
inProcessText: "label.action.delete.volume.processing",
|
||||
afterActionSeccessFn: function(json, $midmenuItem1, id) {
|
||||
$midmenuItem1.slideUp("slow", function() {
|
||||
$(this).remove();
|
||||
@ -554,17 +554,17 @@ var volumeActionMap = {
|
||||
});
|
||||
}
|
||||
},
|
||||
"Take Snapshot": {
|
||||
"label.action.take.snapshot": {
|
||||
isAsyncJob: true,
|
||||
asyncJobResponse: "createsnapshotresponse",
|
||||
dialogBeforeActionFn : doTakeSnapshot,
|
||||
inProcessText: "Taking Snapshot....",
|
||||
inProcessText: "label.action.take.snapshot.processing",
|
||||
afterActionSeccessFn: function(json, $midmenuItem1, id) {}
|
||||
},
|
||||
"Recurring Snapshot": {
|
||||
"label.action.recurring.snapshot": {
|
||||
dialogBeforeActionFn : doRecurringSnapshot
|
||||
},
|
||||
"Download Volume": {
|
||||
"label.action.download.volume": {
|
||||
dialogBeforeActionFn : doDownloadVolume
|
||||
}
|
||||
}
|
||||
@ -681,7 +681,7 @@ function doDeleteVolume($actionLink, $detailsTab, $midmenuItem1) {
|
||||
var id = jsonObj.id;
|
||||
|
||||
$("#dialog_confirmation")
|
||||
.text("Please confirm you want to delete this volume")
|
||||
.text(dictionary["message.action.delete.volume"])
|
||||
.dialog('option', 'buttons', {
|
||||
"Confirm": function() {
|
||||
$(this).dialog("close");
|
||||
@ -694,8 +694,9 @@ function doDeleteVolume($actionLink, $detailsTab, $midmenuItem1) {
|
||||
}).dialog("open");
|
||||
}
|
||||
|
||||
function doTakeSnapshot($actionLink, $detailsTab, $midmenuItem1) {
|
||||
$("#dialog_create_snapshot")
|
||||
function doTakeSnapshot($actionLink, $detailsTab, $midmenuItem1) {
|
||||
$("#dialog_confirmation")
|
||||
.text(dictionary["message.action.take.snapshot"])
|
||||
.dialog('option', 'buttons', {
|
||||
"Confirm": function() {
|
||||
$(this).dialog("close");
|
||||
@ -1004,11 +1005,11 @@ var volumeSnapshotActionMap = {
|
||||
}
|
||||
}
|
||||
,
|
||||
"Create Template": {
|
||||
"label.action.create.template": {
|
||||
isAsyncJob: true,
|
||||
asyncJobResponse: "createtemplateresponse",
|
||||
dialogBeforeActionFn : doCreateTemplateFromSnapshotInVolumePage,
|
||||
inProcessText: "Creating Template....",
|
||||
inProcessText: "label.action.create.template.processing",
|
||||
afterActionSeccessFn: function(json, id, $subgridItem) {}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user