Skip to content

Format total count of runners in tabs by locale

Miguel Rincon requested to merge 346919-format-numbers-runner-tabs into master

What does this MR do and why?

This change formats the total count of each type of runner in the tabs with a thousands separator according to the current user locale.

Changelog: changed

Screenshots or screen recordings

before after (mocked)
image image

How to set up and validate locally

I used mock numbers to display the formatting

  1. With many runners available... or with mock data:
Diff to change data
diff --git a/app/assets/javascripts/runner/admin_runners/admin_runners_app.vue b/app/assets/javascripts/runner/admin_runners/admin_runners_app.vue
index 3366942f6ad..844186537ca 100644
--- a/app/assets/javascripts/runner/admin_runners/admin_runners_app.vue
+++ b/app/assets/javascripts/runner/admin_runners/admin_runners_app.vue
@@ -102,6 +102,9 @@ export default {
       variables() {
         return this.countVariables;
       },
+      update(data) {
+        return 63153;
+      },
     },
     instanceRunnersCount: {
       ...runnersCountSmartQuery,
@@ -111,6 +114,9 @@ export default {
           type: INSTANCE_TYPE,
         };
       },
+      update(data) {
+        return 23;
+      },
     },
     groupRunnersCount: {
       ...runnersCountSmartQuery,
@@ -120,6 +126,9 @@ export default {
           type: GROUP_TYPE,
         };
       },
+      update(data) {
+        return 2054;
+      },
     },
     projectRunnersCount: {
       ...runnersCountSmartQuery,
@@ -129,6 +138,9 @@ export default {
           type: PROJECT_TYPE,
         };
       },
+      update(data) {
+        return 61076;
+      },
     },
   },
   computed: {
  1. Visit the admin runners page at http://gdk.test:3000/admin/runners.

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 #346919 (closed)

Edited by Miguel Rincon

Merge request reports