Skip to content

Commit a3b2364

Browse files
Merge pull request #13529 from rhamilto/OCPBUGS-27455
OCPBUGS-27455: do not deduplicate ImageManifestVulns in Overview popover
2 parents dc571f6 + 8056732 commit a3b2364

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

  • frontend/packages/container-security/src/components

frontend/packages/container-security/src/components/summary.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const securityHealthHandler: ResourceHealthHandler<WatchImageVuln> = ({
3131
if (!_.isEmpty(data)) {
3232
return {
3333
state: HealthState.ERROR,
34-
message: pluralize(_.uniqBy(data, 'metadata.name').length, 'vulnerable image'),
34+
message: pluralize(data.length, 'vulnerable image'),
3535
};
3636
}
3737
return { state: HealthState.OK, message: '0 vulnerable images' };
@@ -109,8 +109,7 @@ export const SecurityBreakdownPopup: React.FC<SecurityBreakdownPopupProps> = ({
109109
title={priority.title}
110110
/>
111111
&nbsp;
112-
{_.uniqBy(vulnsFor(priority.value), 'metadata.name').length}{' '}
113-
{priority.title}
112+
{vulnsFor(priority.value).length} {priority.title}
114113
</div>
115114
</div>
116115
) : null,
@@ -125,11 +124,11 @@ export const SecurityBreakdownPopup: React.FC<SecurityBreakdownPopupProps> = ({
125124
.map((priority) => ({
126125
label: priority.title,
127126
x: priority.value,
128-
y: _.uniqBy(vulnsFor(priority.value), 'metadata.name').length,
127+
y: vulnsFor(priority.value).length,
129128
}))
130129
.toArray()}
131130
title={t('container-security~{{vulnImageCount, number}} total', {
132-
vulnImageCount: _.uniqBy(resource, 'metadata.name').length,
131+
vulnImageCount: resource.length,
133132
})}
134133
/>
135134
</Link>

0 commit comments

Comments
 (0)