Async import components on package details page

What does this MR do and why?

Async import components on package details page

package_versions_list is rendered under a tab so it does not need to be part of the main bundle.

package_files renders GlTable, is below the fold and as part of !120828 (merged) will be rendered through its own query.

Screenshots or screen recordings

No change in UI

How to set up and validate locally

Premise:

  1. Visit package registry detail page via groups & projects package list page.
  2. Check that files table & versions tab gets loaded

Steps for npm:

  1. rails c - Open the rails console
  2. p = Project.find(1) - Find one of your GDK projects. Project id can be found on the project home page
  3. FactoryBot.create_list(:npm_package, 25, project: p, name: p.name) - Creates 25 npm packages
  4. Add this line if above fails during the creation of files
     def fixture_file_upload(*args, **kwargs)
       Rack::Test::UploadedFile.new(*args, **kwargs)
     end

Steps for generic packages with lot of files:

  1. Use the following command for i in {1..125}; do curl --header "PRIVATE-TOKEN: BSJ3_whVvzU8jSjzGPtQ" --upload-file $PWD/<filename> "http://172.16.123.1:3000/api/v4/projects/<project-id>/packages/generic/<package-name>/<version>/<filename>"; done to upload 125 package files.
    1. Replace token, project-id, package-name, version, filename

You can also try publishing different types of packages, as mentioned in https://gitlab.com/gitlab-org/ci-cd/package-stage/package/-/wikis/Packages-Tips-&-Tricks.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Rahul Chanila

Merge request reports

Loading