Show security reports summary in pipelines' Security Dashboard - Frontend
- Related issue: #214387 (closed)
What does this MR do?
This MR adds the ability to show security report summaries in the Pipeline Security Dashboard's report type filter.
Screenshots
Before | After |
---|---|
How to test this?
There are two ways of testing this depending on whether the backend part is ready or not.
If the backend is done
Enable the feature flag:
echo "Feature.enable(:pipelines_security_report_summary)" | spring rails c
If the backend isn't ready yet
Mock some data to be fed to the filters:
diff --git a/ee/app/assets/javascripts/security_dashboard/components/security_dashboard_vuex.vue b/ee/app/assets/javascripts/security_dashboard/components/security_dashboard_vuex.vue
index 3caa336a301..0993c7fdc56 100644
--- a/ee/app/assets/javascripts/security_dashboard/components/security_dashboard_vuex.vue
+++ b/ee/app/assets/javascripts/security_dashboard/components/security_dashboard_vuex.vue
@@ -64,7 +64,21 @@ export default {
securityReportSummary: {
type: Object,
required: false,
- default: () => ({}),
+ default: () => ({
+ containerScanning: {
+ vulnerabilitiesCount: 467,
+ },
+ dependencyScanning: {
+ vulnerabilitiesCount: 354,
+ },
+ sast: {
+ vulnerabilitiesCount: 470,
+ },
+ dast: {
+ vulnerabilitiesCount: 789,
+ scannedResourcesCount: 56,
+ }
+ }),
},
},
computed: {
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry (not required as this is behind a feature flag)
- [-] Documentation (if required)
-
Code review guidelines - [-] Merge request performance guidelines
-
Style guides - [-] Database guides
-
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Edited by Paul Gascou-Vaillancourt