Maintenance mode displays a banner message
What does this MR do?
This MR adds a banner message when the instance is in maintenance mode.
No changelog required here since this feature is behind a feature flag.
We might want to wait on merging this until the actual changes are in that will make the instance read-only.
For now only an initial review is needed. Please don't pass to a maintainer yet.
Here is the expected output when multiple conditions hold for showing banners. For now we have decided to stack them up. *Some of the screenshots follow:
Case | Maintenance mode | DB read only(read-only instance) | Secondary | Message |
---|---|---|---|---|
1* | true | true | true | secondary + maintenance mode |
2* | true | true | false | read-only instance + maintenance mode |
3. | true | false | true | can't happen |
4* | true | false | false | maintenance mode |
5. | false | true | true | secondary, as before |
6. | false | true | false | read-only instance, as before |
7. | false | false | true | can't happen |
8. | false | false | false | no banner |
Related issue: #217893 (closed)
Screenshots
Case 1
Case 2
Case 4
Default banner
User set banner message
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by Aakriti Gupta