[Dataset quality] Add Flyout Integration Actions#179401
[Dataset quality] Add Flyout Integration Actions#179401mohamedhamed-ahmed merged 18 commits intoelastic:mainfrom
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
|
Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs) |
|
/ci |
|
/oblt-deploy-serverless |
x-pack/plugins/observability_solution/dataset_quality/common/constants.ts
Outdated
Show resolved
Hide resolved
...ervability_solution/dataset_quality/server/routes/data_streams/get_integration_dashboards.ts
Outdated
Show resolved
Hide resolved
...ervability_solution/dataset_quality/server/routes/data_streams/get_integration_dashboards.ts
Show resolved
Hide resolved
x-pack/plugins/observability_solution/dataset_quality/common/constants.ts
Outdated
Show resolved
Hide resolved
...observability_solution/dataset_quality/public/components/flyout/integration_actions_menu.tsx
Show resolved
Hide resolved
...ugins/observability_solution/dataset_quality/public/hooks/use_flyout_integration_actions.tsx
Show resolved
Hide resolved
x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/types.ts
Outdated
Show resolved
Hide resolved
...k/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_flyout.tsx
Outdated
Show resolved
Hide resolved
...k/plugins/observability_solution/dataset_quality/public/services/data_streams_stats/types.ts
Outdated
Show resolved
Hide resolved
...lution/dataset_quality/public/state_machines/dataset_quality_controller/src/state_machine.ts
Show resolved
Hide resolved
x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/routes.ts
Outdated
Show resolved
Hide resolved
@flash1293 I see the point there and I agree on the concept in general. Let me just try to explain what I have in mind. So in our case we want to query 2 different SOs to get the data we need:
Ideally how I see that interaction with SO is either types are exposed from a central place and we use the abstraction already provided by the SO, or each SO type owner exposes a service that we can use as the case with fleet here. |
|
For dashboards there is the find dashboards service on the client that works on ids: So we could use the fleet API on the server side to get the dashboard ids we care about (with the extension on the fleet side as mentioned, but that makes sense to me) and the dashboard find service on the client: It looks like we need only the name, not the full saved object, maybe that's worth an extension as well. @ThomThomson do you have any guidance here? It seems like the dashboard find service sits on top of the content management service and it shouldn't be hard for it to extend to to handle this use case as well./ |
I think directly querying for saved objects managed by other plugins is probably a bit of an antipattern in Kibana, and generally the recommendation from the Kibana core folks is for plugins to wrap any saved object operations needed by other plugins in either a server side API exposed in the plugin's The right way to access this data from another Kibana plugin is (in my opinion) probably by consuming the Here's some examples of other plugins that need integration data that take that approach: kibana/x-pack/plugins/cloud_defend/server/routes/status/status.ts Lines 147 to 148 in 01cf912 kibana/x-pack/plugins/cloud_security_posture/server/routes/status/status.ts Lines 222 to 223 in 01cf912
More than happy to accept a PR that extends the |
jughosta
left a comment
There was a problem hiding this comment.
Changes in packages/deeplinks/analytics LGTM
@flash1293 good find, I oversaw this. TIL |
@flash1293 I remember this was discussed back when we were onboarding Dashboard to content management because there are other places where we only needed a subset of the SO's attributes. We decided to just return the full attributes in all cases but I can't remember the reasoning behind this. Maybe @sebelga would know? Either way, I'd say it's best practice to use the |
|
@ThomThomson @kpollich Thanks both for the input here. I will update the PR shortly to consume both services and I guess I will go with filtering out what is not needed on my side and pass only the needed data to the client afterward. |
|
@flash1293 I have made the necessary changes to consume the fleet service. Created an issue for the presentation team as discussed with @ThomThomson to expose the dashboard service from the server contract so that we can use it on our side. For the time being will keep the dashboard SO querying code as is until the above ticket is tackled. |
ThomThomson
left a comment
There was a problem hiding this comment.
Deep links changes LGTM! Code only review
| await PageObjects.observabilityLogsExplorer.navigateTo(); | ||
|
|
||
| // Add initial integrations | ||
| await PageObjects.observabilityLogsExplorer.setupInitialIntegrations(); |
There was a problem hiding this comment.
Could we move this to before section? I see this is being called in two different it but being cleaned only at the end of these describe. Would that create issues when running the tests?
There was a problem hiding this comment.
I see its being called in 3 different tests, I would honestly keep this way so that its not enforced on all tests in case we want to install only 1 specific package or test a case where no packages are installed
|
|
||
| await action.click(); | ||
|
|
||
| await retry.tryForTime(5000, async () => { |
There was a problem hiding this comment.
Could we extract this into a helper that checks users have been redirected correctly?
There was a problem hiding this comment.
the thing is checking a user is redirected could be done in many ways and some logic internally can be done differently I am not sure if this can be extracted out
x-pack/test/dataset_quality_api_integration/tests/data_streams/integration_dashboards.spec.ts
Show resolved
Hide resolved
...lugins/observability_solution/dataset_quality/server/routes/data_streams/get_integrations.ts
Show resolved
Hide resolved
...lution/dataset_quality/public/state_machines/dataset_quality_controller/src/state_machine.ts
Show resolved
Hide resolved
yngrdyn
left a comment
There was a problem hiding this comment.
LGTM, thanks for this work 🚀
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
History
To update your PR or re-run it, just comment with: cc @yngrdyn |
closes #178843
📝 Summary
This PR adds actions to the integration section in the dataset quality flyout.
These actions navigate to different integration-related pages.
The Dashboards action is only visible if the integration does have dashboard assets installed, otherwise its hidden.
🎥 Demo
IntegrationActions.mov