diff --git a/ee/app/assets/javascripts/security_dashboard/store/modules/filters/constants.js b/ee/app/assets/javascripts/security_dashboard/store/modules/filters/constants.js index cf86287ccb08fea64755f9e8be2b8a452d5089b3..fc4a642d41b7ffdd1401daf1757195595ac49711 100644 --- a/ee/app/assets/javascripts/security_dashboard/store/modules/filters/constants.js +++ b/ee/app/assets/javascripts/security_dashboard/store/modules/filters/constants.js @@ -1,13 +1,23 @@ import { s__ } from '~/locale'; -export const SEVERITIES = { +export const SEVERITY_LEVELS = { critical: 'Critical', high: 'High', medium: 'Medium', low: 'Low', unknown: 'Unknown', - experimental: 'Experimental', + info: 'Info', + undefined: 'Undefined', +}; + +export const CONFIDENCE_LEVELS = { + confirmed: 'Confirmed', + high: 'High', + medium: 'Medium', + low: 'Low', + unknown: 'Unknown', ignore: 'Ignore', + experimental: 'Experimental', undefined: 'Undefined', }; diff --git a/ee/app/assets/javascripts/security_dashboard/store/modules/filters/state.js b/ee/app/assets/javascripts/security_dashboard/store/modules/filters/state.js index 177a14a26bb6e74d0335cb153ea682f99a0dddc1..446be736b95bf420ca16d52cc0c8e04260145c15 100644 --- a/ee/app/assets/javascripts/security_dashboard/store/modules/filters/state.js +++ b/ee/app/assets/javascripts/security_dashboard/store/modules/filters/state.js @@ -1,4 +1,4 @@ -import { SEVERITIES, REPORT_TYPES } from './constants'; +import { SEVERITY_LEVELS, REPORT_TYPES } from './constants'; export default () => ({ filters: [ @@ -10,7 +10,7 @@ export default () => ({ name: 'All', id: 'all', }, - ...Object.entries(SEVERITIES).map(severity => { + ...Object.entries(SEVERITY_LEVELS).map(severity => { const [id, name] = severity; return { id, name }; }), diff --git a/ee/changelogs/unreleased/9397-split-severity-and-confidence-sets-of-values-for-vulnerabilities-FE.yml b/ee/changelogs/unreleased/9397-split-severity-and-confidence-sets-of-values-for-vulnerabilities-FE.yml new file mode 100644 index 0000000000000000000000000000000000000000..655fbb784a72c8f6a6c62e199117da83cfd8428d --- /dev/null +++ b/ee/changelogs/unreleased/9397-split-severity-and-confidence-sets-of-values-for-vulnerabilities-FE.yml @@ -0,0 +1,6 @@ +--- +title: Splits the severity and confidence constants in the group security dashboard + frontend +merge_request: 9535 +author: +type: other diff --git a/ee/spec/javascripts/security_dashboard/components/filter_spec.js b/ee/spec/javascripts/security_dashboard/components/filter_spec.js index 6775e1ab6d30cc4cb5c48f04f6db49ce57fe5a6c..95b62804b7bb90809b95271c50003a185111903b 100644 --- a/ee/spec/javascripts/security_dashboard/components/filter_spec.js +++ b/ee/spec/javascripts/security_dashboard/components/filter_spec.js @@ -19,8 +19,8 @@ describe('Filter component', () => { vm.$destroy(); }); - it('should display all 9 severity options', () => { - expect(vm.$el.querySelectorAll('.dropdown-item').length).toEqual(9); + it('should display all 8 severity options', () => { + expect(vm.$el.querySelectorAll('.dropdown-item').length).toEqual(8); }); it('should display a check next to only the selected item', () => {