Skip to content

[FE] Add export button for violations on Compliance Report

What does this MR do and why?

Add export button for violations on Compliance Report

Screenshots or screen recordings

Before After
image Screenshot_2023-06-20_at_15.08.30
Screenshot_2023-06-20_at_15.08.37
Screenshot_2023-06-20_at_15.11.53

Note: also changed Frameworks export button to be consistent with the new button text (screenshot 3 in After section).

How to set up and validate locally

  1. Apply this diff to make the export button show.
diff --git a/ee/app/views/groups/security/compliance_dashboards/show.html.haml b/ee/app/views/groups/security/compliance_dashboards/show.html.haml
index 17aa1321d5f7..3e5630e59757 100644
--- a/ee/app/views/groups/security/compliance_dashboards/show.html.haml
+++ b/ee/app/views/groups/security/compliance_dashboards/show.html.haml
@@ -3,6 +3,7 @@
 
 #js-compliance-report{ data: {
   can_add_edit: @group.subgroup? ? "false" : "true",
+  violations_csv_export_path: group_security_compliance_framework_reports_path(@group, format: :csv),
   frameworks_csv_export_path: group_security_compliance_framework_reports_path(@group, format: :csv),
   merge_commits_csv_export_path: group_security_merge_commit_reports_path(@group),
   group_path: @group.full_path,
  1. Navigate to a group, then Secure -> Compliance report

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Sam Figueroa

Merge request reports