Commit 931e5b73 authored by Sam Beckham's avatar Sam Beckham Committed by Filipa Lacerda

Splits severity and confidence levels in the FE

- Updates the constants file
- Updates the filters file
- Updates the tests
parent e5a28a57
import { s__ } from '~/locale'; import { s__ } from '~/locale';
export const SEVERITIES = { export const SEVERITY_LEVELS = {
critical: 'Critical', critical: 'Critical',
high: 'High', high: 'High',
medium: 'Medium', medium: 'Medium',
low: 'Low', low: 'Low',
unknown: 'Unknown', unknown: 'Unknown',
experimental: 'Experimental', info: 'Info',
undefined: 'Undefined',
};
export const CONFIDENCE_LEVELS = {
confirmed: 'Confirmed',
high: 'High',
medium: 'Medium',
low: 'Low',
unknown: 'Unknown',
ignore: 'Ignore', ignore: 'Ignore',
experimental: 'Experimental',
undefined: 'Undefined', undefined: 'Undefined',
}; };
......
import { SEVERITIES, REPORT_TYPES } from './constants'; import { SEVERITY_LEVELS, REPORT_TYPES } from './constants';
export default () => ({ export default () => ({
filters: [ filters: [
...@@ -10,7 +10,7 @@ export default () => ({ ...@@ -10,7 +10,7 @@ export default () => ({
name: 'All', name: 'All',
id: 'all', id: 'all',
}, },
...Object.entries(SEVERITIES).map(severity => { ...Object.entries(SEVERITY_LEVELS).map(severity => {
const [id, name] = severity; const [id, name] = severity;
return { id, name }; return { id, name };
}), }),
......
---
title: Splits the severity and confidence constants in the group security dashboard
frontend
merge_request: 9535
author:
type: other
...@@ -19,8 +19,8 @@ describe('Filter component', () => { ...@@ -19,8 +19,8 @@ describe('Filter component', () => {
vm.$destroy(); vm.$destroy();
}); });
it('should display all 9 severity options', () => { it('should display all 8 severity options', () => {
expect(vm.$el.querySelectorAll('.dropdown-item').length).toEqual(9); expect(vm.$el.querySelectorAll('.dropdown-item').length).toEqual(8);
}); });
it('should display a check next to only the selected item', () => { it('should display a check next to only the selected item', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment