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
3c262da5
Commit
3c262da5
authored
Oct 05, 2020
by
Alan (Maciej) Paruszewski
Committed by
Tim Zallmann
Oct 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable sorting vulnerabilities by report type
parent
f9fad2a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
ee/app/assets/javascripts/security_dashboard/components/vulnerability_list.vue
...ipts/security_dashboard/components/vulnerability_list.vue
+3
-1
ee/changelogs/unreleased/249245-enable-sorting-vulnerabilities-by-report-type.yml
.../249245-enable-sorting-vulnerabilities-by-report-type.yml
+5
-0
ee/spec/frontend/security_dashboard/components/vulnerability_list_spec.js
.../security_dashboard/components/vulnerability_list_spec.js
+6
-0
No files found.
ee/app/assets/javascripts/security_dashboard/components/vulnerability_list.vue
View file @
3c262da5
...
...
@@ -21,6 +21,7 @@ import { formatDate } from '~/lib/utils/datetime_utility';
import
{
s__
,
__
,
sprintf
}
from
'
~/locale
'
;
import
SelectionSummary
from
'
./selection_summary.vue
'
;
import
IssuesBadge
from
'
./issues_badge.vue
'
;
import
{
convertToSnakeCase
}
from
'
~/lib/utils/text_utility
'
;
import
{
VULNERABILITIES_PER_PAGE
}
from
'
../store/constants
'
;
export
const
SCANNER_ALERT_DISMISSED_LOCAL_STORAGE_KEY
=
...
...
@@ -165,6 +166,7 @@ export default {
label
:
s__
(
'
Reports|Scanner
'
),
thClass
:
'
scanner
'
,
tdClass
:
'
scanner
'
,
sortable
:
this
.
isSortable
,
},
{
key
:
'
activity
'
,
...
...
@@ -277,7 +279,7 @@ export default {
},
handleSortChange
(
args
)
{
if
(
args
.
sortBy
)
{
this
.
$emit
(
'
sort-changed
'
,
args
);
this
.
$emit
(
'
sort-changed
'
,
{
...
args
,
sortBy
:
convertToSnakeCase
(
args
.
sortBy
)
}
);
}
},
},
...
...
ee/changelogs/unreleased/249245-enable-sorting-vulnerabilities-by-report-type.yml
0 → 100644
View file @
3c262da5
---
title
:
Enable sorting vulnerabiliies by state in the list view
merge_request
:
42980
author
:
type
:
added
ee/spec/frontend/security_dashboard/components/vulnerability_list_spec.js
View file @
3c262da5
...
...
@@ -478,6 +478,12 @@ describe('Vulnerability list component', () => {
expect
(
spy
).
toHaveBeenCalledWith
(
args
);
});
it
(
'
triggers the listener when sortBy is camelCased and transforms it to snake_case
'
,
()
=>
{
const
args
=
{
sortBy
:
'
reportType
'
,
sortDesc
:
false
};
findTable
().
vm
.
$emit
(
'
sort-changed
'
,
args
);
expect
(
spy
).
toHaveBeenCalledWith
({
...
args
,
sortBy
:
'
report_type
'
});
});
it
(
'
does not trigger the listener when sortBy is an empty value
'
,
()
=>
{
findTable
().
vm
.
$emit
(
'
sort-changed
'
,
{});
expect
(
spy
).
not
.
toHaveBeenCalled
();
...
...
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