diff --git a/src/views/portfolio/projects/FindingAudit.vue b/src/views/portfolio/projects/FindingAudit.vue index 2668c0780..6ca666e3e 100644 --- a/src/views/portfolio/projects/FindingAudit.vue +++ b/src/views/portfolio/projects/FindingAudit.vue @@ -20,7 +20,7 @@ {{ alias.vulnId }}{{ alias.vulnId }} @@ -143,7 +143,7 @@ />
+ > {{ this.$t('message.add_comment') }}
@@ -175,6 +175,34 @@ /> + Suppress all + +

Do you want to suppress the vulnerability in all projects?

+
+ Yes + No +
+
+ Unsuppress all + +

Do you want to unsuppress the vulnerability in all projects?

+
+ Yes + No +
+
+ > {{ this.$t('message.update_details') }} @@ -326,6 +354,7 @@ export default { analysisJustification: null, analysisResponse: null, analysisDetails: null, + suppressAllFlag: false, }; }, watch: { @@ -338,12 +367,35 @@ export default { null, null, currentValue, + false, ); } }, }, mixins: [permissionsMixin], methods: { + suppressForAllProjects() { + this.callRestEndpoint( + this.analysisState, + this.analysisJustification, + this.analysisResponse, + this.analysisDetails, + null, + true, + true, + ); + }, + unSuppressForAllProjects() { + this.callRestEndpoint( + this.analysisState, + this.analysisJustification, + this.analysisResponse, + this.analysisDetails, + null, + false, + true, + ); + }, resolveVulnAliases: function (aliases, vulnSource) { return common.resolveVulnAliases( vulnSource ? vulnSource : this.source, @@ -408,6 +460,13 @@ export default { } else { this.isSuppressed = false; } + if (Object.prototype.hasOwnProperty.call(analysis, 'suppressAllFlag')) { + this.suppressAllFlag = analysis.suppressAllFlag; + } else { + this.suppressAllFlag = false; + } + this.$refs.confirmSuppression.hide(); + this.$refs.confirmUnSuppression.hide(); }, makeAnalysis: function () { this.callRestEndpoint( @@ -417,6 +476,7 @@ export default { this.analysisDetails, null, null, + null, ); }, addComment: function () { @@ -428,6 +488,7 @@ export default { this.analysisDetails, this.comment, null, + null, ); } this.comment = null; @@ -439,6 +500,7 @@ export default { analysisDetails, comment, isSuppressed, + suppressAllFlag, ) { let url = `${this.$api.BASE_URL}/${this.$api.URL_ANALYSIS}`; this.axios @@ -452,6 +514,7 @@ export default { analysisDetails: analysisDetails, comment: comment, isSuppressed: isSuppressed, + suppressAllFlag: suppressAllFlag, }) .then((response) => { this.$toastr.s(this.$t('message.updated'));