Skip to content

Commit 3acebf2

Browse files
author
Jessica Wang
committed
CLOUDSTACK-6852: UI - modules - remove variable drModuleIncluded.
1 parent c181485 commit 3acebf2

3 files changed

Lines changed: 4 additions & 9 deletions

File tree

ui/scripts/cloudStack.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -489,9 +489,6 @@
489489
};
490490
}
491491

492-
document.title = _l('label.app.name');
493-
494-
// set value to global variable
495-
drModuleIncluded = isModuleIncluded("dr");
492+
document.title = _l('label.app.name');
496493
});
497494
})(cloudStack, jQuery);

ui/scripts/sharedFunctions.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ var md5HashedLogin = false;
4949
var pageSize = 20;
5050
//var pageSize = 1; //for testing only
5151

52-
var drModuleIncluded = false;
53-
5452
//async action
5553
var pollAsyncJobResult = function(args) {
5654
$.ajax({
@@ -1176,7 +1174,7 @@ function listViewDataProvider(args, data, options) {
11761174
}
11771175

11781176
var addExtraPropertiesIfDrModuleIncluded = function(jsonObj, resourceType) {
1179-
if (drModuleIncluded) {
1177+
if (isModuleIncluded("dr")) {
11801178
$.ajax({
11811179
url: createURL("listResourceDetails"),
11821180
data: {

ui/scripts/storage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@
906906
}
907907

908908
var volumeDrEnabled = false;
909-
if (drModuleIncluded) {
909+
if (isModuleIncluded("dr")) {
910910
volumeDrEnabled = cloudStack.dr.sharedFunctions.isVolumeDrEnabled(args.context.volumes[0]);
911911
}
912912

@@ -920,7 +920,7 @@
920920
success: function(json) {
921921
var instanceObjs = json.listvirtualmachinesresponse.virtualmachine;
922922
$(instanceObjs).each(function() {
923-
if (drModuleIncluded) {
923+
if (isModuleIncluded("dr")) {
924924
var vmDrEnabled = cloudStack.dr.sharedFunctions.isVmDrEnabled(this);
925925
if (vmDrEnabled == volumeDrEnabled) {
926926
items.push({

0 commit comments

Comments
 (0)