2019-11-08 10:02:51 +01:00
|
|
|
import { DataSourcePlugin } from '@grafana/data';
|
2020-02-05 16:40:37 +01:00
|
|
|
import { ANNOTATION_QUERY_STEP_DEFAULT, PrometheusDatasource } from './datasource';
|
2016-02-01 23:24:08 +01:00
|
|
|
|
2021-05-19 16:24:27 +02:00
|
|
|
import PromQueryEditorByApp from './components/PromQueryEditorByApp';
|
2019-09-16 07:17:34 +02:00
|
|
|
import PromCheatSheet from './components/PromCheatSheet';
|
2020-02-06 12:37:30 +00:00
|
|
|
import PromExploreQueryEditor from './components/PromExploreQueryEditor';
|
2018-10-09 19:46:31 +02:00
|
|
|
|
2019-11-08 10:02:51 +01:00
|
|
|
import { ConfigEditor } from './configuration/ConfigEditor';
|
|
|
|
|
|
2015-10-02 03:19:25 +09:00
|
|
|
class PrometheusAnnotationsQueryCtrl {
|
2017-12-21 08:39:31 +01:00
|
|
|
static templateUrl = 'partials/annotations.editor.html';
|
2020-02-05 16:40:37 +01:00
|
|
|
stepDefaultValuePlaceholder = ANNOTATION_QUERY_STEP_DEFAULT;
|
2015-10-02 03:19:25 +09:00
|
|
|
}
|
|
|
|
|
|
2019-11-08 10:02:51 +01:00
|
|
|
export const plugin = new DataSourcePlugin(PrometheusDatasource)
|
2021-05-19 16:24:27 +02:00
|
|
|
.setQueryEditor(PromQueryEditorByApp)
|
2019-11-08 10:02:51 +01:00
|
|
|
.setConfigEditor(ConfigEditor)
|
2019-12-23 11:42:31 +01:00
|
|
|
.setExploreMetricsQueryField(PromExploreQueryEditor)
|
2019-11-08 10:02:51 +01:00
|
|
|
.setAnnotationQueryCtrl(PrometheusAnnotationsQueryCtrl)
|
2021-01-19 22:52:09 +00:00
|
|
|
.setQueryEditorHelp(PromCheatSheet);
|