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

[Logs UI] Fix alert previews for thresholds of 0 #111150

Merged
merged 4 commits into from
Sep 8, 2021

Conversation

afgomez
Copy link
Contributor

@afgomez afgomez commented Sep 3, 2021

Summary

Closes #108496

Ensures the alert previews render correctly when the user introduces a threshold of 0.

Alejandro Fernández Gómez added 2 commits September 3, 2021 16:00
According to the types, if a threshold is present it always has a
`threshold.value` so there's no need to check. This also prevents
treating a value of `0` as `false`.
@afgomez afgomez added v8.0.0 Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services release_note:skip Skip the PR/issue when compiling release notes auto-backport Deprecated - use backport:version if exact versions are needed v7.16.0 labels Sep 3, 2021
@afgomez afgomez requested a review from a team as a code owner September 3, 2021 14:21
@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

@afgomez
Copy link
Contributor Author

afgomez commented Sep 6, 2021

@elasticmachine merge upstream

@weltenwort weltenwort self-requested a review September 6, 2021 17:33
Copy link
Member

@weltenwort weltenwort left a comment

Choose a reason for hiding this comment

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

The "IS more than 0" is rendered correctly now. 👍

I'm still seeing some surprising behavior in the preview chart, though:

image

The y axis is still not scaled to include the threshold and only takes the value range of the bars into account. Do we want to make sure that it also includes the threshold if it is below the lowest or above the highest actual value?

@afgomez
Copy link
Contributor Author

afgomez commented Sep 7, 2021

@weltenwort thanks for the review <3! I've pushed a tweak for the change you asked for.

Copy link
Member

@weltenwort weltenwort left a comment

Choose a reason for hiding this comment

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

Thanks for fixing the y axis range 👍 LGTM, hope jenkins agrees

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
infra 1.7MB 1.7MB -80.0B

History

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

@afgomez afgomez merged commit 77e25be into elastic:master Sep 8, 2021
@afgomez afgomez deleted the 108496-fix-threshold-alert-previews branch September 8, 2021 09:33
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Sep 8, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

jloleysens added a commit to jloleysens/kibana that referenced this pull request Sep 8, 2021
…-link-to-kibana-app

* 'master' of github.com:elastic/kibana: (61 commits)
  [Logs UI] Fix alert previews for thresholds of `0` (elastic#111150)
  [Archive Migration][Partial] discover apps-discover (elastic#110437)
  [APM] Set start date of APM ML job to -4 weeks (elastic#111375)
  [ML] APM Latency Correlations: Code consolidation. (elastic#110790)
  [Discover] Fix indices permission for multiline test (elastic#111284)
  [Detection Rules] Add 7.15 rules (elastic#111464)
  [Security Solution][Endpoint][Host Isolation] Hide isolate host option in alert details rather than disabling (elastic#111064)
  React version of angular license view (elastic#111317)
  [APM] Fix link in readme (elastic#111362)
  [Security Solution] add agent field to generator (elastic#111428)
  [Dashboard] Retain Tags on Quicksave (elastic#111015)
  Reorder App Search ingestion methods (elastic#111361)
  Port performance docs to new docs system. (elastic#111063)
  [Security Solution][RAC] Fixes updatedAt loading bug (elastic#111010)
  [sample data] update web log geo.src field to match country code of geo.coordinates (elastic#110885)
  [Security solution] [Endpoint] Fix bad artifact migration (elastic#111294)
  Fix copy typo. (elastic#111203)
  [build] Remove empty optimize directory (elastic#111393)
  [Maps] fix term join not updating when editing right field (elastic#111030)
  [Fleet] Set default settings in component template instead of the index template (elastic#111197)
  ...

# Conflicts:
#	x-pack/plugins/reporting/public/management/__snapshots__/report_listing.test.tsx.snap
#	x-pack/plugins/reporting/public/management/report_listing.test.tsx
kibanamachine added a commit that referenced this pull request Sep 8, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Alejandro Fernández Gómez <alejandro.fernandez@elastic.co>
chrisronline pushed a commit to chrisronline/kibana that referenced this pull request Sep 8, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Logs UI Logs UI feature release_note:skip Skip the PR/issue when compiling release notes Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.16.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Logs] Log threshold alert preview breaks
4 participants