rename analytics setting

This commit is contained in:
Christian Adams
2019-04-17 15:28:15 -04:00
parent fbc7d1a9f2
commit add8673d7c
8 changed files with 9 additions and 9 deletions

View File

@@ -78,7 +78,7 @@ def gather(dest=None, module=None):
logger.exception("Invalid License provided, or No License Provided") logger.exception("Invalid License provided, or No License Provided")
return "Error: Invalid License provided, or No License Provided" return "Error: Invalid License provided, or No License Provided"
if not settings.INSIGHTS_DATA_ENABLED: if not settings.INSIGHTS_TRACKING_STATE:
logger.error("Insights analytics not enabled") logger.error("Insights analytics not enabled")
return "Error: Insights analytics not enabled" return "Error: Insights analytics not enabled"

View File

@@ -49,7 +49,7 @@ def metrics():
license_info = get_license(show_key=False) license_info = get_license(show_key=False)
SYSTEM_INFO.info({ SYSTEM_INFO.info({
'install_uuid': settings.INSTALL_UUID, 'install_uuid': settings.INSTALL_UUID,
'insights_analytics': str(settings.INSIGHTS_DATA_ENABLED), 'insights_analytics': str(settings.INSIGHTS_TRACKING_STATE),
'tower_url_base': settings.TOWER_URL_BASE, 'tower_url_base': settings.TOWER_URL_BASE,
'tower_version': get_awx_version(), 'tower_version': get_awx_version(),
'ansible_version': get_ansible_version(), 'ansible_version': get_ansible_version(),

View File

@@ -309,7 +309,7 @@ register(
) )
register( register(
'INSIGHTS_DATA_ENABLED', 'INSIGHTS_TRACKING_STATE',
field_class=fields.BooleanField, field_class=fields.BooleanField,
default=False, default=False,
label=_('Gather data for Automation Insights'), label=_('Gather data for Automation Insights'),

View File

@@ -37,7 +37,7 @@ def mock_valid_license():
@pytest.mark.django_db @pytest.mark.django_db
def test_gather(mock_valid_license): def test_gather(mock_valid_license):
settings.INSIGHTS_DATA_ENABLED = True settings.INSIGHTS_TRACKING_STATE = True
tgz = gather(module=importlib.import_module(__name__)) tgz = gather(module=importlib.import_module(__name__))
files = {} files = {}

View File

@@ -670,7 +670,7 @@ PENDO_TRACKING_STATE = "off"
# Enables Insights data collection for Ansible Tower. # Enables Insights data collection for Ansible Tower.
# Note: This setting may be overridden by database settings. # Note: This setting may be overridden by database settings.
INSIGHTS_DATA_ENABLED = False INSIGHTS_TRACKING_STATE = False
# Default list of modules allowed for ad hoc commands. # Default list of modules allowed for ad hoc commands.

View File

@@ -88,7 +88,7 @@ AWX_ISOLATED_LAUNCH_TIMEOUT = 30
# Disable Pendo on the UI for development/test. # Disable Pendo on the UI for development/test.
# Note: This setting may be overridden by database settings. # Note: This setting may be overridden by database settings.
PENDO_TRACKING_STATE = "off" PENDO_TRACKING_STATE = "off"
INSIGHTS_DATA_ENABLED = False INSIGHTS_TRACKING_STATE = False
# Use Django-Jenkins if installed. Only run tests for awx.main app. # Use Django-Jenkins if installed. Only run tests for awx.main app.
try: try:

View File

@@ -59,7 +59,7 @@ export default ['i18n', function(i18n) {
type: 'textarea', type: 'textarea',
reset: 'CUSTOM_VENV_PATHS' reset: 'CUSTOM_VENV_PATHS'
}, },
INSIGHTS_DATA_ENABLED: { INSIGHTS_TRACKING_STATE: {
type: 'toggleSwitch' type: 'toggleSwitch'
} }
}, },

View File

@@ -11,11 +11,11 @@ export default ['$rootScope', 'Rest', 'GetBasePath', 'ProcessErrors',
updateInsightsTrackingState: function(tracking_type) { updateInsightsTrackingState: function(tracking_type) {
if (tracking_type === true || tracking_type === false) { if (tracking_type === true || tracking_type === false) {
Rest.setUrl(`${GetBasePath('settings')}system`); Rest.setUrl(`${GetBasePath('settings')}system`);
Rest.patch({ INSIGHTS_DATA_ENABLED: tracking_type }) Rest.patch({ INSIGHTS_TRACKING_STATE: tracking_type })
.catch(function ({data, status}) { .catch(function ({data, status}) {
ProcessErrors($rootScope, data, status, null, { ProcessErrors($rootScope, data, status, null, {
hdr: 'Error!', hdr: 'Error!',
msg: 'Failed to patch INSIGHTS_DATA_ENABLED in settings: ' + msg: 'Failed to patch INSIGHTS_TRACKING_STATE in settings: ' +
status }); status });
}); });
} else { } else {