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

[Alert details page][Custom threshold] Add group by and tags fields to the alert details page summary #174254

Merged
merged 11 commits into from
Jan 17, 2024

Conversation

maryam-saeidi
Copy link
Member

@maryam-saeidi maryam-saeidi commented Jan 4, 2024

Closes #155698
Closes #174236

Summary

This PR adds group and tag information to the alert details page summary fields for the custom threshold rule:

image

🧪 How to test

  • Enable alert details page config
    xpack.observability.unsafe.alertDetails.observability.enabled: true
    
  • Create a custom threshold rule with a group by and add more than 3 rule tags
  • After the alert is fired, go to the alert details page (from alert flyout or menu action in the alert table); you should see the group by and tags information there.

@maryam-saeidi maryam-saeidi added release_note:skip Skip the PR/issue when compiling release notes Feature:Alert Details Page Observability ux management team Feature: Custom threshold Observability custom threshold rule type labels Jan 4, 2024
@maryam-saeidi maryam-saeidi self-assigned this Jan 4, 2024
@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@maryam-saeidi
Copy link
Member Author

/ci

@maryam-saeidi maryam-saeidi marked this pull request as ready for review January 4, 2024 14:11
@maryam-saeidi maryam-saeidi requested a review from a team as a code owner January 4, 2024 14:11
@botelastic botelastic bot added the Team:obs-ux-management Observability Management User Experience Team label Jan 5, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

Copy link
Contributor

@benakansara benakansara left a comment

Choose a reason for hiding this comment

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

Should adjust spacing when "Tags" is empty and show "-" under "Tags"?

Screenshot 2024-01-15 at 14 26 52 Screenshot 2024-01-15 at 14 29 29

@maryam-saeidi
Copy link
Member Author

Should adjust spacing when "Tags" is empty and show "-" under "Tags"?

Screenshot 2024-01-15 at 14 26 52 Screenshot 2024-01-15 at 14 29 29

Good point! I can also hide tags if we don't have any. @maciejforcone What do you think? Is it better to hide tags or just show a - when we don't have any?

@maciejforcone
Copy link

Good point! I can also hide tags if we don't have any. @maciejforcone What do you think? Is it better to hide tags or just show a - when we don't have any?

I also think that we can just hide tags header in this case.

@maryam-saeidi
Copy link
Member Author

@benakansara I checked the code, and I saw I was checking if tags exist, but in our case, tags are an empty array, and because of that, the code didn't work correctly. I fixed it in this commit: 87bab8e

@maryam-saeidi maryam-saeidi changed the title [Alert details page][Custom threshold] Add group by information to the alert details page summary [Alert details page][Custom threshold] Add group by and tags fields to the alert details page summary Jan 16, 2024
@benakansara
Copy link
Contributor

@maryam-saeidi @maciejforcone Should we adjust spacing around tags when there are less number of tags (first screenshot below)? We can show all alert summary fields (source, tags, any other) equally spaced, wdyt?

Screenshot 2024-01-16 at 13 32 57 Screenshot 2024-01-16 at 13 38 01

@maryam-saeidi
Copy link
Member Author

maryam-saeidi commented Jan 16, 2024

@maryam-saeidi @maciejforcone Should we adjust spacing around tags when there are less number of tags (first screenshot below)? We can show all alert summary fields (source, tags, any other) equally spaced, wdyt?

Screenshot 2024-01-16 at 13 32 57 Screenshot 2024-01-16 at 13 38 01

If you mean to spread the content to fill the whole row, personally, I like the current structure better.
If you mean having a bit more space between columns, I think it is a good idea. I checked the design, and it seems the space is more than the current implementation. @benakansara Is that what you meant?

Current

With XL gutterSize:

@benakansara
Copy link
Contributor

I meant to spread the content to fill the whole row. I remember at some point we had this kind of design in alert details page (when I added tags in APM alert details page long time back). But it seems the design is changed since then. I checked the APM alert details page now, and looks similar to design in this PR.

Screenshot 2024-01-16 at 14 48 20

I think adding xl gutterSize will help.

Copy link
Contributor

@benakansara benakansara left a comment

Choose a reason for hiding this comment

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

LGTM

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #5 / useGetCaseMetrics shows an error toast when getSingleCaseMetrics throws

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
observability 581 583 +2

Async chunks

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

id before after diff
observability 600.7KB 602.0KB +1.3KB

History

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

cc @maryam-saeidi

@maryam-saeidi maryam-saeidi merged commit 2ea78ce into elastic:main Jan 17, 2024
21 checks passed
@maryam-saeidi maryam-saeidi deleted the 155698-show-group-info branch January 17, 2024 09:34
@kibanamachine kibanamachine added v8.13.0 backport:skip This commit does not require backporting labels Jan 17, 2024
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this pull request Feb 15, 2024
…o the alert details page summary (elastic#174254)

Closes elastic#155698
Closes elastic#174236

## Summary

This PR adds group and tag information to the alert details page summary
fields for the custom threshold rule:


![image](https://github.com/elastic/kibana/assets/12370520/d93e32bd-99ae-414f-87ed-5ca5884acfa6)


## 🧪 How to test
- Enable alert details page config
    ```
    xpack.observability.unsafe.alertDetails.observability.enabled: true
    ```
- Create a custom threshold rule with a group by and add more than 3
rule tags
- After the alert is fired, go to the alert details page (from alert
flyout or menu action in the alert table); you should see the group by
and tags information there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Alert Details Page Observability ux management team Feature: Custom threshold Observability custom threshold rule type release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-management Observability Management User Experience Team v8.13.0
Projects
None yet
7 participants