Replace registries index with registries and upstreams index route
What does this MR do and why?
Replace registries index with registries and upstreams index route
Update routes for Maven registries and upstreams
Updated routes:
- Route changed from
/maven/<id>to/maven/registries/<id>. - Route changed from
/maven/<id>to/maven/upstreams/<id>.
Updated breadcrumbs
- Breadcrumb changed from
Maven virtual registriestoMaven registries and upstreams. - Breadcrumb changed from
Maven > <id>toMaven registries > <id>. - Breadcrumb changed from
Maven > Upstreams > <id>toMaven upstreams > <id>.
The breadcrumbs Maven registries and Maven upstreams point to the same link for now & will be updated to point to the upstreams tab in the follow-up MRs
This is prep for Maven virtual registry Upstreams list view (#556837 - closed)
EE: true
AI summary
This code change reorganizes the Maven virtual registry feature by combining the separate "registries" and "upstreams" pages into a single unified page called "registries and upstreams".
The main changes include:
- Creating a new controller and page that shows both registries and upstreams together in one view
- Removing the old separate index page for just registries
- Updating all navigation links, breadcrumbs, and redirects to point to the new combined page
- Moving the JavaScript file to match the new page structure
- Updating the URL routing to reflect the new page organization
- Modifying test files to test the new combined functionality instead of the old separate pages
The end result is a cleaner user experience where users can see and manage both Maven registries and their upstream sources from a single location, rather than having to navigate between separate pages. All the existing functionality for creating, editing, and deleting registries remains the same - it's just organized differently in the user interface.
References
Screenshots or screen recordings
Notice the change in routes & breadcrumb
How to set up and validate locally
- Ensure you have enabled the following feature flags
$ gdk rails console
Feature.enable(:maven_virtual_registry)
Feature.enable(:ui_for_virtual_registries)
-
Go to a top-level group
-
Go to
Deploy -> Virtual Registry -
Create a new maven registry
-
Click on the
Add upstreambutton -
The required fields are
name,url. For the URL, you can usehttps://repo.maven.apache.org/maven2 -
Click on
Create upstream -
Visit the upstream details
groups/<group>/-/virtual_registries/maven/upstreams/<upstream-id> -
Confirm that empty state is displayed
-
Run the script to generate lot of upstream entries
group = Group.find(<id>) upstream = VirtualRegistries::Packages::Maven::Upstream.find(<id>) 40.times do |i| components = ['com', 'org', 'net', 'io'].sample project = ['example', 'test', 'demo', 'sample', 'library'].sample artifact = ['core', 'api', 'client', 'utils', 'common'].sample version = "#{rand(1..5)}.#{rand(0..9)}.#{rand(0..9)}" relative_path = "/#{components}/#{project}/#{artifact}/#{version}/#{artifact}-#{version}.jar" storage_key = "cache-entry-#{Time.now.to_i}-#{i}-#{SecureRandom.hex(8)}" VirtualRegistries::Packages::Maven::Cache::Entry.create!( group: group, upstream: upstream, relative_path: relative_path, size: rand(10..1000), file: Tempfile.new("cache-#{i}"), file_sha1: SecureRandom.hex(20), object_storage_key: storage_key ) end -
Go through registry new, edit & show pages to confirm that routing, breadcrumb & routes are updated.
-
Go through upstream show & edit pages to confirm that breadcrumb & routes are updated.
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 #556837 (closed)






