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