Show banner when search indices are detected as read-only
What does this MR do and why?
This MR adds a warning to the Search page to check if any of the indices are read-only.
Closes #353108
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
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
-
Set up GDK with Elasticsearch
-
Start, Index, and Enable Elasticsearch per the
Setup
instructions -
Go to the Admin Area > Settings > Search and verify that there are no alerts
-
Put one of the indices into read-only mode by doing the following:
curl -H 'Content-Type: application/json' -XPUT "http://localhost:9200/gitlab-development-users/_settings" -d '{ "index.blocks.read_only" : "true" }'
-
Refresh the Advanced Search page in GDK and verify that the alert shows that it is in read-only and it lists the one index.
-
Put other indices into read-only and verify that all affected indices are listed.
-
Set all affected indices to
false
to disable read-only and verify the alert goes away.