diff --git a/awx/ui/src/screens/Inventory/SmartInventoryHost/SmartInventoryHost.js b/awx/ui/src/screens/Inventory/AdvancedInventoryHost/AdvancedInventoryHost.js similarity index 74% rename from awx/ui/src/screens/Inventory/SmartInventoryHost/SmartInventoryHost.js rename to awx/ui/src/screens/Inventory/AdvancedInventoryHost/AdvancedInventoryHost.js index 62de1ecf5c..1276c3bbf8 100644 --- a/awx/ui/src/screens/Inventory/SmartInventoryHost/SmartInventoryHost.js +++ b/awx/ui/src/screens/Inventory/AdvancedInventoryHost/AdvancedInventoryHost.js @@ -8,11 +8,11 @@ import ContentLoading from 'components/ContentLoading'; import RoutedTabs from 'components/RoutedTabs'; import useRequest from 'hooks/useRequest'; import { InventoriesAPI } from 'api'; -import SmartInventoryHostDetail from '../SmartInventoryHostDetail'; +import AdvancedInventoryHostDetail from '../AdvancedInventoryHostDetail'; -function SmartInventoryHost({ inventory, setBreadcrumb }) { +function AdvancedInventoryHost({ inventory, setBreadcrumb }) { const { params, path, url } = useRouteMatch( - '/inventories/smart_inventory/:id/hosts/:hostId' + '/inventories/:inventoryType/:id/hosts/:hostId' ); const { @@ -28,7 +28,7 @@ function SmartInventoryHost({ inventory, setBreadcrumb }) { ); return response; }, [inventory.id, params.hostId]), - null + { isLoading: true } ); useEffect(() => { @@ -44,7 +44,6 @@ function SmartInventoryHost({ inventory, setBreadcrumb }) { if (error) { return ; } - const tabsArray = [ { name: ( @@ -53,7 +52,7 @@ function SmartInventoryHost({ inventory, setBreadcrumb }) { {t`Back to Hosts`} ), - link: `/inventories/smart_inventory/${inventory.id}/hosts`, + link: `/inventories/${params.inventoryType}/${inventory.id}/hosts`, id: 0, }, { @@ -72,17 +71,19 @@ function SmartInventoryHost({ inventory, setBreadcrumb }) { {!isLoading && host && ( - + - {t`View smart inventory host details`} + {params.inventoryType === 'smart_inventory' + ? t`View smart inventory host details` + : t`View constructed inventory host details`} @@ -92,4 +93,4 @@ function SmartInventoryHost({ inventory, setBreadcrumb }) { ); } -export default SmartInventoryHost; +export default AdvancedInventoryHost; diff --git a/awx/ui/src/screens/Inventory/SmartInventoryHost/SmartInventoryHost.test.js b/awx/ui/src/screens/Inventory/AdvancedInventoryHost/AdvancedInventoryHost.test.js similarity index 90% rename from awx/ui/src/screens/Inventory/SmartInventoryHost/SmartInventoryHost.test.js rename to awx/ui/src/screens/Inventory/AdvancedInventoryHost/AdvancedInventoryHost.test.js index d3f01bd85e..345b9478b7 100644 --- a/awx/ui/src/screens/Inventory/SmartInventoryHost/SmartInventoryHost.test.js +++ b/awx/ui/src/screens/Inventory/AdvancedInventoryHost/AdvancedInventoryHost.test.js @@ -7,14 +7,14 @@ import { waitForElement, } from '../../../../testUtils/enzymeHelpers'; import mockHost from '../shared/data.host.json'; -import SmartInventoryHost from './SmartInventoryHost'; +import AdvancedInventoryHost from './AdvancedInventoryHost'; jest.mock('../../../api'); jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), useRouteMatch: () => ({ params: { id: 1234, hostId: 2 }, - path: '/inventories/smart_inventory/:id/hosts/:hostId', + path: '/inventories/:inventoryType/:id/hosts/:hostId', url: '/inventories/smart_inventory/1234/hosts/2', }), })); @@ -24,7 +24,7 @@ const mockSmartInventory = { name: 'Mock Smart Inventory', }; -describe('', () => { +describe('', () => { let wrapper; let history; @@ -36,7 +36,7 @@ describe('', () => { InventoriesAPI.readHostDetail.mockResolvedValue(mockHost); await act(async () => { wrapper = mountWithContexts( - {}} /> @@ -55,7 +55,7 @@ describe('', () => { InventoriesAPI.readHostDetail.mockRejectedValueOnce(new Error()); await act(async () => { wrapper = mountWithContexts( - {}} /> @@ -76,7 +76,7 @@ describe('', () => { }); await act(async () => { wrapper = mountWithContexts( - {}} />, diff --git a/awx/ui/src/screens/Inventory/AdvancedInventoryHost/index.js b/awx/ui/src/screens/Inventory/AdvancedInventoryHost/index.js new file mode 100644 index 0000000000..24b8579c1b --- /dev/null +++ b/awx/ui/src/screens/Inventory/AdvancedInventoryHost/index.js @@ -0,0 +1 @@ +export { default } from './AdvancedInventoryHost'; diff --git a/awx/ui/src/screens/Inventory/SmartInventoryHostDetail/SmartInventoryHostDetail.js b/awx/ui/src/screens/Inventory/AdvancedInventoryHostDetail/AdvancedInventoryHostDetail.js similarity index 80% rename from awx/ui/src/screens/Inventory/SmartInventoryHostDetail/SmartInventoryHostDetail.js rename to awx/ui/src/screens/Inventory/AdvancedInventoryHostDetail/AdvancedInventoryHostDetail.js index 27af396135..afe2836663 100644 --- a/awx/ui/src/screens/Inventory/SmartInventoryHostDetail/SmartInventoryHostDetail.js +++ b/awx/ui/src/screens/Inventory/AdvancedInventoryHostDetail/AdvancedInventoryHostDetail.js @@ -1,5 +1,5 @@ import React from 'react'; -import { Link } from 'react-router-dom'; +import { Link, useParams } from 'react-router-dom'; import { t } from '@lingui/macro'; import { Host } from 'types'; @@ -8,7 +8,8 @@ import { Detail, DetailList, UserDateDetail } from 'components/DetailList'; import Sparkline from 'components/Sparkline'; import { VariablesDetail } from 'components/CodeEditor'; -function SmartInventoryHostDetail({ host }) { +function AdvancedInventoryHostDetail({ host }) { + const { inventoryType } = useParams(); const { created, description, @@ -24,6 +25,7 @@ function SmartInventoryHostDetail({ host }) { type: 'job', })); + const inventoryKind = inventory.kind === '' ? 'inventory' : inventoryType; return ( @@ -37,7 +39,7 @@ function SmartInventoryHostDetail({ host }) { + {inventory?.name} } @@ -61,8 +63,8 @@ function SmartInventoryHostDetail({ host }) { ); } -SmartInventoryHostDetail.propTypes = { +AdvancedInventoryHostDetail.propTypes = { host: Host.isRequired, }; -export default SmartInventoryHostDetail; +export default AdvancedInventoryHostDetail; diff --git a/awx/ui/src/screens/Inventory/SmartInventoryHostDetail/SmartInventoryHostDetail.test.js b/awx/ui/src/screens/Inventory/AdvancedInventoryHostDetail/AdvancedInventoryHostDetail.test.js similarity index 80% rename from awx/ui/src/screens/Inventory/SmartInventoryHostDetail/SmartInventoryHostDetail.test.js rename to awx/ui/src/screens/Inventory/AdvancedInventoryHostDetail/AdvancedInventoryHostDetail.test.js index 93a6092b80..11c7ec7920 100644 --- a/awx/ui/src/screens/Inventory/SmartInventoryHostDetail/SmartInventoryHostDetail.test.js +++ b/awx/ui/src/screens/Inventory/AdvancedInventoryHostDetail/AdvancedInventoryHostDetail.test.js @@ -1,15 +1,17 @@ import React from 'react'; import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; -import SmartInventoryHostDetail from './SmartInventoryHostDetail'; +import AdvancedInventoryHostDetail from './AdvancedInventoryHostDetail'; import mockHost from '../shared/data.host.json'; jest.mock('../../../api'); -describe('', () => { +describe('', () => { let wrapper; beforeAll(() => { - wrapper = mountWithContexts(); + wrapper = mountWithContexts( + + ); }); test('should render Details', () => { @@ -30,11 +32,12 @@ describe('', () => { test('should not load Activity', () => { wrapper = mountWithContexts( - diff --git a/awx/ui/src/screens/Inventory/AdvancedInventoryHostDetail/index.js b/awx/ui/src/screens/Inventory/AdvancedInventoryHostDetail/index.js new file mode 100644 index 0000000000..7162875c23 --- /dev/null +++ b/awx/ui/src/screens/Inventory/AdvancedInventoryHostDetail/index.js @@ -0,0 +1 @@ +export { default } from './AdvancedInventoryHostDetail'; diff --git a/awx/ui/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHostList.js b/awx/ui/src/screens/Inventory/AdvancedInventoryHosts/AdvancedInventoryHostList.js similarity index 87% rename from awx/ui/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHostList.js rename to awx/ui/src/screens/Inventory/AdvancedInventoryHosts/AdvancedInventoryHostList.js index 747e7bd058..8406c439e9 100644 --- a/awx/ui/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHostList.js +++ b/awx/ui/src/screens/Inventory/AdvancedInventoryHosts/AdvancedInventoryHostList.js @@ -13,7 +13,7 @@ import { getQSConfig, parseQueryString } from 'util/qs'; import { InventoriesAPI } from 'api'; import { Inventory } from 'types'; import AdHocCommands from 'components/AdHocCommands/AdHocCommands'; -import SmartInventoryHostListItem from './SmartInventoryHostListItem'; +import AdvancedInventoryHostListItem from './AdvancedInventoryHostListItem'; const QS_CONFIG = getQSConfig('host', { page: 1, @@ -21,7 +21,7 @@ const QS_CONFIG = getQSConfig('host', { order_by: 'name', }); -function SmartInventoryHostList({ inventory }) { +function AdvancedInventoryHostList({ inventory }) { const location = useLocation(); const [isAdHocLaunchLoading, setIsAdHocLaunchLoading] = useState(false); const { @@ -61,7 +61,10 @@ function SmartInventoryHostList({ inventory }) { useEffect(() => { fetchHosts(); }, [fetchHosts]); - + const inventoryType = + inventory.kind === 'constructed' + ? 'constructed_inventory' + : 'smart_inventory'; return ( } renderRow={(host, index) => ( - row.id === host.id)} onSelect={() => handleSelect(host)} rowIndex={index} @@ -127,8 +131,8 @@ function SmartInventoryHostList({ inventory }) { ); } -SmartInventoryHostList.propTypes = { +AdvancedInventoryHostList.propTypes = { inventory: Inventory.isRequired, }; -export default SmartInventoryHostList; +export default AdvancedInventoryHostList; diff --git a/awx/ui/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHostList.test.js b/awx/ui/src/screens/Inventory/AdvancedInventoryHosts/AdvancedInventoryHostList.test.js similarity index 85% rename from awx/ui/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHostList.test.js rename to awx/ui/src/screens/Inventory/AdvancedInventoryHosts/AdvancedInventoryHostList.test.js index 0b87981836..f51befdaf2 100644 --- a/awx/ui/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHostList.test.js +++ b/awx/ui/src/screens/Inventory/AdvancedInventoryHosts/AdvancedInventoryHostList.test.js @@ -5,13 +5,13 @@ import { mountWithContexts, waitForElement, } from '../../../../testUtils/enzymeHelpers'; -import SmartInventoryHostList from './SmartInventoryHostList'; +import AdvancedInventoryHostList from './AdvancedInventoryHostList'; import mockInventory from '../shared/data.inventory.json'; import mockHosts from '../shared/data.hosts.json'; jest.mock('../../../api'); -describe('', () => { +describe('', () => { let wrapper; const clonedInventory = { ...mockInventory, @@ -44,7 +44,7 @@ describe('', () => { }); await act(async () => { wrapper = mountWithContexts( - + ); }); await waitForElement(wrapper, 'ContentLoading', (el) => el.length === 0); @@ -55,12 +55,12 @@ describe('', () => { }); test('initially renders successfully', () => { - expect(wrapper.find('SmartInventoryHostList').length).toBe(1); + expect(wrapper.find('AdvancedInventoryHostList').length).toBe(1); }); test('should fetch hosts from api and render them in the list', () => { expect(InventoriesAPI.readHosts).toHaveBeenCalled(); - expect(wrapper.find('SmartInventoryHostListItem').length).toBe(3); + expect(wrapper.find('AdvancedInventoryHostListItem').length).toBe(3); }); test('should select and deselect all items', async () => { @@ -87,7 +87,7 @@ describe('', () => { ); await act(async () => { wrapper = mountWithContexts( - + ); }); await waitForElement(wrapper, 'ContentError', (el) => el.length === 1); diff --git a/awx/ui/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHostListItem.js b/awx/ui/src/screens/Inventory/AdvancedInventoryHosts/AdvancedInventoryHostListItem.js similarity index 60% rename from awx/ui/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHostListItem.js rename to awx/ui/src/screens/Inventory/AdvancedInventoryHosts/AdvancedInventoryHostListItem.js index ae5fe8aab3..8030a7f5d7 100644 --- a/awx/ui/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHostListItem.js +++ b/awx/ui/src/screens/Inventory/AdvancedInventoryHosts/AdvancedInventoryHostListItem.js @@ -9,20 +9,26 @@ import { Tr, Td } from '@patternfly/react-table'; import Sparkline from 'components/Sparkline'; import { Host } from 'types'; -function SmartInventoryHostListItem({ +function AdvancedInventoryHostListItem({ detailUrl, - host, + host: { + name, + id, + summary_fields: { recent_jobs, inventory }, + }, isSelected, onSelect, rowIndex, + inventoryType, }) { - const recentPlaybookJobs = host.summary_fields.recent_jobs.map((job) => ({ + const recentPlaybookJobs = recent_jobs.map((job) => ({ ...job, type: 'job', })); - + const inventoryKind = inventory.kind === '' ? 'inventory' : inventoryType; + const inventoryLink = `/inventories/${inventoryKind}/${inventory.id}/details`; return ( - + - {host.name} + {name} - - {host.summary_fields.inventory.name} - + {inventory.name} ); } -SmartInventoryHostListItem.propTypes = { +AdvancedInventoryHostListItem.propTypes = { detailUrl: string.isRequired, host: Host.isRequired, isSelected: bool.isRequired, onSelect: func.isRequired, }; -export default SmartInventoryHostListItem; +export default AdvancedInventoryHostListItem; diff --git a/awx/ui/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHostListItem.test.js b/awx/ui/src/screens/Inventory/AdvancedInventoryHosts/AdvancedInventoryHostListItem.test.js similarity index 84% rename from awx/ui/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHostListItem.test.js rename to awx/ui/src/screens/Inventory/AdvancedInventoryHosts/AdvancedInventoryHostListItem.test.js index b3d26782ca..be66aaa9b4 100644 --- a/awx/ui/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHostListItem.test.js +++ b/awx/ui/src/screens/Inventory/AdvancedInventoryHosts/AdvancedInventoryHostListItem.test.js @@ -1,6 +1,6 @@ import React from 'react'; import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; -import SmartInventoryHostListItem from './SmartInventoryHostListItem'; +import AdvancedInventoryHostListItem from './AdvancedInventoryHostListItem'; const mockHost = { id: 2, @@ -19,14 +19,14 @@ const mockHost = { }, }; -describe('', () => { +describe('', () => { let wrapper; beforeEach(() => { wrapper = mountWithContexts( - + + + + + + + + ); +} + +AdvancedInventoryHosts.propTypes = { + inventory: Inventory.isRequired, +}; + +export default AdvancedInventoryHosts; diff --git a/awx/ui/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHosts.test.js b/awx/ui/src/screens/Inventory/AdvancedInventoryHosts/AdvancedInventoryHosts.test.js similarity index 62% rename from awx/ui/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHosts.test.js rename to awx/ui/src/screens/Inventory/AdvancedInventoryHosts/AdvancedInventoryHosts.test.js index f97b3c73d0..049bc0873c 100644 --- a/awx/ui/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHosts.test.js +++ b/awx/ui/src/screens/Inventory/AdvancedInventoryHosts/AdvancedInventoryHosts.test.js @@ -5,37 +5,39 @@ import { mountWithContexts, waitForElement, } from '../../../../testUtils/enzymeHelpers'; -import SmartInventoryHosts from './SmartInventoryHosts'; +import AdvancedInventoryHosts from './AdvancedInventoryHosts'; jest.mock('../../../api'); -jest.mock('./SmartInventoryHostList', () => { - const SmartInventoryHostList = () =>
; +jest.mock('./AdvancedInventoryHostList', () => { + const AdvancedInventoryHostList = () =>
; return { __esModule: true, - default: SmartInventoryHostList, + default: AdvancedInventoryHostList, }; }); -describe('', () => { +describe('', () => { test('should render smart inventory host list', () => { const history = createMemoryHistory({ initialEntries: ['/inventories/smart_inventory/1/hosts'], }); const match = { - path: '/inventories/smart_inventory/:id/hosts', + path: '/inventories/:inventoryType/:id/hosts', url: '/inventories/smart_inventory/1/hosts', isExact: true, }; const wrapper = mountWithContexts( - , + , { context: { router: { history, route: { match } } }, } ); - expect(wrapper.find('SmartInventoryHostList').length).toBe(1); - expect(wrapper.find('SmartInventoryHostList').prop('inventory')).toEqual({ - id: 1, - }); + expect(wrapper.find('AdvancedInventoryHostList').length).toBe(1); + expect(wrapper.find('AdvancedInventoryHostList').prop('inventory')).toEqual( + { + id: 1, + } + ); jest.clearAllMocks(); }); @@ -45,20 +47,23 @@ describe('', () => { initialEntries: ['/inventories/smart_inventory/1/hosts/2'], }); const match = { - path: '/inventories/smart_inventory/:id/hosts/:hostId', + path: '/inventories/:inventoryType/:id/hosts/:hostId', url: '/inventories/smart_inventory/1/hosts/2', isExact: true, }; await act(async () => { wrapper = mountWithContexts( - {}} />, + {}} + />, { context: { router: { history, route: { match } } }, } ); }); await waitForElement(wrapper, 'ContentLoading', (el) => el.length === 0); - expect(wrapper.find('SmartInventoryHost').length).toBe(1); + expect(wrapper.find('AdvancedInventoryHost').length).toBe(1); jest.clearAllMocks(); }); }); diff --git a/awx/ui/src/screens/Inventory/AdvancedInventoryHosts/index.js b/awx/ui/src/screens/Inventory/AdvancedInventoryHosts/index.js new file mode 100644 index 0000000000..121af5d8c2 --- /dev/null +++ b/awx/ui/src/screens/Inventory/AdvancedInventoryHosts/index.js @@ -0,0 +1 @@ +export { default } from './AdvancedInventoryHosts'; diff --git a/awx/ui/src/screens/Inventory/ConstructedInventory.js b/awx/ui/src/screens/Inventory/ConstructedInventory.js index 58b33b96d2..242cbab585 100644 --- a/awx/ui/src/screens/Inventory/ConstructedInventory.js +++ b/awx/ui/src/screens/Inventory/ConstructedInventory.js @@ -23,7 +23,7 @@ import RoutedTabs from 'components/RoutedTabs'; import ConstructedInventoryDetail from './ConstructedInventoryDetail'; import ConstructedInventoryEdit from './ConstructedInventoryEdit'; import ConstructedInventoryGroups from './ConstructedInventoryGroups'; -import ConstructedInventoryHosts from './ConstructedInventoryHosts'; +import AdvancedInventoryHosts from './AdvancedInventoryHosts'; import { getInventoryPath } from './shared/utils'; function ConstructedInventory({ setBreadcrumb }) { @@ -42,8 +42,7 @@ function ConstructedInventory({ setBreadcrumb }) { ); return data; }, [match.params.id]), - - null + { isLoading: true } ); useEffect(() => { @@ -111,7 +110,11 @@ function ConstructedInventory({ setBreadcrumb }) { } let showCardHeader = true; - if (['edit'].some((name) => location.pathname.includes(name))) { + if ( + ['edit', 'add', 'groups/', 'hosts/'].some((name) => + location.pathname.includes(name) + ) + ) { showCardHeader = false; } @@ -154,7 +157,10 @@ function ConstructedInventory({ setBreadcrumb }) { path="/inventories/constructed_inventory/:id/hosts" key="hosts" > - + , ({ describe('', () => { let wrapper; - beforeEach(async () => { + // beforeEach(async () => { + // ConstructedInventoriesAPI.readDetail.mockResolvedValue({ + // data: mockInventory, + // }); + // }); + + test('should render expected tabs', async () => { ConstructedInventoriesAPI.readDetail.mockResolvedValue({ data: mockInventory, }); - }); - - test('should render expected tabs', async () => { const expectedTabs = [ 'Back to Inventories', 'Details', @@ -45,6 +51,9 @@ describe('', () => { }); test('should show content error when user attempts to navigate to erroneous route', async () => { + ConstructedInventoriesAPI.readDetail.mockResolvedValue({ + data: { ...mockInventory, kind: 'constructed' }, + }); const history = createMemoryHistory({ initialEntries: ['/inventories/constructed_inventory/1/foobar'], }); @@ -60,7 +69,7 @@ describe('', () => { match: { params: { id: 1 }, url: '/inventories/constructed_inventory/1/foobar', - path: '/inventories/constructed_inventory/1/foobar', + path: '/inventories/:inventoryType/:id/foobar', }, }, }, @@ -68,6 +77,7 @@ describe('', () => { } ); }); + await waitForElement(wrapper, 'ContentLoading', (el) => el.length === 0); expect(wrapper.find('ContentError').length).toBe(1); }); }); diff --git a/awx/ui/src/screens/Inventory/ConstructedInventoryHosts/ConstructedInventoryHosts.js b/awx/ui/src/screens/Inventory/ConstructedInventoryHosts/ConstructedInventoryHosts.js deleted file mode 100644 index 56f0c801b8..0000000000 --- a/awx/ui/src/screens/Inventory/ConstructedInventoryHosts/ConstructedInventoryHosts.js +++ /dev/null @@ -1,13 +0,0 @@ -/* eslint i18next/no-literal-string: "off" */ -import React from 'react'; -import { CardBody } from 'components/Card'; - -function ConstructedInventoryHosts() { - return ( - -
Coming Soon!
-
- ); -} - -export default ConstructedInventoryHosts; diff --git a/awx/ui/src/screens/Inventory/ConstructedInventoryHosts/ConstructedInventoryHosts.test.js b/awx/ui/src/screens/Inventory/ConstructedInventoryHosts/ConstructedInventoryHosts.test.js deleted file mode 100644 index 0d6b3d6f13..0000000000 --- a/awx/ui/src/screens/Inventory/ConstructedInventoryHosts/ConstructedInventoryHosts.test.js +++ /dev/null @@ -1,15 +0,0 @@ -import React from 'react'; -import { act } from 'react-dom/test-utils'; -import { mountWithContexts } from '../../../../testUtils/enzymeHelpers'; -import ConstructedInventoryHosts from './ConstructedInventoryHosts'; - -describe('', () => { - test('initially renders successfully', async () => { - let wrapper; - await act(async () => { - wrapper = mountWithContexts(); - }); - expect(wrapper.length).toBe(1); - expect(wrapper.find('ConstructedInventoryHosts').length).toBe(1); - }); -}); diff --git a/awx/ui/src/screens/Inventory/ConstructedInventoryHosts/index.js b/awx/ui/src/screens/Inventory/ConstructedInventoryHosts/index.js deleted file mode 100644 index 68464720fb..0000000000 --- a/awx/ui/src/screens/Inventory/ConstructedInventoryHosts/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './ConstructedInventoryHosts'; diff --git a/awx/ui/src/screens/Inventory/SmartInventory.js b/awx/ui/src/screens/Inventory/SmartInventory.js index b91d253dc6..d55327aa27 100644 --- a/awx/ui/src/screens/Inventory/SmartInventory.js +++ b/awx/ui/src/screens/Inventory/SmartInventory.js @@ -22,7 +22,7 @@ import RoutedTabs from 'components/RoutedTabs'; import RelatedTemplateList from 'components/RelatedTemplateList'; import SmartInventoryDetail from './SmartInventoryDetail'; import SmartInventoryEdit from './SmartInventoryEdit'; -import SmartInventoryHosts from './SmartInventoryHosts'; +import AdvancedInventoryHosts from './AdvancedInventoryHosts'; import { getInventoryPath } from './shared/utils'; function SmartInventory({ setBreadcrumb }) { @@ -142,7 +142,7 @@ function SmartInventory({ setBreadcrumb }) { />
, - diff --git a/awx/ui/src/screens/Inventory/SmartInventoryHost/index.js b/awx/ui/src/screens/Inventory/SmartInventoryHost/index.js deleted file mode 100644 index 7e634beb10..0000000000 --- a/awx/ui/src/screens/Inventory/SmartInventoryHost/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './SmartInventoryHost'; diff --git a/awx/ui/src/screens/Inventory/SmartInventoryHostDetail/index.js b/awx/ui/src/screens/Inventory/SmartInventoryHostDetail/index.js deleted file mode 100644 index 4c166ddc01..0000000000 --- a/awx/ui/src/screens/Inventory/SmartInventoryHostDetail/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './SmartInventoryHostDetail'; diff --git a/awx/ui/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHosts.js b/awx/ui/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHosts.js deleted file mode 100644 index b1f461eabc..0000000000 --- a/awx/ui/src/screens/Inventory/SmartInventoryHosts/SmartInventoryHosts.js +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react'; -import { Route, Switch } from 'react-router-dom'; -import { Inventory } from 'types'; -import SmartInventoryHostList from './SmartInventoryHostList'; -import SmartInventoryHost from '../SmartInventoryHost'; - -function SmartInventoryHosts({ inventory, setBreadcrumb }) { - return ( - - - - - - - - - ); -} - -SmartInventoryHosts.propTypes = { - inventory: Inventory.isRequired, -}; - -export default SmartInventoryHosts; diff --git a/awx/ui/src/screens/Inventory/SmartInventoryHosts/index.js b/awx/ui/src/screens/Inventory/SmartInventoryHosts/index.js deleted file mode 100644 index 95af99ffe3..0000000000 --- a/awx/ui/src/screens/Inventory/SmartInventoryHosts/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './SmartInventoryHosts';