mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
load pa.min.js for pendo on demand
courtesy of our friends at Pendo
This commit is contained in:
parent
b6e51a0cd4
commit
fa4dd9a335
@ -187,6 +187,9 @@ var tower = angular.module('Tower', [
|
||||
.constant('AngularScheduler.useTimezone', true)
|
||||
.constant('AngularScheduler.showUTCField', true)
|
||||
.constant('$timezones.definitions.location', urlPrefix + 'lib/angular-tz-extensions/tz/data')
|
||||
.config(function($pendolyticsProvider) {
|
||||
$pendolyticsProvider.doNotAutoStart();
|
||||
})
|
||||
.config(['$routeProvider',
|
||||
function ($routeProvider) {
|
||||
$routeProvider.
|
||||
|
@ -100,6 +100,7 @@ export default
|
||||
config = response.license_info;
|
||||
config.analytics_status = response.analytics_status;
|
||||
if(config.analytics_status !== 'off'){
|
||||
$pendolytics.bootstrap();
|
||||
deferred.resolve(config);
|
||||
}
|
||||
else {
|
||||
@ -115,6 +116,7 @@ export default
|
||||
});
|
||||
}
|
||||
else if(config.analytics_status !== 'off'){
|
||||
$pendolytics.bootstrap();
|
||||
deferred.resolve(config);
|
||||
}
|
||||
else {
|
||||
@ -128,6 +130,8 @@ export default
|
||||
this.getConfig().then(function(config){
|
||||
var options = that.setPendoOptions(config);
|
||||
that.setRole(options).then(function(options){
|
||||
$log.debug('Pendo status is '+ config.analytics_status + '. Object below:');
|
||||
$log.debug(options);
|
||||
$pendolytics.identify(options);
|
||||
}, function(reason){
|
||||
// reject function for setRole
|
||||
|
@ -26,7 +26,8 @@
|
||||
|
||||
<script src="{{ STATIC_URL }}tower.concat.js?v={{version}}"></script>
|
||||
|
||||
<script src="//d3accju1t3mngt.cloudfront.net/js/angular/ng-pendo.js"></script>
|
||||
<!-- <script src="//d3accju1t3mngt.cloudfront.net/js/angular/ng-pendo.js"></script> -->
|
||||
<script src='{{ STATIC_URL }}lib/ng-pendo.js'></script>
|
||||
<script>
|
||||
window.pendo_options = {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user