diff --git a/ee/app/assets/javascripts/vue_shared/security_reports/grouped_security_reports_app.vue b/ee/app/assets/javascripts/vue_shared/security_reports/grouped_security_reports_app.vue index 83fd2ccf7dd03563b2deb059da9f188d0b7fe5e0..eb355437a8f83c273fe1709f9b0861564651f6e1 100644 --- a/ee/app/assets/javascripts/vue_shared/security_reports/grouped_security_reports_app.vue +++ b/ee/app/assets/javascripts/vue_shared/security_reports/grouped_security_reports_app.vue @@ -176,6 +176,11 @@ export default { shouldRenderDependencyScanning() { const { head, diffEndpoint } = this.dependencyScanning.paths; + return head || diffEndpoint; + }, + shouldRenderDast() { + const { head, diffEndpoint } = this.dast.paths; + return head || diffEndpoint; }, }, @@ -225,7 +230,12 @@ export default { this.fetchSastContainerReports(); } - if (this.dastHeadPath) { + const dastDiffEndpoint = gl && gl.mrWidgetData && gl.mrWidgetData.dast_comparison_path; + + if (gon.features && gon.features.dastMergeRequestReportApi && dastDiffEndpoint) { + this.setDastDiffEndpoint(dastDiffEndpoint); + this.fetchDastDiff(); + } else if (this.dastHeadPath) { this.setDastHeadPath(this.dastHeadPath); if (this.dastBasePath) { @@ -291,6 +301,8 @@ export default { 'setSastContainerDiffEndpoint', 'fetchDependencyScanningDiff', 'setDependencyScanningDiffEndpoint', + 'fetchDastDiff', + 'setDastDiffEndpoint', ]), ...mapActions('sast', { setSastHeadPath: 'setHeadPath', @@ -373,7 +385,7 @@ export default { /> -