You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by al...@apache.org on 2012/07/04 02:35:29 UTC

[12/50] [abbrv] git commit: CS-14907: Only allow download volume for uploaded volumes

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 <pr...@citrix.com>
reviewed-by: Brian Federle <br...@citrix.com>


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/vpc
Commit: b70bc92f46a27699417c411d1eb6586351e64d54
Parents: de04b8c
Author: Brian Federle <br...@citrix.com>
Authored: Mon Jul 2 10:41:20 2012 -0700
Committer: Brian Federle <br...@citrix.com>
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");
       }
     }