From c29ed73d4d36fbbd8e48cae4217c655d8024c7cc Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Fri, 6 Jun 2014 13:16:27 -0700 Subject: [PATCH] CLOUDSTACK-6852: UI - modules - add global variable drModuleIncluded. --- ui/scripts/cloudStack.js | 3 +++ ui/scripts/sharedFunctions.js | 2 ++ ui/scripts/storage.js | 7 ++----- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js index be7692de093..ad53a4a0a07 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); diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js index c51bc8dc3d4..bec03360c31 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 diff --git a/ui/scripts/storage.js b/ui/scripts/storage.js index 7e71448b214..7ee475fe3e4 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({