mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-30 11:51:48 -05:00
37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
import React from 'react';
|
|
import { Link, 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 ContentError from '../../../components/ContentError';
|
|
import RADIUSDetail from './RADIUSDetail';
|
|
import RADIUSEdit from './RADIUSEdit';
|
|
|
|
function RADIUS({ i18n }) {
|
|
const baseURL = '/settings/radius';
|
|
return (
|
|
<PageSection>
|
|
<Card>
|
|
<Switch>
|
|
<Redirect from={baseURL} to={`${baseURL}/details`} exact />
|
|
<Route path={`${baseURL}/details`}>
|
|
<RADIUSDetail />
|
|
</Route>
|
|
<Route path={`${baseURL}/edit`}>
|
|
<RADIUSEdit />
|
|
</Route>
|
|
<Route key="not-found" path={`${baseURL}/*`}>
|
|
<ContentError isNotFound>
|
|
<Link to={`${baseURL}/details`}>
|
|
{i18n._(t`View RADIUS settings`)}
|
|
</Link>
|
|
</ContentError>
|
|
</Route>
|
|
</Switch>
|
|
</Card>
|
|
</PageSection>
|
|
);
|
|
}
|
|
|
|
export default withI18n()(RADIUS);
|