Updated Branches: refs/heads/master 8202acdbc -> 4e132fccb
CLOUDSTACK-3950: UI > template/ISO page > hide CopyTemplate/CopyISO action when it's region-wide (i.e. zoneid is null) Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4e132fcc Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4e132fcc Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4e132fcc Branch: refs/heads/master Commit: 4e132fccb62e56db3bfbc35ba9c1f7cda514981e Parents: 8202acd Author: Jessica Wang <[email protected]> Authored: Fri Aug 16 19:50:16 2013 -0700 Committer: Jessica Wang <[email protected]> Committed: Fri Aug 16 19:53:29 2013 -0700 ---------------------------------------------------------------------- ui/scripts/templates.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4e132fcc/ui/scripts/templates.js ---------------------------------------------------------------------- diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js index 4b544ab..d596bc2 100644 --- a/ui/scripts/templates.js +++ b/ui/scripts/templates.js @@ -1660,9 +1660,12 @@ } else { allowedActions.push("edit"); - if (havingSwift == false && havingS3 == false) + //Swift and S3 are region-wide secondary storage + //if (havingSwift == false && havingS3 == false) + if (havingSwift == false && jsonObj.zoneid != null) { //"jsonObj.zoneid == null" means it is registered on region-wide S3 => global to all zones allowedActions.push("copyTemplate"); - + } + //allowedActions.push("createVm"); // For Beta2, this simply doesn't work without a network. } @@ -1697,8 +1700,10 @@ } else { allowedActions.push("edit"); - if (havingSwift == false) + //Swift and S3 are region-wide secondary storage + if (havingSwift == false && jsonObj.zoneid != null) { //"jsonObj.zoneid == null" means it is registered on region-wide S3 => global to all zones allowedActions.push("copyISO"); + } } // "Create VM"
