mirror of
https://github.com/prometheus/prometheus.git
synced 2025-08-06 22:27:17 +02:00
Show Consoles link if configured
Signed-off-by: Julius Volz <julius.volz@gmail.com>
This commit is contained in:
parent
53affc64db
commit
1f8a6b4d6e
@ -26,6 +26,7 @@ import {
|
|||||||
IconChevronRight,
|
IconChevronRight,
|
||||||
IconCloudDataConnection,
|
IconCloudDataConnection,
|
||||||
IconDatabase,
|
IconDatabase,
|
||||||
|
IconDeviceDesktopAnalytics,
|
||||||
IconFlag,
|
IconFlag,
|
||||||
IconHeartRateMonitor,
|
IconHeartRateMonitor,
|
||||||
IconInfoCircle,
|
IconInfoCircle,
|
||||||
@ -197,10 +198,22 @@ function App() {
|
|||||||
dispatch(updateSettings({ pathPrefix }));
|
dispatch(updateSettings({ pathPrefix }));
|
||||||
}, [pathPrefix]);
|
}, [pathPrefix]);
|
||||||
|
|
||||||
const { agentMode } = useSettings();
|
const { agentMode, consolesLink } = useSettings();
|
||||||
|
|
||||||
const navLinks = (
|
const navLinks = (
|
||||||
<>
|
<>
|
||||||
|
{consolesLink && (
|
||||||
|
<Button
|
||||||
|
component="a"
|
||||||
|
href={consolesLink}
|
||||||
|
className={classes.link}
|
||||||
|
leftSection={<IconDeviceDesktopAnalytics style={navIconStyle} />}
|
||||||
|
px={navLinkXPadding}
|
||||||
|
>
|
||||||
|
Consoles
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
|
||||||
{mainNavPages
|
{mainNavPages
|
||||||
.filter((p) => !agentMode || p.inAgentMode)
|
.filter((p) => !agentMode || p.inAgentMode)
|
||||||
.map((p) => (
|
.map((p) => (
|
||||||
|
Loading…
Reference in New Issue
Block a user