mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
* refactor header * split left and right header actions * cleanup * fix broken tests * move MetricsQueryEditor tests to QueryEditor tests * fix mock imports * remove no longer used onRunQuery func * move run queries button * apply defaults also when changing query type * remove not used prop
22 lines
989 B
TypeScript
22 lines
989 B
TypeScript
import { DashboardLoadedEvent, DataSourcePlugin } from '@grafana/data';
|
|
import { getAppEvents } from '@grafana/runtime';
|
|
|
|
import { ConfigEditor } from './components/ConfigEditor';
|
|
import LogsCheatSheet from './components/LogsCheatSheet';
|
|
import { MetaInspector } from './components/MetaInspector';
|
|
import { QueryEditor } from './components/QueryEditor';
|
|
import { CloudWatchDatasource } from './datasource';
|
|
import { onDashboardLoadedHandler } from './tracking';
|
|
import { CloudWatchJsonData, CloudWatchQuery } from './types';
|
|
|
|
export const plugin = new DataSourcePlugin<CloudWatchDatasource, CloudWatchQuery, CloudWatchJsonData>(
|
|
CloudWatchDatasource
|
|
)
|
|
.setQueryEditorHelp(LogsCheatSheet)
|
|
.setConfigEditor(ConfigEditor)
|
|
.setQueryEditor(QueryEditor)
|
|
.setMetadataInspector(MetaInspector);
|
|
|
|
// Subscribe to on dashboard loaded event so that we can track plugin adoption
|
|
getAppEvents().subscribe<DashboardLoadedEvent<CloudWatchQuery>>(DashboardLoadedEvent, onDashboardLoadedHandler);
|