2019-11-04 00:17:50 -08:00
|
|
|
import React, { FC } from 'react';
|
2019-10-28 07:02:42 -07:00
|
|
|
import Navigation from './Navbar';
|
2019-10-27 14:03:39 -07:00
|
|
|
import { Container } from 'reactstrap';
|
2019-10-17 05:38:09 -07:00
|
|
|
|
|
|
|
import './App.css';
|
2019-11-04 00:17:50 -08:00
|
|
|
import { Router, Redirect } from '@reach/router';
|
2019-10-28 07:02:42 -07:00
|
|
|
import { Alerts, Config, Flags, Rules, Services, Status, Targets, PanelList } from './pages';
|
2019-11-04 00:17:50 -08:00
|
|
|
import PathPrefixProps from './PathPrefixProps';
|
2019-10-17 05:38:09 -07:00
|
|
|
|
2019-11-04 00:17:50 -08:00
|
|
|
const App: FC<PathPrefixProps> = ({ pathPrefix }) => {
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<Navigation pathPrefix={pathPrefix} />
|
|
|
|
<Container fluid style={{ paddingTop: 70 }}>
|
|
|
|
<Router basepath={`${pathPrefix}/new`}>
|
|
|
|
<Redirect from="/" to={`${pathPrefix}/new/graph`} />
|
|
|
|
|
|
|
|
<PanelList path="/graph" pathPrefix={pathPrefix} />
|
|
|
|
<Alerts path="/alerts" pathPrefix={pathPrefix} />
|
|
|
|
<Config path="/config" pathPrefix={pathPrefix} />
|
|
|
|
<Flags path="/flags" pathPrefix={pathPrefix} />
|
|
|
|
<Rules path="/rules" pathPrefix={pathPrefix} />
|
|
|
|
<Services path="/service-discovery" pathPrefix={pathPrefix} />
|
|
|
|
<Status path="/status" pathPrefix={pathPrefix} />
|
|
|
|
<Targets path="/targets" pathPrefix={pathPrefix} />
|
|
|
|
</Router>
|
|
|
|
</Container>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|
2019-10-17 05:38:09 -07:00
|
|
|
|
|
|
|
export default App;
|