mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
@grafana/runtime: expose config and loadPluginCss (#17655)
* move config to grafana runtime * set defaults * defaults in constructor * use @types/systemjs * rename Settings to GrafanaBootConfig
This commit is contained in:
@@ -31,6 +31,7 @@ import * as d3 from 'd3';
|
||||
import * as grafanaData from '@grafana/data';
|
||||
import * as grafanaUI from '@grafana/ui';
|
||||
import * as grafanaRuntime from '@grafana/runtime';
|
||||
export { loadPluginCss } from '@grafana/runtime';
|
||||
|
||||
// rxjs
|
||||
import { Observable, Subject } from 'rxjs';
|
||||
@@ -230,11 +231,3 @@ export function importPanelPlugin(id: string): Promise<PanelPlugin> {
|
||||
return getPanelPluginNotFound(id);
|
||||
});
|
||||
}
|
||||
|
||||
export function loadPluginCss(options) {
|
||||
if (config.bootData.user.lightTheme) {
|
||||
System.import(options.light + '!css');
|
||||
} else {
|
||||
System.import(options.dark + '!css');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user