mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Public Dashboards: Renaming PubdashFooter (#58137)
This commit is contained in:
parent
d45fe6e25c
commit
49e36c5c05
@ -4,16 +4,16 @@ import React from 'react';
|
||||
import { GrafanaTheme2, colorManipulator } from '@grafana/data';
|
||||
import { useStyles2 } from '@grafana/ui';
|
||||
|
||||
export interface PublicDashboardFooter {
|
||||
export interface PublicDashboardFooterCfg {
|
||||
hide: boolean;
|
||||
text: string;
|
||||
logo: string;
|
||||
link: string;
|
||||
}
|
||||
|
||||
export const PubdashFooter = function () {
|
||||
export const PublicDashboardFooter = function () {
|
||||
const styles = useStyles2(getStyles);
|
||||
const conf = getPubdashFooterConfig();
|
||||
const conf = getPublicDashboardFooterConfig();
|
||||
|
||||
return conf.hide ? null : (
|
||||
<div className={styles.footer}>
|
||||
@ -26,10 +26,10 @@ export const PubdashFooter = function () {
|
||||
);
|
||||
};
|
||||
|
||||
export function setPubdashFooterConfigFn(fn: typeof getPubdashFooterConfig) {
|
||||
getPubdashFooterConfig = fn;
|
||||
export function setPublicDashboardFooterConfigFn(fn: typeof getPublicDashboardFooterConfig) {
|
||||
getPublicDashboardFooterConfig = fn;
|
||||
}
|
||||
export let getPubdashFooterConfig = (): PublicDashboardFooter => ({
|
||||
export let getPublicDashboardFooterConfig = (): PublicDashboardFooterCfg => ({
|
||||
hide: false,
|
||||
text: 'powered by Grafana',
|
||||
logo: 'public/img/grafana_icon.svg',
|
@ -28,7 +28,7 @@ import { DashboardPrompt } from '../components/DashboardPrompt/DashboardPrompt';
|
||||
import { DashboardSettings } from '../components/DashboardSettings';
|
||||
import { PanelInspector } from '../components/Inspector/PanelInspector';
|
||||
import { PanelEditor } from '../components/PanelEditor/PanelEditor';
|
||||
import { PubdashFooter } from '../components/PubdashFooter/PubdashFooter';
|
||||
import { PublicDashboardFooter } from '../components/PublicDashboardFooter/PublicDashboardsFooter';
|
||||
import { SubMenu } from '../components/SubMenu/SubMenu';
|
||||
import { DashboardGrid } from '../dashgrid/DashboardGrid';
|
||||
import { liveTimer } from '../dashgrid/liveTimer';
|
||||
@ -415,7 +415,7 @@ export class UnthemedDashboardPage extends PureComponent<Props, State> {
|
||||
)}
|
||||
{
|
||||
// TODO: assess if there are other places where we may want a footer, which may reveal a better place to add this
|
||||
isPublic && <PubdashFooter />
|
||||
isPublic && <PublicDashboardFooter />
|
||||
}
|
||||
</>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user