cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

UI: Add option to Login to a specific Project view via setting on config.json

Open nvazquez opened this issue 7 months ago • 19 comments

Description

This PR adds a new setting on the config.json file:

  • displayProjectFieldOnLogin - false by default to preserve the current behavior.
  • When set to true: the project option is displayed on the login page. The user is logged in to the project view directly instead of the Default View

Documentation PR: https://github.com/apache/cloudstack-documentation/pull/515

Screenshot 2025-05-30 at 14 36 02

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
  • [ ] Minor
  • [ ] Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

  • Create project

  • Login setting the project field on the login page: Screenshot 2025-05-30 at 12 42 37

  • Observe the page view is correctly set on login: Screenshot 2025-05-30 at 12 43 52

nvazquez avatar May 30 '25 15:05 nvazquez

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 16.60%. Comparing base (bce17b6) to head (f1b5f63). Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main   #10935   +/-   ##
=========================================
  Coverage     16.60%   16.60%           
+ Complexity    13925    13924    -1     
=========================================
  Files          5729     5729           
  Lines        508070   508083   +13     
  Branches      61769    61771    +2     
=========================================
+ Hits          84370    84373    +3     
- Misses       414271   414282   +11     
+ Partials       9429     9428    -1     
Flag Coverage Δ
uitests 3.93% <ø> (-0.01%) :arrow_down:
unittests 17.49% <ø> (+<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.

: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.

codecov[bot] avatar May 30 '25 15:05 codecov[bot]

@blueorangutan ui

nvazquez avatar May 30 '25 18:05 nvazquez

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

blueorangutan avatar May 30 '25 18:05 blueorangutan

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

blueorangutan avatar May 30 '25 18:05 blueorangutan

Probably not a good idea? Instead this could be an account level setting, why do we want this?

rohityadavcloud avatar Jun 02 '25 17:06 rohityadavcloud

Probably not a good idea? Instead this could be an account level setting, why do we want this?

I don’t understand you remark @rohityadavcloud , an account can participate in tons of projects and may want to log into a specific one from the start. Admitted it is a bit of candy, but why not a good idea?

DaanHoogland avatar Jun 03 '25 07:06 DaanHoogland

Sorry @rohityadavcloud why is it not good idea? In my point of view it improves usability on the UI but not seeing the downside

nvazquez avatar Jun 03 '25 09:06 nvazquez

I don't think this is a good UX/design - most users won't remember their project names. At least most shouldn't want to see this by default, could we wrap in some UI config i.e. disabled by default? Also check the 2FA UI, this could potentially break when 2FA is enabled.

rohityadavcloud avatar Jun 03 '25 10:06 rohityadavcloud

Thanks @rohityadavcloud - I have refactored the PR to be optional and disabled by default. Admins have to toggle a key on the config.json file to display the project field on login

nvazquez avatar Jun 03 '25 11:06 nvazquez

@blueorangutan ui

nvazquez avatar Jun 03 '25 13:06 nvazquez

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

blueorangutan avatar Jun 03 '25 13:06 blueorangutan

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

blueorangutan avatar Jun 03 '25 13: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 Jun 10 '25 11:06 github-actions[bot]

@blueorangutan ui

nvazquez avatar Jun 10 '25 11:06 nvazquez

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

blueorangutan avatar Jun 10 '25 11:06 blueorangutan

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

blueorangutan avatar Jun 10 '25 11:06 blueorangutan

@blueorangutan package

nvazquez avatar Jun 10 '25 12:06 nvazquez

@nvazquez 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 Jun 10 '25 12:06 blueorangutan

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

blueorangutan avatar Jun 10 '25 13:06 blueorangutan