aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/overview
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2018-05-15 15:09:44 +0200
committerSonarTech <sonartech@sonarsource.com>2018-05-17 20:20:44 +0200
commit6c0ff4d3148549cf88ef5017008c20de9d3b7ef8 (patch)
treea7d468b63af05763b44e71cfb595167199163fa5 /server/sonar-web/src/main/js/apps/overview
parentd9cfd808a088ef4226c8d03e50020b6d52909c52 (diff)
downloadsonarqube-6c0ff4d3148549cf88ef5017008c20de9d3b7ef8.tar.gz
sonarqube-6c0ff4d3148549cf88ef5017008c20de9d3b7ef8.zip
fix application quality gate badge
Diffstat (limited to 'server/sonar-web/src/main/js/apps/overview')
-rw-r--r--server/sonar-web/src/main/js/apps/overview/qualityGate/ApplicationQualityGate.tsx8
-rw-r--r--server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/__snapshots__/ApplicationQualityGate-test.tsx.snap9
2 files changed, 14 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/apps/overview/qualityGate/ApplicationQualityGate.tsx b/server/sonar-web/src/main/js/apps/overview/qualityGate/ApplicationQualityGate.tsx
index 600499f9038..d50bc8a42f1 100644
--- a/server/sonar-web/src/main/js/apps/overview/qualityGate/ApplicationQualityGate.tsx
+++ b/server/sonar-web/src/main/js/apps/overview/qualityGate/ApplicationQualityGate.tsx
@@ -24,6 +24,7 @@ import Level from '../../../components/ui/Level';
import { getApplicationQualityGate, ApplicationProject } from '../../../api/quality-gates';
import { translate } from '../../../helpers/l10n';
import { LightComponent, Metric } from '../../../app/types';
+import DocTooltip from '../../../components/docs/DocTooltip';
interface Props {
component: LightComponent;
@@ -88,14 +89,15 @@ export default class ApplicationQualityGate extends React.PureComponent<Props, S
<h2 className="overview-title">
{translate('overview.quality_gate')}
{this.state.loading && <i className="spinner spacer-left" />}
- {status != null && <Level level={status} />}
+ <DocTooltip className="spacer-left" doc="quality-gates/project-homepage-quality-gate" />
+ {status != null && <Level className="big-spacer-left" level={status} />}
</h2>
{projects &&
metrics && (
<div
- id="overview-quality-gate-conditions-list"
- className="overview-quality-gate-conditions-list clearfix">
+ className="overview-quality-gate-conditions-list clearfix"
+ id="overview-quality-gate-conditions-list">
{projects
.filter(project => project.status !== 'OK')
.map(project => (
diff --git a/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/__snapshots__/ApplicationQualityGate-test.tsx.snap b/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/__snapshots__/ApplicationQualityGate-test.tsx.snap
index 5a7f39cf4d9..f87fd62309a 100644
--- a/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/__snapshots__/ApplicationQualityGate-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/__snapshots__/ApplicationQualityGate-test.tsx.snap
@@ -12,6 +12,10 @@ exports[`renders 1`] = `
<i
className="spinner spacer-left"
/>
+ <DocTooltip
+ className="spacer-left"
+ doc="quality-gates/project-homepage-quality-gate"
+ />
</h2>
</div>
`;
@@ -25,7 +29,12 @@ exports[`renders 2`] = `
className="overview-title"
>
overview.quality_gate
+ <DocTooltip
+ className="spacer-left"
+ doc="quality-gates/project-homepage-quality-gate"
+ />
<Level
+ className="big-spacer-left"
level="ERROR"
/>
</h2>