Repository: cloudstack Updated Branches: refs/heads/4.4-forward 9e2db2f22 -> c29ed73d4
CLOUDSTACK-6852: UI - modules - add global variable drModuleIncluded. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c29ed73d Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c29ed73d Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c29ed73d Branch: refs/heads/4.4-forward Commit: c29ed73d4d36fbbd8e48cae4217c655d8024c7cc Parents: 9e2db2f Author: Jessica Wang <jessicaw...@apache.org> Authored: Fri Jun 6 13:16:27 2014 -0700 Committer: Jessica Wang <jessicaw...@apache.org> Committed: Fri Jun 6 13:28:22 2014 -0700 ---------------------------------------------------------------------- ui/scripts/cloudStack.js | 3 +++ ui/scripts/sharedFunctions.js | 2 ++ ui/scripts/storage.js | 7 ++----- 3 files changed, 7 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c29ed73d/ui/scripts/cloudStack.js ---------------------------------------------------------------------- diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js index be7692d..ad53a4a 100644 --- a/ui/scripts/cloudStack.js +++ b/ui/scripts/cloudStack.js @@ -490,5 +490,8 @@ } document.title = _l('label.app.name'); + + // set value to global variable + drModuleIncluded = isModuleIncluded("dr"); }); })(cloudStack, jQuery); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c29ed73d/ui/scripts/sharedFunctions.js ---------------------------------------------------------------------- diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js index c51bc8d..bec0336 100644 --- a/ui/scripts/sharedFunctions.js +++ b/ui/scripts/sharedFunctions.js @@ -49,6 +49,8 @@ var md5HashedLogin = false; var pageSize = 20; //var pageSize = 1; //for testing only +var drModuleIncluded = false; + var rootAccountId = 1; //async action http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c29ed73d/ui/scripts/storage.js ---------------------------------------------------------------------- diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js index 7e71448..7ee475f 100644 --- a/ui/scripts/storage.js +++ b/ui/scripts/storage.js @@ -900,14 +900,11 @@ hypervisor: args.context.volumes[0].hypervisor }); } - - - var drModuleIncluded = isModuleIncluded("dr"); + var volumeDrEnabled = false; if (drModuleIncluded) { volumeDrEnabled = cloudStack.dr.sharedFunctions.isVolumeDrEnabled(args.context.volumes[0]); - } - + } $(['Running', 'Stopped']).each(function() { $.ajax({