-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[RAM] Implement global alerts page #175143
[RAM] Implement global alerts page #175143
Conversation
516a822
to
bc455f8
Compare
/ci |
/ci |
/ci |
/ci |
/ci |
/ci |
…ana into 173647-global-alerts-page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
dab4336
to
a75223b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alerts_as_data_rbac.ts
changes lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I mention in my comment below, this looks great but I would like to move the logic for the panels creation to the consumers and then pass the panel items to the unified search. In that way we make the component more generic!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanx a lot for the contribution. It seems as a very nice enhancement but it is very specific for the alerts stack page so I would like to make this more generic in unified search. I suggest:
- change the quickFilters to
additionalQueryBarMenuPanels
- create the panels in the consumer (stack alerts)
- pass them to unfied search new prop
additionalQueryBarMenuPanels
- Display them in the query bar menu
In that way other consumers can use the same logic to display panel items in than menu without the need to integrating this inside unified search
Let me know if you have any questions!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your review @stratoula! 😊
In that case, how would you like me to address the issue of specifying top-level items as well as nested panels? Would a nested structure like the one I used for quick filters (flattened at QueryBarMenuPanels
-level) be ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think that this
...quickFiltersContextMenuData.panels
should come from the consumers of unified search. So after the proposed changes it should look
... additionalQueryBarMenuPanels
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I mean is that quickFilters
accepts a nested structure where items like
{ name: '', filter: {} }
render top-level menu items like these:
whereas items like
{ groupName: '', items: [...] }
render menu items that link to a panel with sub-items (see Status
):
The EuiContextMenu
API expects a flattened structure thought, so I guess the options are either accepting a nested structure like the one described above, then flattened at QueryBarMenuPanels
-level, something like:
additionalQueryBarMenuItems={[
{ name: '' }, // Top-level
{ title/groupName: '', items: [{ name: '' }] }, // Nested in subpanel
]}
or let the consumer handle the association between panels and items:
additionalQueryBarMenuItems={[
{ name: '' }, // Top-level
{ name: '', panel: 1 }, // Link to panel
]}
additionalQueryBarMenuPanels={[
{ id: 1, title: '', items: [...] },
{ id: 2, title: '', items: [...] },
]}
// or alternatively
additionalQueryBarMenuItems={{
items: [...],
panels: [...],
}}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry If I was not very clear. I want this additionalQueryBarMenuItemsData to be built outside Unified search.
So let's go with this
additionalQueryBarMenuItems={{
items: [...],
panels: [...],
}}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, except from the broken story! Thanx for addressing my feedback! I am approving to not block you anymore but let's merge after the storybook fix! Great job!
@@ -711,4 +711,34 @@ storiesOf('SearchBar', module) | |||
submitButtonStyle: 'full', | |||
renderQueryInputAppend: () => <EuiButton onClick={() => {}}>Append</EuiButton>, | |||
}) | |||
) | |||
.add('with quick filters', () => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This story is broken now! Can we fix it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thanks for the heads up! 👍
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
async chunk count
ESLint disabled line counts
References to deprecated APIs
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Adds a global alerts page to the Stack management section to allow users to browse alerts across different solutions/apps through a unified UX. Refs elastic#166709 Closes elastic#173647 Closes elastic#173650 Closes elastic#173648
Adds a global alerts page to the Stack management section to allow users to browse alerts across different solutions/apps through a unified UX. Refs elastic#166709 Closes elastic#173647 Closes elastic#173650 Closes elastic#173648
Summary
Adds a global alerts page to the Stack management section to allow users to see alerts across different solutions/apps through a unified UX.
Spec
Tasks
Deferred work items
Quick filters
query bar menu subtitle ([EuiContextMenu]renderItem
wildcard content eui#7507)Checklist