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

[ResponseOps][BUG] - UI fixes for Alerts Summary chart #137476

Merged
merged 17 commits into from
Aug 2, 2022

Conversation

fkanout
Copy link
Contributor

@fkanout fkanout commented Jul 28, 2022

Summary

It fixes #137292 by adding:

1- Tooltip once hovering on the bar
2- Add a base/background bar that presents the total alerts in the scope of 30 days
3- Update the design and add Last 30 days
4- Update ES query to be more efficient
Screenshot 2022-07-29 at 13 24 55

Screenshot 2022-07-29 at 13 29 05

It fixes #137417 by adding a proper error message
Screenshot 2022-07-29 at 13 33 55

@fkanout fkanout added the v8.4.0 label Jul 28, 2022
@fkanout fkanout self-assigned this Jul 28, 2022
@fkanout fkanout added v8.5.0 bug Fixes for quality problems that affect the customer experience labels Jul 29, 2022
@fkanout fkanout marked this pull request as ready for review July 29, 2022 11:52
@fkanout fkanout requested a review from a team as a code owner July 29, 2022 11:52
@fkanout
Copy link
Contributor Author

fkanout commented Jul 29, 2022

@elasticmachine merge upstream

@fkanout fkanout added release_note:fix Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" labels Jul 29, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@elasticmachine
Copy link
Contributor

Pinging @elastic/actionable-observability (Team: Actionable Observability)

@fkanout
Copy link
Contributor Author

fkanout commented Jul 29, 2022

/oblt-deploy

// If there are alerts in this day, we construct the chart data.
return [
...acc,
...dayAlerts.alertStatus.buckets.map((alert) => ({
Copy link
Contributor

Choose a reason for hiding this comment

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

Tell me if I am wrong here, but I feel that you should also add the totalDayAlert too so you can avoid the white background when you have data.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@XavierM, excellent point. Actually, totalDayAlert was added to each day and calculated based on the number of alerts for that day.
But then once the 2nd of alerts kicked in. The chart flipped upside down means the totalDayAlert (grey color) becomes at the bottom and the recovered and active at the top. I tried to fix that in many ways this morning but with no success and I don't want to spend more time on it as we all agreed.

BTW, when we hover over the bar the gray bar appears again.

I think this limitation is ok for this version, what do you think @maciejforcone?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can do it just like that -> https://github.com/fkanout/kibana/pull/3/files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, @XavierM. But it has exactly the same issue I mentioned -the chart is flipped. You need at least two days of data to see the issue.

Screenshot 2022-07-29 at 17 11 28

Here is my commit where I deleted my solution after I saw the issue

Copy link
Contributor

@XavierM XavierM Aug 1, 2022

Choose a reason for hiding this comment

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

I failed.... 😞 but I was also looking everywhere in kibana, and it looks like that nobody is doing the fake background like we do, maybe for good reason. I am wondering if we should remove it because if we are having alerts/data, we most likely not going to see this grey background anyway. It is better to be simplistic sometime.

what do you think?

Copy link
Contributor Author

@fkanout fkanout Aug 1, 2022

Choose a reason for hiding this comment

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

@XavierM, no worries! BTW, the only way I found to make it works is by making chart reading starting from the left, which means the today bar will be at the very left bar.

To answer your question. I don't mind removing the background/reference bars.

Copy link
Contributor

Choose a reason for hiding this comment

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

Alright, after talking to @angorayc, we found a cool solution about it and now she might have to fix some other graph in security solution LOL.

The PR is re-open @fkanout

Copy link
Contributor

@XavierM XavierM left a comment

Choose a reason for hiding this comment

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

when there is no alert that looks a little bit weird

image

@fkanout
Copy link
Contributor Author

fkanout commented Jul 29, 2022

#137476 (review)
@maciejforcone, what do you think is the adequate way to say there are no alerts?

@maciejforcone
Copy link

since it's a chart - it can be just flat, 30 empty bars, so it doesn't look broken. We don't need to repeat text "no alerts" because we already have three zeros.

@fkanout
Copy link
Contributor Author

fkanout commented Aug 1, 2022

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 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
triggersActionsUi 1.0MB 1.0MB +1.5KB

History

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

cc @fkanout

@fkanout fkanout added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) and removed v8.4.0 v8.5.0 labels Aug 2, 2022
@fkanout fkanout merged commit 521c2a4 into elastic:main Aug 2, 2022
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 2, 2022
* Use more efficient code/query, and add the 3rd bar (base one)

* Update comment

* Update comment

* Add the shade color to the base bar

* Update comment

* Remove unused else

* add tooltip and fix base bar

* Update design

* Add error handling message

* review idea

* fix no alerts + graph to get greyed out

* review I

* Fix the order of alertsChartData

* Fix design and color scheme

Co-authored-by: Xavier Mouligneau <[email protected]>
(cherry picked from commit 521c2a4)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.4

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Aug 2, 2022
…7840)

* Use more efficient code/query, and add the 3rd bar (base one)

* Update comment

* Update comment

* Add the shade color to the base bar

* Update comment

* Remove unused else

* add tooltip and fix base bar

* Update design

* Add error handling message

* review idea

* fix no alerts + graph to get greyed out

* review I

* Fix the order of alertsChartData

* Fix design and color scheme

Co-authored-by: Xavier Mouligneau <[email protected]>
(cherry picked from commit 521c2a4)

Co-authored-by: Faisal Kanout <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) bug Fixes for quality problems that affect the customer experience release_note:fix Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.4.0 v8.5.0
Projects
None yet
6 participants