mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-12 12:46:23 +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 { CodeIcon, IssueIcon, LogoShortIcon, WikiIcon } from "../../components/Main/Icons";
|
||||
import { LogoShortIcon } from "../../components/Main/Icons";
|
||||
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()}`;
|
||||
|
||||
return <footer className="vm-footer">
|
||||
@ -15,33 +24,18 @@ const Footer: FC = memo(() => {
|
||||
<LogoShortIcon/>
|
||||
victoriametrics.com
|
||||
</a>
|
||||
<a
|
||||
className="vm-link vm-footer__link"
|
||||
target="_blank"
|
||||
href="https://docs.victoriametrics.com/MetricsQL.html"
|
||||
rel="help noreferrer"
|
||||
>
|
||||
<CodeIcon/>
|
||||
MetricsQL
|
||||
</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>
|
||||
{links.map(({ href, Icon, title }) => (
|
||||
<a
|
||||
className="vm-link vm-footer__link"
|
||||
target="_blank"
|
||||
href={href}
|
||||
rel="help noreferrer"
|
||||
key={`${href}-${title}`}
|
||||
>
|
||||
<Icon/>
|
||||
{title}
|
||||
</a>
|
||||
))}
|
||||
<div className="vm-footer__copyright">
|
||||
© {copyrightYears} VictoriaMetrics
|
||||
</div>
|
||||
|
@ -9,6 +9,7 @@ import router, { routerOptions } from "../../router";
|
||||
import useDeviceDetect from "../../hooks/useDeviceDetect";
|
||||
import ControlsLogsLayout from "./ControlsLogsLayout";
|
||||
import useFetchDefaultTimezone from "../../hooks/useFetchDefaultTimezone";
|
||||
import { footerLinksToLogs } from "../../constants/footerLinks";
|
||||
|
||||
const LogsLayout: FC = () => {
|
||||
const appModeEnable = getAppModeEnable();
|
||||
@ -36,7 +37,7 @@ const LogsLayout: FC = () => {
|
||||
>
|
||||
<Outlet/>
|
||||
</div>
|
||||
{!appModeEnable && <Footer/>}
|
||||
{!appModeEnable && <Footer links={footerLinksToLogs}/>}
|
||||
</section>;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user