open-consul/ui-v2/app/services
John Cowen 40e632a955
ui: Enable recovery from an unreachable datacenter (500 error) (#7404)
For URL maintenance reasons we store the last visited DC in
localStorage incase you come back to a page (for example settings) that
doesn't have a dc in the URL.

A problem arises here if the last DC you tried to visit is unreachable.

The first fix here clears out the last visited DC from localStorage if
the API has errored out.

Secondly, our `href-mut` helper which mutates the current current and
replaces 'parts' in the URL rather than the whole thing functioned by
detecting the current route/URL you are on an 'mutating' that. A problem
arose here as even though you might be on the `/ui/dc-1/services` URL the
actual route is the 'error' route which does not have a URL that can be
changed properly.

The second fix here uses route.currentRoute.name over route.currentRouteName.

The latter is equal to error when an error occurs whereas the former gives you the name of the route before the error happened, which is actually what we want/the intent here.

ie. when `router.currentRouteName === 'error'` then
`router.currentRoute.name === Name Of Route Before It Errored` it seems
2020-03-09 09:10:47 +00:00
..
client ui: Use options.method for keying not options.type (#7308) 2020-02-18 14:03:27 +00:00
clipboard ui: UI Release Merge (ui-staging merge) (#6527) 2019-09-30 14:47:49 +01:00
code-mirror ui: UI Release Merge (ui-staging merge) (#6527) 2019-09-30 14:47:49 +01:00
repository ui: Enable recovery from an unreachable datacenter (500 error) (#7404) 2020-03-09 09:10:47 +00:00
atob.js UI V2 (#4086) 2018-05-10 19:52:53 +01:00
btoa.js UI V2 (#4086) 2018-05-10 19:52:53 +01:00
data-structs.js ui: Discovery Chain (#6746) 2019-12-18 12:26:47 +00:00
dom-buffer.js ui: fix production build only empty role modal (#5806) 2019-05-08 10:01:26 +01:00
dom.js ui: Discovery Chain (#6746) 2019-12-18 12:26:47 +00:00
feedback.js ui: UI Release Merge (ui-staging merge) (#6527) 2019-09-30 14:47:49 +01:00
form.js UI: ACL Roles (#5635) 2019-05-01 18:22:37 +00:00
lazy-proxy.js ui: UI Release Merge (ui-staging merge) (#6527) 2019-09-30 14:47:49 +01:00
logger.js WIP: Logger 2018-06-25 12:25:14 -07:00
repository.js ui: Namespace Support (#6639) 2019-12-18 12:26:47 +00:00
search.js UI: ACL Roles (#5635) 2019-05-01 18:22:37 +00:00
settings.js ui: UI Release Merge (ui-staging merge) (#6527) 2019-09-30 14:47:49 +01:00
store.js ui: Namespace Support (#6639) 2019-12-18 12:26:47 +00:00
ticker.js ui: Discovery Chain (#6746) 2019-12-18 12:26:47 +00:00
timeout.js ui: Adds tick whilst editing the link template in the Settings area (#5820) 2019-05-17 12:33:12 +01:00