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

[Fleet] Tabular UI for installed integrations #212582

Merged

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented Feb 26, 2025

Summary

Related to #209861

The feature is behind a new feature installedIntegrationsTabularUI

# to enable it in your kibana config 
xpack.fleet.enableExperimental: ['installedIntegrationsTabularUI']. 

Implementation details

All the packages are fetched in memory, and the pagination filtering is done client side, in the useInstalledIntegrations hook, that hook is unit tested.

API Changes

To be able to populate the View policies count, I update the package API with a new withPackagePoliciesCount query parameter default to false, that populate an packagePolicyInfo property on the package result.

UI Changes

Screenshot 2025-03-03 at 9 09 30 AM

Not Done in that PR

  • Actions are not implemented in that PR
  • View policies is not implemented
  • Version and status table are going to merged together, when the design is discussed/adjusted I will come up with a follow up PR, please do not review the current columns as they will be changed soon
  • Cypress test will come later too.

Todo

  • permissions
  • Tests
    • API change tests
    • React unit test for main data hooks
    • Cypress tests

@nchaulet nchaulet force-pushed the feature-installed-integrations-tabular-ui branch from 0e7a038 to 5783ba9 Compare February 26, 2025 21:57
@nchaulet nchaulet force-pushed the feature-installed-integrations-tabular-ui branch from 5783ba9 to 284b64f Compare February 26, 2025 22:23
@nchaulet nchaulet added the ci:cloud-deploy Create or update a Cloud deployment label Feb 27, 2025
@nchaulet nchaulet added ci:project-deploy-observability Create an Observability project and removed ci:cloud-deploy Create or update a Cloud deployment labels Feb 28, 2025
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 docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@nchaulet nchaulet added ci:cloud-deploy Create or update a Cloud deployment and removed ci:project-deploy-observability Create an Observability project labels Feb 28, 2025
@kibanamachine
Copy link
Contributor

PR Cloud deployment started at: https://buildkite.com/elastic/kibana-deploy-cloud-from-pr/builds/89

…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards --update'
@kibanamachine
Copy link
Contributor

Project deployed, see credentials at: https://buildkite.com/elastic/kibana-deploy-project-from-pr/builds/344

@nchaulet nchaulet marked this pull request as ready for review March 3, 2025 14:09
@nchaulet nchaulet requested a review from a team as a code owner March 3, 2025 14:09
@nchaulet nchaulet added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Team:Fleet Team label for Observability Data Collection Fleet team and removed ci:cloud-deploy Create or update a Cloud deployment labels Mar 3, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@nchaulet
Copy link
Member Author

nchaulet commented Mar 3, 2025

@elasticmachine merge upstream

@jen-huang jen-huang self-requested a review March 4, 2025 01:00
const res = await getPackages({
savedObjectsClient,
...request.query,
});
const flattenedRes = res.map((pkg) => soToInstallationInfo(pkg)) as PackageList;

if (request.query.withPackagePoliciesCount) {
const countByPackage = await getPackagePoliciesCountByPackageName(
Copy link
Contributor

Choose a reason for hiding this comment

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

curious why not use packagePolicyService.list instead of a new function?

Copy link
Member Author

Choose a reason for hiding this comment

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

that function does an aggregation in elasticsearch on package policy name as we do not need to return package policies, we could eventually update the list method to support passing aggregations but we will still probably need an extra function to abstract that aggregation wdyt?

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 I also missed that getPackagePoliciesCountByPackageName keys by package name, not that it returns a count based on a package name param (that's why I thought we could use packagePolicyService.list kuery + total). thanks for clarifying

nchaulet and others added 2 commits March 3, 2025 21:07
…rations/sections/epm/screens/installed_integrations/components/installed_integrations_table.tsx

Co-authored-by: Jen Huang <its.jenetic@gmail.com>
…rations/sections/epm/screens/installed_integrations/components/installed_integrations_search_bar.tsx

Co-authored-by: Jen Huang <its.jenetic@gmail.com>
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
fleet 1201 1211 +10

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 1.7MB 1.7MB +12.5KB

Page load bundle

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

id before after diff
fleet 156.9KB 158.1KB +1.2KB

History

{ count_by_package_name: { buckets: Array<{ key: string; doc_count: number }> } }
>({
type: savedObjectType,
perPage: 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

should we add size:0 since hits are not used?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes 👍 I will make the change

Copy link
Member Author

Choose a reason for hiding this comment

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

actually it's already done with the perPage: 0 it's a saved object client not an ES client

label: (
<FormattedMessage
id="xpack.fleet.epmInstalledIntegrations.upgradeAvailableFilterLabel"
defaultMessage="Upgrade"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think Upgrade available would be more expressive, though it might take up too much space.

Copy link
Member Author

Choose a reason for hiding this comment

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

That a good point noting this to do a design review with christian when this is technically done.

Copy link
Contributor

@jen-huang jen-huang left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, LGTM 🚀

Copy link
Contributor

@juliaElastic juliaElastic left a comment

Choose a reason for hiding this comment

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

LGTM

<EuiFlexItem grow={false}>
<EuiFilterGroup>
{statuses.map((item) => (
<EuiFilterButton
Copy link
Contributor

Choose a reason for hiding this comment

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

this could be extracted to a small component

@nchaulet nchaulet merged commit 680bf58 into elastic:main Mar 5, 2025
10 checks passed
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 release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants