mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 09:51:09 +03:00
commit
6ab70a2f60
@ -13,6 +13,7 @@ export default
|
||||
return {
|
||||
setPendoOptions: function (config) {
|
||||
var tower_version = config.version.split('-')[0],
|
||||
trial = (config.trial) ? config.trial : false,
|
||||
options = {
|
||||
visitor: {
|
||||
id: null,
|
||||
@ -24,7 +25,7 @@ export default
|
||||
planLevel: config.license_type,
|
||||
planPrice: config.instance_count,
|
||||
creationDate: config.license_date,
|
||||
trial: config.trial,
|
||||
trial: trial,
|
||||
tower_version: tower_version,
|
||||
ansible_version: config.ansible_version
|
||||
}
|
||||
@ -100,15 +101,21 @@ export default
|
||||
config.analytics_status = c.analytics_status;
|
||||
config.version = c.version;
|
||||
config.ansible_version = c.ansible_version;
|
||||
options = this.setPendoOptions(config);
|
||||
this.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
|
||||
$log.debug(reason);
|
||||
});
|
||||
if(config.analytics_status === 'detailed' || config.analytics_status === 'anonymous'){
|
||||
$pendolytics.bootstrap();
|
||||
options = this.setPendoOptions(config);
|
||||
this.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
|
||||
$log.debug(reason);
|
||||
});
|
||||
}
|
||||
else {
|
||||
$log.debug('Pendo is turned off.')
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user