[Maps] create NOT EXISTS filter for tooltip property with no value#62849
Merged
nreese merged 3 commits intoelastic:masterfrom Apr 9, 2020
Merged
[Maps] create NOT EXISTS filter for tooltip property with no value#62849nreese merged 3 commits intoelastic:masterfrom
nreese merged 3 commits intoelastic:masterfrom
Conversation
Contributor
|
Pinging @elastic/kibana-gis (Team:Geo) |
thomasneirynck
approved these changes
Apr 8, 2020
x-pack/plugins/maps/public/layers/tooltips/es_tooltip_property.test.ts
Outdated
Show resolved
Hide resolved
|
|
||
| return [esFilters.buildPhraseFilter(indexPatternField, this.getRawValue(), this._indexPattern)]; | ||
| const value = this.getRawValue(); | ||
| if (value == null) { |
Contributor
There was a problem hiding this comment.
== relies on type coercion. maybe value === null || typeof value == 'undefined' instead.
Contributor
Author
There was a problem hiding this comment.
I would like to leave the check as == null. This is a pretty standard way to check for null, for example, from https://medium.com/javascript-in-plain-english/how-to-check-for-null-in-javascript-dffab64d8ed5 "That means checking for null is one of the few times in JavaScript that using == is recommended, while otherwise === is generally recommended." Additionally, this null check is used all over the Kibana code base. Just search for == null to see its usage.
Contributor
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
nreese
added a commit
to nreese/kibana
that referenced
this pull request
Apr 9, 2020
…lastic#62849) * [Maps] create NOT EXISTS filter for tooltip property with no value * review feedback
jloleysens
added a commit
to jloleysens/kibana
that referenced
this pull request
Apr 9, 2020
…chore/put-all-xjson-together * 'master' of github.com:elastic/kibana: [EPM] Update UI copy to use `integration` (elastic#63077) [NP] Inline buildPointSeriesData and buildHierarchicalData dependencies (elastic#61575) [Maps] create NOT EXISTS filter for tooltip property with no value (elastic#62849) [Endpoint] Add link to Logs UI to the Host Details view (elastic#62852) [UI COPY] Fixes typo in max_shingle_size for search_as_you_type (elastic#63071) [APM] docs: add alerting examples for APM (elastic#62864) [EPM] Change PACKAGES_SAVED_OBJECT_TYPE id (elastic#62818) docs: fix rendering of bulleted list (elastic#62855) Exposed AddMessageVariables as separate component (elastic#63007) Add Data - Adding cloud reset password link to cloud instructions (elastic#62835) [ML] DF Analytics: update memory estimate after adding exclude fields (elastic#62850) [Table Vis] Fix visualization overflow (elastic#62630) [Endpoint][EPM] Endpoint depending on ingest manager to initialize (elastic#62871) [Remote clusters] Fix flaky jest tests (elastic#58768) [Discover] Hide time picker when an indexpattern without timefield is selected (elastic#62134) Move search source parsing and serializing to data (elastic#59919) [ML] Functional tests - stabilize typing in mml input (elastic#63091) [data.search.aggs]: Clean up TimeBuckets implementation (elastic#62123) [ML] Functional transform tests - stabilize source selection (elastic#63087) add embed flag to saved object url as well (elastic#62926) # Conflicts: # x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/es_index.tsx
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 is an existing bug when users create a filter in a tooltip for a value that does not exist. The filter creates a match_phrase on null which results in a bad request
This PR updates the
getESFilterslogic to create a negated exists filter when the value does not exist