Count on-demand scans with PipelineScopeCounts
What does this MR do and why?
This leverages the PipelineScopeCounts
module to get pipelines counts in the on-demand scans index page. This affects both the HAML view–that passes the counts down to properly initialize the app–and the Vue app that polls for updated counts.
This also takes the queries' limits into account by appending a +
to the counts when the limit has been hit.
Screenshots or screen recordings
Before | After (no visual change) | After (limits) |
---|---|---|
How to set up and validate locally
-
Navigate to the on-demand scans index page at
/:namespace/:project/-/on_demand_scans
. -
If you don't have enough data for the items limits to be hit, you can override them client-side by applying this patch:
diff --git a/ee/app/assets/javascripts/on_demand_scans/components/on_demand_scans.vue b/ee/app/assets/javascripts/on_demand_scans/components/on_demand_scans.vue index c0f7541e7c3..6651305a90a 100644 --- a/ee/app/assets/javascripts/on_demand_scans/components/on_demand_scans.vue +++ b/ee/app/assets/javascripts/on_demand_scans/components/on_demand_scans.vue @@ -92,23 +92,23 @@ export default { return { all: { component: AllTab, - itemsCount: this.onDemandScanCounts.all, + itemsCount: 1000, }, running: { component: RunningTab, - itemsCount: this.onDemandScanCounts.running, + itemsCount: 1000, }, finished: { component: FinishedTab, - itemsCount: this.onDemandScanCounts.finished, + itemsCount: 1000, }, scheduled: { component: ScheduledTab, - itemsCount: this.onDemandScanCounts.scheduled, + itemsCount: 100, }, saved: { component: SavedTab, - itemsCount: this.onDemandScanCounts.saved, + itemsCount: 100, }, }; },
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #346284 (closed)
Edited by Paul Gascou-Vaillancourt