mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
@@ -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;
|
||||
}
|
||||
|
@@ -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() {
|
||||
|
Reference in New Issue
Block a user