mirror of
https://github.com/grafana/grafana.git
synced 2025-01-27 00:37:04 -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-if="ctrl.query.tag.length">
|
||||||
|
|
|
|
||||||
<span ng-repeat="tagName in ctrl.query.tag">
|
<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>
|
<i class="fa fa-remove"></i>
|
||||||
{{tagName}}
|
{{tagName}}
|
||||||
</a>
|
</a>
|
||||||
@ -28,7 +28,7 @@
|
|||||||
<div class="search-results-container" ng-if="ctrl.tagsMode">
|
<div class="search-results-container" ng-if="ctrl.tagsMode">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span6 offset1">
|
<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-class="{'selected': $index === selectedIndex }"
|
||||||
ng-click="ctrl.filterByTag(tag.term, $event)">
|
ng-click="ctrl.filterByTag(tag.term, $event)">
|
||||||
<a class="search-result-tag label label-tag" tag-color-from-name="tag.term">
|
<a class="search-result-tag label label-tag" tag-color-from-name="tag.term">
|
||||||
|
@ -108,9 +108,12 @@ export class SearchCtrl {
|
|||||||
|
|
||||||
getTags() {
|
getTags() {
|
||||||
return this.backendSrv.get('/api/dashboards/tags').then((results) => {
|
return this.backendSrv.get('/api/dashboards/tags').then((results) => {
|
||||||
this.tagsMode = true;
|
this.tagsMode = !this.tagsMode;
|
||||||
this.results = results;
|
this.results = results;
|
||||||
this.giveSearchFocus = this.giveSearchFocus + 1;
|
this.giveSearchFocus = this.giveSearchFocus + 1;
|
||||||
|
if ( !this.tagsMode ) {
|
||||||
|
this.search();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user