diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/overview/helpers/metrics.js')
-rw-r--r-- | server/sonar-web/src/main/js/apps/overview/helpers/metrics.js | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/server/sonar-web/src/main/js/apps/overview/helpers/metrics.js b/server/sonar-web/src/main/js/apps/overview/helpers/metrics.js index ce3cd1d6b60..1a37e037c2a 100644 --- a/server/sonar-web/src/main/js/apps/overview/helpers/metrics.js +++ b/server/sonar-web/src/main/js/apps/overview/helpers/metrics.js @@ -19,43 +19,6 @@ */ import { translate } from '../../../helpers/l10n'; -function hasRightDomain (metric, domains) { - return domains.indexOf(metric.domain) !== -1; -} - -function isNotHidden (metric) { - return !metric.hidden; -} - -function hasSimpleType (metric) { - return metric.type !== 'DATA' && metric.type !== 'DISTRIB'; -} - -function isNotDifferential (metric) { - return metric.key.indexOf('new_') !== 0; -} - -export function filterMetrics (metrics) { - return metrics.filter(metric => { - return isNotHidden(metric) && hasSimpleType(metric) && isNotDifferential(metric); - }); -} - -export function filterMetricsForDomains (metrics, domains) { - return filterMetrics(metrics).filter(metric => hasRightDomain(metric, domains)); -} - - -export function getShortType (type) { - if (type === 'INT') { - return 'SHORT_INT'; - } else if (type === 'WORK_DUR') { - return 'SHORT_WORK_DUR'; - } - return type; -} - - export function getMetricName (metricKey) { return translate('overview.metric', metricKey); } |