diff --git a/public/app/features/dashboard/components/PubdashFooter/PubdashFooter.tsx b/public/app/features/dashboard/components/PubdashFooter/PubdashFooter.tsx index b94c7484454..7eec6b48e7c 100644 --- a/public/app/features/dashboard/components/PubdashFooter/PubdashFooter.tsx +++ b/public/app/features/dashboard/components/PubdashFooter/PubdashFooter.tsx @@ -4,20 +4,38 @@ import React from 'react'; import { GrafanaTheme2, colorManipulator } from '@grafana/data'; import { useStyles2 } from '@grafana/ui'; +export interface PublicDashboardFooter { + hide: boolean; + text: string; + logo: string; + link: string; +} + export const PubdashFooter = function () { const styles = useStyles2(getStyles); + const conf = getPubdashFooterConfig(); - return ( + return conf.hide ? null : (
- - powered by Grafana + + {conf.text}
); }; +export function setPubdashFooterConfigFn(fn: typeof getPubdashFooterConfig) { + getPubdashFooterConfig = fn; +} +export let getPubdashFooterConfig = (): PublicDashboardFooter => ({ + hide: false, + text: 'powered by Grafana', + logo: 'public/img/grafana_icon.svg', + link: 'https://grafana.com/', +}); + const getStyles = (theme: GrafanaTheme2) => ({ footer: css` position: absolute;