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 <[email protected]> reviewed-by: Brian Federle <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/b70bc92f Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/b70bc92f Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/b70bc92f Branch: refs/heads/regions Commit: b70bc92f46a27699417c411d1eb6586351e64d54 Parents: de04b8c Author: Brian Federle <[email protected]> Authored: Mon Jul 2 10:41:20 2012 -0700 Committer: Brian Federle <[email protected]> Committed: Mon Jul 2 10:41:35 2012 -0700 ---------------------------------------------------------------------- ui/scripts/storage.js | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b70bc92f/ui/scripts/storage.js ---------------------------------------------------------------------- diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js index 92e7b50..c0ac3b2 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"); } }
