aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2018-10-16 17:52:08 +0200
committerSonarTech <sonartech@sonarsource.com>2018-11-07 20:21:02 +0100
commit2ae68e108091fd20c6dd6288c5c3ceef2ce9b16a (patch)
treee53d5d8f66249f6550f3ecbea612745f62c60913 /server
parent7168904610eb499afe8a3721c26e7e5afd384725 (diff)
downloadsonarqube-2ae68e108091fd20c6dd6288c5c3ceef2ce9b16a.tar.gz
sonarqube-2ae68e108091fd20c6dd6288c5c3ceef2ce9b16a.zip
SONAR-11363 Display duplications on the measures page
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/App.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/MeasuresEmpty.tsx15
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/utils.ts6
3 files changed, 8 insertions, 15 deletions
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/App.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/App.tsx
index b48b6a29f36..97111db9d91 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/App.tsx
@@ -279,7 +279,7 @@ export default class App extends React.PureComponent<Props, State> {
{this.renderContent(displayOverview, query, metric)}
</div>
) : (
- <MeasuresEmpty branchLike={branchLike} />
+ <MeasuresEmpty />
)}
</div>
);
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/MeasuresEmpty.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/MeasuresEmpty.tsx
index 7b795fa6faa..bf502bf0fb4 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/MeasuresEmpty.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/MeasuresEmpty.tsx
@@ -19,22 +19,11 @@
*/
import * as React from 'react';
import { translate } from '../../../helpers/l10n';
-import { BranchLike } from '../../../app/types';
-import { isShortLivingBranch, isPullRequest } from '../../../helpers/branches';
-
-interface Props {
- branchLike?: BranchLike;
-}
-
-export default function MeasuresEmpty({ branchLike }: Props) {
- const message =
- isShortLivingBranch(branchLike) || isPullRequest(branchLike)
- ? translate('component_measures.no_coverage')
- : translate('component_measures.empty');
+export default function MeasuresEmpty() {
return (
<div className="page page-limited">
- <div className="note">{message}</div>
+ <div className="note">{translate('component_measures.empty')}</div>
</div>
);
}
diff --git a/server/sonar-web/src/main/js/apps/component-measures/utils.ts b/server/sonar-web/src/main/js/apps/component-measures/utils.ts
index 26b41a1a503..7c2eb9cf1ff 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/utils.ts
+++ b/server/sonar-web/src/main/js/apps/component-measures/utils.ts
@@ -169,7 +169,11 @@ export function getMeasuresPageMetricKeys(metrics: { [key: string]: Metric }, br
'new_line_coverage',
'new_conditions_to_cover',
'new_uncovered_conditions',
- 'new_branch_coverage'
+ 'new_branch_coverage',
+
+ 'new_duplicated_lines_density',
+ 'new_duplicated_lines',
+ 'new_duplicated_blocks'
];
}