diff --git a/awx/ui/client/src/configuration/forms/system-form/sub-forms/system-misc.form.js b/awx/ui/client/src/configuration/forms/system-form/sub-forms/system-misc.form.js index e15713ee39..db475c8267 100644 --- a/awx/ui/client/src/configuration/forms/system-form/sub-forms/system-misc.form.js +++ b/awx/ui/client/src/configuration/forms/system-form/sub-forms/system-misc.form.js @@ -58,6 +58,8 @@ export default ['i18n', function(i18n) { CUSTOM_VENV_PATHS: { type: 'textarea', reset: 'CUSTOM_VENV_PATHS' + INSIGHTS_DATA_ENABLED: { + type: 'toggleSwitch' } }, diff --git a/awx/ui/client/src/license/license.block.less b/awx/ui/client/src/license/license.block.less index 0625568fff..08a6c624a6 100644 --- a/awx/ui/client/src/license/license.block.less +++ b/awx/ui/client/src/license/license.block.less @@ -140,6 +140,11 @@ margin-bottom: 20px; } -.License-detailsGroup--withSeparator { - border-top: 1px solid @default-icon-hov; +.License-analyticsCheckbox { + padding-top: 5px; +} + +.License-analyticsCheckboxGroup { + padding: 10px 0; + font-weight: bold; } diff --git a/awx/ui/client/src/license/license.controller.js b/awx/ui/client/src/license/license.controller.js index 39e211c4f5..ae7e5d3655 100644 --- a/awx/ui/client/src/license/license.controller.js +++ b/awx/ui/client/src/license/license.controller.js @@ -9,9 +9,9 @@ import {N_} from "../i18n"; export default ['Wait', '$state', '$scope', '$rootScope', 'ProcessErrors', 'CheckLicense', 'moment','$window', - 'ConfigService', 'FeaturesService', 'pendoService', 'i18n', 'config', + 'ConfigService', 'FeaturesService', 'pendoService', 'insightsEnablementService', 'i18n', 'config', function(Wait, $state, $scope, $rootScope, ProcessErrors, CheckLicense, moment, - $window, ConfigService, FeaturesService, pendoService, i18n, config) { + $window, ConfigService, FeaturesService, pendoService, insightsEnablementService, i18n, config) { const calcDaysRemaining = function(seconds) { // calculate the number of days remaining on the license @@ -54,7 +54,8 @@ export default $scope.valid = CheckLicense.valid($scope.license.license_info); $scope.compliant = $scope.license.license_info.compliant; $scope.newLicense = { - pendo: true + pendo: true, + insights: true }; }; @@ -114,6 +115,13 @@ export default } else { pendoService.updatePendoTrackingState('off'); } + + if ($scope.newLicense.insights) { + insightsEnablementService.updateInsightsTrackingState(true); + } else { + insightsEnablementService.updateInsightsTrackingState(false); + } + $state.go('dashboard', { licenseMissing: false }); diff --git a/awx/ui/client/src/license/license.partial.html b/awx/ui/client/src/license/license.partial.html index f97ea9e1c8..86be0f9284 100644 --- a/awx/ui/client/src/license/license.partial.html +++ b/awx/ui/client/src/license/license.partial.html @@ -115,25 +115,38 @@