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

[AO] Sync chart pointers on the metric threshold alert details page #155402

Merged
merged 4 commits into from
Apr 24, 2023

Conversation

maryam-saeidi
Copy link
Member

@maryam-saeidi maryam-saeidi commented Apr 20, 2023

Closes #155354

Summary

This PR syncs chart pointers on the metric threshold alert details page.

image

🧪 How to test

  • Add xpack.observability.unsafe.alertDetails.metrics.enabled: true to the Kibana config
  • Create a metric threshold rule with multiple conditions that generates an alert
  • Go to the alert details page and check the chart pointers

@maryam-saeidi maryam-saeidi added the Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" label Apr 20, 2023
@maryam-saeidi maryam-saeidi self-assigned this Apr 20, 2023
@maryam-saeidi maryam-saeidi added the release_note:skip Skip the PR/issue when compiling release notes label Apr 20, 2023
@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.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@maryam-saeidi maryam-saeidi marked this pull request as ready for review April 20, 2023 13:31
@maryam-saeidi maryam-saeidi requested a review from a team as a code owner April 20, 2023 13:31
@elasticmachine
Copy link
Contributor

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

@@ -22,6 +22,9 @@ jest.mock('../../../hooks/use_kibana', () => ({
useKibanaContextForPlugin: () => ({
services: {
...mockStartServices,
charts: {
Copy link
Member Author

Choose a reason for hiding this comment

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

Please let me know if you have another idea for mocking.
I tried adding the following line to this mock:

charts: chartPluginMock.createStartContract(),

But then it gives me another error:

Test suite failed to run

    TypeError: Cannot read properties of undefined (reading 'createSetup')

      11 |
      12 | const colors = new LegacyColorsService();
    > 13 | colors.init(coreMock.createSetup().uiSettings);
         |                      ^
      14 |
      15 | export const colorsServiceMock: LegacyColorsService = {
      16 |   createColorLookupFunction: jest.fn(colors.createColorLookupFunction.bind(colors)),

@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
infra 2.0MB 2.0MB +186.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
infra 90.7KB 90.8KB +136.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 394 397 +3

Total ESLint disabled count

id before after diff
securitySolution 474 477 +3

History

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

cc @maryam-saeidi

@maryam-saeidi maryam-saeidi added the Feature:Alert Details Page Observability ux management team label Apr 21, 2023
Copy link
Contributor

@kdelemme kdelemme left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@mohamedhamed-ahmed mohamedhamed-ahmed left a comment

Choose a reason for hiding this comment

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

LGTM!

@maryam-saeidi maryam-saeidi merged commit b71f783 into elastic:main Apr 24, 2023
@maryam-saeidi maryam-saeidi deleted the 155354-sync-pointers branch April 24, 2023 13:23
@kibanamachine kibanamachine added v8.8.0 backport:skip This commit does not require backporting labels Apr 24, 2023
nikitaindik pushed a commit to nikitaindik/kibana that referenced this pull request Apr 25, 2023
…lastic#155402)

Closes elastic#155354

## Summary

This PR syncs chart pointers on the metric threshold alert details page.


![image](https://user-images.githubusercontent.com/12370520/233380782-bf97eab8-167d-4f97-a10d-d2bfec1936e7.png)


## 🧪 How to test

- Add `xpack.observability.unsafe.alertDetails.metrics.enabled: true` to
the Kibana config
- Create a metric threshold rule with multiple conditions that generates
an alert
- Go to the alert details page and check the chart pointers
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 release_note:skip Skip the PR/issue when compiling release notes Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[AO] Sync chart pointers on metric threshold alert details
7 participants