Protected packages: Show alert message on fetching error
requested to merge gitlab-community/gitlab:413641-gerardo-navarro-protected-packages-add-project-settings-ui-follow-up-show-alert-for-fetching-error into master
What does this MR do and why?
Protected packages: Show alert message on fetching error
- Showing error message in alert when fetching package protection rules fails
- Removing unnecessary state variable
fetchSettingsError
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
MR Checklist (@gerardo-navarro)
-
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the javascript style guides -
Conforms to the database guides
Screenshots or screen recordings
When an error occurs while fetching the package protection rules, then we show this alert with the message.
How to set up and validate locally
- Create some package protections rule via
rails c
25.times { |i| Packages::Protection::Rule.create(project: Project.find(7), package_name_pattern: "flightjs/flight-#{i}", push_protected_up_to_access_level: :maintainer) }
- Go to http://gdk.test:3000/flightjs/Flight/-/settings/packages_and_registries
- In the network of the browser's dev tools, you can disable networking (top right)
- Click on the button "Next" in the pagination navigation to load the next page
- You should see the alert message appear
Related to #413641
Edited by Gerardo Navarro