Skip to content

Commit ecb2950

Browse files
[8.18] Adding a unique count to transforms on the integrations overview to fix overcounting error (#236177) (#236189)
# Backport This will backport the following commits from `main` to `8.18`: - [Adding a unique count to transforms on the integrations overview to fix overcounting error (#236177)](#236177) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Kylie Meli","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-09-23T20:57:35Z","message":"Adding a unique count to transforms on the integrations overview to fix overcounting error (#236177)\n\n## Summary\n\nIt was reported on\n[slack](https://elastic.slack.com/archives/C010LT16CFR/p1758625016868399)\nthat we were way overcounting the number of transforms on the overview\npage for integrations. I looked into it and we were purely going off of\ncount for assets. For transforms we apparently have multiple entries\nthat ultimately point to the same transform, so I added a unique count\nand now it aligns with the count we show on the installed assets page\nwhere we key off of the installed transform that was built from all the\nindividual files.\n\n## Screenshots\n\nReported issue in slack showing inaccuracy on overview page\n<img width=\"642\" height=\"442\" alt=\"image (7)\"\nsrc=\"https://github.com/user-attachments/assets/2b885cd3-009f-4e27-82c3-a58a66e0d99c\"\n/>\n\nAccurate count on the assets tab\n<img width=\"1008\" height=\"919\" alt=\"Screenshot 2025-09-23 at 2 58 29 PM\"\nsrc=\"https://github.com/user-attachments/assets/44d2fd20-4e85-43bb-8d67-0448dd866ab6\"\n/>\n\nPost fix --> Now accurate count on the overview page\n<img width=\"1724\" height=\"1019\" alt=\"Screenshot 2025-09-23 at 2 58\n13 PM\"\nsrc=\"https://github.com/user-attachments/assets/a222116e-acd1-425e-9d1e-30d630bd1f37\"\n/>\n\nconsole log of all the individual transform 'assets'\n<img width=\"1477\" height=\"916\" alt=\"Screenshot 2025-09-23 at 2 59 41 PM\"\nsrc=\"https://github.com/user-attachments/assets/a64fb73d-f6f0-4fbb-981e-88bc60b1efe4\"\n/>","sha":"efb3462287d7a9f619ec011e4a35e0451d9985e0","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:Fleet","backport:all-open","v9.2.0"],"title":"Adding a unique count to transforms on the integrations overview to fix overcounting error","number":236177,"url":"https://github.com/elastic/kibana/pull/236177","mergeCommit":{"message":"Adding a unique count to transforms on the integrations overview to fix overcounting error (#236177)\n\n## Summary\n\nIt was reported on\n[slack](https://elastic.slack.com/archives/C010LT16CFR/p1758625016868399)\nthat we were way overcounting the number of transforms on the overview\npage for integrations. I looked into it and we were purely going off of\ncount for assets. For transforms we apparently have multiple entries\nthat ultimately point to the same transform, so I added a unique count\nand now it aligns with the count we show on the installed assets page\nwhere we key off of the installed transform that was built from all the\nindividual files.\n\n## Screenshots\n\nReported issue in slack showing inaccuracy on overview page\n<img width=\"642\" height=\"442\" alt=\"image (7)\"\nsrc=\"https://github.com/user-attachments/assets/2b885cd3-009f-4e27-82c3-a58a66e0d99c\"\n/>\n\nAccurate count on the assets tab\n<img width=\"1008\" height=\"919\" alt=\"Screenshot 2025-09-23 at 2 58 29 PM\"\nsrc=\"https://github.com/user-attachments/assets/44d2fd20-4e85-43bb-8d67-0448dd866ab6\"\n/>\n\nPost fix --> Now accurate count on the overview page\n<img width=\"1724\" height=\"1019\" alt=\"Screenshot 2025-09-23 at 2 58\n13 PM\"\nsrc=\"https://github.com/user-attachments/assets/a222116e-acd1-425e-9d1e-30d630bd1f37\"\n/>\n\nconsole log of all the individual transform 'assets'\n<img width=\"1477\" height=\"916\" alt=\"Screenshot 2025-09-23 at 2 59 41 PM\"\nsrc=\"https://github.com/user-attachments/assets/a64fb73d-f6f0-4fbb-981e-88bc60b1efe4\"\n/>","sha":"efb3462287d7a9f619ec011e4a35e0451d9985e0"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/236177","number":236177,"mergeCommit":{"message":"Adding a unique count to transforms on the integrations overview to fix overcounting error (#236177)\n\n## Summary\n\nIt was reported on\n[slack](https://elastic.slack.com/archives/C010LT16CFR/p1758625016868399)\nthat we were way overcounting the number of transforms on the overview\npage for integrations. I looked into it and we were purely going off of\ncount for assets. For transforms we apparently have multiple entries\nthat ultimately point to the same transform, so I added a unique count\nand now it aligns with the count we show on the installed assets page\nwhere we key off of the installed transform that was built from all the\nindividual files.\n\n## Screenshots\n\nReported issue in slack showing inaccuracy on overview page\n<img width=\"642\" height=\"442\" alt=\"image (7)\"\nsrc=\"https://github.com/user-attachments/assets/2b885cd3-009f-4e27-82c3-a58a66e0d99c\"\n/>\n\nAccurate count on the assets tab\n<img width=\"1008\" height=\"919\" alt=\"Screenshot 2025-09-23 at 2 58 29 PM\"\nsrc=\"https://github.com/user-attachments/assets/44d2fd20-4e85-43bb-8d67-0448dd866ab6\"\n/>\n\nPost fix --> Now accurate count on the overview page\n<img width=\"1724\" height=\"1019\" alt=\"Screenshot 2025-09-23 at 2 58\n13 PM\"\nsrc=\"https://github.com/user-attachments/assets/a222116e-acd1-425e-9d1e-30d630bd1f37\"\n/>\n\nconsole log of all the individual transform 'assets'\n<img width=\"1477\" height=\"916\" alt=\"Screenshot 2025-09-23 at 2 59 41 PM\"\nsrc=\"https://github.com/user-attachments/assets/a64fb73d-f6f0-4fbb-981e-88bc60b1efe4\"\n/>","sha":"efb3462287d7a9f619ec011e4a35e0451d9985e0"}}]}] BACKPORT--> Co-authored-by: Kylie Meli <[email protected]>
1 parent 5693e42 commit ecb2950

File tree

1 file changed

+8
-1
lines changed
  • x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/detail/overview

1 file changed

+8
-1
lines changed

x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/detail/overview/details.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,19 @@ export const Details: React.FC<Props> = memo(({ packageInfo, integrationInfo })
155155
<EuiFlexGroup direction="column" gutterSize="xs">
156156
{entries(filteredTypes).map(([_type, parts], index) => {
157157
const type = _type as KibanaAssetType;
158+
// For transforms, count unique transform modules since multiple files can belong to the same transform
159+
// For all other asset types, count all parts
160+
const assetCount =
161+
_type === 'transform'
162+
? new Set(parts.map((part) => part.file)).size
163+
: parts.length;
164+
158165
return (
159166
<EuiFlexItem key={`item-${index}`}>
160167
<EuiFlexGroup gutterSize="xs" alignItems="center" justifyContent="spaceBetween">
161168
<EuiFlexItem grow={false}>{AssetTitleMap[type]}</EuiFlexItem>
162169
<EuiFlexItem grow={false}>
163-
<EuiNotificationBadge color="subdued">{parts.length}</EuiNotificationBadge>
170+
<EuiNotificationBadge color="subdued">{assetCount}</EuiNotificationBadge>
164171
</EuiFlexItem>
165172
</EuiFlexGroup>
166173
</EuiFlexItem>

0 commit comments

Comments
 (0)