Core: Make application title customizable for WL (#22401)

* Core: Add custom app title

* Docs: Update White Labeling title customization

* Core: set back export for Branding types
This commit is contained in:
Agnès Toulet
2020-02-25 15:18:37 +01:00
committed by GitHub
parent 204682e9b8
commit 1dd404a1fb
7 changed files with 15 additions and 3 deletions

View File

@@ -32,8 +32,11 @@ export const MenuLogo: FC<BrandComponentProps> = ({ className }) => {
return <img className={className} src="public/img/grafana_icon.svg" alt="Grafana" />;
};
export const AppTitle = 'Grafana';
export class Branding {
static LoginLogo = LoginLogo;
static LoginBackground = LoginBackground;
static MenuLogo = MenuLogo;
static AppTitle = AppTitle;
}

View File

@@ -9,6 +9,7 @@ import PageContents from './PageContents';
import { CustomScrollbar } from '@grafana/ui';
import { NavModel } from '@grafana/data';
import { isEqual } from 'lodash';
import { Branding } from '../Branding/Branding';
interface Props {
children: JSX.Element[] | JSX.Element;
@@ -31,7 +32,7 @@ class Page extends Component<Props> {
updateTitle = () => {
const title = this.getPageTitle;
document.title = title ? title + ' - Grafana' : 'Grafana';
document.title = title ? title + ' - ' + Branding.AppTitle : Branding.AppTitle;
};
get getPageTitle() {