Skip to content

Commit bbc813f

Browse files
authored
Merge pull request #218 from mgalesloot/flux/fix-ocirepo
Flux: fix oci repo status in overview page
2 parents 5856619 + ff85d37 commit bbc813f

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
@@ -521,12 +521,8 @@ function FluxOverviewChart({ resourceClass }) {
521521
const total = crds.length;
522522
if (total === 0) return '0%';
523523

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

532528
return `${percentage}%`;

0 commit comments

Comments
 (0)