Use '-'; add changeset

This commit is contained in:
Jesse Bye
2021-02-26 11:47:46 -08:00
parent fe2c7c27d4
commit a4c5758028
2 changed files with 8 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-sonarqube': patch
---
Display '-' instead of 'undefined' if no code coverage is reported.
@@ -232,7 +232,9 @@ export const SonarQubeCard = ({
link={value.getComponentMeasuresUrl('COVERAGE')}
title="Coverage"
leftSlot={<Percentage value={value.metrics.coverage} />}
rightSlot={<Value value={`${value.metrics.coverage || 0}%`} />}
rightSlot={
<Value value={`${value.metrics.coverage || '-'}%`} />
}
/>
<RatingCard
title="Duplications"