aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web
diff options
context:
space:
mode:
authorMathieu Suen <mathieu.suen@sonarsource.com>2021-08-27 17:36:00 +0200
committersonartech <sonartech@sonarsource.com>2021-08-30 20:08:20 +0000
commit422e4a74167fbc468dd8a1270a70fab2d3f17b1d (patch)
tree5f7c9a9417e8bb591f4ea4770c0e48b7f38cc003 /server/sonar-web
parentb96a80637b2f86bd8436e9aaef83b0c2c704fb31 (diff)
downloadsonarqube-422e4a74167fbc468dd8a1270a70fab2d3f17b1d.tar.gz
sonarqube-422e4a74167fbc468dd8a1270a70fab2d3f17b1d.zip
SONAR-13876 Explicit line of code is for main branch in project info drawer
Diffstat (limited to 'server/sonar-web')
-rw-r--r--server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaSize.tsx5
-rw-r--r--server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/__snapshots__/MetaSize-test.tsx.snap34
2 files changed, 32 insertions, 7 deletions
diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaSize.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaSize.tsx
index eb48b01b034..ebafe436f72 100644
--- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaSize.tsx
+++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaSize.tsx
@@ -39,7 +39,10 @@ export default function MetaSize({ component, measures }: MetaSizeProps) {
return (
<>
- <h3>{localizeMetric(MetricKey.ncloc)}</h3>
+ <div className="display-flex-row display-inline-flex-baseline">
+ <h3>{localizeMetric(MetricKey.ncloc)}</h3>
+ <span className="spacer-left small">({translate('project.info.main_branch')})</span>
+ </div>
<div className="display-flex-center">
{ncloc ? (
<>
diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/__snapshots__/MetaSize-test.tsx.snap b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/__snapshots__/MetaSize-test.tsx.snap
index ecea37594c9..a4394d3d0b3 100644
--- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/__snapshots__/MetaSize-test.tsx.snap
+++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/__snapshots__/MetaSize-test.tsx.snap
@@ -2,9 +2,20 @@
exports[`should render correctly: application 1`] = `
<Fragment>
- <h3>
- metric.ncloc.name
- </h3>
+ <div
+ className="display-flex-row display-inline-flex-baseline"
+ >
+ <h3>
+ metric.ncloc.name
+ </h3>
+ <span
+ className="spacer-left small"
+ >
+ (
+ project.info.main_branch
+ )
+ </span>
+ </div>
<div
className="display-flex-center"
>
@@ -47,9 +58,20 @@ exports[`should render correctly: application 1`] = `
exports[`should render correctly: project 1`] = `
<Fragment>
- <h3>
- metric.ncloc.name
- </h3>
+ <div
+ className="display-flex-row display-inline-flex-baseline"
+ >
+ <h3>
+ metric.ncloc.name
+ </h3>
+ <span
+ className="spacer-left small"
+ >
+ (
+ project.info.main_branch
+ )
+ </span>
+ </div>
<div
className="display-flex-center"
>