Commit f8e769ae authored by Fernando Arias's avatar Fernando Arias

Add file line number to vuln modal

* For the vuln modals add line number to the file path

Update unit tests

Add changelog
parent adfb33b8
...@@ -81,7 +81,12 @@ export default { ...@@ -81,7 +81,12 @@ export default {
'url', 'url',
vulnerability.project && vulnerability.project.full_path, vulnerability.project && vulnerability.project.full_path,
); );
Vue.set(state.modal.data.file, 'value', vulnerability.location && vulnerability.location.file); Vue.set(
state.modal.data.file,
'value',
vulnerability.location &&
`${vulnerability.location.file}:${vulnerability.location.start_line}`,
);
Vue.set( Vue.set(
state.modal.data.identifiers, state.modal.data.identifiers,
'value', 'value',
......
---
title: Add file line number to vuln modal
merge_request: 10265
author:
type: changed
...@@ -275,7 +275,9 @@ describe('vulnerabilities module mutations', () => { ...@@ -275,7 +275,9 @@ describe('vulnerabilities module mutations', () => {
}); });
it('should set the modal file', () => { it('should set the modal file', () => {
expect(state.modal.data.file.value).toEqual(vulnerability.location.file); expect(state.modal.data.file.value).toEqual(
`${vulnerability.location.file}:${vulnerability.location.start_line}`,
);
}); });
it('should set the modal identifiers', () => { it('should set the modal identifiers', () => {
......
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