Updated Branches: refs/heads/4.2 4cb311530 -> 5061aefe0
CLOUDSTACK-4428: UI > volume page > when hypervisor is KVM and kvm.snapshot.enabled is false, still show Take Snapshot on a detached volume. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5061aefe Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5061aefe Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5061aefe Branch: refs/heads/4.2 Commit: 5061aefe039d5d14409c3f020d3c0a2090f59621 Parents: 4cb3115 Author: Jessica Wang <[email protected]> Authored: Tue Nov 12 11:33:39 2013 -0800 Committer: Jessica Wang <[email protected]> Committed: Tue Nov 12 11:33:39 2013 -0800 ---------------------------------------------------------------------- ui/scripts/storage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5061aefe/ui/scripts/storage.js ---------------------------------------------------------------------- diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js index ec63e15..7aef3e9 100644 --- a/ui/scripts/storage.js +++ b/ui/scripts/storage.js @@ -1870,7 +1870,7 @@ allowedActions.push("takeSnapshot"); allowedActions.push("recurringSnapshot"); } else { - if(jsonObj.vmstate == 'Stopped') { + if(jsonObj.vmstate == 'Stopped' || jsonObj.virtualmachineid == undefined) { //volume of stopped VM, or detached volume allowedActions.push("takeSnapshot"); } }
