mirror of
https://github.com/grafana/grafana.git
synced 2026-08-16 16:14:59 -05:00
Runtime: Expose panel plugin import utils (#60799)
* Runtime: Expose plugin import utils * Review * Fix
This commit is contained in:
@@ -32,6 +32,7 @@ import {
|
||||
setLocationSrv,
|
||||
setQueryRunnerFactory,
|
||||
setRunRequest,
|
||||
setPluginImportUtils,
|
||||
} from '@grafana/runtime';
|
||||
import { setPanelDataErrorView } from '@grafana/runtime/src/components/PanelDataErrorView';
|
||||
import { setPanelRenderer } from '@grafana/runtime/src/components/PanelRenderer';
|
||||
@@ -68,6 +69,7 @@ import { getTimeSrv } from './features/dashboard/services/TimeSrv';
|
||||
import { PanelDataErrorView } from './features/panel/components/PanelDataErrorView';
|
||||
import { PanelRenderer } from './features/panel/components/PanelRenderer';
|
||||
import { DatasourceSrv } from './features/plugins/datasource_srv';
|
||||
import { importPanelPlugin, syncGetPanelPlugin } from './features/plugins/importPanelPlugin';
|
||||
import { preloadPlugins } from './features/plugins/pluginPreloader';
|
||||
import { QueryRunner } from './features/query/state/QueryRunner';
|
||||
import { runRequest } from './features/query/state/runRequest';
|
||||
@@ -145,6 +147,12 @@ export class GrafanaApp {
|
||||
// Provide runRequest implementation to packages, @grafana/scenes in particular
|
||||
setRunRequest(runRequest);
|
||||
|
||||
// Privide plugin import utils to packages, @grafana/scenes in particular
|
||||
setPluginImportUtils({
|
||||
importPanelPlugin,
|
||||
getPanelPluginFromCache: syncGetPanelPlugin,
|
||||
});
|
||||
|
||||
locationUtil.initialize({
|
||||
config,
|
||||
getTimeRangeForUrl: getTimeSrv().timeRangeForUrl,
|
||||
|
||||
Reference in New Issue
Block a user