UI: Add option to Login to a specific Project view via setting on config.json
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
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:
-
Observe the page view is correctly set on login:
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.
@blueorangutan ui
@nvazquez 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/10935 (QA-JID-633)
Probably not a good idea? Instead this could be an account level setting, why do we want this?
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?
Sorry @rohityadavcloud why is it not good idea? In my point of view it improves usability on the UI but not seeing the downside
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.
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
@blueorangutan ui
@nvazquez 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/10935 (QA-JID-635)
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
@blueorangutan ui
@nvazquez 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/10935 (QA-JID-642)
@blueorangutan package
@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.
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13693