From 5d27f2c8867adc72d4b2bf87ad4fc6058f4a6333 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Thu, 10 May 2012 11:11:54 -0700 Subject: [PATCH] CS-14761: volume page - make migration action available only when volume state is Ready. --- ui/scripts/storage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js index 7b15f6aa399..a33a764782f 100644 --- a/ui/scripts/storage.js +++ b/ui/scripts/storage.js @@ -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") {