2023-01-13 16:31:44 +00:00
|
|
|
import { DataSourcePlugin, DashboardLoadedEvent } from '@grafana/data';
|
|
|
|
|
import { getAppEvents } from '@grafana/runtime';
|
2022-04-22 14:33:13 +01:00
|
|
|
|
2021-04-23 09:23:33 +02:00
|
|
|
import CheatSheet from './CheatSheet';
|
2023-07-24 16:26:10 +01:00
|
|
|
import { TempoQueryField } from './QueryField';
|
2021-10-06 13:39:14 -06:00
|
|
|
import { ConfigEditor } from './configuration/ConfigEditor';
|
2020-10-13 19:12:49 +02:00
|
|
|
import { TempoDatasource } from './datasource';
|
2023-01-13 16:31:44 +00:00
|
|
|
import { onDashboardLoadedHandler } from './tracking';
|
|
|
|
|
import { TempoQuery } from './types';
|
2020-10-13 19:12:49 +02:00
|
|
|
|
|
|
|
|
export const plugin = new DataSourcePlugin(TempoDatasource)
|
2021-11-22 12:07:38 +01:00
|
|
|
.setQueryEditor(TempoQueryField)
|
2020-10-13 19:12:49 +02:00
|
|
|
.setConfigEditor(ConfigEditor)
|
2021-11-22 12:07:38 +01:00
|
|
|
.setQueryEditorHelp(CheatSheet);
|
2023-01-13 16:31:44 +00:00
|
|
|
|
|
|
|
|
// Subscribe to on dashboard loaded event so that we can track plugin adoption
|
|
|
|
|
getAppEvents().subscribe<DashboardLoadedEvent<TempoQuery>>(DashboardLoadedEvent, onDashboardLoadedHandler);
|