Refactor runner utils functions
What does this MR do and why?
This MR refactors some of the runners list and pagination logic into smaller functions that can be tested in isolation:
formatJobCount
tableField
getPaginationVariables
This MR is parent of !80380 (merged), where the need for these functions is more obvious.
Screenshots or screen recordings
N/A
How to set up and validate locally
-
With some runners added (https://docs.gitlab.com/ee/ci/runners/runners_scope.html)
-
In rails console (
$ rails c
) enable the the view runner pageFeature.enable(:runner_read_only_admin_view)
-
Visit
Admin -> Runners
e.g.http://gdk.test:3000/admin/runners
-
Visit any Runner e.g.
http://gdk.test:3000/admin/runners/1
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 #347856 (closed)
Edited by Miguel Rincon