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
f3a01ed7
Commit
f3a01ed7
authored
Nov 08, 2018
by
samdbeckham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds a catch for instances to the GSP modal
Where GSP is the group security dashboard
parent
ef6e44aa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
1 deletion
+26
-1
ee/app/assets/javascripts/security_dashboard/store/modules/vulnerabilities/mutations.js
...rity_dashboard/store/modules/vulnerabilities/mutations.js
+7
-1
ee/spec/javascripts/security_dashboard/store/vulnerabilities/data/mock_data_vulnerabilities.json
...store/vulnerabilities/data/mock_data_vulnerabilities.json
+12
-0
ee/spec/javascripts/security_dashboard/store/vulnerabilities/mutations_spec.js
...ecurity_dashboard/store/vulnerabilities/mutations_spec.js
+7
-0
No files found.
ee/app/assets/javascripts/security_dashboard/store/modules/vulnerabilities/mutations.js
View file @
f3a01ed7
...
...
@@ -64,11 +64,17 @@ export default {
Vue
.
set
(
state
.
modal
.
data
.
severity
,
'
value
'
,
vulnerability
.
severity
);
Vue
.
set
(
state
.
modal
.
data
.
confidence
,
'
value
'
,
vulnerability
.
confidence
);
Vue
.
set
(
state
.
modal
.
data
.
solution
,
'
value
'
,
vulnerability
.
solution
);
Vue
.
set
(
state
.
modal
.
data
.
instances
,
'
value
'
,
vulnerability
.
instances
);
Vue
.
set
(
state
.
modal
,
'
vulnerability
'
,
vulnerability
);
Vue
.
set
(
state
.
modal
.
vulnerability
,
'
hasIssue
'
,
Boolean
(
vulnerability
.
issue_feedback
));
Vue
.
set
(
state
.
modal
.
vulnerability
,
'
isDismissed
'
,
Boolean
(
vulnerability
.
dismissal_feedback
));
Vue
.
set
(
state
.
modal
,
'
error
'
,
null
);
if
(
vulnerability
.
instances
&&
vulnerability
.
instances
.
length
)
{
Vue
.
set
(
state
.
modal
.
data
.
instances
,
'
value
'
,
vulnerability
.
instances
);
}
else
{
Vue
.
set
(
state
.
modal
.
data
.
instances
,
'
value
'
,
null
);
}
if
(
vulnerability
.
links
&&
vulnerability
.
links
.
length
)
{
Vue
.
set
(
state
.
modal
.
data
.
links
,
'
value
'
,
vulnerability
.
links
);
}
else
{
...
...
ee/spec/javascripts/security_dashboard/store/vulnerabilities/data/mock_data_vulnerabilities.json
View file @
f3a01ed7
...
...
@@ -47,6 +47,18 @@
"name"
:
"Cipher does not check for integrity first?"
,
"url"
:
"https://crypto.stackexchange.com/questions/31428/pbewithmd5anddes-cipher-does-not-check-for-integrity-first"
}
],
"instances"
:
[
{
"param"
:
"X-Content-Type-Options"
,
"method"
:
"GET"
,
"uri"
:
"http://bikebilly-spring-auto-devops-review-feature-br-3y2gpb.35.192.176.43.xip.io"
},
{
"param"
:
"X-Content-Type-Options"
,
"method"
:
"GET"
,
"uri"
:
"http://bikebilly-spring-auto-devops-review-feature-br-3y2gpb.35.192.176.43.xip.io/"
}
]
},
{
...
...
ee/spec/javascripts/security_dashboard/store/vulnerabilities/mutations_spec.js
View file @
f3a01ed7
...
...
@@ -223,6 +223,13 @@ describe('vulnerabilities module mutations', () => {
expect
(
state
.
modal
.
data
.
links
.
value
).
toEqual
(
null
);
});
it
(
'
should nullify the instances
'
,
()
=>
{
const
payload
=
{
vulnerability
:
{
...
vulnerability
,
instances
:
[]
}
};
mutations
[
types
.
SET_MODAL_DATA
](
state
,
payload
);
expect
(
state
.
modal
.
data
.
instances
.
value
).
toEqual
(
null
);
});
});
});
...
...
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