]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9608 Change facets order in measures page
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Mon, 7 Aug 2017 13:00:34 +0000 (15:00 +0200)
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>
Mon, 14 Aug 2017 09:44:44 +0000 (11:44 +0200)
server/sonar-web/src/main/js/apps/component-measures/__tests__/__snapshots__/utils-test.js.snap
server/sonar-web/src/main/js/apps/component-measures/config/domains.js
server/sonar-web/src/main/js/apps/component-measures/sidebar/__tests__/__snapshots__/DomainFacet-test.js.snap

index 7459d13dc96d77ecd2298781def56de55a328a0a..782aa5880058f88300e045a4546c8bac7038aae5 100644 (file)
@@ -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",
     },
   },
index bd683bd18fb890ad937c5c83a16553d415b5dddc..9f10d6f7b281a8cf4b7a7f5113bfe10a2bb669cc 100644 (file)
 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',
index 3b11a53b1ff7a75c322e3c79c31b70e1d9a5c14b..8aff649b8639015466a41415d5f606c998020479 100644 (file)
@@ -41,17 +41,17 @@ exports[`should display facet item list 1`] = `
       name={
         <Tooltip
           mouseEnterDelay={0.5}
-          overlay="Bugs"
+          overlay="New Bugs"
           placement="bottom"
         >
           <span
-            id="measure-bugs-name"
+            id="measure-new_bugs-name"
           >
             <IssueTypeIcon
               className="little-spacer-right"
-              query="bugs"
+              query="new_bugs"
             />
-            Bugs
+            New Bugs
           </span>
         </Tooltip>
       }
@@ -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"
     />
     <FacetItem
       active={false}
@@ -87,17 +86,17 @@ exports[`should display facet item list 1`] = `
       name={
         <Tooltip
           mouseEnterDelay={0.5}
-          overlay="New Bugs"
+          overlay="Bugs"
           placement="bottom"
         >
           <span
-            id="measure-new_bugs-name"
+            id="measure-bugs-name"
           >
             <IssueTypeIcon
               className="little-spacer-right"
-              query="new_bugs"
+              query="bugs"
             />
-            New Bugs
+            Bugs
           </span>
         </Tooltip>
       }
@@ -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"
     />
   </FacetItemsList>
 </FacetBox>
@@ -164,23 +164,23 @@ exports[`should display facet item list with bugs selected 1`] = `
       value="Reliability"
     />
     <FacetItem
-      active={true}
+      active={false}
       disabled={false}
       halfWidth={false}
       name={
         <Tooltip
           mouseEnterDelay={0.5}
-          overlay="Bugs"
+          overlay="New Bugs"
           placement="bottom"
         >
           <span
-            id="measure-bugs-name"
+            id="measure-new_bugs-name"
           >
             <IssueTypeIcon
               className="little-spacer-right"
-              query="bugs"
+              query="new_bugs"
             />
-            Bugs
+            New Bugs
           </span>
         </Tooltip>
       }
@@ -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"
     />
     <FacetItem
-      active={false}
+      active={true}
       disabled={false}
       halfWidth={false}
       name={
         <Tooltip
           mouseEnterDelay={0.5}
-          overlay="New Bugs"
+          overlay="Bugs"
           placement="bottom"
         >
           <span
-            id="measure-new_bugs-name"
+            id="measure-bugs-name"
           >
             <IssueTypeIcon
               className="little-spacer-right"
-              query="new_bugs"
+              query="bugs"
             />
-            New Bugs
+            Bugs
           </span>
         </Tooltip>
       }
@@ -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"
     />
   </FacetItemsList>
 </FacetBox>