grafana/public/app/plugins/datasource/prometheus/module.ts

21 lines
854 B
TypeScript
Raw Normal View History

import { DataSourcePlugin } from '@grafana/data';
import { ANNOTATION_QUERY_STEP_DEFAULT, PrometheusDatasource } from './datasource';
import PromQueryEditorByApp from './components/PromQueryEditorByApp';
import PromCheatSheet from './components/PromCheatSheet';
import PromExploreQueryEditor from './components/PromExploreQueryEditor';
import { ConfigEditor } from './configuration/ConfigEditor';
2015-10-01 13:19:25 -05:00
class PrometheusAnnotationsQueryCtrl {
static templateUrl = 'partials/annotations.editor.html';
stepDefaultValuePlaceholder = ANNOTATION_QUERY_STEP_DEFAULT;
2015-10-01 13:19:25 -05:00
}
export const plugin = new DataSourcePlugin(PrometheusDatasource)
.setQueryEditor(PromQueryEditorByApp)
.setConfigEditor(ConfigEditor)
.setExploreMetricsQueryField(PromExploreQueryEditor)
.setAnnotationQueryCtrl(PrometheusAnnotationsQueryCtrl)
.setQueryEditorHelp(PromCheatSheet);