diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/component-measures')
3 files changed, 1 insertions, 78 deletions
diff --git a/server/sonar-web/src/main/js/apps/component-measures/config/complementary.js b/server/sonar-web/src/main/js/apps/component-measures/config/complementary.js index b33de901b5f..67628c7e96e 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/config/complementary.js +++ b/server/sonar-web/src/main/js/apps/component-measures/config/complementary.js @@ -18,18 +18,6 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ export default { - 'overall_coverage': ['overall_uncovered_lines', 'overall_uncovered_conditions'], - 'overall_line_coverage': ['overall_uncovered_lines'], - 'overall_branch_coverage': ['overall_uncovered_conditions'], - 'overall_uncovered_lines': ['overall_line_coverage'], - 'overall_uncovered_conditions': ['overall_branch_coverage'], - - 'new_overall_coverage': ['new_overall_uncovered_lines', 'new_overall_uncovered_conditions'], - 'new_overall_line_coverage': ['new_overall_uncovered_lines'], - 'new_overall_branch_coverage': ['new_overall_uncovered_conditions'], - 'new_overall_uncovered_lines': ['new_overall_line_coverage'], - 'new_overall_uncovered_conditions': ['new_overall_branch_coverage'], - 'coverage': ['uncovered_lines', 'uncovered_conditions'], 'line_coverage': ['uncovered_lines'], 'branch_coverage': ['uncovered_conditions'], @@ -42,18 +30,6 @@ export default { 'new_uncovered_lines': ['new_line_coverage'], 'new_uncovered_conditions': ['new_branch_coverage'], - 'it_coverage': ['it_uncovered_lines', 'it_uncovered_conditions'], - 'it_line_coverage': ['it_uncovered_lines'], - 'it_branch_coverage': ['it_uncovered_conditions'], - 'it_uncovered_lines': ['it_line_coverage'], - 'it_uncovered_conditions': ['it_branch_coverage'], - - 'new_it_coverage': ['new_it_uncovered_lines', 'new_it_uncovered_conditions'], - 'new_it_line_coverage': ['new_it_uncovered_lines'], - 'new_it_branch_coverage': ['new_it_uncovered_conditions'], - 'new_it_uncovered_lines': ['new_it_line_coverage'], - 'new_it_uncovered_conditions': ['new_it_branch_coverage'], - 'duplicated_lines_density': ['duplicated_lines'], 'new_duplicated_lines_density': ['new_duplicated_lines'], 'duplicated_lines': ['duplicated_lines_density'], diff --git a/server/sonar-web/src/main/js/apps/component-measures/config/domains.js b/server/sonar-web/src/main/js/apps/component-measures/config/domains.js index 2c810ad9989..80a231995ec 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/config/domains.js +++ b/server/sonar-web/src/main/js/apps/component-measures/config/domains.js @@ -68,27 +68,11 @@ export const domains = { 'Coverage': { main: [ - 'overall_coverage', 'coverage', - 'it_coverage', - 'new_overall_coverage', 'new_coverage', - 'new_it_coverage', 'tests' ], order: [ - 'overall_coverage', - 'new_overall_coverage', - 'overall_line_coverage', - 'new_overall_line_coverage', - 'overall_branch_coverage', - 'new_overall_branch_coverage', - 'overall_uncovered_lines', - 'new_overall_uncovered_lines', - 'overall_uncovered_conditions', - 'new_overall_uncovered_conditions', - 'new_overall_lines_to_cover', - 'coverage', 'new_coverage', 'line_coverage', @@ -101,18 +85,6 @@ export const domains = { 'new_uncovered_conditions', 'new_lines_to_cover', - 'it_coverage', - 'new_it_coverage', - 'it_line_coverage', - 'new_it_line_coverage', - 'it_branch_coverage', - 'new_it_branch_coverage', - 'it_uncovered_lines', - 'new_it_uncovered_lines', - 'it_uncovered_conditions', - 'new_it_uncovered_conditions', - 'new_it_lines_to_cover', - 'lines_to_cover', 'tests', @@ -122,11 +94,6 @@ export const domains = { 'skipped_tests', 'test_success_density', 'test_execution_time' - ], - spaces: [ - 'coverage', - 'it_coverage', - 'tests' ] }, diff --git a/server/sonar-web/src/main/js/apps/component-measures/home/HomeMeasuresList.js b/server/sonar-web/src/main/js/apps/component-measures/home/HomeMeasuresList.js index 921a24f9f03..ce240293f58 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/home/HomeMeasuresList.js +++ b/server/sonar-web/src/main/js/apps/component-measures/home/HomeMeasuresList.js @@ -33,26 +33,6 @@ function sortMeasures (measures, order) { ]; } -function filterCoverageMeasures (measures) { - const hasOverallCoverage = !!measures.find(measure => measure.metric.key === 'overall_coverage'); - const hasUTCoverage = !!measures.find(measure => measure.metric.key === 'coverage'); - const hasITCoverage = !!measures.find(measure => measure.metric.key === 'it_coverage'); - - // display overall coverage only if all types of coverage exist - const shouldShowOverallCoverage = hasOverallCoverage && hasUTCoverage && hasITCoverage; - - // skip if we should display overall coverage - if (shouldShowOverallCoverage) { - return measures; - } - - // otherwise, hide all overall coverage measures - return measures.filter(measure => { - return measure.metric.key.indexOf('overall_') !== 0 && - measure.metric.key.indexOf('new_overall_') !== 0; - }); -} - function filterIssuesMeasures (measures) { const BANNED_MEASURES = [ 'blocker_violations', @@ -73,7 +53,7 @@ const HomeMeasuresList = ({ domain, component }) => { const { measures, name } = domain; const config = domains[name] || {}; - const filteredMeasures = filterCoverageMeasures(filterIssuesMeasures(measures)); + const filteredMeasures = filterIssuesMeasures(measures); const configMain = config.main || []; const [mainMeasures, otherMeasures] = partition(filteredMeasures, measure => configMain.includes(measure.metric.key)); |