From: Grégoire Aubert Date: Mon, 7 Aug 2017 13:00:34 +0000 (+0200) Subject: SONAR-9608 Change facets order in measures page X-Git-Tag: 6.6-RC1~641 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0fe44ef3084fdd0cbeb5cb7100c9e46f797155d5;p=sonarqube.git SONAR-9608 Change facets order in measures page --- diff --git a/server/sonar-web/src/main/js/apps/component-measures/__tests__/__snapshots__/utils-test.js.snap b/server/sonar-web/src/main/js/apps/component-measures/__tests__/__snapshots__/utils-test.js.snap index 7459d13dc96..782aa588005 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/__tests__/__snapshots__/utils-test.js.snap +++ b/server/sonar-web/src/main/js/apps/component-measures/__tests__/__snapshots__/utils-test.js.snap @@ -67,29 +67,29 @@ exports[`sortMeasures should sort based on the config 1`] = ` Array [ Object { "metric": Object { - "key": "bugs", - "name": "bugs", + "key": "new_bugs", + "name": "new_bugs", "type": "INT", }, }, Object { "metric": Object { - "key": "new_bugs", - "name": "new_bugs", + "key": "new_reliability_remediation_effort", + "name": "bugs", "type": "INT", }, }, Object { "metric": Object { - "key": "reliability_remediation_effort", - "name": "new_bugs", + "key": "bugs", + "name": "bugs", "type": "INT", }, }, Object { "metric": Object { - "key": "new_reliability_remediation_effort", - "name": "bugs", + "key": "reliability_remediation_effort", + "name": "new_bugs", "type": "INT", }, }, 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 bd683bd18fb..9f10d6f7b28 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 @@ -21,51 +21,57 @@ export const domains = { Reliability: { order: [ - 'bugs', + 'new_reliability_rating', 'new_bugs', + 'new_reliability_remediation_effort', + 'reliability_rating', - 'reliability_remediation_effort', - 'new_reliability_remediation_effort' + 'bugs', + 'reliability_remediation_effort' ] }, Security: { order: [ - 'vulnerabilities', + 'new_security_rating', 'new_vulnerabilities', + 'new_security_remediation_effort', + 'security_rating', - 'security_remediation_effort', - 'new_security_remediation_effort' + 'vulnerabilities', + 'security_remediation_effort' ] }, Maintainability: { order: [ - 'code_smells', 'new_code_smells', + 'new_maintainability_rating', + 'new_technical_debt', + 'new_sqale_debt_ratio', + + 'code_smells', 'sqale_rating', 'sqale_index', - 'new_technical_debt', 'sqale_debt_ratio', - 'new_sqale_debt_ratio', 'effort_to_reach_maintainability_rating_a' ] }, Coverage: { order: [ - 'coverage', 'new_coverage', - 'line_coverage', 'new_line_coverage', - 'branch_coverage', 'new_branch_coverage', - 'uncovered_lines', 'new_uncovered_lines', - 'uncovered_conditions', 'new_uncovered_conditions', 'new_lines_to_cover', + 'coverage', + 'line_coverage', + 'branch_coverage', + 'uncovered_lines', + 'uncovered_conditions', 'lines_to_cover', 'tests', @@ -80,21 +86,23 @@ export const domains = { Duplications: { order: [ - 'duplicated_lines_density', 'new_duplicated_lines_density', - 'duplicated_blocks', 'new_duplicated_blocks', - 'duplicated_lines', 'new_duplicated_lines', + + 'duplicated_lines_density', + 'duplicated_blocks', + 'duplicated_lines', 'duplicated_files' ] }, Size: { order: [ + 'new_lines', + 'ncloc', 'lines', - 'new_lines', 'statements', 'functions', 'classes', @@ -113,18 +121,19 @@ export const domains = { Issues: { order: [ - 'violations', 'new_violations', - 'blocker_violations', 'new_blocker_violations', - 'critical_violations', 'new_critical_violations', - 'major_violations', 'new_major_violations', - 'minor_violations', 'new_minor_violations', - 'info_violations', 'new_info_violations', + + 'violations', + 'blocker_violations', + 'critical_violations', + 'major_violations', + 'minor_violations', + 'info_violations', 'open_issues', 'reopened_issues', 'confirmed_issues', diff --git a/server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/__snapshots__/DomainFacet-test.js.snap b/server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/__snapshots__/DomainFacet-test.js.snap index 3b11a53b1ff..8aff649b863 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/__snapshots__/DomainFacet-test.js.snap +++ b/server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/__snapshots__/DomainFacet-test.js.snap @@ -41,17 +41,17 @@ exports[`should display facet item list 1`] = ` name={ - Bugs + New Bugs } @@ -63,8 +63,8 @@ exports[`should display facet item list 1`] = ` "leak": "5", "metric": Object { "domain": "Reliability", - "key": "bugs", - "name": "Bugs", + "key": "new_bugs", + "name": "New Bugs", "type": "INT", }, "periods": Array [ @@ -73,12 +73,11 @@ exports[`should display facet item list 1`] = ` "value": "5", }, ], - "value": "5", } } /> } - value="bugs" + value="new_bugs" /> - New Bugs + Bugs } @@ -109,8 +108,8 @@ exports[`should display facet item list 1`] = ` "leak": "5", "metric": Object { "domain": "Reliability", - "key": "new_bugs", - "name": "New Bugs", + "key": "bugs", + "name": "Bugs", "type": "INT", }, "periods": Array [ @@ -119,11 +118,12 @@ exports[`should display facet item list 1`] = ` "value": "5", }, ], + "value": "5", } } /> } - value="new_bugs" + value="bugs" /> @@ -164,23 +164,23 @@ exports[`should display facet item list with bugs selected 1`] = ` value="Reliability" /> - Bugs + New Bugs } @@ -192,8 +192,8 @@ exports[`should display facet item list with bugs selected 1`] = ` "leak": "5", "metric": Object { "domain": "Reliability", - "key": "bugs", - "name": "Bugs", + "key": "new_bugs", + "name": "New Bugs", "type": "INT", }, "periods": Array [ @@ -202,31 +202,30 @@ exports[`should display facet item list with bugs selected 1`] = ` "value": "5", }, ], - "value": "5", } } /> } - value="bugs" + value="new_bugs" /> - New Bugs + Bugs } @@ -238,8 +237,8 @@ exports[`should display facet item list with bugs selected 1`] = ` "leak": "5", "metric": Object { "domain": "Reliability", - "key": "new_bugs", - "name": "New Bugs", + "key": "bugs", + "name": "Bugs", "type": "INT", }, "periods": Array [ @@ -248,11 +247,12 @@ exports[`should display facet item list with bugs selected 1`] = ` "value": "5", }, ], + "value": "5", } } /> } - value="new_bugs" + value="bugs" />