UI: Notify users when upgrades are available or restart is required
Description
This PR adds a feature in UI to notify when:
- a new version of CloudStack is available (only for admins)
- Custom alert message set in config.json
When the update is needed or the last update failed for the router, set network & vpc to restart required to true.
On login, if there are any networks or VPCs which need restart, insert a message in the notification panel.
This PR also adds a small UI improvement in the UI to show which network/UI requires restart and filtering networks/VPCs which require restart.
Types of changes
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
- [ ] Major
- [x] Minor
Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [ ] Minor
- [ ] Trivial
Screenshots (if appropriate):
Custom alert message (configured in config.json)
This is useful if the operator wants to display a custom message to the users. The operator needs to set the message by setting the value of alertMessage in the config.json. Type of message can be configured by alertMessageType in config.json. Possible values are success, info, warning and error.
Details
New release available for cloudstack
Details
Restart required notification
Details
Show in UI that a restart is required
Details
Add filter on restart required
Details
How Has This Been Tested?
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 15.57%. Comparing base (
a5f5560) to head (29410de). Report is 13 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #7610 +/- ##
===========================================
Coverage 15.57% 15.57%
- Complexity 12047 12048 +1
===========================================
Files 5505 5505
Lines 482621 482680 +59
Branches 61174 60013 -1161
===========================================
+ Hits 75176 75188 +12
- Misses 399141 399187 +46
- Partials 8304 8305 +1
| Flag | Coverage Δ | |
|---|---|---|
| uitests | 4.17% <ø> (+<0.01%) |
:arrow_up: |
| unittests | 16.35% <ø> (+<0.01%) |
:arrow_up: |
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.
Replaced notification with an alert component.
@vishesh92 I suppose this a screenshot for admin; a user I would prefer a single alert (too many makes the UI look poor). Click that could open a form with more details. Also, can we merge notification for both guest networks and VPCs? (for the end user these are just networks.
Alternatively; you can display as part of the dashboard (perhaps not top of the UI) - let's discuss. Let me try if the demo env can be used to test changes for further feedback.
@blueorangutan ui
@rohityadavcloud a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
@rohityadavcloud I manually changed the value of restartrequired in database to true to test this. Version check should work with 4.19-SNAPSHOT.
UI build: :heavy_check_mark: Live QA URL: https://qa.cloudstack.cloud/simulator/pr/7610 (QA-JID-121)
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
@vishesh92 can you please look into merge conflicts and outstanding comments? SHould this be considered for 4.19?
@shwstppr Have some changes that needs to be done. Leaving this PR for 4.19.1 or 4.20. I will update the milestone.
@vishesh92 Is this PR targeted for 4.19.1? If so, please rebase and update target branch.
@vishesh92 Please resolve the conflicts, & check/address the comments. Thanks.
@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 10590
@blueorangutan ui
@vishesh92 a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
@blueorangutan ui
@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/7610 (QA-JID-417)
@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.
@blueorangutan ui
@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/7610 (QA-JID-418)
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10605
@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 10609
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
@blueorangutan package