Skip to content

Commit c29ed73

Browse files
author
Jessica Wang
committed
CLOUDSTACK-6852: UI - modules - add global variable drModuleIncluded.
1 parent 9e2db2f commit c29ed73

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

‎ui/scripts/cloudStack.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,5 +490,8 @@
490490
}
491491

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

‎ui/scripts/sharedFunctions.js‎

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

52+
var drModuleIncluded = false;
53+
5254
var rootAccountId = 1;
5355

5456
//async action

‎ui/scripts/storage.js‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -900,14 +900,11 @@
900900
hypervisor: args.context.volumes[0].hypervisor
901901
});
902902
}
903-
904-
905-
var drModuleIncluded = isModuleIncluded("dr");
903+
906904
var volumeDrEnabled = false;
907905
if (drModuleIncluded) {
908906
volumeDrEnabled = cloudStack.dr.sharedFunctions.isVolumeDrEnabled(args.context.volumes[0]);
909-
}
910-
907+
}
911908

912909
$(['Running', 'Stopped']).each(function() {
913910
$.ajax({

0 commit comments

Comments
 (0)