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

fix(ui): avoid single stat crash #14423

Merged
merged 1 commit into from
Jul 23, 2019
Merged

fix(ui): avoid single stat crash #14423

merged 1 commit into from
Jul 23, 2019

Conversation

chnn
Copy link
Contributor

@chnn chnn commented Jul 23, 2019

Changes the latestValues logic to ignore null/empty Flux rows. This prevents a single stat/gauge crash.

Also wraps the time machine Vis in a error boundary, to mitigate the results of a crash.

Closes #14422

Changes the `latestValues` logic to ignore null/empty Flux rows. This
prevents a single stat/gauge crash.

Also wraps the time machine `Vis` in a error boundary, to mitigate the
results of a crash.

Closes #14422
@chnn chnn requested a review from a team July 23, 2019 17:23
@ghost ghost requested review from ebb-tide and removed request for a team July 23, 2019 17:23
Copy link
Contributor

@ebb-tide ebb-tide left a comment

Choose a reason for hiding this comment

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

🐰🐰🐰

const table = fromFlux(resp).table
const result = latestValues(table)

expect(result).toEqual([4, 6.0, 2.0, 8.0])
})

test('ignores rows with empty values', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

thanks for the test!!

@chnn chnn merged commit bbf80ac into master Jul 23, 2019
@mark-rushakoff mark-rushakoff deleted the fix-ui-latest-values branch April 16, 2020 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Single stat crashes with certain data
2 participants