diff --git a/public/app/features/dashboard/components/PubdashFooter/PubdashFooter.tsx b/public/app/features/dashboard/components/PubdashFooter/PubdashFooter.tsx new file mode 100644 index 00000000000..e281c11f827 --- /dev/null +++ b/public/app/features/dashboard/components/PubdashFooter/PubdashFooter.tsx @@ -0,0 +1,39 @@ +import { css } from '@emotion/css'; +import React from 'react'; + +import { GrafanaTheme2, colorManipulator } from '@grafana/data'; +import { useStyles2 } from '@grafana/ui'; + +export const PubdashFooter = function () { + const styles = useStyles2(getStyles); + + return ( +
+ + + powered by Grafana + + +
+ ); +}; + +const getStyles = (theme: GrafanaTheme2) => ({ + footer: css` + position: absolute; + height: 30px; + bottom: 0; + width: 100%; + background-color: ${colorManipulator.alpha(theme.colors.background.canvas, 0.7)}; + text-align: right; + font-size: ${theme.typography.body.fontSize}; + z-index: ${theme.zIndex.navbarFixed}; + `, + logoText: css` + margin-right: ${theme.spacing(1)}; + `, + logoImg: css` + height: 100%; + padding: ${theme.spacing(0.25, 0, 0.5, 0)}; + `, +}); diff --git a/public/app/features/dashboard/containers/DashboardPage.tsx b/public/app/features/dashboard/containers/DashboardPage.tsx index 5d39368ca06..0935e07d25e 100644 --- a/public/app/features/dashboard/containers/DashboardPage.tsx +++ b/public/app/features/dashboard/containers/DashboardPage.tsx @@ -28,6 +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 { SubMenu } from '../components/SubMenu/SubMenu'; import { DashboardGrid } from '../dashgrid/DashboardGrid'; import { liveTimer } from '../dashgrid/liveTimer'; @@ -401,6 +402,10 @@ export class UnthemedDashboardPage extends PureComponent { sectionNav={sectionNav} /> )} + { + // TODO: assess if there are other places where we may want a footer, which may reveal a better place to add this + isPublic && + } ); }