mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-13 13:11:37 +01:00
vmui/logs: update footer links (#6498)
### Describe Your Changes
Update the links in the footer for logs:
[LogsQL](https://docs.victoriametrics.com/victorialogs/logsql/) and
[Documentation](https://docs.victoriametrics.com/victorialogs/)
(cherry picked from commit 13e3bb88a9
)
This commit is contained in:
parent
36f6a08f07
commit
5e8e89f22d
35
app/vmui/packages/vmui/src/constants/footerLinks.ts
Normal file
35
app/vmui/packages/vmui/src/constants/footerLinks.ts
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import { CodeIcon, IssueIcon, WikiIcon } from "../components/Main/Icons";
|
||||||
|
|
||||||
|
const issueLink = {
|
||||||
|
href: "https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new/choose",
|
||||||
|
Icon: IssueIcon,
|
||||||
|
title: "Create an issue",
|
||||||
|
};
|
||||||
|
|
||||||
|
export const footerLinksByDefault = [
|
||||||
|
{
|
||||||
|
href: "https://docs.victoriametrics.com/MetricsQL.html",
|
||||||
|
Icon: CodeIcon,
|
||||||
|
title: "MetricsQL",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
href: "https://docs.victoriametrics.com/#vmui",
|
||||||
|
Icon: WikiIcon,
|
||||||
|
title: "Documentation",
|
||||||
|
},
|
||||||
|
issueLink
|
||||||
|
];
|
||||||
|
|
||||||
|
export const footerLinksToLogs = [
|
||||||
|
{
|
||||||
|
href: "https://docs.victoriametrics.com/victorialogs/logsql/",
|
||||||
|
Icon: CodeIcon,
|
||||||
|
title: "LogsQL",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
href: "https://docs.victoriametrics.com/victorialogs/",
|
||||||
|
Icon: WikiIcon,
|
||||||
|
title: "Documentation",
|
||||||
|
},
|
||||||
|
issueLink
|
||||||
|
];
|
@ -1,8 +1,17 @@
|
|||||||
import React, { FC, memo } from "preact/compat";
|
import React, { FC, memo } from "preact/compat";
|
||||||
import { CodeIcon, IssueIcon, LogoShortIcon, WikiIcon } from "../../components/Main/Icons";
|
import { LogoShortIcon } from "../../components/Main/Icons";
|
||||||
import "./style.scss";
|
import "./style.scss";
|
||||||
|
import { footerLinksByDefault } from "../../constants/footerLinks";
|
||||||
|
|
||||||
const Footer: FC = memo(() => {
|
interface Props {
|
||||||
|
links?: {
|
||||||
|
href: string;
|
||||||
|
Icon: FC;
|
||||||
|
title: string;
|
||||||
|
}[]
|
||||||
|
}
|
||||||
|
|
||||||
|
const Footer: FC<Props> = memo(({ links = footerLinksByDefault }) => {
|
||||||
const copyrightYears = `2019-${new Date().getFullYear()}`;
|
const copyrightYears = `2019-${new Date().getFullYear()}`;
|
||||||
|
|
||||||
return <footer className="vm-footer">
|
return <footer className="vm-footer">
|
||||||
@ -15,33 +24,18 @@ const Footer: FC = memo(() => {
|
|||||||
<LogoShortIcon/>
|
<LogoShortIcon/>
|
||||||
victoriametrics.com
|
victoriametrics.com
|
||||||
</a>
|
</a>
|
||||||
|
{links.map(({ href, Icon, title }) => (
|
||||||
<a
|
<a
|
||||||
className="vm-link vm-footer__link"
|
className="vm-link vm-footer__link"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
href="https://docs.victoriametrics.com/MetricsQL.html"
|
href={href}
|
||||||
rel="help noreferrer"
|
rel="help noreferrer"
|
||||||
|
key={`${href}-${title}`}
|
||||||
>
|
>
|
||||||
<CodeIcon/>
|
<Icon/>
|
||||||
MetricsQL
|
{title}
|
||||||
</a>
|
|
||||||
<a
|
|
||||||
className="vm-link vm-footer__link"
|
|
||||||
target="_blank"
|
|
||||||
href="https://docs.victoriametrics.com/#vmui"
|
|
||||||
rel="help noreferrer"
|
|
||||||
>
|
|
||||||
<WikiIcon/>
|
|
||||||
Documentation
|
|
||||||
</a>
|
|
||||||
<a
|
|
||||||
className="vm-link vm-footer__link"
|
|
||||||
target="_blank"
|
|
||||||
href="https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new/choose"
|
|
||||||
rel="noreferrer"
|
|
||||||
>
|
|
||||||
<IssueIcon/>
|
|
||||||
Create an issue
|
|
||||||
</a>
|
</a>
|
||||||
|
))}
|
||||||
<div className="vm-footer__copyright">
|
<div className="vm-footer__copyright">
|
||||||
© {copyrightYears} VictoriaMetrics
|
© {copyrightYears} VictoriaMetrics
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,6 +9,7 @@ import router, { routerOptions } from "../../router";
|
|||||||
import useDeviceDetect from "../../hooks/useDeviceDetect";
|
import useDeviceDetect from "../../hooks/useDeviceDetect";
|
||||||
import ControlsLogsLayout from "./ControlsLogsLayout";
|
import ControlsLogsLayout from "./ControlsLogsLayout";
|
||||||
import useFetchDefaultTimezone from "../../hooks/useFetchDefaultTimezone";
|
import useFetchDefaultTimezone from "../../hooks/useFetchDefaultTimezone";
|
||||||
|
import { footerLinksToLogs } from "../../constants/footerLinks";
|
||||||
|
|
||||||
const LogsLayout: FC = () => {
|
const LogsLayout: FC = () => {
|
||||||
const appModeEnable = getAppModeEnable();
|
const appModeEnable = getAppModeEnable();
|
||||||
@ -36,7 +37,7 @@ const LogsLayout: FC = () => {
|
|||||||
>
|
>
|
||||||
<Outlet/>
|
<Outlet/>
|
||||||
</div>
|
</div>
|
||||||
{!appModeEnable && <Footer/>}
|
{!appModeEnable && <Footer links={footerLinksToLogs}/>}
|
||||||
</section>;
|
</section>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user