aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web
diff options
context:
space:
mode:
authorPascal Mugnier <pascal.mugnier@sonarsource.com>2018-05-24 11:59:05 +0200
committerSonarTech <sonartech@sonarsource.com>2018-05-28 20:20:45 +0200
commitde048e14399224bab6e00bf70c68679987462b27 (patch)
tree6cd9b4ef0bd0dd004d072160a8c10cc778920675 /server/sonar-web
parent0f0c3b73cc423fe90d6f4b97d6e73fe7bcdc485d (diff)
downloadsonarqube-de048e14399224bab6e00bf70c68679987462b27.tar.gz
sonarqube-de048e14399224bab6e00bf70c68679987462b27.zip
SONAR-10713 Fix for front-end
Diffstat (limited to 'server/sonar-web')
-rw-r--r--server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx6
-rw-r--r--server/sonar-web/src/main/js/apps/overview/meta/Meta.tsx20
2 files changed, 14 insertions, 12 deletions
diff --git a/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx b/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx
index 097e642860f..8ef2e875509 100644
--- a/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx
+++ b/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx
@@ -176,15 +176,15 @@ export class OverviewApp extends React.PureComponent<Props, State> {
renderEmpty() {
const { component } = this.props;
- const isProject = component.qualifier === 'TRK';
+ const isApp = component.qualifier === 'APP';
return (
<div className="overview-main page-main">
<h3>
{!this.state.measures ||
!this.state.measures.find(measure => measure.metric.key === 'projects')
- ? translate(isProject ? 'overview.project.empty' : 'portfolio.app.empty')
+ ? translate(isApp ? 'portfolio.app.empty' : 'overview.project.empty')
: translate(
- isProject ? 'overview.project.no_lines_of_code' : 'portfolio.app.no_lines_of_code'
+ isApp ? 'portfolio.app.no_lines_of_code' : 'overview.project.no_lines_of_code'
)}
</h3>
</div>
diff --git a/server/sonar-web/src/main/js/apps/overview/meta/Meta.tsx b/server/sonar-web/src/main/js/apps/overview/meta/Meta.tsx
index 631c258e268..37d1618f37d 100644
--- a/server/sonar-web/src/main/js/apps/overview/meta/Meta.tsx
+++ b/server/sonar-web/src/main/js/apps/overview/meta/Meta.tsx
@@ -54,6 +54,7 @@ export default class Meta extends React.PureComponent<Props> {
const { qualifier, description, qualityProfiles, qualityGate, visibility } = component;
const isProject = qualifier === 'TRK';
+ const isApp = qualifier === 'APP';
const isPrivate = visibility === Visibility.Private;
return (
@@ -104,15 +105,16 @@ export default class Meta extends React.PureComponent<Props> {
{organizationsEnabled && <MetaOrganizationKey organization={component.organization} />}
</div>
- {!isPrivate && (
- <BadgesModal
- branchLike={branchLike}
- metrics={metrics}
- onSonarCloud={onSonarCloud}
- project={component.key}
- qualifier={component.qualifier}
- />
- )}
+ {!isPrivate &&
+ (isProject || isApp) && (
+ <BadgesModal
+ branchLike={branchLike}
+ metrics={metrics}
+ onSonarCloud={onSonarCloud}
+ project={component.key}
+ qualifier={component.qualifier}
+ />
+ )}
</div>
);
}