Sha256: 97ddda1057e4f1f89b9ca5aa4d3ae0898ad4003e3006172d7a703224218dff93
Contents?: true
Size: 1.65 KB
Versions: 40
Compression:
Stored size: 1.65 KB
Contents
import React from 'react'; import PropTypes from 'prop-types'; import { Route, Switch, Redirect } from 'react-router-dom'; import AnsibleVariableOverrides from './AnsibleVariableOverrides'; import RolesTab from './RolesTab'; import JobsTab from './JobsTab'; import TabLayout from './TabLayout'; import WrappedAnsibleHostInventory from './AnsibleHostInventory'; import { ANSIBLE_KEY } from '../constants'; import { route } from '../helpers'; const SecondaryTabRoutes = ({ response, router, history }) => ( <Switch ouiaId="switch"> <Route exact path={`/${ANSIBLE_KEY}`}> <Redirect to={route('roles')} /> </Route> <Route path={route('roles')}> <TabLayout> <RolesTab hostId={response.id} history={history} canEditHost={response.permissions.edit_hosts} /> </TabLayout> </Route> <Route path={route('variables')}> <TabLayout> <AnsibleVariableOverrides hostId={response.id} hostAttrs={response} history={history} /> </TabLayout> </Route> <Route path={route('inventory')}> <TabLayout> <WrappedAnsibleHostInventory hostId={response.id} /> </TabLayout> </Route> <Route path={route('jobs')}> <TabLayout> <JobsTab resourceId={response.id} resourceName="host" hostGroupId={response.hostgroup_id} history={history} /> </TabLayout> </Route> </Switch> ); SecondaryTabRoutes.propTypes = { response: PropTypes.object.isRequired, router: PropTypes.object.isRequired, history: PropTypes.object.isRequired, }; export default SecondaryTabRoutes;
Version data entries
40 entries across 40 versions & 1 rubygems