Skip to content
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

[ML] Fix Anomaly Explorer charts time range to obey time picker range #80317

Merged

Conversation

peteharverson
Copy link
Contributor

Summary

Fixes the time range used for plotting the anomaly charts in the Anomaly Explorer so that the min / max observe the time range set in the global time picker. Previously, as shown in #70244, depending on the bucket span of the job(s) and the time range in the view, the charts could extend past the range set in the time picker.

Also renamed the earliest / latest arguments of the anomalyDataChange and calculateChartRange functions to make it clearer that they relate to the times selected in the swim lane, and not the time picker earliest / latest.

Before:
anomaly_chart_time_ranges_before

After:
anomaly_chart_time_ranges_after

Note that the time span of the grey highlighted box in these charts is two hours, whereas it should be the same as the time range selected in the swim lane. This is being fixed in #80299.

Related to #70244

@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, also did a local test to verify fixed spans for the chart.

Copy link
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jest Test Update LGTM

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

async chunks size

id before after diff
ml 11.3MB 11.3MB +522.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@peteharverson peteharverson merged commit e88cf10 into elastic:master Oct 14, 2020
@peteharverson peteharverson deleted the ml-anomaly-chart-time-range branch October 14, 2020 08:17
peteharverson added a commit to peteharverson/kibana that referenced this pull request Oct 14, 2020
…elastic#80317)

* [ML] Fix Anomaly Explorer charts time range to obey time picker range

* [ML] Fix explorer_charts_container_service Jest tests
peteharverson added a commit to peteharverson/kibana that referenced this pull request Oct 14, 2020
…elastic#80317)

* [ML] Fix Anomaly Explorer charts time range to obey time picker range

* [ML] Fix explorer_charts_container_service Jest tests
peteharverson added a commit that referenced this pull request Oct 14, 2020
…#80317) (#80464)

* [ML] Fix Anomaly Explorer charts time range to obey time picker range

* [ML] Fix explorer_charts_container_service Jest tests
peteharverson added a commit that referenced this pull request Oct 14, 2020
…#80317) (#80466)

* [ML] Fix Anomaly Explorer charts time range to obey time picker range

* [ML] Fix explorer_charts_container_service Jest tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants