Skip to content

Adds pagination to maven virtual registries list page

What does this MR do and why?

Adds pagination to maven virtual registries list page

Replace REST API with GraphQL query

Handles URL params & browser back button

EE: true

References

Screenshots or screen recordings

Before After
172.16.123.1_3000_groups_kalcifer_-_virtual_registries_maven_before_eyJpZCI6IjIwIn0 Screenshot_2025-08-08_at_1.52.13_pm

How to set up and validate locally

  1. Ensure you have enabled the following feature flags
$ gdk rails console
Feature.enable(:maven_virtual_registry)
Feature.enable(:ui_for_virtual_registries)
  1. Go to a top-level group
  2. Create 20 virtual registries
g = Group.find(<root-group-id>) 
20.times.each { |i|  VirtualRegistries::Packages::Maven::Registry.create(group: g, name: "maven registry #{i}") }
  1. Go to Deploy -> Virtual Registry -> Maven
  2. Apply diff to see pagination by 5 items since default is 20 & the limit is 20:
diff --git a/ee/app/assets/javascripts/packages_and_registries/virtual_registries/maven/registries_list_app.vue b/ee/app/assets/javascripts/packages_and_registries/virtual_registries/maven/registries_list_app.vue
index 3feb3186fe5b..209f0a664561 100644
--- a/ee/app/assets/javascripts/packages_and_registries/virtual_registries/maven/registries_list_app.vue
+++ b/ee/app/assets/javascripts/packages_and_registries/virtual_registries/maven/registries_list_app.vue
@@ -7,7 +7,7 @@ import MavenRegistryItem from 'ee/packages_and_registries/virtual_registries/com
 import getMavenVirtualRegistries from '../graphql/queries/get_maven_virtual_registries.query.graphql';
 import { captureException } from '../sentry_utils';
 
-const PAGE_SIZE = 20;
+const PAGE_SIZE = 5;
 
 export default {
   name: 'MavenRegistriesListApp',

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #559044 (closed)

Edited by Rahul Chanila

Merge request reports

Loading