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 ( useContext(ConfigContext); diff --git a/awx/ui_next/src/routeConfig.js b/awx/ui_next/src/routeConfig.js index 08cc6b33cf..cb936764cb 100644 --- a/awx/ui_next/src/routeConfig.js +++ b/awx/ui_next/src/routeConfig.js @@ -13,11 +13,7 @@ import NotificationTemplates from './screens/NotificationTemplate'; import Organizations from './screens/Organization'; import Projects from './screens/Project'; import Schedules from './screens/Schedule'; -import AuthSettings from './screens/AuthSetting'; -import JobsSettings from './screens/JobsSetting'; -import SystemSettings from './screens/SystemSetting'; -import UISettings from './screens/UISetting'; -import License from './screens/License'; +import Settings from './screens/Setting'; import Teams from './screens/Team'; import Templates from './screens/Template'; import Users from './screens/User'; @@ -134,32 +130,12 @@ function getRouteConfig(i18n) { }, { groupTitle: i18n._(t`Settings`), - groupId: 'settings_group', + groupId: 'settings', routes: [ { - title: i18n._(t`Authentication`), - path: '/auth_settings', - screen: AuthSettings, - }, - { - title: i18n._(t`Jobs`), - path: '/jobs_settings', - screen: JobsSettings, - }, - { - title: i18n._(t`System`), - path: '/system_settings', - screen: SystemSettings, - }, - { - title: i18n._(t`User Interface`), - path: '/ui_settings', - screen: UISettings, - }, - { - title: i18n._(t`License`), - path: '/license', - screen: License, + title: i18n._(t`Settings`), + path: '/settings', + screen: Settings, }, ], }, diff --git a/awx/ui_next/src/screens/AuthSetting/AuthSettings.jsx b/awx/ui_next/src/screens/AuthSetting/AuthSettings.jsx deleted file mode 100644 index e9f79a452a..0000000000 --- a/awx/ui_next/src/screens/AuthSetting/AuthSettings.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 AuthSettings extends Component { - render() { - const { i18n } = this.props; - const { light } = PageSectionVariants; - - 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..9f0e6ffe64 --- /dev/null +++ b/awx/ui_next/src/screens/Setting/SettingList.jsx @@ -0,0 +1,193 @@ +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, +} 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 SplitLayout = 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 config = useConfig(); + const settingRoutes = [ + { + header: i18n._(t`Authentication`), + description: i18n._( + t`Enable simplified login for your ${brandName} 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 ${brandName}` + ), + 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', + }, + ], + }, + ]; + + if (Object.keys(config).length === 0) { + return ( + + + + + + ); + } + + return ( + + {settingRoutes.map(({ description, header, id, routes }) => { + if (id === 'license' && config?.license_info?.license_type === 'open') { + 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..4d8d49830d --- /dev/null +++ b/awx/ui_next/src/screens/Setting/Settings.jsx @@ -0,0 +1,107 @@ +import React from 'react'; +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'; +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'; +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`), + '/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 ( + <> + + + + + + + + + + + + + + + + + + + + + + {license_info?.license_type === 'open' ? ( + + ) : ( + + )} + + + + + + + + + + + + + + + + + + + + + + + + + + + {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';