@grafana/runtime
Version:
Grafana Runtime Library
215 lines (214 loc) • 7.3 kB
TypeScript
import { AppPluginConfig as AppPluginConfigGrafanaData, AuthSettings, AzureSettings as AzureSettingsGrafanaData, BootData, BuildInfo, DataSourceInstanceSettings, FeatureToggles, GrafanaTheme, GrafanaTheme2, LicenseInfo, MapLayerOptions, OAuthSettings, PanelPluginMeta, PreinstalledPlugin as PreinstalledPluginGrafanaData, SystemDateFormatSettings, AngularMeta, PluginLoadingStrategy, PluginDependencies, PluginExtensions, TimeOption, UnifiedAlertingConfig } from '@grafana/data';
/**
* @deprecated Use the type from `@grafana/data`
*/
export interface AzureSettings {
cloud?: string;
clouds?: AzureCloudInfo[];
managedIdentityEnabled: boolean;
workloadIdentityEnabled: boolean;
userIdentityEnabled: boolean;
userIdentityFallbackCredentialsEnabled: boolean;
azureEntraPasswordCredentialsEnabled: boolean;
}
/**
* @deprecated Use the type from `@grafana/data`
*/
export interface AzureCloudInfo {
name: string;
displayName: string;
}
/**
* @deprecated Use the type from `@grafana/data`
*/
export type AppPluginConfig = {
id: string;
path: string;
version: string;
preload: boolean;
angular: AngularMeta;
loadingStrategy: PluginLoadingStrategy;
dependencies: PluginDependencies;
extensions: PluginExtensions;
moduleHash?: string;
};
/**
* @deprecated Use the type from `@grafana/data`
*/
export type PreinstalledPlugin = {
id: string;
version: string;
};
/**
* Use to access Grafana config settings in application code.
* This takes `window.grafanaBootData.settings` as input and returns a config object.
*/
export declare class GrafanaBootConfig {
publicDashboardAccessToken?: string;
publicDashboardsEnabled: boolean;
snapshotEnabled: boolean;
datasources: {
[str: string]: DataSourceInstanceSettings;
};
panels: {
[key: string]: PanelPluginMeta;
};
apps: Record<string, AppPluginConfigGrafanaData>;
auth: AuthSettings;
minRefreshInterval: string;
appUrl: string;
appSubUrl: string;
namespace: string;
windowTitlePrefix: string;
buildInfo: BuildInfo;
bootData: BootData;
externalUserMngLinkUrl: string;
externalUserMngLinkName: string;
externalUserMngInfo: string;
externalUserMngAnalytics: boolean;
externalUserMngAnalyticsParams: string;
allowOrgCreate: boolean;
feedbackLinksEnabled: boolean;
disableLoginForm: boolean;
defaultDatasource: string;
authProxyEnabled: boolean;
exploreEnabled: boolean;
queryHistoryEnabled: boolean;
helpEnabled: boolean;
profileEnabled: boolean;
newsFeedEnabled: boolean;
ldapEnabled: boolean;
jwtHeaderName: string;
jwtUrlLogin: boolean;
sigV4AuthEnabled: boolean;
azureAuthEnabled: boolean;
secureSocksDSProxyEnabled: boolean;
samlEnabled: boolean;
samlName: string;
autoAssignOrg: boolean;
verifyEmailEnabled: boolean;
oauth: OAuthSettings;
rbacEnabled: boolean;
disableUserSignUp: boolean;
loginHint: string;
passwordHint: string;
loginError?: string;
viewersCanEdit: boolean;
disableSanitizeHtml: boolean;
trustedTypesDefaultPolicyEnabled: boolean;
cspReportOnlyEnabled: boolean;
liveEnabled: boolean;
liveMessageSizeLimit: number;
/** @deprecated Use `theme2` instead. */
theme: GrafanaTheme;
theme2: GrafanaTheme2;
featureToggles: FeatureToggles;
anonymousEnabled: boolean;
anonymousDeviceLimit?: number;
licenseInfo: LicenseInfo;
rendererAvailable: boolean;
rendererVersion: string;
rendererDefaultImageWidth: number;
rendererDefaultImageHeight: number;
rendererDefaultImageScale: number;
supportBundlesEnabled: boolean;
http2Enabled: boolean;
dateFormats?: SystemDateFormatSettings;
grafanaJavascriptAgent: {
enabled: boolean;
apiKey: string;
customEndpoint: string;
consoleInstrumentalizationEnabled: boolean;
performanceInstrumentalizationEnabled: boolean;
cspInstrumentalizationEnabled: boolean;
tracingInstrumentalizationEnabled: boolean;
webVitalsAttribution: boolean;
internalLoggerLevel: number;
botFilterEnabled: boolean;
};
pluginCatalogURL: string;
pluginAdminEnabled: boolean;
pluginAdminExternalManageEnabled: boolean;
pluginCatalogHiddenPlugins: string[];
pluginCatalogManagedPlugins: string[];
pluginCatalogPreinstalledPlugins: PreinstalledPluginGrafanaData[];
pluginsCDNBaseURL: string;
expressionsEnabled: boolean;
awsAllowedAuthProviders: string[];
awsAssumeRoleEnabled: boolean;
azure: AzureSettingsGrafanaData;
caching: {
enabled: boolean;
};
geomapDefaultBaseLayerConfig?: MapLayerOptions;
geomapDisableCustomBaseLayer?: boolean;
unifiedAlertingEnabled: boolean;
unifiedAlerting: UnifiedAlertingConfig;
applicationInsightsConnectionString?: string;
applicationInsightsEndpointUrl?: string;
recordedQueries: {
enabled: boolean;
};
featureHighlights: {
enabled: boolean;
};
reporting: {
enabled: boolean;
};
analytics: {
enabled: boolean;
};
googleAnalyticsId?: string;
googleAnalytics4Id?: string;
googleAnalytics4SendManualPageViews: boolean;
rudderstackWriteKey?: string;
rudderstackDataPlaneUrl?: string;
rudderstackSdkUrl?: string;
rudderstackConfigUrl?: string;
rudderstackIntegrationsUrl?: string;
analyticsConsoleReporting: boolean;
dashboardPerformanceMetrics: string[];
panelSeriesLimit: number;
sqlConnectionLimits: {
maxOpenConns: number;
maxIdleConns: number;
connMaxLifetime: number;
};
defaultDatasourceManageAlertsUiToggle: boolean;
defaultAllowRecordingRulesTargetAlertsUiToggle: boolean;
tokenExpirationDayLimit?: number;
enableFrontendSandboxForPlugins: string[];
sharedWithMeFolderUID?: string;
rootFolderUID?: string;
localFileSystemAvailable?: boolean;
cloudMigrationIsTarget?: boolean;
cloudMigrationPollIntervalMs: number;
reportingStaticContext?: Record<string, string>;
exploreDefaultTimeOffset: string;
exploreHideLogsDownload?: boolean;
quickRanges?: TimeOption[];
pluginRestrictedAPIsAllowList?: Record<string, string[]>;
pluginRestrictedAPIsBlockList?: Record<string, string[]>;
/**
* Language used in Grafana's UI. This is after the user's preference (or deteceted locale) is resolved to one of
* Grafana's supported language.
*/
language: string | undefined;
/**
* regionalFormat used in Grafana's UI. Default to 'es-US' in the backend and overwritten when the user select a different one in SharedPreferences.
* This is the regionalFormat that is used for date formatting and other locale-specific features.
*/
regionalFormat: string;
listDashboardScopesEndpoint: string;
listScopesEndpoint: string;
openFeatureContext: Record<string, unknown>;
constructor(options: BootData['settings'] & {
bootData: BootData;
});
}
/**
* Use this to access the {@link GrafanaBootConfig} for the current running Grafana instance.
*
* @public
*/
export declare const config: GrafanaBootConfig;