Skip to content

Commit ff85d37

Browse files
committed
Flux: fix oci repo status in overview page
Signed-off-by: Matthijs Galesloot <[email protected]>
1 parent fda59dc commit ff85d37

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

flux/src/overview/index.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -524,12 +524,8 @@ function FluxOverviewChart({ resourceClass }) {
524524
const total = crds.length;
525525
if (total === 0) return '0%';
526526

527-
const success = crds.filter(
528-
crd =>
529-
crd.jsonData.status?.conditions?.some(
530-
condition => condition.type === 'Ready' && condition.status === 'True'
531-
) && !crd.jsonData.spec?.suspend
532-
).length;
527+
const [success] = getStatus(crds);
528+
533529
const percentage = Math.round((success / total) * 100);
534530

535531
return `${percentage}%`;

0 commit comments

Comments
 (0)