Commit f29bb4c3 authored by Mike Greiling's avatar Mike Greiling

Merge branch 'line-number-vuln-modal' into 'master'

Add file line number to vuln modal

Closes #8701

See merge request gitlab-org/gitlab-ee!10265
parents bbfb1d60 f8e769ae
......@@ -81,7 +81,12 @@ export default {
'url',
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(
state.modal.data.identifiers,
'value',
......
---
title: Add file line number to vuln modal
merge_request: 10265
author:
type: changed
......@@ -275,7 +275,9 @@ describe('vulnerabilities module mutations', () => {
});
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', () => {
......
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