From 1a78c16adf9394cdc980b3a336da31f5e5f6cbd6 Mon Sep 17 00:00:00 2001 From: Christian Adams Date: Wed, 28 Aug 2019 09:25:02 -0400 Subject: [PATCH 1/3] add settings for license & automation analytics creds --- awx/main/conf.py | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/awx/main/conf.py b/awx/main/conf.py index 18f6e4026a..1108fb9f26 100644 --- a/awx/main/conf.py +++ b/awx/main/conf.py @@ -124,6 +124,44 @@ register( category_slug='system', ) +register( + 'REDHAT_USERNAME', + field_class=fields.CharField, + default='', + allow_blank=True, + encrypted=False, + read_only=False, + label=_('Your Red hat customer username'), + help_text=_('Enter your Red Hat customer password to get a Tower License'), # noqa + category=_('System'), + category_slug='system', +) + +register( + 'REDHAT_PASSWORD', + field_class=fields.CharField, + default='', + allow_blank=True, + encrypted=True, + read_only=False, + label=_('Your Red Hat customer password'), + help_text=_('Enter your Red Hat customer password to get a Tower License'), # noqa + category=_('System'), + category_slug='system', +) + +register( + 'AUTOMATION_ANALYTICS_URL', + field_class=fields.URLField, + default='https://cloud.redhat.com', + schemes=('http', 'https'), + allow_plain_hostname=True, # Allow hostname only without TLD. + label=_('Automation Analytics upload URL.'), + help_text=_('This setting is used to to configure data collection for the Automation Analytics dashboard.'), + category=_('System'), + category_slug='system', +) + register( 'INSTALL_UUID', field_class=fields.CharField, From 56c694404945ebd084609fe04f44ff8114a80a53 Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Wed, 28 Aug 2019 13:54:15 -0400 Subject: [PATCH 2/3] add ui fields to configure tower in tower for automation analytics fields --- .../forms/system-form/sub-forms/system-misc.form.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 3c98e95c41..f7c94e0139 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 @@ -61,6 +61,19 @@ export default ['i18n', function(i18n) { }, INSIGHTS_TRACKING_STATE: { type: 'toggleSwitch' + }, + REDHAT_USERNAME: { + type: 'text', + reset: 'REDHAT_USERNAME', + }, + REDHAT_PASSWORD: { + type: 'sensitive', + hasShowInputButton: true, + reset: 'REDHAT_PASSWORD', + }, + AUTOMATION_ANALYTICS_URL: { + type: 'text', + reset: 'AUTOMATION_ANALYTICS_URL', } }, From eacd3568816af128af8519b4296dd0cf2e335690 Mon Sep 17 00:00:00 2001 From: Christian Adams Date: Wed, 28 Aug 2019 09:25:02 -0400 Subject: [PATCH 3/3] fix wording in settings for license & automation analytics creds --- awx/main/conf.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/awx/main/conf.py b/awx/main/conf.py index 1108fb9f26..05529aadf9 100644 --- a/awx/main/conf.py +++ b/awx/main/conf.py @@ -131,8 +131,8 @@ register( allow_blank=True, encrypted=False, read_only=False, - label=_('Your Red hat customer username'), - help_text=_('Enter your Red Hat customer password to get a Tower License'), # noqa + label=_('Red Hat customer username'), + help_text=_('This username is used to retrieve license information and to send Automation Analytics'), # noqa category=_('System'), category_slug='system', ) @@ -144,8 +144,8 @@ register( allow_blank=True, encrypted=True, read_only=False, - label=_('Your Red Hat customer password'), - help_text=_('Enter your Red Hat customer password to get a Tower License'), # noqa + label=_('Red Hat customer password'), + help_text=_('This password is used to retrieve license information and to send Automation Analytics'), # noqa category=_('System'), category_slug='system', ) @@ -157,7 +157,7 @@ register( schemes=('http', 'https'), allow_plain_hostname=True, # Allow hostname only without TLD. label=_('Automation Analytics upload URL.'), - help_text=_('This setting is used to to configure data collection for the Automation Analytics dashboard.'), + help_text=_('This setting is used to to configure data collection for the Automation Analytics dashboard'), category=_('System'), category_slug='system', )