mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
new UI - volume page - hide actions when volume state is "Creating" or "Corrupted" or volume is attaching to a VM.
This commit is contained in:
parent
8dcea8c07e
commit
3f9b58bc73
@ -71,32 +71,27 @@ function volumeJsonToDetailsTab(jsonObj){
|
|||||||
//buildActionLinkForDetailsTab("Take Snapshot", volumeActionMap, $actionMenu, volumeListAPIMap); //show take snapshot
|
//buildActionLinkForDetailsTab("Take Snapshot", volumeActionMap, $actionMenu, volumeListAPIMap); //show take snapshot
|
||||||
//buildActionLinkForDetailsTab("Recurring Snapshot", volumeActionMap, $actionMenu, volumeListAPIMap); //show Recurring Snapshot
|
//buildActionLinkForDetailsTab("Recurring Snapshot", volumeActionMap, $actionMenu, volumeListAPIMap); //show Recurring Snapshot
|
||||||
|
|
||||||
if(jsonObj.type=="ROOT") {
|
if(jsonObj.state != "Creating" && jsonObj.state != "Corrupted" && jsonObj.name != "attaching") {
|
||||||
if (jsonObj.vmstate == "Stopped")
|
if(jsonObj.type=="ROOT") {
|
||||||
buildActionLinkForDetailsTab("Create Template", volumeActionMap, $actionMenu, volumeListAPIMap); //show create template
|
if (jsonObj.vmstate == "Stopped")
|
||||||
}
|
buildActionLinkForDetailsTab("Create Template", volumeActionMap, $actionMenu, volumeListAPIMap); //show create template
|
||||||
else {
|
}
|
||||||
if (jsonObj.virtualmachineid != null) {
|
else {
|
||||||
if (jsonObj.storagetype == "shared" && (jsonObj.vmstate == "Running" || jsonObj.vmstate == "Stopped")) {
|
if (jsonObj.virtualmachineid != null) {
|
||||||
buildActionLinkForDetailsTab("Detach Disk", volumeActionMap, $actionMenu, volumeListAPIMap); //show detach disk
|
if (jsonObj.storagetype == "shared" && (jsonObj.vmstate == "Running" || jsonObj.vmstate == "Stopped")) {
|
||||||
}
|
buildActionLinkForDetailsTab("Detach Disk", volumeActionMap, $actionMenu, volumeListAPIMap); //show detach disk
|
||||||
} else {
|
}
|
||||||
// Disk not attached
|
} else {
|
||||||
if (jsonObj.storagetype == "shared") {
|
// Disk not attached
|
||||||
buildActionLinkForDetailsTab("Detach Disk", volumeActionMap, $actionMenu, volumeListAPIMap); //show attach disk
|
if (jsonObj.storagetype == "shared") {
|
||||||
|
buildActionLinkForDetailsTab("Detach Disk", volumeActionMap, $actionMenu, volumeListAPIMap); //show attach disk
|
||||||
|
|
||||||
if(jsonObj.vmname == null || jsonObj.vmname == "none")
|
if(jsonObj.vmname == null || jsonObj.vmname == "none")
|
||||||
buildActionLinkForDetailsTab("Delete Volume", volumeActionMap, $actionMenu, volumeListAPIMap); //show delete volume
|
buildActionLinkForDetailsTab("Delete Volume", volumeActionMap, $actionMenu, volumeListAPIMap); //show delete volume
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
if(jsonObj.state == "Creating" || jsonObj.state == "Corrupted" || jsonObj.name == "attaching")
|
|
||||||
template.find("#grid_links_container").hide(); //hide actions panel
|
|
||||||
else
|
|
||||||
template.find("#grid_links_container").show(); //show actions panel
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function volumeClearRightPanel() {
|
function volumeClearRightPanel() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user