Commit Graph

19 Commits

Author SHA1 Message Date
Michael Lange 4736803a24 ES5 getters codemod 2019-04-10 14:54:36 -07:00
Michael Lange ec21bab24d
Merge pull request #4833 from hashicorp/b-ui-gracefully-handle-stat-errors
UI: Gracefully handle stat errors
2018-11-09 14:35:48 -08:00
Michael Lange 36fed0919d Move jsonWithDefault to a util 2018-11-01 22:07:58 -07:00
Michael Lange 7cd8179637 Test coverage for breadcrumb qp change 2018-10-31 13:27:35 -07:00
Michael Lange 9f3a37f1c2 Simplify the control flow around changing namespaces and regions
The UI will no longer try to redirect to the appropriate namespace or
region if one is found in localStorage. Instead, it will assume that
the lack of query param means the default namespaces or region is
desired.
2018-08-09 18:22:39 -07:00
Michael Lange 6e2bb48fd5 Handle errors when getting regions or the default regions
This protects against volatility in the server and, more commonly, ACLs
returning forbidden responses.
2018-08-09 18:22:39 -07:00
Michael Lange 3180e57138 Only deal with the region param (in the app and in api calls) when necessary 2018-08-09 18:22:39 -07:00
Michael Lange c4c79c7a1f Get the server's region (aka default region) from the API
The default region shouldn't be used as a qp since no qp means the same
thing.
2018-08-09 18:22:38 -07:00
Michael Lange 0cfeba49d7 Add the region qp to all requests made through the token service 2018-08-09 18:22:38 -07:00
Michael Lange 93f41278b1 Clear up the data flow for namespaces
This is incredibly tricky with query params, since there is a bundle of
timing issues, lifecycle issues, missing features, and all around
gotchas with query params.

This solution has no observers and no instances of the system service
being set from the jobs controller.

The upside to this is no observers, much easier to follow logic, no more
dependent key chain reactions.
2018-08-09 18:22:38 -07:00
Michael Lange a430baba4f Harden up the system service for the event of store unloading 2018-08-09 18:22:37 -07:00
Michael Lange 2bb770361b Add three-way region property (query param, service, localStorage) 2018-08-09 18:22:37 -07:00
Michael Lange dbf4b6c242 Clear out the localStorage namespace when it's no longer valid
In the event that a namespace in localStorage is not found in the
response for /namespaces, clear the localStorage value and assume
the default namespace.
2018-03-28 14:55:07 -07:00
Michael Lange 1107798da6 Use the new ember modules imports
Generated with a codemode:
https://github.com/ember-cli/ember-modules-codemod
2018-01-17 09:02:04 -08:00
Michael Lange d967a9eb30 Redo the logic around showing namespaces
Don't show namespaces if the only namespace is `default`
2017-10-23 17:42:36 -07:00
Michael Lange 2340504da8 Replace simple dropdown namespace switcher with ember-power-select 2017-10-11 13:45:03 -07:00
Michael Lange 3a0d292337 Add namespaces and active namespace to the system service 2017-10-11 13:45:03 -07:00
Michael Lange 3bb0a9779c Make sure to qualify requests made outside of adapters 2017-10-11 13:45:03 -07:00
Alex Dadgar e5ec915ac3 sync 2017-09-19 10:08:23 -05:00