aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorJeremy Davis <jeremy.davis@sonarsource.com>2023-01-16 15:17:42 +0100
committersonartech <sonartech@sonarsource.com>2023-01-16 20:03:43 +0000
commita3cd2185b8705f96a1a6f042e475290d2d4127c6 (patch)
treef8af8096acd7bf605c593a3191f3aa02e11d2261 /server
parent4b10923c40d03bf25fff9cb1bcd92ae15db567ce (diff)
downloadsonarqube-a3cd2185b8705f96a1a6f042e475290d2d4127c6.tar.gz
sonarqube-a3cd2185b8705f96a1a6f042e475290d2d4127c6.zip
SONAR-17816 Better wording
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarning.tsx32
-rw-r--r--server/sonar-web/src/main/js/apps/overview/styles.css9
2 files changed, 33 insertions, 8 deletions
diff --git a/server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarning.tsx b/server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarning.tsx
index c3dca159e4b..f41c9c11d42 100644
--- a/server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarning.tsx
+++ b/server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarning.tsx
@@ -32,25 +32,41 @@ interface Props {
export default function CleanAsYouCodeWarning({ component }: Props) {
return (
<>
- <Alert variant="warning">{translate('overview.quality_gate.conditions.cayc.warning')}</Alert>
- <p className="big-spacer-top big-spacer-bottom">
+ <Alert variant="warning">
{component.qualityGate ? (
<FormattedMessage
- id="overview.quality_gate.conditions.cayc.details"
- defaultMessage={translate('overview.quality_gate.conditions.cayc.details')}
+ id="overview.quality_gate.conditions.cayc.warning"
+ defaultMessage={translate('overview.quality_gate.conditions.cayc.warning')}
values={{
link: (
- <Link to={getQualityGateUrl(component.qualityGate.key)}>
- {translate('overview.quality_gate.conditions.cayc.details.link')}
- </Link>
+ <div
+ className="overview-quality-gate-alert-inline-link"
+ title={component.qualityGate.name}
+ >
+ <Link to={getQualityGateUrl(component.qualityGate.key)}>
+ {component.qualityGate.name}
+ </Link>
+ </div>
),
}}
/>
) : (
- translate('overview.quality_gate.conditions.cayc.details.no_link')
+ translate('overview.quality_gate.conditions.cayc.warning.no_link')
)}
+ </Alert>
+
+ <p className="big-spacer-top big-spacer-bottom">
+ {translate('overview.quality_gate.conditions.cayc.details')}
</p>
+ {component.qualityGate && (
+ <div className="big-spacer-bottom">
+ <Link className="button" to={getQualityGateUrl(component.qualityGate.key)}>
+ {translate('overview.quality_gate.conditions.cayc.review')}
+ </Link>
+ </div>
+ )}
+
<Link
target="_blank"
to="https://docs.sonarqube.org/latest/user-guide/clean-as-you-code/#quality-gate"
diff --git a/server/sonar-web/src/main/js/apps/overview/styles.css b/server/sonar-web/src/main/js/apps/overview/styles.css
index d06f711df32..dbe0751d8ec 100644
--- a/server/sonar-web/src/main/js/apps/overview/styles.css
+++ b/server/sonar-web/src/main/js/apps/overview/styles.css
@@ -159,6 +159,15 @@
font-size: var(--bigFontSize);
}
+.overview-quality-gate-alert-inline-link {
+ display: inline-block;
+ max-width: 100%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ padding-bottom: 1px;
+ margin-bottom: -5px;
+}
+
/*
* Animations
*/