Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
105b17ae
Commit
105b17ae
authored
Mar 18, 2020
by
Savas Vedova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove duplicate constant definitions
parent
13851f12
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
19 deletions
+6
-19
ee/app/assets/javascripts/security_dashboard/store/modules/filters/constants.js
...pts/security_dashboard/store/modules/filters/constants.js
+1
-17
ee/app/assets/javascripts/security_dashboard/store/modules/filters/state.js
...scripts/security_dashboard/store/modules/filters/state.js
+5
-2
No files found.
ee/app/assets/javascripts/security_dashboard/store/modules/filters/constants.js
View file @
105b17ae
import
{
s__
}
from
'
~/locale
'
;
export
const
SEVERITY_LEVELS
=
{
critical
:
s__
(
'
severity|Critical
'
),
high
:
s__
(
'
severity|High
'
),
medium
:
s__
(
'
severity|Medium
'
),
low
:
s__
(
'
severity|Low
'
),
unknown
:
s__
(
'
severity|Unknown
'
),
info
:
s__
(
'
severity|Info
'
),
undefined
:
s__
(
'
severity|Undefined
'
),
};
export
const
REPORT_TYPES
=
{
container_scanning
:
s__
(
'
ciReport|Container Scanning
'
),
dast
:
s__
(
'
ciReport|DAST
'
),
dependency_scanning
:
s__
(
'
ciReport|Dependency Scanning
'
),
sast
:
s__
(
'
ciReport|SAST
'
),
};
export
const
ALL
=
'
all
'
;
export
const
BASE_FILTERS
=
{
severity
:
{
name
:
s__
(
'
ciReport|All severities
'
),
...
...
ee/app/assets/javascripts/security_dashboard/store/modules/filters/state.js
View file @
105b17ae
import
{
SEVERITY_LEVELS
,
REPORT_TYPES
,
BASE_FILTERS
}
from
'
./constants
'
;
import
{
BASE_FILTERS
}
from
'
./constants
'
;
import
{
SEVERITY_LEVELS
,
REPORT_TYPES
}
from
'
../../constants
'
;
import
{
s__
}
from
'
~/locale
'
;
const
optionsObjectToArray
=
obj
=>
Object
.
entries
(
obj
).
map
(([
id
,
name
])
=>
({
id
,
name
}));
const
severityLevelsWithoutNone
=
{
...
SEVERITY_LEVELS
};
delete
severityLevelsWithoutNone
.
none
;
export
default
()
=>
({
filters
:
[
{
name
:
s__
(
'
SecurityDashboard|Severity
'
),
id
:
'
severity
'
,
options
:
[
BASE_FILTERS
.
severity
,
...
optionsObjectToArray
(
SEVERITY_LEVELS
)],
options
:
[
BASE_FILTERS
.
severity
,
...
optionsObjectToArray
(
severityLevelsWithoutNone
)],
hidden
:
false
,
selection
:
new
Set
([
BASE_FILTERS
.
severity
.
id
]),
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment