Skip to content

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

  1. With some runners added (https://docs.gitlab.com/ee/ci/runners/runners_scope.html)

  2. In rails console ($ rails c) enable the the view runner page

    Feature.enable(:runner_read_only_admin_view)
  3. Visit Admin -> Runners e.g. http://gdk.test:3000/admin/runners

  4. 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.

Related to #347856 (closed)

Edited by Miguel Rincon

Merge request reports

Loading