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 cleanup of mlAnomaliesTableService listeners in Time Series Viewer. #25967

Merged
merged 4 commits into from
Nov 21, 2018

Conversation

walterra
Copy link
Contributor

@walterra walterra commented Nov 20, 2018

Summary

A missing call to componentWillUnmount() in the Single Series Viewer didn't properly clean up the listeners for mlAnomaliesTableService so when switching to the Anomaly Explorer the page would crash if the user hovered the Anomaly Table.

This fixes it by calling ReactDOM.unmountComponentAtNode(element[0]); in element.on('$destroy', () => { ... }) to trigger the cleanup.

Additionally, as a safety measure, mlChartTooltipService.show() now silently fails if target is undefined.

Checklist

For maintainers


Part of #25791.

@walterra walterra added bug Fixes for quality problems that affect the customer experience non-issue Indicates to automation that a pull request should not appear in the release notes v7.0.0 :ml Feature:ml-results legacy - do not use v6.6.0 labels Nov 20, 2018
@walterra walterra self-assigned this Nov 20, 2018
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

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

LGTM ⚡️

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

LGTM

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@walterra walterra merged commit ac9c375 into elastic:master Nov 21, 2018
@walterra walterra deleted the ml-fix-table-listener-unmount branch November 21, 2018 10:32
walterra added a commit to walterra/kibana that referenced this pull request Nov 21, 2018
…Viewer. (elastic#25967)

- A missing call to componentWillUnmount() in the Single Series Viewer didn't properly clean up the listeners for mlAnomaliesTableService so when switching to the Anomaly Explorer the page would crash if the user hovered the Anomaly Table.
- This fixes it by calling ReactDOM.unmountComponentAtNode(element[0]); in element.on('$destroy', () => { ... }) to trigger the cleanup.
- Additionally, as a safety measure, mlChartTooltipService.show() now silently fails if target is undefined.
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

walterra added a commit that referenced this pull request Nov 21, 2018
…Viewer. (#25967) (#26001)

- A missing call to componentWillUnmount() in the Single Series Viewer didn't properly clean up the listeners for mlAnomaliesTableService so when switching to the Anomaly Explorer the page would crash if the user hovered the Anomaly Table.
- This fixes it by calling ReactDOM.unmountComponentAtNode(element[0]); in element.on('$destroy', () => { ... }) to trigger the cleanup.
- Additionally, as a safety measure, mlChartTooltipService.show() now silently fails if target is undefined.
@sophiec20 sophiec20 added the Feature:Anomaly Detection ML anomaly detection label Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Anomaly Detection ML anomaly detection Feature:ml-results legacy - do not use :ml non-issue Indicates to automation that a pull request should not appear in the release notes v6.6.0 v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants