mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
* style(dashboardsettings): disable eslint react hooks exhaustive deps warning * Unrelated fix * Fix annotation angular loading issues * Fixing update issue Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
23 lines
699 B
TypeScript
23 lines
699 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 {
|
|
declare annotation: any;
|
|
|
|
types = annotationTypes;
|
|
|
|
/** @ngInject */
|
|
constructor($scope: any) {
|
|
this.annotation = $scope.ctrl.annotation;
|
|
this.annotation.type = this.annotation.type || GrafanaAnnotationType.Tags;
|
|
this.annotation.limit = this.annotation.limit || 100;
|
|
}
|
|
|
|
static templateUrl = 'partials/annotations.editor.html';
|
|
}
|