diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/portfolio/components')
-rw-r--r-- | server/sonar-web/src/main/js/apps/portfolio/components/App.tsx | 15 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/portfolio/components/ReleasabilityBox.tsx | 34 |
2 files changed, 23 insertions, 26 deletions
diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/App.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/App.tsx index 7c18623172a..eb8b5f89ec1 100644 --- a/server/sonar-web/src/main/js/apps/portfolio/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/portfolio/components/App.tsx @@ -161,14 +161,13 @@ export class App extends React.PureComponent<Props, State> { <MaintainabilityBox component={component.key} measures={measures!} /> </div> - {subComponents !== undefined && - totalSubComponents !== undefined && ( - <WorstProjects - component={component.key} - subComponents={subComponents} - total={totalSubComponents} - /> - )} + {subComponents !== undefined && totalSubComponents !== undefined && ( + <WorstProjects + component={component.key} + subComponents={subComponents} + total={totalSubComponents} + /> + )} </div> ); } diff --git a/server/sonar-web/src/main/js/apps/portfolio/components/ReleasabilityBox.tsx b/server/sonar-web/src/main/js/apps/portfolio/components/ReleasabilityBox.tsx index fdffce0d3dc..4fb6e1ad37a 100644 --- a/server/sonar-web/src/main/js/apps/portfolio/components/ReleasabilityBox.tsx +++ b/server/sonar-web/src/main/js/apps/portfolio/components/ReleasabilityBox.tsx @@ -50,24 +50,22 @@ export default function ReleasabilityBox({ component, measures }: Props) { <RatingFreshness lastChange={lastReleasabilityChange} rating={rating} /> - {effort && - Number(effort) > 0 && ( - <div className="portfolio-effort"> - <Link - to={getComponentDrilldownUrl({ componentKey: component, metric: 'alert_status' })}> - <span> - <Measure - className="little-spacer-right" - metricKey="projects" - metricType="SHORT_INT" - value={effort} - /> - {Number(effort) === 1 ? 'project' : 'projects'} - </span> - </Link>{' '} - <Level level="ERROR" small={true} /> - </div> - )} + {effort && Number(effort) > 0 && ( + <div className="portfolio-effort"> + <Link to={getComponentDrilldownUrl({ componentKey: component, metric: 'alert_status' })}> + <span> + <Measure + className="little-spacer-right" + metricKey="projects" + metricType="SHORT_INT" + value={effort} + /> + {Number(effort) === 1 ? 'project' : 'projects'} + </span> + </Link>{' '} + <Level level="ERROR" small={true} /> + </div> + )} </div> ); } |