grafana/public/app/plugins/datasource/prometheus/module.ts
kay delaney b9b6af9491
Dashboards: Adds cheat sheet toggle to supported query editors (#28857)
* Dashboards: Adds cheat sheet toggle to supported query editors
2021-01-19 23:52:09 +01:00

21 lines
843 B
TypeScript

import { DataSourcePlugin } from '@grafana/data';
import { ANNOTATION_QUERY_STEP_DEFAULT, PrometheusDatasource } from './datasource';
import { PromQueryEditor } from './components/PromQueryEditor';
import PromCheatSheet from './components/PromCheatSheet';
import PromExploreQueryEditor from './components/PromExploreQueryEditor';
import { ConfigEditor } from './configuration/ConfigEditor';
class PrometheusAnnotationsQueryCtrl {
static templateUrl = 'partials/annotations.editor.html';
stepDefaultValuePlaceholder = ANNOTATION_QUERY_STEP_DEFAULT;
}
export const plugin = new DataSourcePlugin(PrometheusDatasource)
.setQueryEditor(PromQueryEditor)
.setConfigEditor(ConfigEditor)
.setExploreMetricsQueryField(PromExploreQueryEditor)
.setAnnotationQueryCtrl(PrometheusAnnotationsQueryCtrl)
.setQueryEditorHelp(PromCheatSheet);