From c24e169bf6070e17b815fba09ddb5dc128ccc52c Mon Sep 17 00:00:00 2001 From: Marliana Lara Date: Tue, 28 Jul 2020 15:22:36 -0400 Subject: [PATCH 1/2] Add settings framework --- .../AppContainer/NavExpandableGroup.jsx | 9 + awx/ui_next/src/routeConfig.js | 34 +--- .../src/screens/AuthSetting/AuthSettings.jsx | 28 --- .../screens/AuthSetting/AuthSettings.test.jsx | 29 --- awx/ui_next/src/screens/AuthSetting/index.js | 1 - .../src/screens/JobsSetting/JobsSettings.jsx | 28 --- .../screens/JobsSetting/JobsSettings.test.jsx | 29 --- awx/ui_next/src/screens/JobsSetting/index.js | 1 - awx/ui_next/src/screens/License/License.jsx | 28 --- .../src/screens/License/License.test.jsx | 29 --- .../Setting/ActivityStream/ActivityStream.jsx | 29 +++ .../ActivityStream/ActivityStream.test.jsx | 16 ++ .../ActivityStreamDetail.jsx | 25 +++ .../ActivityStreamDetail.test.jsx | 16 ++ .../ActivityStreamDetail/index.js | 1 + .../ActivityStreamEdit/ActivityStreamEdit.jsx | 25 +++ .../ActivityStreamEdit.test.jsx | 16 ++ .../ActivityStreamEdit/index.js | 1 + .../screens/Setting/ActivityStream/index.js | 1 + .../src/screens/Setting/AzureAD/AzureAD.jsx | 30 +++ .../screens/Setting/AzureAD/AzureAD.test.jsx | 16 ++ .../AzureAD/AzureADDetail/AzureADDetail.jsx | 25 +++ .../AzureADDetail/AzureADDetail.test.jsx | 16 ++ .../Setting/AzureAD/AzureADDetail/index.js | 1 + .../AzureAD/AzureADEdit/AzureADEdit.jsx | 25 +++ .../AzureAD/AzureADEdit/AzureADEdit.test.jsx | 16 ++ .../Setting/AzureAD/AzureADEdit/index.js | 1 + .../src/screens/Setting/AzureAD/index.js | 1 + .../src/screens/Setting/GitHub/GitHub.jsx | 30 +++ .../screens/Setting/GitHub/GitHub.test.jsx | 16 ++ .../GitHub/GitHubDetail/GitHubDetail.jsx | 25 +++ .../GitHub/GitHubDetail/GitHubDetail.test.jsx | 16 ++ .../Setting/GitHub/GitHubDetail/index.js | 1 + .../Setting/GitHub/GitHubEdit/GitHubEdit.jsx | 25 +++ .../GitHub/GitHubEdit/GitHubEdit.test.jsx | 16 ++ .../Setting/GitHub/GitHubEdit/index.js | 1 + .../src/screens/Setting/GitHub/index.js | 1 + .../Setting/GoogleOAuth2/GoogleOAuth2.jsx | 30 +++ .../GoogleOAuth2/GoogleOAuth2.test.jsx | 16 ++ .../GoogleOAuth2Detail/GoogleOAuth2Detail.jsx | 25 +++ .../GoogleOAuth2Detail.test.jsx | 16 ++ .../GoogleOAuth2/GoogleOAuth2Detail/index.js | 1 + .../GoogleOAuth2Edit/GoogleOAuth2Edit.jsx | 25 +++ .../GoogleOAuth2Edit.test.jsx | 16 ++ .../GoogleOAuth2/GoogleOAuth2Edit/index.js | 1 + .../src/screens/Setting/GoogleOAuth2/index.js | 1 + awx/ui_next/src/screens/Setting/Jobs/Jobs.jsx | 30 +++ .../src/screens/Setting/Jobs/Jobs.test.jsx | 16 ++ .../Setting/Jobs/JobsDetail/JobsDetail.jsx | 25 +++ .../Jobs/JobsDetail/JobsDetail.test.jsx | 16 ++ .../screens/Setting/Jobs/JobsDetail/index.js | 1 + .../Setting/Jobs/JobsEdit/JobsEdit.jsx | 25 +++ .../Setting/Jobs/JobsEdit/JobsEdit.test.jsx | 16 ++ .../screens/Setting/Jobs/JobsEdit/index.js | 1 + awx/ui_next/src/screens/Setting/Jobs/index.js | 1 + awx/ui_next/src/screens/Setting/LDAP/LDAP.jsx | 30 +++ .../src/screens/Setting/LDAP/LDAP.test.jsx | 16 ++ .../Setting/LDAP/LDAPDetail/LDAPDetail.jsx | 25 +++ .../LDAP/LDAPDetail/LDAPDetail.test.jsx | 16 ++ .../screens/Setting/LDAP/LDAPDetail/index.js | 1 + .../Setting/LDAP/LDAPEdit/LDAPEdit.jsx | 25 +++ .../Setting/LDAP/LDAPEdit/LDAPEdit.test.jsx | 16 ++ .../screens/Setting/LDAP/LDAPEdit/index.js | 1 + awx/ui_next/src/screens/Setting/LDAP/index.js | 1 + .../src/screens/Setting/License/License.jsx | 30 +++ .../screens/Setting/License/License.test.jsx | 16 ++ .../License/LicenseDetail/LicenseDetail.jsx | 25 +++ .../LicenseDetail/LicenseDetail.test.jsx | 16 ++ .../Setting/License/LicenseDetail/index.js | 1 + .../License/LicenseEdit/LicenseEdit.jsx | 25 +++ .../License/LicenseEdit/LicenseEdit.test.jsx | 16 ++ .../Setting/License/LicenseEdit/index.js | 1 + .../screens/{ => Setting}/License/index.js | 0 .../src/screens/Setting/Logging/Logging.jsx | 30 +++ .../screens/Setting/Logging/Logging.test.jsx | 16 ++ .../Logging/LoggingDetail/LoggingDetail.jsx | 25 +++ .../LoggingDetail/LoggingDetail.test.jsx | 16 ++ .../Setting/Logging/LoggingDetail/index.js | 1 + .../Logging/LoggingEdit/LoggingEdit.jsx | 25 +++ .../Logging/LoggingEdit/LoggingEdit.test.jsx | 16 ++ .../Setting/Logging/LoggingEdit/index.js | 1 + .../src/screens/Setting/Logging/index.js | 1 + .../screens/Setting/MiscSystem/MiscSystem.jsx | 30 +++ .../Setting/MiscSystem/MiscSystem.test.jsx | 18 ++ .../MiscSystemDetail/MiscSystemDetail.jsx | 25 +++ .../MiscSystemDetail.test.jsx | 16 ++ .../MiscSystem/MiscSystemDetail/index.js | 1 + .../MiscSystemEdit/MiscSystemEdit.jsx | 25 +++ .../MiscSystemEdit/MiscSystemEdit.test.jsx | 16 ++ .../MiscSystem/MiscSystemEdit/index.js | 1 + .../src/screens/Setting/MiscSystem/index.js | 1 + .../src/screens/Setting/Radius/Radius.jsx | 30 +++ .../screens/Setting/Radius/Radius.test.jsx | 16 ++ .../Radius/RadiusDetail/RadiusDetail.jsx | 25 +++ .../Radius/RadiusDetail/RadiusDetail.test.jsx | 16 ++ .../Setting/Radius/RadiusDetail/index.js | 1 + .../Setting/Radius/RadiusEdit/RadiusEdit.jsx | 25 +++ .../Radius/RadiusEdit/RadiusEdit.test.jsx | 16 ++ .../Setting/Radius/RadiusEdit/index.js | 1 + .../src/screens/Setting/Radius/index.js | 1 + awx/ui_next/src/screens/Setting/SAML/SAML.jsx | 30 +++ .../src/screens/Setting/SAML/SAML.test.jsx | 16 ++ .../Setting/SAML/SAMLDetail/SAMLDetail.jsx | 25 +++ .../SAML/SAMLDetail/SAMLDetail.test.jsx | 16 ++ .../screens/Setting/SAML/SAMLDetail/index.js | 1 + .../Setting/SAML/SAMLEdit/SAMLEdit.jsx | 25 +++ .../Setting/SAML/SAMLEdit/SAMLEdit.test.jsx | 16 ++ .../screens/Setting/SAML/SAMLEdit/index.js | 1 + awx/ui_next/src/screens/Setting/SAML/index.js | 1 + .../src/screens/Setting/SettingList.jsx | 178 ++++++++++++++++++ .../src/screens/Setting/SettingList.test.jsx | 16 ++ awx/ui_next/src/screens/Setting/Settings.jsx | 101 ++++++++++ .../src/screens/Setting/Settings.test.jsx | 16 ++ .../src/screens/Setting/TACACS/TACACS.jsx | 30 +++ .../screens/Setting/TACACS/TACACS.test.jsx | 16 ++ .../TACACS/TACACSDetail/TACACSDetail.jsx | 25 +++ .../TACACS/TACACSDetail/TACACSDetail.test.jsx | 16 ++ .../Setting/TACACS/TACACSDetail/index.js | 1 + .../Setting/TACACS/TACACSEdit/TACACSEdit.jsx | 25 +++ .../TACACS/TACACSEdit/TACACSEdit.test.jsx | 16 ++ .../Setting/TACACS/TACACSEdit/index.js | 1 + .../src/screens/Setting/TACACS/index.js | 1 + awx/ui_next/src/screens/Setting/UI/UI.jsx | 30 +++ .../src/screens/Setting/UI/UI.test.jsx | 16 ++ .../screens/Setting/UI/UIDetail/UIDetail.jsx | 25 +++ .../Setting/UI/UIDetail/UIDetail.test.jsx | 16 ++ .../src/screens/Setting/UI/UIDetail/index.js | 1 + .../src/screens/Setting/UI/UIEdit/UIEdit.jsx | 25 +++ .../screens/Setting/UI/UIEdit/UIEdit.test.jsx | 16 ++ .../src/screens/Setting/UI/UIEdit/index.js | 1 + awx/ui_next/src/screens/Setting/UI/index.js | 1 + awx/ui_next/src/screens/Setting/index.js | 1 + .../screens/SystemSetting/SystemSettings.jsx | 28 --- .../SystemSetting/SystemSettings.test.jsx | 29 --- .../src/screens/SystemSetting/index.js | 1 - .../src/screens/UISetting/UISettings.jsx | 28 --- .../src/screens/UISetting/UISettings.test.jsx | 29 --- awx/ui_next/src/screens/UISetting/index.js | 1 - 138 files changed, 2029 insertions(+), 318 deletions(-) delete mode 100644 awx/ui_next/src/screens/AuthSetting/AuthSettings.jsx delete mode 100644 awx/ui_next/src/screens/AuthSetting/AuthSettings.test.jsx delete mode 100644 awx/ui_next/src/screens/AuthSetting/index.js delete mode 100644 awx/ui_next/src/screens/JobsSetting/JobsSettings.jsx delete mode 100644 awx/ui_next/src/screens/JobsSetting/JobsSettings.test.jsx delete mode 100644 awx/ui_next/src/screens/JobsSetting/index.js delete mode 100644 awx/ui_next/src/screens/License/License.jsx delete mode 100644 awx/ui_next/src/screens/License/License.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/ActivityStream/ActivityStream.jsx create mode 100644 awx/ui_next/src/screens/Setting/ActivityStream/ActivityStream.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamDetail/ActivityStreamDetail.jsx create mode 100644 awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamDetail/ActivityStreamDetail.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamDetail/index.js create mode 100644 awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamEdit/ActivityStreamEdit.jsx create mode 100644 awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamEdit/ActivityStreamEdit.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamEdit/index.js create mode 100644 awx/ui_next/src/screens/Setting/ActivityStream/index.js create mode 100644 awx/ui_next/src/screens/Setting/AzureAD/AzureAD.jsx create mode 100644 awx/ui_next/src/screens/Setting/AzureAD/AzureAD.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/AzureAD/AzureADDetail/AzureADDetail.jsx create mode 100644 awx/ui_next/src/screens/Setting/AzureAD/AzureADDetail/AzureADDetail.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/AzureAD/AzureADDetail/index.js create mode 100644 awx/ui_next/src/screens/Setting/AzureAD/AzureADEdit/AzureADEdit.jsx create mode 100644 awx/ui_next/src/screens/Setting/AzureAD/AzureADEdit/AzureADEdit.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/AzureAD/AzureADEdit/index.js create mode 100644 awx/ui_next/src/screens/Setting/AzureAD/index.js create mode 100644 awx/ui_next/src/screens/Setting/GitHub/GitHub.jsx create mode 100644 awx/ui_next/src/screens/Setting/GitHub/GitHub.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/GitHub/GitHubDetail/GitHubDetail.jsx create mode 100644 awx/ui_next/src/screens/Setting/GitHub/GitHubDetail/GitHubDetail.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/GitHub/GitHubDetail/index.js create mode 100644 awx/ui_next/src/screens/Setting/GitHub/GitHubEdit/GitHubEdit.jsx create mode 100644 awx/ui_next/src/screens/Setting/GitHub/GitHubEdit/GitHubEdit.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/GitHub/GitHubEdit/index.js create mode 100644 awx/ui_next/src/screens/Setting/GitHub/index.js create mode 100644 awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2.jsx create mode 100644 awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Detail/GoogleOAuth2Detail.jsx create mode 100644 awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Detail/GoogleOAuth2Detail.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Detail/index.js create mode 100644 awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Edit/GoogleOAuth2Edit.jsx create mode 100644 awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Edit/GoogleOAuth2Edit.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Edit/index.js create mode 100644 awx/ui_next/src/screens/Setting/GoogleOAuth2/index.js create mode 100644 awx/ui_next/src/screens/Setting/Jobs/Jobs.jsx create mode 100644 awx/ui_next/src/screens/Setting/Jobs/Jobs.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/Jobs/JobsDetail/JobsDetail.jsx create mode 100644 awx/ui_next/src/screens/Setting/Jobs/JobsDetail/JobsDetail.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/Jobs/JobsDetail/index.js create mode 100644 awx/ui_next/src/screens/Setting/Jobs/JobsEdit/JobsEdit.jsx create mode 100644 awx/ui_next/src/screens/Setting/Jobs/JobsEdit/JobsEdit.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/Jobs/JobsEdit/index.js create mode 100644 awx/ui_next/src/screens/Setting/Jobs/index.js create mode 100644 awx/ui_next/src/screens/Setting/LDAP/LDAP.jsx create mode 100644 awx/ui_next/src/screens/Setting/LDAP/LDAP.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/LDAP/LDAPDetail/LDAPDetail.jsx create mode 100644 awx/ui_next/src/screens/Setting/LDAP/LDAPDetail/LDAPDetail.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/LDAP/LDAPDetail/index.js create mode 100644 awx/ui_next/src/screens/Setting/LDAP/LDAPEdit/LDAPEdit.jsx create mode 100644 awx/ui_next/src/screens/Setting/LDAP/LDAPEdit/LDAPEdit.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/LDAP/LDAPEdit/index.js create mode 100644 awx/ui_next/src/screens/Setting/LDAP/index.js create mode 100644 awx/ui_next/src/screens/Setting/License/License.jsx create mode 100644 awx/ui_next/src/screens/Setting/License/License.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/License/LicenseDetail/LicenseDetail.jsx create mode 100644 awx/ui_next/src/screens/Setting/License/LicenseDetail/LicenseDetail.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/License/LicenseDetail/index.js create mode 100644 awx/ui_next/src/screens/Setting/License/LicenseEdit/LicenseEdit.jsx create mode 100644 awx/ui_next/src/screens/Setting/License/LicenseEdit/LicenseEdit.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/License/LicenseEdit/index.js rename awx/ui_next/src/screens/{ => Setting}/License/index.js (100%) create mode 100644 awx/ui_next/src/screens/Setting/Logging/Logging.jsx create mode 100644 awx/ui_next/src/screens/Setting/Logging/Logging.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/Logging/LoggingDetail/LoggingDetail.jsx create mode 100644 awx/ui_next/src/screens/Setting/Logging/LoggingDetail/LoggingDetail.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/Logging/LoggingDetail/index.js create mode 100644 awx/ui_next/src/screens/Setting/Logging/LoggingEdit/LoggingEdit.jsx create mode 100644 awx/ui_next/src/screens/Setting/Logging/LoggingEdit/LoggingEdit.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/Logging/LoggingEdit/index.js create mode 100644 awx/ui_next/src/screens/Setting/Logging/index.js create mode 100644 awx/ui_next/src/screens/Setting/MiscSystem/MiscSystem.jsx create mode 100644 awx/ui_next/src/screens/Setting/MiscSystem/MiscSystem.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemDetail/MiscSystemDetail.jsx create mode 100644 awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemDetail/MiscSystemDetail.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemDetail/index.js create mode 100644 awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemEdit/MiscSystemEdit.jsx create mode 100644 awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemEdit/MiscSystemEdit.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemEdit/index.js create mode 100644 awx/ui_next/src/screens/Setting/MiscSystem/index.js create mode 100644 awx/ui_next/src/screens/Setting/Radius/Radius.jsx create mode 100644 awx/ui_next/src/screens/Setting/Radius/Radius.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/Radius/RadiusDetail/RadiusDetail.jsx create mode 100644 awx/ui_next/src/screens/Setting/Radius/RadiusDetail/RadiusDetail.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/Radius/RadiusDetail/index.js create mode 100644 awx/ui_next/src/screens/Setting/Radius/RadiusEdit/RadiusEdit.jsx create mode 100644 awx/ui_next/src/screens/Setting/Radius/RadiusEdit/RadiusEdit.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/Radius/RadiusEdit/index.js create mode 100644 awx/ui_next/src/screens/Setting/Radius/index.js create mode 100644 awx/ui_next/src/screens/Setting/SAML/SAML.jsx create mode 100644 awx/ui_next/src/screens/Setting/SAML/SAML.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/SAML/SAMLDetail/SAMLDetail.jsx create mode 100644 awx/ui_next/src/screens/Setting/SAML/SAMLDetail/SAMLDetail.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/SAML/SAMLDetail/index.js create mode 100644 awx/ui_next/src/screens/Setting/SAML/SAMLEdit/SAMLEdit.jsx create mode 100644 awx/ui_next/src/screens/Setting/SAML/SAMLEdit/SAMLEdit.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/SAML/SAMLEdit/index.js create mode 100644 awx/ui_next/src/screens/Setting/SAML/index.js create mode 100644 awx/ui_next/src/screens/Setting/SettingList.jsx create mode 100644 awx/ui_next/src/screens/Setting/SettingList.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/Settings.jsx create mode 100644 awx/ui_next/src/screens/Setting/Settings.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/TACACS/TACACS.jsx create mode 100644 awx/ui_next/src/screens/Setting/TACACS/TACACS.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/TACACS/TACACSDetail/TACACSDetail.jsx create mode 100644 awx/ui_next/src/screens/Setting/TACACS/TACACSDetail/TACACSDetail.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/TACACS/TACACSDetail/index.js create mode 100644 awx/ui_next/src/screens/Setting/TACACS/TACACSEdit/TACACSEdit.jsx create mode 100644 awx/ui_next/src/screens/Setting/TACACS/TACACSEdit/TACACSEdit.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/TACACS/TACACSEdit/index.js create mode 100644 awx/ui_next/src/screens/Setting/TACACS/index.js create mode 100644 awx/ui_next/src/screens/Setting/UI/UI.jsx create mode 100644 awx/ui_next/src/screens/Setting/UI/UI.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/UI/UIDetail/UIDetail.jsx create mode 100644 awx/ui_next/src/screens/Setting/UI/UIDetail/UIDetail.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/UI/UIDetail/index.js create mode 100644 awx/ui_next/src/screens/Setting/UI/UIEdit/UIEdit.jsx create mode 100644 awx/ui_next/src/screens/Setting/UI/UIEdit/UIEdit.test.jsx create mode 100644 awx/ui_next/src/screens/Setting/UI/UIEdit/index.js create mode 100644 awx/ui_next/src/screens/Setting/UI/index.js create mode 100644 awx/ui_next/src/screens/Setting/index.js delete mode 100644 awx/ui_next/src/screens/SystemSetting/SystemSettings.jsx delete mode 100644 awx/ui_next/src/screens/SystemSetting/SystemSettings.test.jsx delete mode 100644 awx/ui_next/src/screens/SystemSetting/index.js delete mode 100644 awx/ui_next/src/screens/UISetting/UISettings.jsx delete mode 100644 awx/ui_next/src/screens/UISetting/UISettings.test.jsx delete mode 100644 awx/ui_next/src/screens/UISetting/index.js diff --git a/awx/ui_next/src/components/AppContainer/NavExpandableGroup.jsx b/awx/ui_next/src/components/AppContainer/NavExpandableGroup.jsx index 7df96c65c0..1ebbb7e9ae 100644 --- a/awx/ui_next/src/components/AppContainer/NavExpandableGroup.jsx +++ b/awx/ui_next/src/components/AppContainer/NavExpandableGroup.jsx @@ -34,6 +34,15 @@ class NavExpandableGroup extends Component { const { groupId, groupTitle, routes } = this.props; const { isExpanded } = this.state; + if (routes.length === 1) { + const [{ path }] = routes; + return ( + + {groupTitle} + + ); + } + return ( - - - {i18n._(t`Authentication Settings`)} - - - - - ); - } -} - -export default withI18n()(AuthSettings); diff --git a/awx/ui_next/src/screens/AuthSetting/AuthSettings.test.jsx b/awx/ui_next/src/screens/AuthSetting/AuthSettings.test.jsx deleted file mode 100644 index 0c0ca67b4b..0000000000 --- a/awx/ui_next/src/screens/AuthSetting/AuthSettings.test.jsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react'; - -import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; - -import AuthSettings from './AuthSettings'; - -describe('', () => { - let pageWrapper; - let pageSections; - let title; - - beforeEach(() => { - pageWrapper = mountWithContexts(); - pageSections = pageWrapper.find('PageSection'); - title = pageWrapper.find('Title'); - }); - - afterEach(() => { - pageWrapper.unmount(); - }); - - test('initially renders without crashing', () => { - expect(pageWrapper.length).toBe(1); - expect(pageSections.length).toBe(2); - expect(title.length).toBe(1); - expect(title.props().size).toBe('2xl'); - expect(pageSections.first().props().variant).toBe('light'); - }); -}); diff --git a/awx/ui_next/src/screens/AuthSetting/index.js b/awx/ui_next/src/screens/AuthSetting/index.js deleted file mode 100644 index 880b6544c0..0000000000 --- a/awx/ui_next/src/screens/AuthSetting/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './AuthSettings'; diff --git a/awx/ui_next/src/screens/JobsSetting/JobsSettings.jsx b/awx/ui_next/src/screens/JobsSetting/JobsSettings.jsx deleted file mode 100644 index f5fb77ef50..0000000000 --- a/awx/ui_next/src/screens/JobsSetting/JobsSettings.jsx +++ /dev/null @@ -1,28 +0,0 @@ -import React, { Component, Fragment } from 'react'; -import { withI18n } from '@lingui/react'; -import { t } from '@lingui/macro'; -import { - PageSection, - PageSectionVariants, - Title, -} from '@patternfly/react-core'; - -class JobsSettings extends Component { - render() { - const { i18n } = this.props; - const { light } = PageSectionVariants; - - return ( - - - - {i18n._(t`Jobs Settings`)} - - - - - ); - } -} - -export default withI18n()(JobsSettings); diff --git a/awx/ui_next/src/screens/JobsSetting/JobsSettings.test.jsx b/awx/ui_next/src/screens/JobsSetting/JobsSettings.test.jsx deleted file mode 100644 index c57567c5c4..0000000000 --- a/awx/ui_next/src/screens/JobsSetting/JobsSettings.test.jsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react'; - -import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; - -import JobsSettings from './JobsSettings'; - -describe('', () => { - let pageWrapper; - let pageSections; - let title; - - beforeEach(() => { - pageWrapper = mountWithContexts(); - pageSections = pageWrapper.find('PageSection'); - title = pageWrapper.find('Title'); - }); - - afterEach(() => { - pageWrapper.unmount(); - }); - - test('initially renders without crashing', () => { - expect(pageWrapper.length).toBe(1); - expect(pageSections.length).toBe(2); - expect(title.length).toBe(1); - expect(title.props().size).toBe('2xl'); - expect(pageSections.first().props().variant).toBe('light'); - }); -}); diff --git a/awx/ui_next/src/screens/JobsSetting/index.js b/awx/ui_next/src/screens/JobsSetting/index.js deleted file mode 100644 index 376300927a..0000000000 --- a/awx/ui_next/src/screens/JobsSetting/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './JobsSettings'; diff --git a/awx/ui_next/src/screens/License/License.jsx b/awx/ui_next/src/screens/License/License.jsx deleted file mode 100644 index 1ec59d2930..0000000000 --- a/awx/ui_next/src/screens/License/License.jsx +++ /dev/null @@ -1,28 +0,0 @@ -import React, { Component, Fragment } from 'react'; -import { withI18n } from '@lingui/react'; -import { t } from '@lingui/macro'; -import { - PageSection, - PageSectionVariants, - Title, -} from '@patternfly/react-core'; - -class License extends Component { - render() { - const { i18n } = this.props; - const { light } = PageSectionVariants; - - return ( - - - - {i18n._(t`License`)} - - - - - ); - } -} - -export default withI18n()(License); diff --git a/awx/ui_next/src/screens/License/License.test.jsx b/awx/ui_next/src/screens/License/License.test.jsx deleted file mode 100644 index 58e3cbfa90..0000000000 --- a/awx/ui_next/src/screens/License/License.test.jsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react'; - -import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; - -import License from './License'; - -describe('', () => { - let pageWrapper; - let pageSections; - let title; - - beforeEach(() => { - pageWrapper = mountWithContexts(); - pageSections = pageWrapper.find('PageSection'); - title = pageWrapper.find('Title'); - }); - - afterEach(() => { - pageWrapper.unmount(); - }); - - test('initially renders without crashing', () => { - expect(pageWrapper.length).toBe(1); - expect(pageSections.length).toBe(2); - expect(title.length).toBe(1); - expect(title.props().size).toBe('2xl'); - expect(pageSections.first().props().variant).toBe('light'); - }); -}); diff --git a/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStream.jsx b/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStream.jsx new file mode 100644 index 0000000000..bfdfc6f736 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStream.jsx @@ -0,0 +1,29 @@ +import React from 'react'; +import { Redirect, Route, Switch } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { PageSection, Card } from '@patternfly/react-core'; +import ActivityStreamDetail from './ActivityStreamDetail'; +import ActivityStreamEdit from './ActivityStreamEdit'; + +function ActivityStream({ i18n }) { + const baseUrl = '/settings/activity_stream'; + return ( + + + {i18n._(t`Activity stream settings`)} + + + + + + + + + + + + ); +} + +export default withI18n()(ActivityStream); diff --git a/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStream.test.jsx b/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStream.test.jsx new file mode 100644 index 0000000000..cb102b3009 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStream.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import ActivityStream from './ActivityStream'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('Card').text()).toContain('Activity stream settings'); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamDetail/ActivityStreamDetail.jsx b/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamDetail/ActivityStreamDetail.jsx new file mode 100644 index 0000000000..58872940c8 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamDetail/ActivityStreamDetail.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function ActivityStreamDetail({ i18n }) { + return ( + + {i18n._(t`Detail coming soon :)`)} + + + + + ); +} + +export default withI18n()(ActivityStreamDetail); diff --git a/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamDetail/ActivityStreamDetail.test.jsx b/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamDetail/ActivityStreamDetail.test.jsx new file mode 100644 index 0000000000..fe7949a139 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamDetail/ActivityStreamDetail.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import ActivityStreamDetail from './ActivityStreamDetail'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('ActivityStreamDetail').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamDetail/index.js b/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamDetail/index.js new file mode 100644 index 0000000000..442e39b0e7 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamDetail/index.js @@ -0,0 +1 @@ +export { default } from './ActivityStreamDetail'; diff --git a/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamEdit/ActivityStreamEdit.jsx b/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamEdit/ActivityStreamEdit.jsx new file mode 100644 index 0000000000..6b11e727c0 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamEdit/ActivityStreamEdit.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function ActivityStreamEdit({ i18n }) { + return ( + + {i18n._(t`Edit form coming soon :)`)} + + + + + ); +} + +export default withI18n()(ActivityStreamEdit); diff --git a/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamEdit/ActivityStreamEdit.test.jsx b/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamEdit/ActivityStreamEdit.test.jsx new file mode 100644 index 0000000000..a9794b3a69 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamEdit/ActivityStreamEdit.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import ActivityStreamEdit from './ActivityStreamEdit'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('ActivityStreamEdit').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamEdit/index.js b/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamEdit/index.js new file mode 100644 index 0000000000..0818b2b1a3 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/ActivityStream/ActivityStreamEdit/index.js @@ -0,0 +1 @@ +export { default } from './ActivityStreamEdit'; diff --git a/awx/ui_next/src/screens/Setting/ActivityStream/index.js b/awx/ui_next/src/screens/Setting/ActivityStream/index.js new file mode 100644 index 0000000000..5c0c72d9ef --- /dev/null +++ b/awx/ui_next/src/screens/Setting/ActivityStream/index.js @@ -0,0 +1 @@ +export { default } from './ActivityStream'; diff --git a/awx/ui_next/src/screens/Setting/AzureAD/AzureAD.jsx b/awx/ui_next/src/screens/Setting/AzureAD/AzureAD.jsx new file mode 100644 index 0000000000..ab2f23e4a9 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/AzureAD/AzureAD.jsx @@ -0,0 +1,30 @@ +import React from 'react'; +import { Redirect, Route, Switch } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { PageSection, Card } from '@patternfly/react-core'; +import AzureADDetail from './AzureADDetail'; +import AzureADEdit from './AzureADEdit'; + +function AzureAD({ i18n }) { + const baseUrl = '/settings/azure'; + + return ( + + + {i18n._(t`Azure AD settings`)} + + + + + + + + + + + + ); +} + +export default withI18n()(AzureAD); diff --git a/awx/ui_next/src/screens/Setting/AzureAD/AzureAD.test.jsx b/awx/ui_next/src/screens/Setting/AzureAD/AzureAD.test.jsx new file mode 100644 index 0000000000..84d21a712e --- /dev/null +++ b/awx/ui_next/src/screens/Setting/AzureAD/AzureAD.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import AzureAD from './AzureAD'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('Card').text()).toContain('Azure AD settings'); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/AzureAD/AzureADDetail/AzureADDetail.jsx b/awx/ui_next/src/screens/Setting/AzureAD/AzureADDetail/AzureADDetail.jsx new file mode 100644 index 0000000000..d4d15d4213 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/AzureAD/AzureADDetail/AzureADDetail.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function AzureADDetail({ i18n }) { + return ( + + {i18n._(t`Detail coming soon :)`)} + + + + + ); +} + +export default withI18n()(AzureADDetail); diff --git a/awx/ui_next/src/screens/Setting/AzureAD/AzureADDetail/AzureADDetail.test.jsx b/awx/ui_next/src/screens/Setting/AzureAD/AzureADDetail/AzureADDetail.test.jsx new file mode 100644 index 0000000000..192cb20d15 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/AzureAD/AzureADDetail/AzureADDetail.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import AzureADDetail from './AzureADDetail'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('AzureADDetail').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/AzureAD/AzureADDetail/index.js b/awx/ui_next/src/screens/Setting/AzureAD/AzureADDetail/index.js new file mode 100644 index 0000000000..baa4ca3b5e --- /dev/null +++ b/awx/ui_next/src/screens/Setting/AzureAD/AzureADDetail/index.js @@ -0,0 +1 @@ +export { default } from './AzureADDetail'; diff --git a/awx/ui_next/src/screens/Setting/AzureAD/AzureADEdit/AzureADEdit.jsx b/awx/ui_next/src/screens/Setting/AzureAD/AzureADEdit/AzureADEdit.jsx new file mode 100644 index 0000000000..3aaf801740 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/AzureAD/AzureADEdit/AzureADEdit.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function AzureADEdit({ i18n }) { + return ( + + {i18n._(t`Edit form coming soon :)`)} + + + + + ); +} + +export default withI18n()(AzureADEdit); diff --git a/awx/ui_next/src/screens/Setting/AzureAD/AzureADEdit/AzureADEdit.test.jsx b/awx/ui_next/src/screens/Setting/AzureAD/AzureADEdit/AzureADEdit.test.jsx new file mode 100644 index 0000000000..33ff2f09d8 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/AzureAD/AzureADEdit/AzureADEdit.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import AzureADEdit from './AzureADEdit'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('AzureADEdit').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/AzureAD/AzureADEdit/index.js b/awx/ui_next/src/screens/Setting/AzureAD/AzureADEdit/index.js new file mode 100644 index 0000000000..879ccbb06e --- /dev/null +++ b/awx/ui_next/src/screens/Setting/AzureAD/AzureADEdit/index.js @@ -0,0 +1 @@ +export { default } from './AzureADEdit'; diff --git a/awx/ui_next/src/screens/Setting/AzureAD/index.js b/awx/ui_next/src/screens/Setting/AzureAD/index.js new file mode 100644 index 0000000000..3eee0cb78d --- /dev/null +++ b/awx/ui_next/src/screens/Setting/AzureAD/index.js @@ -0,0 +1 @@ +export { default } from './AzureAD'; diff --git a/awx/ui_next/src/screens/Setting/GitHub/GitHub.jsx b/awx/ui_next/src/screens/Setting/GitHub/GitHub.jsx new file mode 100644 index 0000000000..bd2a2fd121 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/GitHub/GitHub.jsx @@ -0,0 +1,30 @@ +import React from 'react'; +import { Redirect, Route, Switch } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { PageSection, Card } from '@patternfly/react-core'; +import GitHubDetail from './GitHubDetail'; +import GitHubEdit from './GitHubEdit'; + +function GitHub({ i18n }) { + const baseUrl = '/settings/github'; + + return ( + + + {i18n._(t`GitHub settings`)} + + + + + + + + + + + + ); +} + +export default withI18n()(GitHub); diff --git a/awx/ui_next/src/screens/Setting/GitHub/GitHub.test.jsx b/awx/ui_next/src/screens/Setting/GitHub/GitHub.test.jsx new file mode 100644 index 0000000000..25ea0d5ca0 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/GitHub/GitHub.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import GitHub from './GitHub'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('Card').text()).toContain('GitHub settings'); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/GitHub/GitHubDetail/GitHubDetail.jsx b/awx/ui_next/src/screens/Setting/GitHub/GitHubDetail/GitHubDetail.jsx new file mode 100644 index 0000000000..de8ad5ec52 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/GitHub/GitHubDetail/GitHubDetail.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function GitHubDetail({ i18n }) { + return ( + + {i18n._(t`Detail coming soon :)`)} + + + + + ); +} + +export default withI18n()(GitHubDetail); diff --git a/awx/ui_next/src/screens/Setting/GitHub/GitHubDetail/GitHubDetail.test.jsx b/awx/ui_next/src/screens/Setting/GitHub/GitHubDetail/GitHubDetail.test.jsx new file mode 100644 index 0000000000..d75fd60ea1 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/GitHub/GitHubDetail/GitHubDetail.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import GitHubDetail from './GitHubDetail'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('GitHubDetail').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/GitHub/GitHubDetail/index.js b/awx/ui_next/src/screens/Setting/GitHub/GitHubDetail/index.js new file mode 100644 index 0000000000..1edff6684e --- /dev/null +++ b/awx/ui_next/src/screens/Setting/GitHub/GitHubDetail/index.js @@ -0,0 +1 @@ +export { default } from './GitHubDetail'; diff --git a/awx/ui_next/src/screens/Setting/GitHub/GitHubEdit/GitHubEdit.jsx b/awx/ui_next/src/screens/Setting/GitHub/GitHubEdit/GitHubEdit.jsx new file mode 100644 index 0000000000..07a6f45015 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/GitHub/GitHubEdit/GitHubEdit.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function GitHubEdit({ i18n }) { + return ( + + {i18n._(t`Edit form coming soon :)`)} + + + + + ); +} + +export default withI18n()(GitHubEdit); diff --git a/awx/ui_next/src/screens/Setting/GitHub/GitHubEdit/GitHubEdit.test.jsx b/awx/ui_next/src/screens/Setting/GitHub/GitHubEdit/GitHubEdit.test.jsx new file mode 100644 index 0000000000..539932c99a --- /dev/null +++ b/awx/ui_next/src/screens/Setting/GitHub/GitHubEdit/GitHubEdit.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import GitHubEdit from './GitHubEdit'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('GitHubEdit').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/GitHub/GitHubEdit/index.js b/awx/ui_next/src/screens/Setting/GitHub/GitHubEdit/index.js new file mode 100644 index 0000000000..cf1d354bf5 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/GitHub/GitHubEdit/index.js @@ -0,0 +1 @@ +export { default } from './GitHubEdit'; diff --git a/awx/ui_next/src/screens/Setting/GitHub/index.js b/awx/ui_next/src/screens/Setting/GitHub/index.js new file mode 100644 index 0000000000..3bebcf36da --- /dev/null +++ b/awx/ui_next/src/screens/Setting/GitHub/index.js @@ -0,0 +1 @@ +export { default } from './GitHub'; diff --git a/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2.jsx b/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2.jsx new file mode 100644 index 0000000000..1a64384cb5 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2.jsx @@ -0,0 +1,30 @@ +import React from 'react'; +import { Redirect, Route, Switch } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { PageSection, Card } from '@patternfly/react-core'; +import GoogleOAuth2Detail from './GoogleOAuth2Detail'; +import GoogleOAuth2Edit from './GoogleOAuth2Edit'; + +function GoogleOAuth2({ i18n }) { + const baseUrl = '/settings/google_oauth2'; + + return ( + + + {i18n._(t`Google OAuth 2.0 settings`)} + + + + + + + + + + + + ); +} + +export default withI18n()(GoogleOAuth2); diff --git a/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2.test.jsx b/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2.test.jsx new file mode 100644 index 0000000000..582e2680c5 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import GoogleOAuth2 from './GoogleOAuth2'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('Card').text()).toContain('Google OAuth 2.0 settings'); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Detail/GoogleOAuth2Detail.jsx b/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Detail/GoogleOAuth2Detail.jsx new file mode 100644 index 0000000000..84188ccf3c --- /dev/null +++ b/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Detail/GoogleOAuth2Detail.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function GoogleOAuth2Detail({ i18n }) { + return ( + + {i18n._(t`Detail coming soon :)`)} + + + + + ); +} + +export default withI18n()(GoogleOAuth2Detail); diff --git a/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Detail/GoogleOAuth2Detail.test.jsx b/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Detail/GoogleOAuth2Detail.test.jsx new file mode 100644 index 0000000000..a5408a8af6 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Detail/GoogleOAuth2Detail.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import GoogleOAuth2Detail from './GoogleOAuth2Detail'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('GoogleOAuth2Detail').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Detail/index.js b/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Detail/index.js new file mode 100644 index 0000000000..f88168ce7c --- /dev/null +++ b/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Detail/index.js @@ -0,0 +1 @@ +export { default } from './GoogleOAuth2Detail'; diff --git a/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Edit/GoogleOAuth2Edit.jsx b/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Edit/GoogleOAuth2Edit.jsx new file mode 100644 index 0000000000..50a546334d --- /dev/null +++ b/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Edit/GoogleOAuth2Edit.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function GoogleOAuth2Edit({ i18n }) { + return ( + + {i18n._(t`Edit form coming soon :)`)} + + + + + ); +} + +export default withI18n()(GoogleOAuth2Edit); diff --git a/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Edit/GoogleOAuth2Edit.test.jsx b/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Edit/GoogleOAuth2Edit.test.jsx new file mode 100644 index 0000000000..034a0def4e --- /dev/null +++ b/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Edit/GoogleOAuth2Edit.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import GoogleOAuth2Edit from './GoogleOAuth2Edit'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('GoogleOAuth2Edit').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Edit/index.js b/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Edit/index.js new file mode 100644 index 0000000000..2f6d4af0f9 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/GoogleOAuth2/GoogleOAuth2Edit/index.js @@ -0,0 +1 @@ +export { default } from './GoogleOAuth2Edit'; diff --git a/awx/ui_next/src/screens/Setting/GoogleOAuth2/index.js b/awx/ui_next/src/screens/Setting/GoogleOAuth2/index.js new file mode 100644 index 0000000000..96db4517d5 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/GoogleOAuth2/index.js @@ -0,0 +1 @@ +export { default } from './GoogleOAuth2'; diff --git a/awx/ui_next/src/screens/Setting/Jobs/Jobs.jsx b/awx/ui_next/src/screens/Setting/Jobs/Jobs.jsx new file mode 100644 index 0000000000..33a52f7771 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Jobs/Jobs.jsx @@ -0,0 +1,30 @@ +import React from 'react'; +import { Redirect, Route, Switch } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { PageSection, Card } from '@patternfly/react-core'; +import JobsDetail from './JobsDetail'; +import JobsEdit from './JobsEdit'; + +function Jobs({ i18n }) { + const baseUrl = '/settings/jobs'; + + return ( + + + {i18n._(t`Jobs settings`)} + + + + + + + + + + + + ); +} + +export default withI18n()(Jobs); diff --git a/awx/ui_next/src/screens/Setting/Jobs/Jobs.test.jsx b/awx/ui_next/src/screens/Setting/Jobs/Jobs.test.jsx new file mode 100644 index 0000000000..7a2e767743 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Jobs/Jobs.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import Jobs from './Jobs'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('Card').text()).toContain('Jobs settings'); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/Jobs/JobsDetail/JobsDetail.jsx b/awx/ui_next/src/screens/Setting/Jobs/JobsDetail/JobsDetail.jsx new file mode 100644 index 0000000000..4ecb0eb5df --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Jobs/JobsDetail/JobsDetail.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function JobsDetail({ i18n }) { + return ( + + {i18n._(t`Detail coming soon :)`)} + + + + + ); +} + +export default withI18n()(JobsDetail); diff --git a/awx/ui_next/src/screens/Setting/Jobs/JobsDetail/JobsDetail.test.jsx b/awx/ui_next/src/screens/Setting/Jobs/JobsDetail/JobsDetail.test.jsx new file mode 100644 index 0000000000..80ab5f4795 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Jobs/JobsDetail/JobsDetail.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import JobsDetail from './JobsDetail'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('JobsDetail').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/Jobs/JobsDetail/index.js b/awx/ui_next/src/screens/Setting/Jobs/JobsDetail/index.js new file mode 100644 index 0000000000..1cea5fcc5a --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Jobs/JobsDetail/index.js @@ -0,0 +1 @@ +export { default } from './JobsDetail'; diff --git a/awx/ui_next/src/screens/Setting/Jobs/JobsEdit/JobsEdit.jsx b/awx/ui_next/src/screens/Setting/Jobs/JobsEdit/JobsEdit.jsx new file mode 100644 index 0000000000..7ae08c9276 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Jobs/JobsEdit/JobsEdit.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function JobsEdit({ i18n }) { + return ( + + {i18n._(t`Edit form coming soon :)`)} + + + + + ); +} + +export default withI18n()(JobsEdit); diff --git a/awx/ui_next/src/screens/Setting/Jobs/JobsEdit/JobsEdit.test.jsx b/awx/ui_next/src/screens/Setting/Jobs/JobsEdit/JobsEdit.test.jsx new file mode 100644 index 0000000000..06f4fb2f12 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Jobs/JobsEdit/JobsEdit.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import JobsEdit from './JobsEdit'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('JobsEdit').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/Jobs/JobsEdit/index.js b/awx/ui_next/src/screens/Setting/Jobs/JobsEdit/index.js new file mode 100644 index 0000000000..a7399e9e67 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Jobs/JobsEdit/index.js @@ -0,0 +1 @@ +export { default } from './JobsEdit'; diff --git a/awx/ui_next/src/screens/Setting/Jobs/index.js b/awx/ui_next/src/screens/Setting/Jobs/index.js new file mode 100644 index 0000000000..9fc254c85c --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Jobs/index.js @@ -0,0 +1 @@ +export { default } from './Jobs'; diff --git a/awx/ui_next/src/screens/Setting/LDAP/LDAP.jsx b/awx/ui_next/src/screens/Setting/LDAP/LDAP.jsx new file mode 100644 index 0000000000..f5e9d1b454 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/LDAP/LDAP.jsx @@ -0,0 +1,30 @@ +import React from 'react'; +import { Redirect, Route, Switch } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { PageSection, Card } from '@patternfly/react-core'; +import LDAPDetail from './LDAPDetail'; +import LDAPEdit from './LDAPEdit'; + +function LDAP({ i18n }) { + const baseUrl = '/settings/ldap'; + + return ( + + + {i18n._(t`LDAP settings`)} + + + + + + + + + + + + ); +} + +export default withI18n()(LDAP); diff --git a/awx/ui_next/src/screens/Setting/LDAP/LDAP.test.jsx b/awx/ui_next/src/screens/Setting/LDAP/LDAP.test.jsx new file mode 100644 index 0000000000..f67a4dc108 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/LDAP/LDAP.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import LDAP from './LDAP'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('Card').text()).toContain('LDAP settings'); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/LDAP/LDAPDetail/LDAPDetail.jsx b/awx/ui_next/src/screens/Setting/LDAP/LDAPDetail/LDAPDetail.jsx new file mode 100644 index 0000000000..63e5cfb9b1 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/LDAP/LDAPDetail/LDAPDetail.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function LDAPDetail({ i18n }) { + return ( + + {i18n._(t`Detail coming soon :)`)} + + + + + ); +} + +export default withI18n()(LDAPDetail); diff --git a/awx/ui_next/src/screens/Setting/LDAP/LDAPDetail/LDAPDetail.test.jsx b/awx/ui_next/src/screens/Setting/LDAP/LDAPDetail/LDAPDetail.test.jsx new file mode 100644 index 0000000000..f4440ace38 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/LDAP/LDAPDetail/LDAPDetail.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import LDAPDetail from './LDAPDetail'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('LDAPDetail').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/LDAP/LDAPDetail/index.js b/awx/ui_next/src/screens/Setting/LDAP/LDAPDetail/index.js new file mode 100644 index 0000000000..8bcb7a3206 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/LDAP/LDAPDetail/index.js @@ -0,0 +1 @@ +export { default } from './LDAPDetail'; diff --git a/awx/ui_next/src/screens/Setting/LDAP/LDAPEdit/LDAPEdit.jsx b/awx/ui_next/src/screens/Setting/LDAP/LDAPEdit/LDAPEdit.jsx new file mode 100644 index 0000000000..084df200ed --- /dev/null +++ b/awx/ui_next/src/screens/Setting/LDAP/LDAPEdit/LDAPEdit.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function LDAPEdit({ i18n }) { + return ( + + {i18n._(t`Edit form coming soon :)`)} + + + + + ); +} + +export default withI18n()(LDAPEdit); diff --git a/awx/ui_next/src/screens/Setting/LDAP/LDAPEdit/LDAPEdit.test.jsx b/awx/ui_next/src/screens/Setting/LDAP/LDAPEdit/LDAPEdit.test.jsx new file mode 100644 index 0000000000..12ac75a6ed --- /dev/null +++ b/awx/ui_next/src/screens/Setting/LDAP/LDAPEdit/LDAPEdit.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import LDAPEdit from './LDAPEdit'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('LDAPEdit').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/LDAP/LDAPEdit/index.js b/awx/ui_next/src/screens/Setting/LDAP/LDAPEdit/index.js new file mode 100644 index 0000000000..347c49008b --- /dev/null +++ b/awx/ui_next/src/screens/Setting/LDAP/LDAPEdit/index.js @@ -0,0 +1 @@ +export { default } from './LDAPEdit'; diff --git a/awx/ui_next/src/screens/Setting/LDAP/index.js b/awx/ui_next/src/screens/Setting/LDAP/index.js new file mode 100644 index 0000000000..30ceea6f47 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/LDAP/index.js @@ -0,0 +1 @@ +export { default } from './LDAP'; diff --git a/awx/ui_next/src/screens/Setting/License/License.jsx b/awx/ui_next/src/screens/Setting/License/License.jsx new file mode 100644 index 0000000000..1d92df41dc --- /dev/null +++ b/awx/ui_next/src/screens/Setting/License/License.jsx @@ -0,0 +1,30 @@ +import React from 'react'; +import { Redirect, Route, Switch } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { PageSection, Card } from '@patternfly/react-core'; +import LicenseDetail from './LicenseDetail'; +import LicenseEdit from './LicenseEdit'; + +function License({ i18n }) { + const baseUrl = '/settings/license'; + + return ( + + + {i18n._(t`License settings`)} + + + + + + + + + + + + ); +} + +export default withI18n()(License); diff --git a/awx/ui_next/src/screens/Setting/License/License.test.jsx b/awx/ui_next/src/screens/Setting/License/License.test.jsx new file mode 100644 index 0000000000..17388ebd2d --- /dev/null +++ b/awx/ui_next/src/screens/Setting/License/License.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import License from './License'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('Card').text()).toContain('License settings'); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/License/LicenseDetail/LicenseDetail.jsx b/awx/ui_next/src/screens/Setting/License/LicenseDetail/LicenseDetail.jsx new file mode 100644 index 0000000000..233fb40895 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/License/LicenseDetail/LicenseDetail.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function LicenseDetail({ i18n }) { + return ( + + {i18n._(t`Detail coming soon :)`)} + + + + + ); +} + +export default withI18n()(LicenseDetail); diff --git a/awx/ui_next/src/screens/Setting/License/LicenseDetail/LicenseDetail.test.jsx b/awx/ui_next/src/screens/Setting/License/LicenseDetail/LicenseDetail.test.jsx new file mode 100644 index 0000000000..f744cab073 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/License/LicenseDetail/LicenseDetail.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import LicenseDetail from './LicenseDetail'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('LicenseDetail').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/License/LicenseDetail/index.js b/awx/ui_next/src/screens/Setting/License/LicenseDetail/index.js new file mode 100644 index 0000000000..efe2514fed --- /dev/null +++ b/awx/ui_next/src/screens/Setting/License/LicenseDetail/index.js @@ -0,0 +1 @@ +export { default } from './LicenseDetail'; diff --git a/awx/ui_next/src/screens/Setting/License/LicenseEdit/LicenseEdit.jsx b/awx/ui_next/src/screens/Setting/License/LicenseEdit/LicenseEdit.jsx new file mode 100644 index 0000000000..38e4eca014 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/License/LicenseEdit/LicenseEdit.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function LicenseEdit({ i18n }) { + return ( + + {i18n._(t`Edit form coming soon :)`)} + + + + + ); +} + +export default withI18n()(LicenseEdit); diff --git a/awx/ui_next/src/screens/Setting/License/LicenseEdit/LicenseEdit.test.jsx b/awx/ui_next/src/screens/Setting/License/LicenseEdit/LicenseEdit.test.jsx new file mode 100644 index 0000000000..f1e6163948 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/License/LicenseEdit/LicenseEdit.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import LicenseEdit from './LicenseEdit'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('LicenseEdit').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/License/LicenseEdit/index.js b/awx/ui_next/src/screens/Setting/License/LicenseEdit/index.js new file mode 100644 index 0000000000..04c3fcfb24 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/License/LicenseEdit/index.js @@ -0,0 +1 @@ +export { default } from './LicenseEdit'; diff --git a/awx/ui_next/src/screens/License/index.js b/awx/ui_next/src/screens/Setting/License/index.js similarity index 100% rename from awx/ui_next/src/screens/License/index.js rename to awx/ui_next/src/screens/Setting/License/index.js diff --git a/awx/ui_next/src/screens/Setting/Logging/Logging.jsx b/awx/ui_next/src/screens/Setting/Logging/Logging.jsx new file mode 100644 index 0000000000..cd8e9aa81d --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Logging/Logging.jsx @@ -0,0 +1,30 @@ +import React from 'react'; +import { Redirect, Route, Switch } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { PageSection, Card } from '@patternfly/react-core'; +import LoggingDetail from './LoggingDetail'; +import LoggingEdit from './LoggingEdit'; + +function Logging({ i18n }) { + const baseUrl = '/settings/logging'; + + return ( + + + {i18n._(t`Logging settings`)} + + + + + + + + + + + + ); +} + +export default withI18n()(Logging); diff --git a/awx/ui_next/src/screens/Setting/Logging/Logging.test.jsx b/awx/ui_next/src/screens/Setting/Logging/Logging.test.jsx new file mode 100644 index 0000000000..2486d42b59 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Logging/Logging.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import Logging from './Logging'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('Card').text()).toContain('Logging settings'); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/Logging/LoggingDetail/LoggingDetail.jsx b/awx/ui_next/src/screens/Setting/Logging/LoggingDetail/LoggingDetail.jsx new file mode 100644 index 0000000000..8b10e37e82 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Logging/LoggingDetail/LoggingDetail.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function LoggingDetail({ i18n }) { + return ( + + {i18n._(t`Detail coming soon :)`)} + + + + + ); +} + +export default withI18n()(LoggingDetail); diff --git a/awx/ui_next/src/screens/Setting/Logging/LoggingDetail/LoggingDetail.test.jsx b/awx/ui_next/src/screens/Setting/Logging/LoggingDetail/LoggingDetail.test.jsx new file mode 100644 index 0000000000..384d3b148c --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Logging/LoggingDetail/LoggingDetail.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import LoggingDetail from './LoggingDetail'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('LoggingDetail').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/Logging/LoggingDetail/index.js b/awx/ui_next/src/screens/Setting/Logging/LoggingDetail/index.js new file mode 100644 index 0000000000..c250c9e39d --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Logging/LoggingDetail/index.js @@ -0,0 +1 @@ +export { default } from './LoggingDetail'; diff --git a/awx/ui_next/src/screens/Setting/Logging/LoggingEdit/LoggingEdit.jsx b/awx/ui_next/src/screens/Setting/Logging/LoggingEdit/LoggingEdit.jsx new file mode 100644 index 0000000000..334518c4fb --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Logging/LoggingEdit/LoggingEdit.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function LoggingEdit({ i18n }) { + return ( + + {i18n._(t`Edit form coming soon :)`)} + + + + + ); +} + +export default withI18n()(LoggingEdit); diff --git a/awx/ui_next/src/screens/Setting/Logging/LoggingEdit/LoggingEdit.test.jsx b/awx/ui_next/src/screens/Setting/Logging/LoggingEdit/LoggingEdit.test.jsx new file mode 100644 index 0000000000..ee1abc72f6 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Logging/LoggingEdit/LoggingEdit.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import LoggingEdit from './LoggingEdit'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('LoggingEdit').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/Logging/LoggingEdit/index.js b/awx/ui_next/src/screens/Setting/Logging/LoggingEdit/index.js new file mode 100644 index 0000000000..6c43fb33e8 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Logging/LoggingEdit/index.js @@ -0,0 +1 @@ +export { default } from './LoggingEdit'; diff --git a/awx/ui_next/src/screens/Setting/Logging/index.js b/awx/ui_next/src/screens/Setting/Logging/index.js new file mode 100644 index 0000000000..a764bd5334 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Logging/index.js @@ -0,0 +1 @@ +export { default } from './Logging'; diff --git a/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystem.jsx b/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystem.jsx new file mode 100644 index 0000000000..9a15087680 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystem.jsx @@ -0,0 +1,30 @@ +import React from 'react'; +import { Redirect, Route, Switch } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { PageSection, Card } from '@patternfly/react-core'; +import MiscSystemDetail from './MiscSystemDetail'; +import MiscSystemEdit from './MiscSystemEdit'; + +function MiscSystem({ i18n }) { + const baseUrl = '/settings/miscellaneous_system'; + + return ( + + + {i18n._(t`Miscellaneous system settings`)} + + + + + + + + + + + + ); +} + +export default withI18n()(MiscSystem); diff --git a/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystem.test.jsx b/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystem.test.jsx new file mode 100644 index 0000000000..4ac180a6ac --- /dev/null +++ b/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystem.test.jsx @@ -0,0 +1,18 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import MiscSystem from './MiscSystem'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('Card').text()).toContain( + 'Miscellaneous system settings' + ); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemDetail/MiscSystemDetail.jsx b/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemDetail/MiscSystemDetail.jsx new file mode 100644 index 0000000000..9784f2bdc6 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemDetail/MiscSystemDetail.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function MiscSystemDetail({ i18n }) { + return ( + + {i18n._(t`Detail coming soon :)`)} + + + + + ); +} + +export default withI18n()(MiscSystemDetail); diff --git a/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemDetail/MiscSystemDetail.test.jsx b/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemDetail/MiscSystemDetail.test.jsx new file mode 100644 index 0000000000..c6dba5b869 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemDetail/MiscSystemDetail.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import MiscSystemDetail from './MiscSystemDetail'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('MiscSystemDetail').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemDetail/index.js b/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemDetail/index.js new file mode 100644 index 0000000000..1976c6d590 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemDetail/index.js @@ -0,0 +1 @@ +export { default } from './MiscSystemDetail'; diff --git a/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemEdit/MiscSystemEdit.jsx b/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemEdit/MiscSystemEdit.jsx new file mode 100644 index 0000000000..e6fa7fdf18 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemEdit/MiscSystemEdit.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function MiscSystemEdit({ i18n }) { + return ( + + {i18n._(t`Edit form coming soon :)`)} + + + + + ); +} + +export default withI18n()(MiscSystemEdit); diff --git a/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemEdit/MiscSystemEdit.test.jsx b/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemEdit/MiscSystemEdit.test.jsx new file mode 100644 index 0000000000..9d3441a413 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemEdit/MiscSystemEdit.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import MiscSystemEdit from './MiscSystemEdit'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('MiscSystemEdit').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemEdit/index.js b/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemEdit/index.js new file mode 100644 index 0000000000..d1f06f7da1 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/MiscSystem/MiscSystemEdit/index.js @@ -0,0 +1 @@ +export { default } from './MiscSystemEdit'; diff --git a/awx/ui_next/src/screens/Setting/MiscSystem/index.js b/awx/ui_next/src/screens/Setting/MiscSystem/index.js new file mode 100644 index 0000000000..e504018a6e --- /dev/null +++ b/awx/ui_next/src/screens/Setting/MiscSystem/index.js @@ -0,0 +1 @@ +export { default } from './MiscSystem'; diff --git a/awx/ui_next/src/screens/Setting/Radius/Radius.jsx b/awx/ui_next/src/screens/Setting/Radius/Radius.jsx new file mode 100644 index 0000000000..a3b4780c72 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Radius/Radius.jsx @@ -0,0 +1,30 @@ +import React from 'react'; +import { Redirect, Route, Switch } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { PageSection, Card } from '@patternfly/react-core'; +import RadiusDetail from './RadiusDetail'; +import RadiusEdit from './RadiusEdit'; + +function Radius({ i18n }) { + const baseUrl = '/settings/radius'; + + return ( + + + {i18n._(t`Radius settings`)} + + + + + + + + + + + + ); +} + +export default withI18n()(Radius); diff --git a/awx/ui_next/src/screens/Setting/Radius/Radius.test.jsx b/awx/ui_next/src/screens/Setting/Radius/Radius.test.jsx new file mode 100644 index 0000000000..0337cd3593 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Radius/Radius.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import Radius from './Radius'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('Card').text()).toContain('Radius settings'); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/Radius/RadiusDetail/RadiusDetail.jsx b/awx/ui_next/src/screens/Setting/Radius/RadiusDetail/RadiusDetail.jsx new file mode 100644 index 0000000000..1453f87573 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Radius/RadiusDetail/RadiusDetail.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function RadiusDetail({ i18n }) { + return ( + + {i18n._(t`Detail coming soon :)`)} + + + + + ); +} + +export default withI18n()(RadiusDetail); diff --git a/awx/ui_next/src/screens/Setting/Radius/RadiusDetail/RadiusDetail.test.jsx b/awx/ui_next/src/screens/Setting/Radius/RadiusDetail/RadiusDetail.test.jsx new file mode 100644 index 0000000000..84d329116e --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Radius/RadiusDetail/RadiusDetail.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import RadiusDetail from './RadiusDetail'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('RadiusDetail').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/Radius/RadiusDetail/index.js b/awx/ui_next/src/screens/Setting/Radius/RadiusDetail/index.js new file mode 100644 index 0000000000..cf4fdebfea --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Radius/RadiusDetail/index.js @@ -0,0 +1 @@ +export { default } from './RadiusDetail'; diff --git a/awx/ui_next/src/screens/Setting/Radius/RadiusEdit/RadiusEdit.jsx b/awx/ui_next/src/screens/Setting/Radius/RadiusEdit/RadiusEdit.jsx new file mode 100644 index 0000000000..62448ead15 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Radius/RadiusEdit/RadiusEdit.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function RadiusEdit({ i18n }) { + return ( + + {i18n._(t`Edit form coming soon :)`)} + + + + + ); +} + +export default withI18n()(RadiusEdit); diff --git a/awx/ui_next/src/screens/Setting/Radius/RadiusEdit/RadiusEdit.test.jsx b/awx/ui_next/src/screens/Setting/Radius/RadiusEdit/RadiusEdit.test.jsx new file mode 100644 index 0000000000..bfb517dcbb --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Radius/RadiusEdit/RadiusEdit.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import RadiusEdit from './RadiusEdit'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('RadiusEdit').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/Radius/RadiusEdit/index.js b/awx/ui_next/src/screens/Setting/Radius/RadiusEdit/index.js new file mode 100644 index 0000000000..bb00543488 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Radius/RadiusEdit/index.js @@ -0,0 +1 @@ +export { default } from './RadiusEdit'; diff --git a/awx/ui_next/src/screens/Setting/Radius/index.js b/awx/ui_next/src/screens/Setting/Radius/index.js new file mode 100644 index 0000000000..4bf959792b --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Radius/index.js @@ -0,0 +1 @@ +export { default } from './Radius'; diff --git a/awx/ui_next/src/screens/Setting/SAML/SAML.jsx b/awx/ui_next/src/screens/Setting/SAML/SAML.jsx new file mode 100644 index 0000000000..51db443691 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/SAML/SAML.jsx @@ -0,0 +1,30 @@ +import React from 'react'; +import { Redirect, Route, Switch } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { PageSection, Card } from '@patternfly/react-core'; +import SAMLDetail from './SAMLDetail'; +import SAMLEdit from './SAMLEdit'; + +function SAML({ i18n }) { + const baseUrl = '/settings/saml'; + + return ( + + + {i18n._(t`SAML settings`)} + + + + + + + + + + + + ); +} + +export default withI18n()(SAML); diff --git a/awx/ui_next/src/screens/Setting/SAML/SAML.test.jsx b/awx/ui_next/src/screens/Setting/SAML/SAML.test.jsx new file mode 100644 index 0000000000..ed6f945835 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/SAML/SAML.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import SAML from './SAML'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('Card').text()).toContain('SAML settings'); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/SAML/SAMLDetail/SAMLDetail.jsx b/awx/ui_next/src/screens/Setting/SAML/SAMLDetail/SAMLDetail.jsx new file mode 100644 index 0000000000..1cf5606f61 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/SAML/SAMLDetail/SAMLDetail.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function SAMLDetail({ i18n }) { + return ( + + {i18n._(t`Detail coming soon :)`)} + + + + + ); +} + +export default withI18n()(SAMLDetail); diff --git a/awx/ui_next/src/screens/Setting/SAML/SAMLDetail/SAMLDetail.test.jsx b/awx/ui_next/src/screens/Setting/SAML/SAMLDetail/SAMLDetail.test.jsx new file mode 100644 index 0000000000..a420e32e9c --- /dev/null +++ b/awx/ui_next/src/screens/Setting/SAML/SAMLDetail/SAMLDetail.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import SAMLDetail from './SAMLDetail'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('SAMLDetail').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/SAML/SAMLDetail/index.js b/awx/ui_next/src/screens/Setting/SAML/SAMLDetail/index.js new file mode 100644 index 0000000000..61df794e27 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/SAML/SAMLDetail/index.js @@ -0,0 +1 @@ +export { default } from './SAMLDetail'; diff --git a/awx/ui_next/src/screens/Setting/SAML/SAMLEdit/SAMLEdit.jsx b/awx/ui_next/src/screens/Setting/SAML/SAMLEdit/SAMLEdit.jsx new file mode 100644 index 0000000000..fc9740b16c --- /dev/null +++ b/awx/ui_next/src/screens/Setting/SAML/SAMLEdit/SAMLEdit.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function SAMLEdit({ i18n }) { + return ( + + {i18n._(t`Edit form coming soon :)`)} + + + + + ); +} + +export default withI18n()(SAMLEdit); diff --git a/awx/ui_next/src/screens/Setting/SAML/SAMLEdit/SAMLEdit.test.jsx b/awx/ui_next/src/screens/Setting/SAML/SAMLEdit/SAMLEdit.test.jsx new file mode 100644 index 0000000000..d6319d9b2e --- /dev/null +++ b/awx/ui_next/src/screens/Setting/SAML/SAMLEdit/SAMLEdit.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import SAMLEdit from './SAMLEdit'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('SAMLEdit').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/SAML/SAMLEdit/index.js b/awx/ui_next/src/screens/Setting/SAML/SAMLEdit/index.js new file mode 100644 index 0000000000..c8c80b8cbe --- /dev/null +++ b/awx/ui_next/src/screens/Setting/SAML/SAMLEdit/index.js @@ -0,0 +1 @@ +export { default } from './SAMLEdit'; diff --git a/awx/ui_next/src/screens/Setting/SAML/index.js b/awx/ui_next/src/screens/Setting/SAML/index.js new file mode 100644 index 0000000000..e19b42b241 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/SAML/index.js @@ -0,0 +1 @@ +export { default } from './SAML'; diff --git a/awx/ui_next/src/screens/Setting/SettingList.jsx b/awx/ui_next/src/screens/Setting/SettingList.jsx new file mode 100644 index 0000000000..455215c68b --- /dev/null +++ b/awx/ui_next/src/screens/Setting/SettingList.jsx @@ -0,0 +1,178 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { + Card as _Card, + CardHeader as _CardHeader, + CardTitle, + DataList, + DataListItem, + DataListCell, + DataListItemCells, + DataListItemRow, + PageSection as _PageSection, +} from '@patternfly/react-core'; +import styled from 'styled-components'; +import { BrandName } from '../../variables'; + +// Setting BrandName to a variable here is necessary to get the jest tests +// passing. Attempting to use BrandName in the template literal results +// in failing tests. +const brandName = BrandName; + +const PageSection = styled(_PageSection)` + column-count: 1; + column-gap: 24px; + @media (min-width: 576px) { + column-count: 2; + } +`; +const Card = styled(_Card)` + display: inline-block; + margin-bottom: 24px; + width: 100%; +`; +const CardHeader = styled(_CardHeader)` + align-items: flex-start; + display: flex; + flex-flow: column nowrap; + && > * { + padding: 0; + } +`; +const CardDescription = styled.div` + color: var(--pf-global--palette--black-600); + font-size: var(--pf-global--FontSize--xs); +`; + +function SettingList({ i18n }) { + const settingRoutes = [ + { + header: i18n._(t`Authentication`), + description: i18n._( + t`Enable simplified login for your Tower applications` + ), + id: 'authentication', + routes: [ + { + title: i18n._(t`Azure AD settings`), + path: '/settings/azure', + }, + { + title: i18n._(t`GitHub settings`), + path: '/settings/github', + }, + { + title: i18n._(t`Google OAuth 2 settings`), + path: '/settings/google_oauth2', + }, + { + title: i18n._(t`LDAP settings`), + path: '/settings/ldap', + }, + { + title: i18n._(t`Radius settings`), + path: '/settings/radius', + }, + { + title: i18n._(t`SAML settings`), + path: '/settings/saml', + }, + { + title: i18n._(t`TACACS+ settings`), + path: '/settings/tacacs', + }, + ], + }, + { + header: i18n._(t`Jobs`), + description: i18n._(t`Update settings pertaining to Jobs within Tower`), + id: 'jobs', + routes: [ + { + title: i18n._(t`Jobs settings`), + path: '/settings/jobs', + }, + ], + }, + { + header: i18n._(t`System`), + description: i18n._(t`Define system-level features and functions`), + id: 'system', + routes: [ + { + title: i18n._(t`Miscellaneous system settings`), + path: '/settings/miscellaneous_system', + }, + { + title: i18n._(t`Activity stream settings`), + path: '/settings/activity_stream', + }, + { + title: i18n._(t`Logging settings`), + path: '/settings/logging', + }, + ], + }, + { + header: i18n._(t`User interface`), + description: i18n._( + t`Set preferences for data collection, logos, and logins` + ), + id: 'user_interface', + routes: [ + { + title: i18n._(t`User interface settings`), + path: '/settings/user_interface', + }, + ], + }, + { + header: i18n._(t`License`), + description: i18n._(t`View and edit your license information`), + id: 'license', + routes: [ + { + title: i18n._(t`License settings`), + path: '/settings/license', + }, + ], + }, + ]; + + return ( + + {settingRoutes.map(({ description, header, id, routes }) => { + if (id === 'license' && brandName === 'Tower') { + return null; + } + return ( + + + {header} + {description} + + + {routes.map(({ title, path }) => ( + + + + {title} + , + ]} + /> + + + ))} + + + ); + })} + + ); +} + +export default withI18n()(SettingList); diff --git a/awx/ui_next/src/screens/Setting/SettingList.test.jsx b/awx/ui_next/src/screens/Setting/SettingList.test.jsx new file mode 100644 index 0000000000..373d6ba5a4 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/SettingList.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; +import SettingList from './SettingList'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/Settings.jsx b/awx/ui_next/src/screens/Setting/Settings.jsx new file mode 100644 index 0000000000..ee0811d1eb --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Settings.jsx @@ -0,0 +1,101 @@ +import React from 'react'; +import { Link, Route, Switch } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { PageSection, Card } from '@patternfly/react-core'; +import ContentError from '../../components/ContentError'; +import Breadcrumbs from '../../components/Breadcrumbs'; +import ActivityStream from './ActivityStream'; +import AzureAD from './AzureAD'; +import GitHub from './GitHub'; +import GoogleOAuth2 from './GoogleOAuth2'; +import Jobs from './Jobs'; +import LDAP from './LDAP'; +import License from './License'; +import Logging from './Logging'; +import MiscSystem from './MiscSystem'; +import Radius from './Radius'; +import SAML from './SAML'; +import SettingList from './SettingList'; +import TACACS from './TACACS'; +import UI from './UI'; + +function Settings({ i18n }) { + const breadcrumbConfig = { + '/settings': i18n._(t`Settings`), + '/settings/activity_stream': i18n._(t`Activity stream`), + '/settings/azure': i18n._(t`Azure AD`), + '/settings/github': i18n._(t`GitHub`), + '/settings/google_oauth2': i18n._(t`Google OAuth2`), + '/settings/jobs': i18n._(t`Jobs`), + '/settings/ldap': i18n._(t`LDAP`), + '/settings/license': i18n._(t`License`), + '/settings/logging': i18n._(t`Logging`), + '/settings/miscellaneous_system': i18n._(t`Miscellaneous system`), + '/settings/radius': i18n._(t`Radius`), + '/settings/saml': i18n._(t`SAML`), + '/settings/tacacs': i18n._(t`TACACS+`), + '/settings/user_interface': i18n._(t`User interface`), + }; + + return ( + <> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {i18n._(t`View all settings`)} + + + + + + + ); +} + +export default withI18n()(Settings); diff --git a/awx/ui_next/src/screens/Setting/Settings.test.jsx b/awx/ui_next/src/screens/Setting/Settings.test.jsx new file mode 100644 index 0000000000..6f00bf2f5e --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Settings.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; +import Settings from './Settings'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/TACACS/TACACS.jsx b/awx/ui_next/src/screens/Setting/TACACS/TACACS.jsx new file mode 100644 index 0000000000..2ba6e62a3d --- /dev/null +++ b/awx/ui_next/src/screens/Setting/TACACS/TACACS.jsx @@ -0,0 +1,30 @@ +import React from 'react'; +import { Redirect, Route, Switch } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { PageSection, Card } from '@patternfly/react-core'; +import TACACSDetail from './TACACSDetail'; +import TACACSEdit from './TACACSEdit'; + +function TACACS({ i18n }) { + const baseUrl = '/settings/tacacs'; + + return ( + + + {i18n._(t`TACACS+ settings`)} + + + + + + + + + + + + ); +} + +export default withI18n()(TACACS); diff --git a/awx/ui_next/src/screens/Setting/TACACS/TACACS.test.jsx b/awx/ui_next/src/screens/Setting/TACACS/TACACS.test.jsx new file mode 100644 index 0000000000..ccf384382d --- /dev/null +++ b/awx/ui_next/src/screens/Setting/TACACS/TACACS.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import TACACS from './TACACS'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('Card').text()).toContain('TACACS+ settings'); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/TACACS/TACACSDetail/TACACSDetail.jsx b/awx/ui_next/src/screens/Setting/TACACS/TACACSDetail/TACACSDetail.jsx new file mode 100644 index 0000000000..97568bb63d --- /dev/null +++ b/awx/ui_next/src/screens/Setting/TACACS/TACACSDetail/TACACSDetail.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function TACACSDetail({ i18n }) { + return ( + + {i18n._(t`Detail coming soon :)`)} + + + + + ); +} + +export default withI18n()(TACACSDetail); diff --git a/awx/ui_next/src/screens/Setting/TACACS/TACACSDetail/TACACSDetail.test.jsx b/awx/ui_next/src/screens/Setting/TACACS/TACACSDetail/TACACSDetail.test.jsx new file mode 100644 index 0000000000..0f88fa78fa --- /dev/null +++ b/awx/ui_next/src/screens/Setting/TACACS/TACACSDetail/TACACSDetail.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import TACACSDetail from './TACACSDetail'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('TACACSDetail').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/TACACS/TACACSDetail/index.js b/awx/ui_next/src/screens/Setting/TACACS/TACACSDetail/index.js new file mode 100644 index 0000000000..1720e8b921 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/TACACS/TACACSDetail/index.js @@ -0,0 +1 @@ +export { default } from './TACACSDetail'; diff --git a/awx/ui_next/src/screens/Setting/TACACS/TACACSEdit/TACACSEdit.jsx b/awx/ui_next/src/screens/Setting/TACACS/TACACSEdit/TACACSEdit.jsx new file mode 100644 index 0000000000..8ec22acb07 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/TACACS/TACACSEdit/TACACSEdit.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function TACACSEdit({ i18n }) { + return ( + + {i18n._(t`Edit form coming soon :)`)} + + + + + ); +} + +export default withI18n()(TACACSEdit); diff --git a/awx/ui_next/src/screens/Setting/TACACS/TACACSEdit/TACACSEdit.test.jsx b/awx/ui_next/src/screens/Setting/TACACS/TACACSEdit/TACACSEdit.test.jsx new file mode 100644 index 0000000000..529090a34f --- /dev/null +++ b/awx/ui_next/src/screens/Setting/TACACS/TACACSEdit/TACACSEdit.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import TACACSEdit from './TACACSEdit'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('TACACSEdit').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/TACACS/TACACSEdit/index.js b/awx/ui_next/src/screens/Setting/TACACS/TACACSEdit/index.js new file mode 100644 index 0000000000..2b95f71aa8 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/TACACS/TACACSEdit/index.js @@ -0,0 +1 @@ +export { default } from './TACACSEdit'; diff --git a/awx/ui_next/src/screens/Setting/TACACS/index.js b/awx/ui_next/src/screens/Setting/TACACS/index.js new file mode 100644 index 0000000000..d1cb31279e --- /dev/null +++ b/awx/ui_next/src/screens/Setting/TACACS/index.js @@ -0,0 +1 @@ +export { default } from './TACACS'; diff --git a/awx/ui_next/src/screens/Setting/UI/UI.jsx b/awx/ui_next/src/screens/Setting/UI/UI.jsx new file mode 100644 index 0000000000..f7f0136e1e --- /dev/null +++ b/awx/ui_next/src/screens/Setting/UI/UI.jsx @@ -0,0 +1,30 @@ +import React from 'react'; +import { Redirect, Route, Switch } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { PageSection, Card } from '@patternfly/react-core'; +import UIDetail from './UIDetail'; +import UIEdit from './UIEdit'; + +function UI({ i18n }) { + const baseUrl = '/settings/ui'; + + return ( + + + {i18n._(t`User interface settings`)} + + + + + + + + + + + + ); +} + +export default withI18n()(UI); diff --git a/awx/ui_next/src/screens/Setting/UI/UI.test.jsx b/awx/ui_next/src/screens/Setting/UI/UI.test.jsx new file mode 100644 index 0000000000..5d62f597e3 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/UI/UI.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; +import UI from './UI'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('Card').text()).toContain('User interface settings'); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/UI/UIDetail/UIDetail.jsx b/awx/ui_next/src/screens/Setting/UI/UIDetail/UIDetail.jsx new file mode 100644 index 0000000000..8f031eb7b3 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/UI/UIDetail/UIDetail.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function UIDetail({ i18n }) { + return ( + + {i18n._(t`Detail coming soon :)`)} + + + + + ); +} + +export default withI18n()(UIDetail); diff --git a/awx/ui_next/src/screens/Setting/UI/UIDetail/UIDetail.test.jsx b/awx/ui_next/src/screens/Setting/UI/UIDetail/UIDetail.test.jsx new file mode 100644 index 0000000000..7cb27b17a8 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/UI/UIDetail/UIDetail.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import UIDetail from './UIDetail'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('UIDetail').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/UI/UIDetail/index.js b/awx/ui_next/src/screens/Setting/UI/UIDetail/index.js new file mode 100644 index 0000000000..791d1d8873 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/UI/UIDetail/index.js @@ -0,0 +1 @@ +export { default } from './UIDetail'; diff --git a/awx/ui_next/src/screens/Setting/UI/UIEdit/UIEdit.jsx b/awx/ui_next/src/screens/Setting/UI/UIEdit/UIEdit.jsx new file mode 100644 index 0000000000..c8d0f4df78 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/UI/UIEdit/UIEdit.jsx @@ -0,0 +1,25 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { withI18n } from '@lingui/react'; +import { t } from '@lingui/macro'; +import { Button } from '@patternfly/react-core'; +import { CardBody, CardActionsRow } from '../../../../components/Card'; + +function UIEdit({ i18n }) { + return ( + + {i18n._(t`Edit form coming soon :)`)} + + + + + ); +} + +export default withI18n()(UIEdit); diff --git a/awx/ui_next/src/screens/Setting/UI/UIEdit/UIEdit.test.jsx b/awx/ui_next/src/screens/Setting/UI/UIEdit/UIEdit.test.jsx new file mode 100644 index 0000000000..c51fb06fa7 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/UI/UIEdit/UIEdit.test.jsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers'; +import UIEdit from './UIEdit'; + +describe('', () => { + let wrapper; + beforeEach(() => { + wrapper = mountWithContexts(); + }); + afterEach(() => { + wrapper.unmount(); + }); + test('initially renders without crashing', () => { + expect(wrapper.find('UIEdit').length).toBe(1); + }); +}); diff --git a/awx/ui_next/src/screens/Setting/UI/UIEdit/index.js b/awx/ui_next/src/screens/Setting/UI/UIEdit/index.js new file mode 100644 index 0000000000..affad29bf8 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/UI/UIEdit/index.js @@ -0,0 +1 @@ +export { default } from './UIEdit'; diff --git a/awx/ui_next/src/screens/Setting/UI/index.js b/awx/ui_next/src/screens/Setting/UI/index.js new file mode 100644 index 0000000000..a33b447adf --- /dev/null +++ b/awx/ui_next/src/screens/Setting/UI/index.js @@ -0,0 +1 @@ +export { default } from './UI'; diff --git a/awx/ui_next/src/screens/Setting/index.js b/awx/ui_next/src/screens/Setting/index.js new file mode 100644 index 0000000000..63a5e968e4 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/index.js @@ -0,0 +1 @@ +export { default } from './Settings'; diff --git a/awx/ui_next/src/screens/SystemSetting/SystemSettings.jsx b/awx/ui_next/src/screens/SystemSetting/SystemSettings.jsx deleted file mode 100644 index 458658e23c..0000000000 --- a/awx/ui_next/src/screens/SystemSetting/SystemSettings.jsx +++ /dev/null @@ -1,28 +0,0 @@ -import React, { Component, Fragment } from 'react'; -import { withI18n } from '@lingui/react'; -import { t } from '@lingui/macro'; -import { - PageSection, - PageSectionVariants, - Title, -} from '@patternfly/react-core'; - -class SystemSettings extends Component { - render() { - const { i18n } = this.props; - const { light } = PageSectionVariants; - - return ( - - - - {i18n._(t`System Settings`)} - - - - - ); - } -} - -export default withI18n()(SystemSettings); diff --git a/awx/ui_next/src/screens/SystemSetting/SystemSettings.test.jsx b/awx/ui_next/src/screens/SystemSetting/SystemSettings.test.jsx deleted file mode 100644 index 2a909f36c7..0000000000 --- a/awx/ui_next/src/screens/SystemSetting/SystemSettings.test.jsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react'; - -import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; - -import SystemSettings from './SystemSettings'; - -describe('', () => { - let pageWrapper; - let pageSections; - let title; - - beforeEach(() => { - pageWrapper = mountWithContexts(); - pageSections = pageWrapper.find('PageSection'); - title = pageWrapper.find('Title'); - }); - - afterEach(() => { - pageWrapper.unmount(); - }); - - test('initially renders without crashing', () => { - expect(pageWrapper.length).toBe(1); - expect(pageSections.length).toBe(2); - expect(title.length).toBe(1); - expect(title.props().size).toBe('2xl'); - expect(pageSections.first().props().variant).toBe('light'); - }); -}); diff --git a/awx/ui_next/src/screens/SystemSetting/index.js b/awx/ui_next/src/screens/SystemSetting/index.js deleted file mode 100644 index 68b119e97b..0000000000 --- a/awx/ui_next/src/screens/SystemSetting/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './SystemSettings'; diff --git a/awx/ui_next/src/screens/UISetting/UISettings.jsx b/awx/ui_next/src/screens/UISetting/UISettings.jsx deleted file mode 100644 index 1ecec2af54..0000000000 --- a/awx/ui_next/src/screens/UISetting/UISettings.jsx +++ /dev/null @@ -1,28 +0,0 @@ -import React, { Component, Fragment } from 'react'; -import { withI18n } from '@lingui/react'; -import { t } from '@lingui/macro'; -import { - PageSection, - PageSectionVariants, - Title, -} from '@patternfly/react-core'; - -class UISettings extends Component { - render() { - const { i18n } = this.props; - const { light } = PageSectionVariants; - - return ( - - - - {i18n._(t`User Interface Settings`)} - - - - - ); - } -} - -export default withI18n()(UISettings); diff --git a/awx/ui_next/src/screens/UISetting/UISettings.test.jsx b/awx/ui_next/src/screens/UISetting/UISettings.test.jsx deleted file mode 100644 index 106b1d4e4e..0000000000 --- a/awx/ui_next/src/screens/UISetting/UISettings.test.jsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react'; - -import { mountWithContexts } from '../../../testUtils/enzymeHelpers'; - -import UISettings from './UISettings'; - -describe('', () => { - let pageWrapper; - let pageSections; - let title; - - beforeEach(() => { - pageWrapper = mountWithContexts(); - pageSections = pageWrapper.find('PageSection'); - title = pageWrapper.find('Title'); - }); - - afterEach(() => { - pageWrapper.unmount(); - }); - - test('initially renders without crashing', () => { - expect(pageWrapper.length).toBe(1); - expect(pageSections.length).toBe(2); - expect(title.length).toBe(1); - expect(title.props().size).toBe('2xl'); - expect(pageSections.first().props().variant).toBe('light'); - }); -}); diff --git a/awx/ui_next/src/screens/UISetting/index.js b/awx/ui_next/src/screens/UISetting/index.js deleted file mode 100644 index 168e652b48..0000000000 --- a/awx/ui_next/src/screens/UISetting/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './UISettings'; From 42158dea5979e92d540cd280f2c7e17277dd0bb5 Mon Sep 17 00:00:00 2001 From: Marliana Lara Date: Wed, 29 Jul 2020 13:47:42 -0400 Subject: [PATCH 2/2] Hide license route based on install and add useConfig hook --- awx/ui_next/src/contexts/Config.jsx | 3 +- .../src/screens/Setting/SettingList.jsx | 29 ++++++++++++++----- awx/ui_next/src/screens/Setting/Settings.jsx | 10 +++++-- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/awx/ui_next/src/contexts/Config.jsx b/awx/ui_next/src/contexts/Config.jsx index 231e6f8301..e8674c955c 100644 --- a/awx/ui_next/src/contexts/Config.jsx +++ b/awx/ui_next/src/contexts/Config.jsx @@ -1,7 +1,8 @@ -import React from 'react'; +import React, { useContext } from 'react'; // eslint-disable-next-line import/prefer-default-export export const ConfigContext = React.createContext({}); export const ConfigProvider = ConfigContext.Provider; export const Config = ConfigContext.Consumer; +export const useConfig = () => useContext(ConfigContext); diff --git a/awx/ui_next/src/screens/Setting/SettingList.jsx b/awx/ui_next/src/screens/Setting/SettingList.jsx index 455215c68b..9f0e6ffe64 100644 --- a/awx/ui_next/src/screens/Setting/SettingList.jsx +++ b/awx/ui_next/src/screens/Setting/SettingList.jsx @@ -11,17 +11,19 @@ import { DataListCell, DataListItemCells, DataListItemRow, - PageSection as _PageSection, + PageSection, } from '@patternfly/react-core'; import styled from 'styled-components'; import { BrandName } from '../../variables'; +import { useConfig } from '../../contexts/Config'; +import ContentLoading from '../../components/ContentLoading/ContentLoading'; // Setting BrandName to a variable here is necessary to get the jest tests // passing. Attempting to use BrandName in the template literal results // in failing tests. const brandName = BrandName; -const PageSection = styled(_PageSection)` +const SplitLayout = styled(PageSection)` column-count: 1; column-gap: 24px; @media (min-width: 576px) { @@ -47,11 +49,12 @@ const CardDescription = styled.div` `; function SettingList({ i18n }) { + const config = useConfig(); const settingRoutes = [ { header: i18n._(t`Authentication`), description: i18n._( - t`Enable simplified login for your Tower applications` + t`Enable simplified login for your ${brandName} applications` ), id: 'authentication', routes: [ @@ -87,7 +90,9 @@ function SettingList({ i18n }) { }, { header: i18n._(t`Jobs`), - description: i18n._(t`Update settings pertaining to Jobs within Tower`), + description: i18n._( + t`Update settings pertaining to Jobs within ${brandName}` + ), id: 'jobs', routes: [ { @@ -141,10 +146,20 @@ function SettingList({ i18n }) { }, ]; + if (Object.keys(config).length === 0) { + return ( + + + + + + ); + } + return ( - + {settingRoutes.map(({ description, header, id, routes }) => { - if (id === 'license' && brandName === 'Tower') { + if (id === 'license' && config?.license_info?.license_type === 'open') { return null; } return ( @@ -171,7 +186,7 @@ function SettingList({ i18n }) { ); })} - + ); } diff --git a/awx/ui_next/src/screens/Setting/Settings.jsx b/awx/ui_next/src/screens/Setting/Settings.jsx index ee0811d1eb..4d8d49830d 100644 --- a/awx/ui_next/src/screens/Setting/Settings.jsx +++ b/awx/ui_next/src/screens/Setting/Settings.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Link, Route, Switch } from 'react-router-dom'; +import { Link, Route, Switch, Redirect } from 'react-router-dom'; import { withI18n } from '@lingui/react'; import { t } from '@lingui/macro'; import { PageSection, Card } from '@patternfly/react-core'; @@ -19,8 +19,10 @@ import SAML from './SAML'; import SettingList from './SettingList'; import TACACS from './TACACS'; import UI from './UI'; +import { useConfig } from '../../contexts/Config'; function Settings({ i18n }) { + const { license_info = {} } = useConfig(); const breadcrumbConfig = { '/settings': i18n._(t`Settings`), '/settings/activity_stream': i18n._(t`Activity stream`), @@ -61,7 +63,11 @@ function Settings({ i18n }) { - + {license_info?.license_type === 'open' ? ( + + ) : ( + + )}