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:
Augustin Husson 2022-02-02 14:53:30 +01:00 committed by GitHub
parent 727cdbff4c
commit 4af2fc8bc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 8 deletions

View file

@ -12,8 +12,8 @@ import {
DropdownMenu,
DropdownItem,
} from 'reactstrap';
import { usePathPrefix } from './contexts/PathPrefixContext';
import { ThemeToggle } from './Theme';
import logo from './images/prometheus_logo_grey.svg';
interface NavbarProps {
consolesLink: string | null;
@ -23,17 +23,11 @@ interface NavbarProps {
const Navigation: FC<NavbarProps> = ({ consolesLink, agentMode }) => {
const [isOpen, setIsOpen] = useState(false);
const toggle = () => setIsOpen(!isOpen);
const pathPrefix = usePathPrefix();
return (
<Navbar className="mb-3" dark color="dark" expand="md" fixed="top">
<NavbarToggler onClick={toggle} className="mr-2" />
<Link className="pt-0 navbar-brand" to={agentMode ? '/agent' : '/graph'}>
<img
src={`${pathPrefix}/prometheus_logo_grey.svg`}
className="d-inline-block align-top"
alt="Prometheus logo"
title="Prometheus"
/>
<img src={logo} className="d-inline-block align-top" alt="Prometheus logo" title="Prometheus" />
Prometheus{agentMode && ' Agent'}
</Link>
<Collapse isOpen={isOpen} navbar style={{ justifyContent: 'space-between' }}>

View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB