CS-14761: volume page - make migration action available only when volume state is Ready.

This commit is contained in:
Jessica Wang 2012-05-10 11:11:54 -07:00
parent be9485c398
commit 5d27f2c886
1 changed files with 2 additions and 2 deletions

View File

@ -1273,7 +1273,7 @@
allowedActions.push("createTemplate");
}
}
else {
else { //jsonObj.type == "DATADISK"
if (jsonObj.virtualmachineid != null) {
if (jsonObj.storagetype == "shared" && (jsonObj.vmstate == "Running" || jsonObj.vmstate == "Stopped" || jsonObj.vmstate == "Destroyed")) {
allowedActions.push("detachDisk");
@ -1281,7 +1281,7 @@
}
else { // Disk not attached
allowedActions.push("remove");
if(isAdmin()) {
if(jsonObj.state == "Ready" && isAdmin()) {
allowedActions.push("migrateToAnotherStorage");
}
if (jsonObj.storagetype == "shared") {