mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
enable partial tag matches for annotations
This commit is contained in:
@@ -40,6 +40,7 @@ class GrafanaDatasource {
|
||||
to: options.range.to.valueOf(),
|
||||
limit: options.annotation.limit,
|
||||
tags: options.annotation.tags,
|
||||
partialMatch: options.annotation.partialMatch,
|
||||
};
|
||||
|
||||
if (options.annotation.type === 'dashboard') {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="gf-form-group">
|
||||
<div class="gf-form-inline">
|
||||
<div class="gf-form">
|
||||
<span class="gf-form-label width-8">
|
||||
<span class="gf-form-label width-9">
|
||||
Filter by
|
||||
<info-popover mode="right-normal">
|
||||
<ul>
|
||||
@@ -11,18 +11,11 @@
|
||||
</ul>
|
||||
</info-popover>
|
||||
</span>
|
||||
<div class="gf-form-select-wrapper width-9">
|
||||
<div class="gf-form-select-wrapper width-8">
|
||||
<select class="gf-form-input" ng-model="ctrl.annotation.type" ng-options="f.value as f.text for f in ctrl.types">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="gf-form" ng-if="ctrl.annotation.type === 'tags'">
|
||||
<span class="gf-form-label">Tags</span>
|
||||
<bootstrap-tagsinput ng-model="ctrl.annotation.tags" tagclass="label label-tag" placeholder="add tags">
|
||||
</bootstrap-tagsinput>
|
||||
</div>
|
||||
|
||||
<div class="gf-form">
|
||||
<span class="gf-form-label">Max limit</span>
|
||||
<div class="gf-form-select-wrapper">
|
||||
@@ -31,6 +24,22 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gf-form-inline">
|
||||
<div class="gf-form" ng-if="ctrl.annotation.type === 'tags'">
|
||||
<gf-form-switch
|
||||
class="gf-form"
|
||||
label="Partial match"
|
||||
label-class="width-9"
|
||||
checked="ctrl.annotation.partialMatch"
|
||||
on-change="ctrl.refresh()"
|
||||
tooltip="By default Grafana will only show annotation that matches all tags in the query. Enabling this will make Grafana return any annotation with the tags you specify."></gf-form-switch>
|
||||
</div>
|
||||
<div class="gf-form" ng-if="ctrl.annotation.type === 'tags'">
|
||||
<span class="gf-form-label">Tags</span>
|
||||
<bootstrap-tagsinput ng-model="ctrl.annotation.tags" tagclass="label label-tag" placeholder="add tags">
|
||||
</bootstrap-tagsinput>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user