aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/components')
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js18
1 files changed, 2 insertions, 16 deletions
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js b/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js
index ad4ca78efaa..0faa854f57c 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js
+++ b/server/sonar-web/src/main/js/components/SourceViewer/views/measures-overlay.js
@@ -25,7 +25,7 @@ import ModalView from '../../common/modals';
import Template from './templates/source-viewer-measures.hbs';
import { searchIssues } from '../../../api/issues';
import { getMeasures } from '../../../api/measures';
-import { getMetrics } from '../../../api/metrics';
+import { getAllMetrics } from '../../../api/metrics';
import { getTests, getCoveredFiles } from '../../../api/tests';
import * as theme from '../../../app/theme';
import { getLocalizedMetricName, getLocalizedMetricDomain } from '../../../helpers/l10n';
@@ -108,20 +108,6 @@ export default ModalView.extend({
this.$('.js-test-list').scrollTop(this.testsScroll);
},
- getMetrics() {
- let metrics = '';
- const url = window.baseUrl + '/api/metrics/search';
- $.ajax({
- url,
- async: false,
- data: { ps: 9999 }
- }).done(data => {
- metrics = data.metrics.filter(metric => metric.type !== 'DATA' && !metric.hidden);
- metrics = sortBy(metrics, 'name');
- });
- return metrics;
- },
-
calcAdditionalMeasures(measures) {
measures.issuesRemediationEffort =
(Number(measures.sqale_index_raw) || 0) +
@@ -153,7 +139,7 @@ export default ModalView.extend({
},
requestMeasures() {
- return getMetrics().then(metrics => {
+ return getAllMetrics().then(metrics => {
const metricsToRequest = metrics
.filter(metric => metric.type !== 'DATA' && !metric.hidden)
.map(metric => metric.key);