Add metadata database alert to registry pages in the UI
What does this MR do and why?
Add metadata database alert to registry pages in the UI
Adds new shared alert component which is imported in:
- container registry list page for groups & projects
- project packages & registries settings
Implementation is similar to !100784 (merged) not be blocked by backend we store that the alert was dismissed in a cookie value but if the user logs into the page in a different browser they will see the alert again.
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.
Screenshots or screen recordings
Before | After |
---|---|
No alert | |
No alert |
How to set up and validate locally
-
Setup & enable Container Registry https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/registry.md
-
Make sure to enable the metadata database https://gitlab.com/gitlab-org/container-registry/-/blob/master/docs/database-local-setup.md?ref_type=heads
-
Follow steps in https://gitlab.com/gitlab-org/ci-cd/package-stage/package/-/wikis/Packages-Tips-&-Tricks#how-to-add-images-with-tags-quickly-to-the-registry
-
Run the following in the terminal
$ ./publish.sh <project-path> 5 1 127.0.0.1:5000 # creates 1 image with 5 tags
-
Visit the container registry image list page in group & project view
-
Confirm that alert is displayed & closing the alert does not show up anymore when refreshed.
-
Clear the cookie
hide_metadata_database_alert
& visitProject > Settings > Packages & Registries
-
Confirm that alert is displayed & closing the alert does not show up anymore when refreshed.
-
Enable the metadata database https://gitlab.com/gitlab-org/container-registry/-/blob/master/docs/database-local-setup.md?ref_type=heads
-
Confirm that alert is not displayed in container registry image list page in group & project view and under
Project > Settings > Packages & Registries
Related to #442701 (closed)