Skip to content

Commit

Permalink
Merge pull request #6991 from bond95/singulars-prulars-issues
Browse files Browse the repository at this point in the history
Made singulars for Insights plugin
  • Loading branch information
openshift-merge-robot committed Oct 26, 2020
2 parents 3be756a + f26b08a commit d7af33c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const InsightsPopup: React.FC<PrometheusHealthPopupProps> = ({ responses,
y: v,
}))}
title={`${numberOfIssues}`}
subTitle="Total issues"
subTitle={`Total ${numberOfIssues === 1 ? 'issue' : 'issues'}`}
legendData={Object.entries(resource).map(([k, v]) => ({ name: `${k}: ${v}` }))}
legendOrientation="vertical"
width={304}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const getClusterInsightsComponentStatus = (
return { state: HealthState.UNKNOWN, message: 'Not available' };
}
const issuesNumber = Object.values(values).reduce((acc, cur) => acc + cur, 0);
const issueStr = `${issuesNumber} issues found`;
const issueStr = `${issuesNumber} ${issuesNumber === 1 ? 'issue' : 'issues'} found`;
if (values.critical > 0) {
return { state: HealthState.ERROR, message: issueStr };
}
Expand Down

0 comments on commit d7af33c

Please sign in to comment.