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