Annotations: More fixes to the angular annotation editors (#33303)

* Annotations: Fixed angular editor issues

* More angular annotation fixes

* removed console.log
This commit is contained in:
Torkel Ödegaard
2021-04-23 14:06:30 +02:00
committed by GitHub
parent 37f7b91a6b
commit b6cfb65e40
11 changed files with 84 additions and 65 deletions

View File

@ -15,10 +15,11 @@ WHERE
class PostgresAnnotationsQueryCtrl {
static templateUrl = 'partials/annotations.editor.html';
annotation: any;
declare annotation: any;
/** @ngInject */
constructor() {
constructor($scope: any) {
this.annotation = $scope.ctrl.annotation;
this.annotation.rawQuery = this.annotation.rawQuery || defaultQuery;
}
}

View File

@ -26,7 +26,8 @@
</div>
<div class="gf-form" ng-show="ctrl.showHelp">
<pre class="gf-form-pre alert alert-info"><h6>Annotation Query Format</h6>
<div class="grafana-info-box">
<pre class="pre--no-style"><h6>Annotation Query Format</h6>
An annotation is an event that is overlaid on top of graphs. The query can have up to four columns per row, the time column is mandatory. Annotation rendering is expensive so it is important to limit the number of rows returned.
- column with alias: <b>time</b> for the annotation event time. Use epoch time or any native date data type.
@ -51,4 +52,5 @@ Or build your own conditionals using these macros which just return the values:
- $__unixEpochNanoTo() -&gt; 1494497183142514872
</pre>
</div>
</div>
</div>