-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Exclusion of source fields #7402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
e7204be
added source filtering
scampi b228c66
ditched the new 'retrieved fields' tab and added checkbox to exclude …
scampi 0d06220
disable field exclusion checkbox if field is a metafield
scampi c3c1d48
[indexPattern] copy excluded field property when refreshing fields
spalger 5b0b00a
[indexPattern/field] move isMetaField consideration into Field
spalger 1dee6f1
[indexPattern/edit] invert the "retreived" column, for accuracy
spalger ec0c334
[indexPattern/field] touchup the field.exclude message
spalger 062931a
Fix typo
spalger 9d70208
[indexPattern] handle index patterns without fields
spalger 5a97b6b
[courier/searchSource] auto add source filter for index pattern
spalger 8211990
[docTable] remove irrelevant test about source filtering
spalger fa5b22d
[settings/indices] cleanup imports
spalger 7819fa9
[settings/indexPattern/fields] add "field filters" tab
spalger d4b9c11
[imports] fix old testUtils import
spalger d75a63f
[ui/fieldWildcard] add lib to match names based on field-style wildcards
spalger 08f8fd7
[settings/fieldFilters] list filter matches, remove excluded fields f…
spalger 385a062
[fieldWildcard] properly escape regexp control chars
spalger da62b2a
[settings/indexPatterns] mark fields excluded if they match an exclud…
spalger e89ceea
[fieldWildcard] properly bind the regexp to the ends
spalger 14d5458
[indexPattern] remove unneeded lodash chain
spalger dc53a10
[settings/indices] use settings-indices- prefix for tab direcives
spalger 4be31b2
corrected rebase on master
scampi 79e87ca
Do not match exclusion on meta/scripted fields. Disable filter bar wh…
scampi 984d334
Merge branch 'master' into issue4366
scampi 3375fd1
corrected error in merge with _index_pattern
scampi 6a0b331
removed unused code
scampi 81a56f9
Merge branch 'master' into issue4366
scampi c209ce3
added missing fieldFilters to test dumps
scampi 9511486
Merge branch 'master' into issue4366
scampi 9e32bbc
added the management section refactoring from master
scampi 153051c
corrected merge with master
scampi deae71c
removed default empty array in the index pattern schema, and check if…
scampi 398f09e
Merge branch 'master' into issue4366
scampi 90894ea
Merge branch 'master' into issue4366
scampi 2f771a8
restricts the source with the exclusion patterns set for that index p…
scampi 39c63be
renamed field filters to source filters and explicitely retrieve the …
scampi 5dfce3d
renamed variables/moved files from field filters to source filters
scampi 5053620
Renamed _field_types.js to _edit_sections.js to better reflect what i…
scampi 3a10394
Removed lines that were specifying the _source field since they were …
scampi 5566013
moved fielddata_fields source filtering to where it is initialized
scampi 5de3906
two-column layout for the source filters indices section
scampi 5b904b0
corrected tests
scampi 5280714
Merge branch 'master' into issue4366
scampi 1d35add
use the same table layout as in the other index sections.
scampi 137667e
Merge branch 'master' into issue4366
scampi c17d619
Filter out .raw suffix from possible matches.
scampi 4b1f105
Merge branch 'master' of github.com:elastic/kibana into issue4366
scampi 19d58cb
Merge branch 'master' of github.com:elastic/kibana into issue4366
scampi 3e594da
Merge branch 'master' of github.com:elastic/kibana into issue4366
scampi 9256412
exclude is deprecated, should be excludes
scampi 87eb402
improved description
scampi 21fd154
Merge branch 'master' of github.com:elastic/kibana into issue4366
scampi 0979aac
changed as per code review
scampi 5e96240
removed filtering logic for keyword and raw fields
scampi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/core_plugins/kibana/public/management/sections/indices/_edit_sections.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import _ from 'lodash'; | ||
| export default function GetFieldTypes() { | ||
|
|
||
| return function (indexPattern) { | ||
| const fieldCount = _.countBy(indexPattern.fields, function (field) { | ||
| return (field.scripted) ? 'scripted' : 'indexed'; | ||
| }); | ||
|
|
||
| _.defaults(fieldCount, { | ||
| indexed: 0, | ||
| scripted: 0, | ||
| sourceFilters: 0 | ||
| }); | ||
|
|
||
| return [ | ||
| { | ||
| title: 'fields', | ||
| index: 'indexedFields', | ||
| count: fieldCount.indexed | ||
| }, | ||
| { | ||
| title: 'scripted fields', | ||
| index: 'scriptedFields', | ||
| count: fieldCount.scripted | ||
| }, | ||
| { | ||
| title: 'source filters', | ||
| index: 'sourceFilters', | ||
| count: fieldCount.sourceFilters | ||
| } | ||
| ]; | ||
| }; | ||
| }; | ||
24 changes: 0 additions & 24 deletions
24
src/core_plugins/kibana/public/management/sections/indices/_field_types.js
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/core_plugins/kibana/public/management/sections/indices/source_filters/controls.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| <div class="actions"> | ||
| <button | ||
| aria-label="Edit source filter" | ||
| ng-if="sourceFilters.editing !== filter" | ||
| ng-click="sourceFilters.editing = filter" | ||
| type="button" | ||
| class="btn btn-xs btn-default"> | ||
| <i aria-hidden="true" class="fa fa-pencil"></i> | ||
| </button> | ||
| <button | ||
| aria-label="Save source filter" | ||
| ng-if="sourceFilters.editing === filter" | ||
| ng-click="sourceFilters.save()" | ||
| ng-disabled="!filter.value" | ||
| type="button" | ||
| class="btn btn-xs btn-primary"> | ||
| <i aria-hidden="true" class="fa fa-save"></i> | ||
| </button> | ||
| <button | ||
| aria-label="Delete source filter" | ||
| ng-click="sourceFilters.delete(filter)" | ||
| type="button" | ||
| class="btn btn-xs btn-danger"> | ||
| <i aria-hidden="true" class="fa fa-trash"></i> | ||
| </button> | ||
| </div> |
12 changes: 12 additions & 0 deletions
12
src/core_plugins/kibana/public/management/sections/indices/source_filters/filter.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <div class="value"> | ||
| <span ng-if="sourceFilters.editing !== filter">{{ filter.value }}</span> | ||
|
|
||
| <input | ||
| ng-model="filter.value" | ||
| input-focus | ||
| ng-if="sourceFilters.editing === filter" | ||
| placeholder="{{ sourceFilters.placeHolder }}" | ||
| type="text" | ||
| required | ||
| class="form-control"> | ||
| </div> |
37 changes: 37 additions & 0 deletions
37
...core_plugins/kibana/public/management/sections/indices/source_filters/source_filters.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| <h3>Source Filters</h3> | ||
|
|
||
| <p> | ||
| Source filters can be used to exclude one or more fields when fetching the document source. This happens when viewing a document in the Discover app, or with a table displaying results from a saved search in the Dashboard app. Each row is built using the source of a single document, and if you have documents with large or unimportant fields you may benefit from filtering those out at this lower level. | ||
| </p> | ||
|
|
||
| <p> | ||
| Note that multi-fields will incorrectly appear as matches in the table below. These filters only actually apply to fields in the original source document, so matching multi-fields are not actually being filtered. | ||
| </p> | ||
|
|
||
| <div ng-class="{ saving: sourceFilters.saving }" class="source-filters-container"> | ||
|
|
||
| <form name="form" ng-submit="sourceFilters.create()"> | ||
| <div class="input-group"> | ||
| <input | ||
| ng-model="sourceFilters.newValue" | ||
| placeholder="{{ sourceFilters.placeHolder }}" | ||
| type="text" | ||
| class="form-control"> | ||
|
|
||
| <div class="input-group-btn" role="group" aria-label="Source Filter Editor Controls"> | ||
| <button | ||
| type="submit" | ||
| class="btn btn-primary" | ||
| ng-disabled="!sourceFilters.newValue"> | ||
| Add | ||
| </button> | ||
| </div> | ||
| </div> | ||
| </form> | ||
|
|
||
| <paginated-table | ||
| columns="columns" | ||
| rows="rows" | ||
| per-page="perPage"> | ||
| </paginated-table> | ||
| </div> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be using
indexPattern.getSourceFilters().length. Right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The count is updated at https://github.com/elastic/kibana/pull/7402/files#diff-042b9dd3484133b320590d4492f96a4eR85