-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
TSVB is retaining results even after indexpattern is removed from opt… #32003
Conversation
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
Current behavior:
My main concern in points 2 and 3. I do not understand why, if the user clears the index pattern field, we show him data for all available indexes, but after saving and reopening saved visualization, we replace this index with the default index pattern? It's confusing and I think we should replace index pattern only for one case: it's a creating a new tsvb viz. How to fix it: in the file src/legacy/core_plugins/metrics/public/components/vis_editor.js we should do: Any ideas? |
After syncing with @markov00 about that, we think we should use the behavior that you suggested, where we use There is still some weird behavior around that empty string index pattern and what the user sees in the editor. So we came up with the following suggestion:
That way we should be very explicit and not break any existing functionality. New visualizations will have the default index pattern shown in the editor (via the If we would e.g. start querying all indexes in case it's an empty string, the old saved TSVB visualizations will behave weird, because for the user it looked like the default index in the editor (since we're replacing it there), but then on dashboard it will load all indexes (the weird bug in the past). So we should stay with loading the default index pattern for all empty string index patterns. We also can't easily migrate those empty strings, since during the saved object migration phase Kibana isn't started completely, meaning we're not having access to the configuration and could see what the default index pattern is. |
💔 Build Failed |
💚 Build Succeeded |
@alexwizp With these changes I don't see the timestamp field populated with the right values for the default index pattern. The field I'm currently seeing seems to be related to the |
… = defaultIndexPattern;
💚 Build Succeeded |
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.
Tested locally LGTM
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.
Tested and works, LGTM 👍 I added one small nitpick about a typo
@@ -62,11 +63,16 @@ export const IndexPattern = props => { | |||
id="tsvb.indexPatternLabel" | |||
defaultMessage="Index pattern" | |||
/>)} | |||
helpText={(model.default_index_pattern && !model[indexPatternName] && <FormattedMessage | |||
id="tsvb.indexPattern.searchByDefaultIndex" | |||
defaultMessage="Default index pattern is used. To query all indexes use *" |
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.
I think it should use indices
as plural of index
- but I wasn't sure and searched for it in the Kibana codebase - 2800
vs 141
in favor of indices
, so I think we should go with it :)
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.
LGTM. Please backport to 6.7.0
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.
LGTM
elastic#32003) # Conflicts: # src/legacy/core_plugins/metrics/server/lib/get_fields.js
elastic#32003) # Conflicts: # src/legacy/core_plugins/metrics/server/lib/get_fields.js
Fix: #31951
Checklist
For maintainers