-
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
Auto interval on date histogram is getting displayed as timestamp per… #59171
Conversation
… 0 milliseconds when x-axis bucket is collapsed Closes elastic#57822
Pinging @elastic/kibana-app (Team:KibanaApp) |
I am sorry, we messed something up here. That issue that you referenced, should have been assigned to @ThomThomson but it seemed somehow we unassigned it again So I'll be closing this in favor of the Devon's PR (which is currently going into the more correct direction): #59220 I am sorry for the inconvinience. |
And according to our latest discussion reopening this again, and finishing this one. |
src/legacy/core_plugins/vis_default_editor/public/components/agg.tsx
Outdated
Show resolved
Hide resolved
@timroes @sulemanof Could you review the changes, please? |
@elasticmachine merge upstream |
merge conflict between base and head |
src/legacy/core_plugins/vis_default_editor/public/components/controls/time_interval.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/vis_default_editor/public/components/agg.tsx
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/vis_default_editor/public/components/agg.tsx
Outdated
Show resolved
Hide resolved
# Conflicts: # src/legacy/core_plugins/vis_default_editor/public/components/agg.tsx # src/legacy/core_plugins/vis_default_editor/public/components/agg_group.tsx # src/legacy/core_plugins/vis_default_editor/public/components/sidebar/data_tab.tsx # src/legacy/core_plugins/vis_default_editor/public/components/sidebar/sidebar.tsx
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 looked at functional tests and left a comment about using testSubjects service over find when possible
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.
Functional tests changes 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.
LGTM.
Tested locally on Chrome (Mac).
@@ -61,7 +61,7 @@ function validateInterval( | |||
timeBase?: string | |||
) { | |||
if (definedOption) { | |||
return { isValid: true }; | |||
return { isValid: true, interval: agg.buckets?.getInterval() }; |
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.
Thanks for fixing scaled message when a user selects an option.
@elasticmachine merge upstream |
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 on Chrome Linux. Agg description when collapsed and warning for upscaling seem to work correctly now, no matter if time is switched via time picker or via brushing the chart. Code 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.
LGTM, tested locally in Chrome in Area chart!
Thanks for adding FT for this, it will help to avoid regressions while refactoring in future!
💛 Build succeeded, but was flaky
Test FailuresKibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/discover/_field_visualize·ts.discover app discover field visualize button should preserve app filters in visualizeStandard Out
Stack Trace
History
To update your PR or re-run it, just comment with: |
elastic#59171) * Auto interval on date histogram is getting displayed as timestamp per 0 milliseconds when x-axis bucket is collapsed Closes elastic#57822 * Fixed incorrect interval label displaying while scaling the chart. * Updated agg.test.tsx snapshot * Got rid of context and refactored agg hooks * Fixed agg.type.name check * Added functional tests to cover the date histogram interval editing * Fixed some expected values in tests * Updated some test cases * Added a new visualization to visualize archive * Added testSubjects service to replace find where possible * Updated tests to match updated behavior Co-authored-by: Elastic Machine <[email protected]>
* upstream/master: (69 commits) Adding PagerDuty icon to connectors cards (elastic#60805) Fix drag and drop flakiness (elastic#61993) Grok debugger migration (elastic#60658) Endpoint: Fix resolver SVG position issue (elastic#61886) [SIEM] version 7.7 rule import (elastic#61903) Added styles to make combobox list items wider for alerting flyout (elastic#61894) [UA] Tight worker loop can cause high CPU usage (elastic#60950) [ML] DF Analytics results table: use index pattern field format if one exists (elastic#61709) [ML] Catching unknown index pattern errors (elastic#61935) [Discover] Deangularize and euificate sidebar (elastic#47559) Endpoint: Add ts-node dev dependency (elastic#61884) Add an onBlur handler for the kuery bar. Only resubmit when input changes. (elastic#61901) [ML] Handle Empty Partition Field Values in Single Metric Viewer (elastic#61649) Auto interval on date histogram is getting displayed as timestamp per… (elastic#59171) [Maps] Explicitly pass fetch function to ems-client (elastic#61846) [SIEM][CASE] Fix aria-labels and translations (elastic#61670) [ML] Settings: Increase number of items that can be paged in calendars and filters lists (elastic#61842) [EPM] update epm filepath route (elastic#61910) APM] Set ignore_above to 1024 for telemetry saved object (elastic#61732) [Logs UI] Log stream row rendering (elastic#60773) ...
#59171) (#61992) * Auto interval on date histogram is getting displayed as timestamp per 0 milliseconds when x-axis bucket is collapsed Closes #57822 * Fixed incorrect interval label displaying while scaling the chart. * Updated agg.test.tsx snapshot * Got rid of context and refactored agg hooks * Fixed agg.type.name check * Added functional tests to cover the date histogram interval editing * Fixed some expected values in tests * Updated some test cases * Added a new visualization to visualize archive * Added testSubjects service to replace find where possible * Updated tests to match updated behavior Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
* master: (64 commits) Adding PagerDuty icon to connectors cards (elastic#60805) Fix drag and drop flakiness (elastic#61993) Grok debugger migration (elastic#60658) Endpoint: Fix resolver SVG position issue (elastic#61886) [SIEM] version 7.7 rule import (elastic#61903) Added styles to make combobox list items wider for alerting flyout (elastic#61894) [UA] Tight worker loop can cause high CPU usage (elastic#60950) [ML] DF Analytics results table: use index pattern field format if one exists (elastic#61709) [ML] Catching unknown index pattern errors (elastic#61935) [Discover] Deangularize and euificate sidebar (elastic#47559) Endpoint: Add ts-node dev dependency (elastic#61884) Add an onBlur handler for the kuery bar. Only resubmit when input changes. (elastic#61901) [ML] Handle Empty Partition Field Values in Single Metric Viewer (elastic#61649) Auto interval on date histogram is getting displayed as timestamp per… (elastic#59171) [Maps] Explicitly pass fetch function to ems-client (elastic#61846) [SIEM][CASE] Fix aria-labels and translations (elastic#61670) [ML] Settings: Increase number of items that can be paged in calendars and filters lists (elastic#61842) [EPM] update epm filepath route (elastic#61910) APM] Set ignore_above to 1024 for telemetry saved object (elastic#61732) [Logs UI] Log stream row rendering (elastic#60773) ...
Auto interval on date histogram is getting displayed as timestamp per 0 milliseconds when x-axis bucket is collapsed
Closes #57822
Summary
Incorrect interval displaying has been fixed by passing timeRange property from DefaultEditor through other components to DefaultEditorAgg. In DefaultEditorAgg this value is set to aggConfigs
timeRange when data changes in the editor.
Found out that because of setAggDescription hook the whole tree is rerendered, as some children are added dynamically.
Checklist
Delete any items that are not applicable to this PR.
For maintainers