Chore: Add type info for grafana boot data (#45322)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
This commit is contained in:
kay delaney
2022-03-30 10:48:58 +01:00
committed by GitHub
parent 6889e39526
commit f1c3177e79
15 changed files with 142 additions and 65 deletions

View File

@ -1,5 +1,6 @@
import { merge } from 'lodash';
import {
BootData,
BuildInfo,
createTheme,
DataSourceInstanceSettings,
@ -28,9 +29,9 @@ export class GrafanaBootConfig implements GrafanaConfig {
appUrl = '';
appSubUrl = '';
windowTitlePrefix = '';
buildInfo: BuildInfo = {} as BuildInfo;
buildInfo: BuildInfo;
newPanelTitle = '';
bootData: any;
bootData: BootData;
externalUserMngLinkUrl = '';
externalUserMngLinkName = '';
externalUserMngInfo = '';
@ -54,9 +55,9 @@ export class GrafanaBootConfig implements GrafanaConfig {
verifyEmailEnabled = false;
oauth: OAuthSettings = {};
disableUserSignUp = false;
loginHint: any;
passwordHint: any;
loginError: any;
loginHint = '';
passwordHint = '';
loginError = undefined;
navTree: any;
viewersCanEdit = false;
editorsCanAdmin = false;
@ -117,6 +118,8 @@ export class GrafanaBootConfig implements GrafanaConfig {
const mode = options.bootData.user.lightTheme ? 'light' : 'dark';
this.theme2 = createTheme({ colors: { mode } });
this.theme = this.theme2.v1;
this.bootData = options.bootData;
this.buildInfo = options.buildInfo;
const defaults = {
datasources: {},