From b70bc92f46a27699417c411d1eb6586351e64d54 Mon Sep 17 00:00:00 2001 From: Brian Federle Date: Mon, 2 Jul 2012 10:41:20 -0700 Subject: [PATCH] CS-14907: Only allow download volume for uploaded volumes This fixes an issue where an uploaded volume that hasn't been moved to primary storage yet is downloaded, causing an error. This adjusts the actionFilter to fix this. Original patch by: Pranav Saxena reviewed-by: Brian Federle --- ui/scripts/storage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js index 92e7b506c97..c0ac3b2f2d2 100644 --- a/ui/scripts/storage.js +++ b/ui/scripts/storage.js @@ -1310,7 +1310,7 @@ allowedActions.push("recurringSnapshot"); } if(jsonObj.state != "Allocated") { - if(jsonObj.vmstate == "Stopped" || jsonObj.virtualmachineid == null) { + if((jsonObj.vmstate == "Stopped" || jsonObj.virtualmachineid == null) && jsonObj.state != "Ready") { allowedActions.push("downloadVolume"); } }