diff options
author | Mathieu Suen <mathieu.suen@sonarsource.com> | 2021-08-27 17:36:00 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-08-30 20:08:20 +0000 |
commit | 422e4a74167fbc468dd8a1270a70fab2d3f17b1d (patch) | |
tree | 5f7c9a9417e8bb591f4ea4770c0e48b7f38cc003 /server/sonar-web | |
parent | b96a80637b2f86bd8436e9aaef83b0c2c704fb31 (diff) | |
download | sonarqube-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')
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" > |