2019-10-27 14:03:39 -07:00
|
|
|
import React, { useState } from 'react';
|
2019-10-28 07:02:42 -07:00
|
|
|
import { Link } from '@reach/router';
|
2019-10-27 14:03:39 -07:00
|
|
|
import {
|
|
|
|
Collapse,
|
|
|
|
Navbar,
|
|
|
|
NavbarToggler,
|
|
|
|
Nav,
|
|
|
|
NavItem,
|
|
|
|
NavLink,
|
|
|
|
UncontrolledDropdown,
|
|
|
|
DropdownToggle,
|
|
|
|
DropdownMenu,
|
|
|
|
DropdownItem,
|
|
|
|
} from 'reactstrap';
|
|
|
|
|
|
|
|
const Navigation = () => {
|
|
|
|
const [isOpen, setIsOpen] = useState(false);
|
|
|
|
const toggle = () => setIsOpen(!isOpen);
|
|
|
|
return (
|
2019-10-28 02:45:53 -07:00
|
|
|
<Navbar className="mb-3" dark color="dark" expand="md">
|
2019-10-28 07:02:42 -07:00
|
|
|
<NavbarToggler onClick={toggle} />
|
|
|
|
<Link className="pt-0 navbar-brand" to="/new/graph">
|
|
|
|
Prometheus
|
|
|
|
</Link>
|
2019-10-27 14:03:39 -07:00
|
|
|
<Collapse isOpen={isOpen} navbar style={{ justifyContent: 'space-between' }}>
|
|
|
|
<Nav className="ml-0" navbar>
|
|
|
|
<NavItem>
|
2019-10-28 07:02:42 -07:00
|
|
|
<NavLink tag={Link} to="/new/alerts">
|
|
|
|
Alerts
|
|
|
|
</NavLink>
|
2019-10-27 14:03:39 -07:00
|
|
|
</NavItem>
|
|
|
|
<NavItem>
|
2019-10-28 07:02:42 -07:00
|
|
|
<NavLink tag={Link} to="/new/graph">
|
|
|
|
Graph
|
|
|
|
</NavLink>
|
2019-10-27 14:03:39 -07:00
|
|
|
</NavItem>
|
|
|
|
<UncontrolledDropdown nav inNavbar>
|
2019-10-28 07:02:42 -07:00
|
|
|
<DropdownToggle nav caret>
|
|
|
|
Status
|
|
|
|
</DropdownToggle>
|
2019-10-27 14:03:39 -07:00
|
|
|
<DropdownMenu>
|
2019-10-28 07:02:42 -07:00
|
|
|
<DropdownItem tag={Link} to="/new/status">
|
|
|
|
Runtime & Build Information
|
|
|
|
</DropdownItem>
|
|
|
|
<DropdownItem tag={Link} to="/new/flags">
|
|
|
|
Command-Line Flags
|
|
|
|
</DropdownItem>
|
|
|
|
<DropdownItem tag={Link} to="/new/config">
|
|
|
|
Configuration
|
|
|
|
</DropdownItem>
|
|
|
|
<DropdownItem tag={Link} to="/new/rules">
|
|
|
|
Rules
|
|
|
|
</DropdownItem>
|
|
|
|
<DropdownItem tag={Link} to="/new/targets">
|
|
|
|
Targets
|
|
|
|
</DropdownItem>
|
|
|
|
<DropdownItem tag={Link} to="/new/service-discovery">
|
|
|
|
Service Discovery
|
|
|
|
</DropdownItem>
|
2019-10-27 14:03:39 -07:00
|
|
|
</DropdownMenu>
|
|
|
|
</UncontrolledDropdown>
|
|
|
|
<NavItem>
|
|
|
|
<NavLink href="https://prometheus.io/docs/prometheus/latest/getting_started/">Help</NavLink>
|
|
|
|
</NavItem>
|
|
|
|
<NavItem>
|
2019-10-28 07:02:42 -07:00
|
|
|
<NavLink tag={Link} to="../../graph">
|
|
|
|
Classic UI
|
|
|
|
</NavLink>
|
2019-10-27 14:03:39 -07:00
|
|
|
</NavItem>
|
|
|
|
</Nav>
|
|
|
|
</Collapse>
|
|
|
|
</Navbar>
|
|
|
|
);
|
2019-10-28 07:02:42 -07:00
|
|
|
};
|
2019-10-27 14:03:39 -07:00
|
|
|
|
|
|
|
export default Navigation;
|