Allow configuring Announcement banner by admin
Description
This PR enables Admin to configure UI Announcement banner containing message through config.json. HTML based message is supported apart from regular text
It can be configured by defining following section in config.json:
"announcementBanner": {
"enabled": true,
"showIcon": true,
"closable": true,
"persistDismissal": true,
"type": "warning",
"message": "<strong>Performance Notice:</strong> We're experiencing high load. Some operations may be slower than usual.",
"startDate": "2025-06-01T00:00:00Z",
"endDate": "2025-07-16T00:00:00Z"
}
Following types are supported:
- info
- warning
- error
To ensure banner is shown only once, enable the following config:
persistDismissal: true
Doc PR: https://github.com/apache/cloudstack-documentation/pull/517
Types of changes
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
- [ ] build/CI
- [ ] test (unit or integration test code)
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
- [ ] Major
- [ ] Minor
Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [x] Minor
- [ ] Trivial
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?
New npm dep (dompurify) is included to sanitize the html.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 16.57%. Comparing base (2d669db) to head (106757e).
:warning: Report is 225 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #10951 +/- ##
============================================
- Coverage 16.60% 16.57% -0.04%
- Complexity 13924 13969 +45
============================================
Files 5730 5744 +14
Lines 508082 510698 +2616
Branches 61770 62118 +348
============================================
+ Hits 84388 84647 +259
- Misses 414259 416580 +2321
- Partials 9435 9471 +36
| Flag | Coverage Δ | |
|---|---|---|
| uitests | 3.90% <ø> (-0.04%) |
:arrow_down: |
| unittests | 17.47% <ø> (-0.03%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
@blueorangutan ui
@sudo87 a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: https://qa.cloudstack.cloud/simulator/pr/10951 (QA-JID-637)
@blueorangutan package
@sudo87 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13635
@blueorangutan package
@sudo87 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13670
@blueorangutan ui
@shwstppr a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: https://qa.cloudstack.cloud/simulator/pr/10951 (QA-JID-643)
@sudo87 Found an issue. When the banner is not closed,
- Open a list view (e.g. projects) or details page (e.g. Public IP Address)
- On scrolling down, there is a gray area on top.
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
@blueorangutan package
@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.
Packaging result [SF]: ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 13744
@blueorangutan package @blueorangutan ui
@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with@blueorangutan ui SystemVM template(s). I'll keep you posted as I make progress.
@vishesh92 a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: https://qa.cloudstack.cloud/simulator/pr/10951 (QA-JID-646)
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13748
@blueorangutan package
@vladimirpetrov a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13936
@blueorangutan package
@sudo87 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14003
LGTM, thanks.