From 2135a6651baa36192f11a893adf7d6f4b6c6222e Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Fri, 25 Sep 2015 13:21:08 -0400 Subject: [PATCH 1/2] Hash the license key to show a deployment key This can be used by pendo and other things that need to identify an individual deployment without exposing the actual license key From 3d7f25218ac0ed3963aa32ae1f5d36945ac71199 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Fri, 25 Sep 2015 15:52:42 -0400 Subject: [PATCH 2/2] Add api side support for pendo Also adds setup playbook support for pendo. This change anticipates that the default for new installations will be 'detailed' --- awx/api/views.py | 3 +++ awx/settings/defaults.py | 3 +++ awx/settings/development.py | 2 ++ 3 files changed, 8 insertions(+) diff --git a/awx/api/views.py b/awx/api/views.py index 95a58cca24..9629c3ebba 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -186,12 +186,15 @@ class ApiV1ConfigView(APIView): license_reader = TaskSerializer() license_data = license_reader.from_file(show_key=request.user.is_superuser) + pendo_state = settings.PENDO_TRACKING_STATE if settings.PENDO_TRACKING_STATE in ('off', 'anonymous', 'detailed') else 'off' + data = dict( time_zone=settings.TIME_ZONE, license_info=license_data, version=get_awx_version(), ansible_version=get_ansible_version(), eula=render_to_string("eula.md"), + analytics_status=pendo_state ) # If LDAP is enabled, user_ldap_fields will return a list of field diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index b2d7c295bf..e6fa26fbb3 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -356,6 +356,9 @@ AWX_JOB_TEMPLATE_HISTORY = 10 # The directory in which proot will create new temporary directories for its root AWX_PROOT_BASE_PATH = "/tmp" +# Enable Pendo on the UI, possible values are 'off', 'anonymous', and 'detailed' +PENDO_TRACKING_STATE = "off" + # Default list of modules allowed for ad hoc commands. AD_HOC_COMMANDS = [ 'command', diff --git a/awx/settings/development.py b/awx/settings/development.py index eec9673ef9..ead9e44a29 100644 --- a/awx/settings/development.py +++ b/awx/settings/development.py @@ -32,6 +32,8 @@ CALLBACK_QUEUE_PORT = "ipc:///tmp/callback_receiver_dev.ipc" # Enable PROOT for tower-qa integration tests AWX_PROOT_ENABLED = True +PENDO_TRACKING_STATE = "off" + # Use Django-Jenkins if installed. Only run tests for awx.main app. try: import django_jenkins