-
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
[Inventory][ECO] Create header action menu #193398
[Inventory][ECO] Create header action menu #193398
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
1f15546
to
5f7869c
Compare
5f7869c
to
3cd4161
Compare
/ci |
e305ee5
to
a728b6e
Compare
/ci |
|
||
const useTypedKibana = () => { | ||
return useKibana<InventoryKibanaContext>().services; | ||
}; | ||
const useTypedKibana = useKibana as () => KibanaReactContextValue<InventoryKibanaContext>; |
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.
Note
useKibana
was simplified to match the standard found across Kibana. core, dependencies, and service are accessed through service
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
This reverts commit 8da664e.
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.
small comments, other than that, LGTM
x-pack/plugins/observability_solution/inventory/public/hooks/use_kibana.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/observability_solution/inventory/public/services/telemetry/types.ts
Show resolved
Hide resolved
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
@crespocarlos you don't need to create a new issue for this. This will be fixed when we work on this issue. The problem happens because EEM hasn't been initialized yet and there's no index to query data from. |
@cauemarcondes , we'd still need to handle exceptions on the client side. Not necessarily this problem, but any other possible errors the API may throw. |
x-pack/plugins/observability_solution/inventory/public/application.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/observability_solution/inventory/public/components/routing/root.tsx
Outdated
Show resolved
Hide resolved
...gins/observability_solution/inventory/public/components/routing/header_action_menu/index.tsx
Outdated
Show resolved
Hide resolved
Sounds good then. I thought you'd be creating an issue for that specific problem. |
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
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
closes [elastic#192326](elastic#192326) ## Summary This PR introduces the "Add data" item to the header menu: https://github.com/user-attachments/assets/78ea3667-4ef1-4f02-a513-76e7ca896e67 <img width="600" alt="image" src="https://github.com/user-attachments/assets/afd21f2d-da66-4d10-83c0-29500591cf3c"> >[!NOTE] >I have refactored` plugin.ts`, moving the `ReactDOM.render` call to `application.tsx`. I've also created a new component to render the context providers. > >`useKibana` and `InventoryKibanaContext` were simplified. > >Besides, the analytics events created for the EEM Service Inventory 'Add data' button were replicated for this button. ### How to test - Add `xpack.inventory.enabled: true` to kibana.dev.yml - Start ES and Kibana locally - Navigate to Observability -> Inventory --------- Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit 1a192bc)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.x`: - [[Inventory][ECO] Create header action menu (#193398)](#193398) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Carlos Crespo","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-20T17:31:54Z","message":"[Inventory][ECO] Create header action menu (#193398)\n\ncloses [#192326](https://github.com/elastic/kibana/issues/192326)\r\n\r\n## Summary\r\n\r\nThis PR introduces the \"Add data\" item to the header menu:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/78ea3667-4ef1-4f02-a513-76e7ca896e67\r\n\r\n\r\n<img width=\"600\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/afd21f2d-da66-4d10-83c0-29500591cf3c\">\r\n\r\n\r\n>[!NOTE]\r\n>I have refactored` plugin.ts`, moving the `ReactDOM.render` call to\r\n`application.tsx`. I've also created a new component to render the\r\ncontext providers.\r\n>\r\n>`useKibana` and `InventoryKibanaContext` were simplified.\r\n>\r\n>Besides, the analytics events created for the EEM Service Inventory\r\n'Add data' button were replicated for this button.\r\n\r\n### How to test\r\n\r\n- Add `xpack.inventory.enabled: true` to kibana.dev.yml\r\n- Start ES and Kibana locally\r\n- Navigate to Observability -> Inventory\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"1a192bcc002bdaf31733a3a8f3ec3b62d3b5b8ef","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-infra_services","v8.16.0"],"title":"[Inventory][ECO] Create header action menu","number":193398,"url":"https://github.com/elastic/kibana/pull/193398","mergeCommit":{"message":"[Inventory][ECO] Create header action menu (#193398)\n\ncloses [#192326](https://github.com/elastic/kibana/issues/192326)\r\n\r\n## Summary\r\n\r\nThis PR introduces the \"Add data\" item to the header menu:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/78ea3667-4ef1-4f02-a513-76e7ca896e67\r\n\r\n\r\n<img width=\"600\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/afd21f2d-da66-4d10-83c0-29500591cf3c\">\r\n\r\n\r\n>[!NOTE]\r\n>I have refactored` plugin.ts`, moving the `ReactDOM.render` call to\r\n`application.tsx`. I've also created a new component to render the\r\ncontext providers.\r\n>\r\n>`useKibana` and `InventoryKibanaContext` were simplified.\r\n>\r\n>Besides, the analytics events created for the EEM Service Inventory\r\n'Add data' button were replicated for this button.\r\n\r\n### How to test\r\n\r\n- Add `xpack.inventory.enabled: true` to kibana.dev.yml\r\n- Start ES and Kibana locally\r\n- Navigate to Observability -> Inventory\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"1a192bcc002bdaf31733a3a8f3ec3b62d3b5b8ef"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193398","number":193398,"mergeCommit":{"message":"[Inventory][ECO] Create header action menu (#193398)\n\ncloses [#192326](https://github.com/elastic/kibana/issues/192326)\r\n\r\n## Summary\r\n\r\nThis PR introduces the \"Add data\" item to the header menu:\r\n\r\n\r\nhttps://github.com/user-attachments/assets/78ea3667-4ef1-4f02-a513-76e7ca896e67\r\n\r\n\r\n<img width=\"600\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/afd21f2d-da66-4d10-83c0-29500591cf3c\">\r\n\r\n\r\n>[!NOTE]\r\n>I have refactored` plugin.ts`, moving the `ReactDOM.render` call to\r\n`application.tsx`. I've also created a new component to render the\r\ncontext providers.\r\n>\r\n>`useKibana` and `InventoryKibanaContext` were simplified.\r\n>\r\n>Besides, the analytics events created for the EEM Service Inventory\r\n'Add data' button were replicated for this button.\r\n\r\n### How to test\r\n\r\n- Add `xpack.inventory.enabled: true` to kibana.dev.yml\r\n- Start ES and Kibana locally\r\n- Navigate to Observability -> Inventory\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"1a192bcc002bdaf31733a3a8f3ec3b62d3b5b8ef"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Carlos Crespo <[email protected]>
FYI @akhileshpok - We'll have this similar 'add data' button at top (see video) which will point to either the onboarding journey or docs for adding services from logs. The same two options will be available from the inventory empty state too. |
closes #192326
Summary
This PR introduces the "Add data" item to the header menu:
add_data.mov
Note
I have refactored
plugin.ts
, moving theReactDOM.render
call toapplication.tsx
. I've also created a new component to render the context providers.useKibana
andInventoryKibanaContext
were simplified.Besides, the analytics events created for the EEM Service Inventory 'Add data' button were replicated for this button.
How to test
xpack.inventory.enabled: true
to kibana.dev.yml