cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

UI: Notify users when upgrades are available or restart is required

Open vishesh92 opened this issue 2 years ago • 42 comments

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

image

New release available for cloudstack

Details

image

Restart required notification

Details

image

Show in UI that a restart is required

Details

image

Add filter on restart required

Details

image

How Has This Been Tested?

vishesh92 avatar Jun 09 '23 04:06 vishesh92

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.

codecov[bot] avatar Jun 09 '23 05:06 codecov[bot]

Replaced notification with an alert component. image

vishesh92 avatar Jun 12 '23 04:06 vishesh92

@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 avatar Jun 15 '23 08:06 rohityadavcloud

@rohityadavcloud a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Jun 15 '23 08:06 blueorangutan

@rohityadavcloud I manually changed the value of restartrequired in database to true to test this. Version check should work with 4.19-SNAPSHOT.

vishesh92 avatar Jun 15 '23 08:06 vishesh92

UI build: :heavy_check_mark: Live QA URL: https://qa.cloudstack.cloud/simulator/pr/7610 (QA-JID-121)

blueorangutan avatar Jun 15 '23 08:06 blueorangutan

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

github-actions[bot] avatar Aug 16 '23 16:08 github-actions[bot]

@vishesh92 can you please look into merge conflicts and outstanding comments? SHould this be considered for 4.19?

shwstppr avatar Oct 10 '23 11:10 shwstppr

@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 avatar Oct 10 '23 12:10 vishesh92

@vishesh92 Is this PR targeted for 4.19.1? If so, please rebase and update target branch.

sureshanaparti avatar Mar 12 '24 10:03 sureshanaparti

@vishesh92 Please resolve the conflicts, & check/address the comments. Thanks.

sureshanaparti avatar Jun 23 '24 15:06 sureshanaparti

@blueorangutan package

vishesh92 avatar Aug 07 '24 05:08 vishesh92

@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 avatar Aug 07 '24 05:08 blueorangutan

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10590

blueorangutan avatar Aug 07 '24 06:08 blueorangutan

@blueorangutan ui

vishesh92 avatar Aug 07 '24 07:08 vishesh92

@vishesh92 a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Aug 07 '24 07:08 blueorangutan

@blueorangutan ui

vishesh92 avatar Aug 11 '24 13:08 vishesh92

@vishesh92 a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Aug 11 '24 13:08 blueorangutan

UI build: :heavy_check_mark: Live QA URL: https://qa.cloudstack.cloud/simulator/pr/7610 (QA-JID-417)

blueorangutan avatar Aug 11 '24 13:08 blueorangutan

@blueorangutan package

vishesh92 avatar Aug 11 '24 14:08 vishesh92

@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 avatar Aug 11 '24 14:08 blueorangutan

@blueorangutan ui

vishesh92 avatar Aug 11 '24 14:08 vishesh92

@vishesh92 a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Aug 11 '24 14:08 blueorangutan

UI build: :heavy_check_mark: Live QA URL: https://qa.cloudstack.cloud/simulator/pr/7610 (QA-JID-418)

blueorangutan avatar Aug 11 '24 14:08 blueorangutan

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10605

blueorangutan avatar Aug 11 '24 15:08 blueorangutan

@blueorangutan package

vishesh92 avatar Aug 11 '24 16:08 vishesh92

@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 avatar Aug 11 '24 16:08 blueorangutan

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10609

blueorangutan avatar Aug 11 '24 17:08 blueorangutan

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

github-actions[bot] avatar Aug 12 '24 18:08 github-actions[bot]

@blueorangutan package

vishesh92 avatar Aug 12 '24 18:08 vishesh92