mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Fix serving of Prometheus logo, move it into 'src/images' (#10236)
* add prometheus logo in the list of file that should be served at the root Signed-off-by: Augustin Husson <husson.augustin@gmail.com> * move prometheus logo to src/images Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
This commit is contained in:
parent
727cdbff4c
commit
4af2fc8bc2
|
@ -12,8 +12,8 @@ import {
|
||||||
DropdownMenu,
|
DropdownMenu,
|
||||||
DropdownItem,
|
DropdownItem,
|
||||||
} from 'reactstrap';
|
} from 'reactstrap';
|
||||||
import { usePathPrefix } from './contexts/PathPrefixContext';
|
|
||||||
import { ThemeToggle } from './Theme';
|
import { ThemeToggle } from './Theme';
|
||||||
|
import logo from './images/prometheus_logo_grey.svg';
|
||||||
|
|
||||||
interface NavbarProps {
|
interface NavbarProps {
|
||||||
consolesLink: string | null;
|
consolesLink: string | null;
|
||||||
|
@ -23,17 +23,11 @@ interface NavbarProps {
|
||||||
const Navigation: FC<NavbarProps> = ({ consolesLink, agentMode }) => {
|
const Navigation: FC<NavbarProps> = ({ consolesLink, agentMode }) => {
|
||||||
const [isOpen, setIsOpen] = useState(false);
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
const toggle = () => setIsOpen(!isOpen);
|
const toggle = () => setIsOpen(!isOpen);
|
||||||
const pathPrefix = usePathPrefix();
|
|
||||||
return (
|
return (
|
||||||
<Navbar className="mb-3" dark color="dark" expand="md" fixed="top">
|
<Navbar className="mb-3" dark color="dark" expand="md" fixed="top">
|
||||||
<NavbarToggler onClick={toggle} className="mr-2" />
|
<NavbarToggler onClick={toggle} className="mr-2" />
|
||||||
<Link className="pt-0 navbar-brand" to={agentMode ? '/agent' : '/graph'}>
|
<Link className="pt-0 navbar-brand" to={agentMode ? '/agent' : '/graph'}>
|
||||||
<img
|
<img src={logo} className="d-inline-block align-top" alt="Prometheus logo" title="Prometheus" />
|
||||||
src={`${pathPrefix}/prometheus_logo_grey.svg`}
|
|
||||||
className="d-inline-block align-top"
|
|
||||||
alt="Prometheus logo"
|
|
||||||
title="Prometheus"
|
|
||||||
/>
|
|
||||||
Prometheus{agentMode && ' Agent'}
|
Prometheus{agentMode && ' Agent'}
|
||||||
</Link>
|
</Link>
|
||||||
<Collapse isOpen={isOpen} navbar style={{ justifyContent: 'space-between' }}>
|
<Collapse isOpen={isOpen} navbar style={{ justifyContent: 'space-between' }}>
|
||||||
|
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Loading…
Reference in a new issue