mirror of
https://github.com/grafana/grafana.git
synced 2025-01-24 23:37:01 -06:00
Fixed broken tags search
This commit is contained in:
parent
13d993a836
commit
a352af5b9f
@ -16,7 +16,7 @@
|
||||
<span ng-if="ctrl.query.tag.length">
|
||||
|
|
||||
<span ng-repeat="tagName in ctrl.query.tag">
|
||||
<a ng-click="ctrl.removeTag(tagName, $event)" tag-color-from-name="ctrl.tagName" class="label label-tag">
|
||||
<a ng-click="ctrl.removeTag(tagName, $event)" tag-color-from-name="tagName" class="label label-tag">
|
||||
<i class="fa fa-remove"></i>
|
||||
{{tagName}}
|
||||
</a>
|
||||
@ -28,7 +28,7 @@
|
||||
<div class="search-results-container" ng-if="ctrl.tagsMode">
|
||||
<div class="row">
|
||||
<div class="span6 offset1">
|
||||
<div ng-repeat="tag in results" class="pointer" style="width: 180px; float: left;"
|
||||
<div ng-repeat="tag in ctrl.results" class="pointer" style="width: 180px; float: left;"
|
||||
ng-class="{'selected': $index === selectedIndex }"
|
||||
ng-click="ctrl.filterByTag(tag.term, $event)">
|
||||
<a class="search-result-tag label label-tag" tag-color-from-name="tag.term">
|
||||
|
@ -108,9 +108,12 @@ export class SearchCtrl {
|
||||
|
||||
getTags() {
|
||||
return this.backendSrv.get('/api/dashboards/tags').then((results) => {
|
||||
this.tagsMode = true;
|
||||
this.tagsMode = !this.tagsMode;
|
||||
this.results = results;
|
||||
this.giveSearchFocus = this.giveSearchFocus + 1;
|
||||
if ( !this.tagsMode ) {
|
||||
this.search();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user