grafana/public/app/plugins/sdk.ts
Torkel Ödegaard 693985a6ba
Plugins: Support es5 plugins extending es6 core classes (#32664)
* Plugins: Support es5 plugins extending es6 core classes

* Make all base classes backward compatible
2021-04-06 14:51:35 +02:00

13 lines
676 B
TypeScript

import { makeClassES5Compatible } from '@grafana/data';
import { loadPluginCss } from '@grafana/runtime';
import { PanelCtrl as PanelCtrlES6 } from 'app/features/panel/panel_ctrl';
import { MetricsPanelCtrl as MetricsPanelCtrlES6 } from 'app/features/panel/metrics_panel_ctrl';
import { QueryCtrl as QueryCtrlES6 } from 'app/features/panel/query_ctrl';
import { alertTab } from 'app/features/alerting/AlertTabCtrl';
const PanelCtrl = makeClassES5Compatible(PanelCtrlES6);
const MetricsPanelCtrl = makeClassES5Compatible(MetricsPanelCtrlES6);
const QueryCtrl = makeClassES5Compatible(QueryCtrlES6);
export { PanelCtrl, MetricsPanelCtrl, QueryCtrl, alertTab, loadPluginCss };