mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Merge pull request #6166 from jimmyjones2/filter-exists
Add field exists filter button to doc table
This commit is contained in:
commit
ea2f94f779
2 changed files with 13 additions and 0 deletions
|
@ -106,6 +106,8 @@ describe('docViews', function () {
|
|||
expect($scope.filter.calledOnce).to.be(true);
|
||||
cell.find('.fa-search-minus').first().click();
|
||||
expect($scope.filter.calledTwice).to.be(true);
|
||||
cell.find('.fa-asterisk').first().click();
|
||||
expect($scope.filter.calledThrice).to.be(true);
|
||||
});
|
||||
|
||||
it('should NOT apply a filter when clicking non-filterable fields', function () {
|
||||
|
@ -115,6 +117,8 @@ describe('docViews', function () {
|
|||
expect($scope.filter.calledOnce).to.be(false);
|
||||
cell.find('.fa-search-minus').first().click();
|
||||
expect($scope.filter.calledTwice).to.be(false);
|
||||
cell.find('.fa-asterisk').first().click();
|
||||
expect($scope.filter.calledOnce).to.be(true);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -27,6 +27,15 @@
|
|||
tooltip-append-to-body="1"
|
||||
class="fa fa-columns"></i>
|
||||
</span>
|
||||
<span ng-if="!indexPattern.metaFields.includes(field)">
|
||||
<i ng-click="filter('_exists_', field, '+')"
|
||||
tooltip="Filter for field present"
|
||||
tooltip-append-to-body="1"
|
||||
class="fa fa-asterisk"></i>
|
||||
</span>
|
||||
<span ng-if="indexPattern.metaFields.includes(field)" tooltip="Unable to filter for presence of meta fields">
|
||||
<i class="fa fa-asterisk text-muted"></i>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue