tripnomics_7.5.5/public/app/plugins/datasource/grafana/annotation_ctrl.ts
venbatechnologies@gmail.com 91fce5c4bf Initial commit
2021-07-05 13:49:40 +05:30

21 lines
615 B
TypeScript

import { SelectableValue } from '@grafana/data';
import { GrafanaAnnotationType } from './types';
export const annotationTypes: Array<SelectableValue<GrafanaAnnotationType>> = [
{ text: 'Dashboard', value: GrafanaAnnotationType.Dashboard },
{ text: 'Tags', value: GrafanaAnnotationType.Tags },
];
export class GrafanaAnnotationsQueryCtrl {
annotation: any;
types = annotationTypes;
constructor() {
this.annotation.type = this.annotation.type || GrafanaAnnotationType.Tags;
this.annotation.limit = this.annotation.limit || 100;
}
static templateUrl = 'partials/annotations.editor.html';
}