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