]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-13564 Allow sorting projects by security review rating
authorJeremy Davis <jeremy.davis@sonarsource.com>
Wed, 2 Dec 2020 15:33:31 +0000 (16:33 +0100)
committersonartech <sonartech@sonarsource.com>
Fri, 4 Dec 2020 20:06:50 +0000 (20:06 +0000)
server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectsSortingSelect-test.tsx.snap
server/sonar-web/src/main/js/apps/projects/utils.ts
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 4ec06a7a8c0777a6ac2272fdb794e0816213bd99..e4e2e330431c4dced25b1c8443afecca646a361f 100644 (file)
@@ -33,6 +33,11 @@ exports[`should handle the descending sort direction 1`] = `
           "label": "projects.sorting.security",
           "value": "security",
         },
+        Object {
+          "class": undefined,
+          "label": "projects.sorting.security_review",
+          "value": "security_review",
+        },
         Object {
           "class": undefined,
           "label": "projects.sorting.maintainability",
@@ -107,6 +112,11 @@ exports[`should render correctly for leak view 1`] = `
           "label": "projects.sorting.new_security",
           "value": "new_security",
         },
+        Object {
+          "class": "projects-leak-sorting-option",
+          "label": "projects.sorting.new_security_review",
+          "value": "new_security_review",
+        },
         Object {
           "class": "projects-leak-sorting-option",
           "label": "projects.sorting.new_maintainability",
@@ -181,6 +191,11 @@ exports[`should render correctly for overall view 1`] = `
           "label": "projects.sorting.security",
           "value": "security",
         },
+        Object {
+          "class": undefined,
+          "label": "projects.sorting.security_review",
+          "value": "security_review",
+        },
         Object {
           "class": undefined,
           "label": "projects.sorting.maintainability",
index 7f0f6d097e7f336d21084b6f8b19c151f7f49ec0..2305c1af3020c09b1ac4a8e3eb591845ba6567d7 100644 (file)
@@ -41,6 +41,7 @@ export const SORTING_METRICS: SortingOption[] = [
   { value: 'analysis_date' },
   { value: 'reliability' },
   { value: 'security' },
+  { value: 'security_review' },
   { value: 'maintainability' },
   { value: 'coverage' },
   { value: 'duplications' },
@@ -52,6 +53,7 @@ export const SORTING_LEAK_METRICS: SortingOption[] = [
   { value: 'analysis_date' },
   { value: 'new_reliability', class: 'projects-leak-sorting-option' },
   { value: 'new_security', class: 'projects-leak-sorting-option' },
+  { value: 'new_security_review', class: 'projects-leak-sorting-option' },
   { value: 'new_maintainability', class: 'projects-leak-sorting-option' },
   { value: 'new_coverage', class: 'projects-leak-sorting-option' },
   { value: 'new_duplications', class: 'projects-leak-sorting-option' },
@@ -63,12 +65,14 @@ export const SORTING_SWITCH: T.Dict<string> = {
   name: 'name',
   reliability: 'new_reliability',
   security: 'new_security',
+  security_review: 'new_security_review',
   maintainability: 'new_maintainability',
   coverage: 'new_coverage',
   duplications: 'new_duplications',
   size: 'new_lines',
   new_reliability: 'reliability',
   new_security: 'security',
+  new_security_review: 'security_review',
   new_maintainability: 'maintainability',
   new_coverage: 'coverage',
   new_duplications: 'duplications',
@@ -320,8 +324,8 @@ const propertyToMetricMap: T.Dict<string | undefined> = {
   new_reliability: 'new_reliability_rating',
   security: 'security_rating',
   new_security: 'new_security_rating',
-  security_review_rating: 'security_review_rating',
-  new_security_review_rating: 'new_security_review_rating',
+  security_review: 'security_review_rating',
+  new_security_review: 'new_security_review_rating',
   maintainability: 'sqale_rating',
   new_maintainability: 'new_maintainability_rating',
   coverage: 'coverage',
index 68cb4d8e9b48fe6ffe4b9e6b18a84a2866f26185..fe486a541d3d0977ea631ab5a53c92a1dde229a3 100644 (file)
@@ -962,12 +962,14 @@ projects.sorting.name=Name
 projects.sorting.analysis_date=Last analysis date
 projects.sorting.reliability=Reliability
 projects.sorting.security=Security
+projects.sorting.security_review=Security Review
 projects.sorting.maintainability=Maintainability
 projects.sorting.coverage=Coverage
 projects.sorting.duplications=Duplications
 projects.sorting.size=Size
 projects.sorting.new_reliability=Reliability
 projects.sorting.new_security=Security
+projects.sorting.new_security_review=Security Review
 projects.sorting.new_maintainability=Maintainability
 projects.sorting.new_coverage=Coverage
 projects.sorting.new_duplications=Duplications