Files
grafana/public/app/plugins/datasource/loki/partials/annotations.editor.html
Fredrik Enestad 261319a4be Loki: Add formatting for annotations (#34774)
* add formatting for loki annotations

based/copied from the same features from the prometheus datasource
2021-05-28 10:12:03 +02:00

29 lines
1.2 KiB
HTML

<loki-annotations-query-editor
expr="ctrl.annotation.expr"
max-lines="ctrl.annotation.maxLines"
instant="ctrl.annotation.instant"
on-change="ctrl.onQueryChange"
datasource="ctrl.datasource"
>
</loki-annotations-query-editor>
<div class="gf-form-group">
<h5 class="section-heading">Field formats<tip>For title and text fields, use either the name or a pattern. For example, {{instance}} is replaced with label value for the label instance.</tip></h5>
<div class="gf-form-inline">
<div class="gf-form">
<span class="gf-form-label width-5">Title</span>
<input type="text" class="gf-form-input max-width-9" ng-model='ctrl.annotation.titleFormat' placeholder="alertname"></input>
</div>
<div class="gf-form">
<span class="gf-form-label width-5">Tags</span>
<input type="text" class="gf-form-input max-width-9" ng-model='ctrl.annotation.tagKeys' placeholder="label1,label2"></input>
</div>
<div class="gf-form-inline">
<div class="gf-form">
<span class="gf-form-label width-5">Text</span>
<input type="text" class="gf-form-input max-width-9" ng-model='ctrl.annotation.textFormat' placeholder="instance"></input>
</div>
</div>
</div>
</div>