[Incident Management] Render suggested dashboards#223424
[Incident Management] Render suggested dashboards#223424cesco-f merged 20 commits intoelastic:mainfrom
Conversation
89bc9fa to
9738339
Compare
|
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
0616232 to
1c0f8c3
Compare
…cking on the button to add it
…oards only after loading
… dashboard number is increased
…_suggested_dashboards
…lated dashboards endpoint
...k/solutions/observability/plugins/observability/public/pages/alert_details/alert_details.tsx
Outdated
Show resolved
Hide resolved
| if (alertDetail) { | ||
| setRuleTypeModel(ruleTypeRegistry.get(alertDetail?.formatted.fields[ALERT_RULE_TYPE_ID]!)); | ||
| setAlertStatus(alertDetail?.formatted?.fields[ALERT_STATUS] as AlertStatus); | ||
| setActiveTabId(OVERVIEW_TAB_ID); |
There was a problem hiding this comment.
What does this removal exactly do? Why did you remove it? Does it fix something specifically?
There was a problem hiding this comment.
I am also curious about this change. This line was added to make sure overview tab is selected when user opens alert details page from "Related alerts" tab.
There was a problem hiding this comment.
With that the tabId query parameter in the url is ignored, the user will always land in the overview tab.
Is that the expected behavior?
There was a problem hiding this comment.
@cesco-f I noticed this as well while working on my PR and changed the line to be
if (passedTab === OVERVIEW_TAB_ID || passedTab === null) setActiveTabId(OVERVIEW_TAB_ID);
Granted passedTab is a new value added as part of my PR but it's a way to formally track the url state.
| } | ||
| }, [onPageReady, alertDetail, isLoading, activeTabId]); | ||
|
|
||
| useEffect(() => { |
There was a problem hiding this comment.
Glad to see all this code being removed in favor of the new api!
| const tabs: Array<Omit<EuiTabbedContentTab, 'id'> & { id: TabId }> = [ | ||
| { | ||
| id: OVERVIEW_TAB_ID, | ||
| id: 'overview', |
There was a problem hiding this comment.
I don't have any strong objection, but why did you replace the consts?
There was a problem hiding this comment.
Before this change whenever we wanted to add a new tab we had to:
- Create the constant
- Use the constant to change the
TabIdtype - Add the constant to the array we use to set the
activeTabId
With my change by just adding the new tab string to the TAB_IDS array everything else will be done automatically.
| }, | ||
| ] | ||
| : []), | ||
| { |
There was a problem hiding this comment.
Before we were not showing the tab if there were no linked dashboards. With this change, I understand we will always show the tab, independent if we have related dashboards or not. Do we handle the empty state and what do we display in this case? I am half way through the review, so I might get the answer!
...rvability/plugins/observability/public/pages/alert_details/components/related_dashboards.tsx
Outdated
Show resolved
Hide resolved
| ruleType: string; | ||
| } | ||
|
|
||
| export function DashboardTile({ |
There was a problem hiding this comment.
Is it DashboardTile or maybe you meant to write DashboardTitle?
There was a problem hiding this comment.
Nope, I meant to write DashboardTile 😂
Is it not clear what a tile is in this case? I used this naming a lot in my previous job, maybe it's not that clear.
There was a problem hiding this comment.
At first glance I thought it might refer to the title only, but it is clear. Just wanted to double check
| return wrapWithHeader( | ||
| <EuiText> | ||
| {i18n.translate('xpack.observability.relatedDashboards.noDashboardsTextLabel', { | ||
| defaultMessage: 'No dashboards', |
There was a problem hiding this comment.
Related to my comment above, I see you display the text No dashboards, which is fine for now I guess.
Similar to this issue, I think we need design input from @maciejforcone regarding Related Dashboards empty state.
...bility/plugins/observability/public/pages/alert_details/hooks/use_related_dashboards.test.ts
Outdated
Show resolved
Hide resolved
|
@cesco-f Great work! I tested the feature and it works well! Other than a few comments/questions, I don't have anything blocking this PR. Maybe I would like us to get @maciejforcone 's input regarding empty state as a follow up PR (similar to the empty state issue for Investigation guide). Here's how it looks right now. Do we want to describe the feature better? We could for example have a notification saying you can edit the rule to manually link dashboards. What do you think?
|
|
Starting backport for target branches: 8.19 https://github.com/elastic/kibana/actions/runs/15637044307 |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
History
|
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
This PR closes elastic#221947. https://github.com/user-attachments/assets/25beac10-5677-42ef-9544-b3ede0bf9fa1 The last part of the video is me trying to find the telemetry event fired when clicking the button. **Acceptance Criteria:** - The list should appear on the Related Dashboards tab, under the Linked Dashboards ✅ - Users should have the ability to add or "promote" a suggested dashboard to the list of linked dashboards stored on this rule, in a single click ✅ - We are collecting telemetry so that we know how many times users click the button to promote a suggested dashboard to a linked dashboard ✅ --------- Co-authored-by: Dominique Belcher <dominique.clarke@elastic.co>
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…224298) # Backport This will backport the following commits from `main` to `8.19`: - [[Incident Management] Render suggested dashboards (#223424)](#223424) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Francesco Fagnani","email":"fagnani.francesco@gmail.com"},"sourceCommit":{"committedDate":"2025-06-13T14:31:21Z","message":"[Incident Management] Render suggested dashboards (#223424)\n\nThis PR closes #221947.\n\n\n\nhttps://github.com/user-attachments/assets/25beac10-5677-42ef-9544-b3ede0bf9fa1\n\nThe last part of the video is me trying to find the telemetry event\nfired when clicking the button.\n\n**Acceptance Criteria:**\n\n- The list should appear on the Related Dashboards tab, under the Linked\nDashboards ✅\n- Users should have the ability to add or \"promote\" a suggested\ndashboard to the list of linked dashboards stored on this rule, in a\nsingle click ✅\n- We are collecting telemetry so that we know how many times users click\nthe button to promote a suggested dashboard to a linked dashboard ✅\n\n---------\n\nCo-authored-by: Dominique Belcher <dominique.clarke@elastic.co>","sha":"123091cb8344b27b576b9e534a92b5a7afd94b70","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["backport missing","release_note:feature","Team:obs-ux-management","backport:version","v9.1.0","v8.19.0","author:obs-ux-management"],"title":"[Incident Management] Render suggested dashboards","number":223424,"url":"https://github.com/elastic/kibana/pull/223424","mergeCommit":{"message":"[Incident Management] Render suggested dashboards (#223424)\n\nThis PR closes #221947.\n\n\n\nhttps://github.com/user-attachments/assets/25beac10-5677-42ef-9544-b3ede0bf9fa1\n\nThe last part of the video is me trying to find the telemetry event\nfired when clicking the button.\n\n**Acceptance Criteria:**\n\n- The list should appear on the Related Dashboards tab, under the Linked\nDashboards ✅\n- Users should have the ability to add or \"promote\" a suggested\ndashboard to the list of linked dashboards stored on this rule, in a\nsingle click ✅\n- We are collecting telemetry so that we know how many times users click\nthe button to promote a suggested dashboard to a linked dashboard ✅\n\n---------\n\nCo-authored-by: Dominique Belcher <dominique.clarke@elastic.co>","sha":"123091cb8344b27b576b9e534a92b5a7afd94b70"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/223424","number":223424,"mergeCommit":{"message":"[Incident Management] Render suggested dashboards (#223424)\n\nThis PR closes #221947.\n\n\n\nhttps://github.com/user-attachments/assets/25beac10-5677-42ef-9544-b3ede0bf9fa1\n\nThe last part of the video is me trying to find the telemetry event\nfired when clicking the button.\n\n**Acceptance Criteria:**\n\n- The list should appear on the Related Dashboards tab, under the Linked\nDashboards ✅\n- Users should have the ability to add or \"promote\" a suggested\ndashboard to the list of linked dashboards stored on this rule, in a\nsingle click ✅\n- We are collecting telemetry so that we know how many times users click\nthe button to promote a suggested dashboard to a linked dashboard ✅\n\n---------\n\nCo-authored-by: Dominique Belcher <dominique.clarke@elastic.co>","sha":"123091cb8344b27b576b9e534a92b5a7afd94b70"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Dominique Belcher <dominique.clarke@elastic.co>

This PR closes #221947.
Screen.Recording.2025-06-11.at.17.12.26.mov
The last part of the video is me trying to find the telemetry event fired when clicking the button.
Acceptance Criteria: