Public Dashboards: Renaming PubdashFooter (#58137)

This commit is contained in:
lean.dev 2022-11-03 10:12:27 -03:00 committed by GitHub
parent d45fe6e25c
commit 49e36c5c05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -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',

View File

@ -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 />
}
</>
);