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
38a4febd
Commit
38a4febd
authored
Jun 11, 2021
by
Mehmet Emin INAC
Committed by
Simon Knox
Jun 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix accessing the errors property of the scan objects
Changelog: fixed EE: true
parent
1b36def8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
ee/app/assets/javascripts/security_dashboard/components/pipeline/pipeline_security_dashboard.vue
...board/components/pipeline/pipeline_security_dashboard.vue
+1
-1
ee/spec/frontend/security_dashboard/components/pipeline/pipeline_security_dashboard_spec.js
...d/components/pipeline/pipeline_security_dashboard_spec.js
+14
-8
No files found.
ee/app/assets/javascripts/security_dashboard/components/pipeline/pipeline_security_dashboard.vue
View file @
38a4febd
...
...
@@ -66,7 +66,7 @@ export default {
};
},
scansWithErrors
()
{
const
getScans
=
(
reportSummary
)
=>
reportSummary
?.
scans
||
[];
const
getScans
=
(
reportSummary
)
=>
reportSummary
?.
scans
?.
nodes
||
[];
const
hasErrors
=
(
scan
)
=>
Boolean
(
scan
.
errors
?.
length
);
return
this
.
securityReportSummary
...
...
ee/spec/frontend/security_dashboard/components/pipeline/pipeline_security_dashboard_spec.js
View file @
38a4febd
...
...
@@ -153,23 +153,29 @@ describe('Pipeline Security Dashboard component', () => {
const
securityReportSummary
=
{
scanner_1
:
{
// this scan contains errors
scans
:
[
scans
:
{
nodes
:
[
{
errors
:
[
'
scanner 1 - error 1
'
,
'
scanner 1 - error 2
'
],
name
:
'
foo
'
},
{
errors
:
[
'
scanner 1 - error 3
'
,
'
scanner 1 - error 4
'
],
name
:
'
bar
'
},
],
},
},
scanner_2
:
null
,
scanner_3
:
{
// this scan contains errors
scans
:
[{
errors
:
[
'
scanner 3 - error 1
'
,
'
scanner 3 - error 2
'
],
name
:
'
baz
'
}],
scans
:
{
nodes
:
[{
errors
:
[
'
scanner 3 - error 1
'
,
'
scanner 3 - error 2
'
],
name
:
'
baz
'
}],
},
},
scanner_4
:
{
scans
:
[{
errors
:
[],
name
:
'
quz
'
}],
scans
:
{
nodes
:
[{
errors
:
[],
name
:
'
quz
'
}],
},
},
};
const
scansWithErrors
=
[
...
securityReportSummary
.
scanner_1
.
scans
,
...
securityReportSummary
.
scanner_3
.
scans
,
...
securityReportSummary
.
scanner_1
.
scans
.
nodes
,
...
securityReportSummary
.
scanner_3
.
scans
.
nodes
,
];
beforeEach
(()
=>
{
...
...
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