Commit 71ec3c49 authored by Michał Zając's avatar Michał Zając

Rely only on vulnerability object

parent c9517154
...@@ -59,10 +59,9 @@ function createFooterApp() { ...@@ -59,10 +59,9 @@ function createFooterApp() {
const props = { const props = {
discussionsUrl, discussionsUrl,
notesUrl, notesUrl,
finding,
solutionInfo: { solutionInfo: {
solution: finding.solution, solution,
remediation: finding.remediation, remediation,
hasDownload, hasDownload,
hasMr, hasMr,
hasRemediation, hasRemediation,
......
...@@ -17,7 +17,7 @@ export default { ...@@ -17,7 +17,7 @@ export default {
return this.vulnerability.location || {}; return this.vulnerability.location || {};
}, },
scanner() { scanner() {
return this.finding.scanner || {}; return this.vulnerability.scanner || {};
}, },
fileText() { fileText() {
return (this.location.file || '') + (this.lineNumber ? `:${this.lineNumber}` : ''); return (this.location.file || '') + (this.lineNumber ? `:${this.lineNumber}` : '');
...@@ -63,9 +63,9 @@ export default { ...@@ -63,9 +63,9 @@ export default {
<severity-badge :severity="vulnerability.severity" class="gl-display-inline ml-1" /> <severity-badge :severity="vulnerability.severity" class="gl-display-inline ml-1" />
</detail-item> </detail-item>
<detail-item <detail-item
v-if="finding.evidence" v-if="vulnerability.evidence"
:sprintf-message="__('%{labelStart}Evidence:%{labelEnd} %{evidence}')" :sprintf-message="__('%{labelStart}Evidence:%{labelEnd} %{evidence}')"
>{{ finding.evidence }} >{{ vulnerability.evidence }}
</detail-item> </detail-item>
<detail-item :sprintf-message="__('%{labelStart}Report Type:%{labelEnd} %{reportType}')" <detail-item :sprintf-message="__('%{labelStart}Report Type:%{labelEnd} %{reportType}')"
>{{ vulnerability.report_type }} >{{ vulnerability.report_type }}
......
...@@ -22,7 +22,7 @@ export default { ...@@ -22,7 +22,7 @@ export default {
type: String, type: String,
required: true, required: true,
}, },
finding: { project: {
type: Object, type: Object,
required: true, required: true,
}, },
...@@ -52,12 +52,6 @@ export default { ...@@ -52,12 +52,6 @@ export default {
hasSolution() { hasSolution() {
return Boolean(this.solutionInfo.solution || this.solutionInfo.remediation); return Boolean(this.solutionInfo.solution || this.solutionInfo.remediation);
}, },
project() {
return {
url: this.finding.project?.full_path,
value: this.finding.project?.full_name,
};
},
}, },
created() { created() {
...@@ -156,16 +150,16 @@ export default { ...@@ -156,16 +150,16 @@ export default {
<div data-qa-selector="vulnerability_footer"> <div data-qa-selector="vulnerability_footer">
<solution-card v-if="hasSolution" v-bind="solutionInfo" /> <solution-card v-if="hasSolution" v-bind="solutionInfo" />
<div v-if="finding.issue_feedback || finding.merge_request_feedback" class="card"> <div v-if="project.issue_feedback || project.merge_request_feedback" class="card">
<issue-note <issue-note
v-if="finding.issue_feedback" v-if="project.issue_feedback"
:feedback="finding.issue_feedback" :feedback="project.issue_feedback"
:project="project" :project="project"
class="card-body" class="card-body"
/> />
<merge-request-note <merge-request-note
v-if="finding.merge_request_feedback" v-if="project.merge_request_feedback"
:feedback="finding.merge_request_feedback" :feedback="project.merge_request_feedback"
:project="project" :project="project"
class="card-body" class="card-body"
/> />
......
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