jmsperu opened a new pull request, #14920:
URL: https://github.com/apache/cloudstack/pull/14920
### Description
Fixes: #14847
On a fresh login `GetInfo` starts `listZones` and `listApis` in parallel and
generates the routes as soon as `listApis` (and the capabilities) return. If
`listZones` has not returned yet, the zones in the store are still the initial
value `{}`, and the menu checks that call `store.getters.zones.filter(...)`
throw `zones.filter is not a function`. The UI stays empty until a reload, when
the zones come from local storage.
This PR:
- starts the `zones` state as an empty list, the same type that `SET_ZONES`
and the cached value use
- generates the routes only after the zones are stored, so the menu items
that depend on zones are not hidden on first login
### Types of changes
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [x] 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)
### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [x] Major
- [ ] Minor
- [ ] Trivial
### How Has This Been Tested?
By code review only so far; not yet run in a browser. I will test it against
a lab management server with a User role that has a short API list and report
here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]