UI: remove stored token if cluster needs init (#26985)

This commit is contained in:
Chelsea Shaw
2024-05-13 12:07:29 -05:00
committed by GitHub
parent c6af47f77e
commit 1fa8b1f4cf
2 changed files with 7 additions and 0 deletions

3
changelog/26985.txt Normal file
View File

@@ -0,0 +1,3 @@
```release-note:bug
ui: Prevent perpetual loading screen when Vault needs initialization
```

View File

@@ -123,6 +123,10 @@ export default Route.extend(ModelBoundaryRoute, ClusterRoute, {
afterModel(model, transition) {
this._super(...arguments);
this.currentCluster.setCluster(model);
if (model.needsInit && this.auth.currentToken) {
// clear token to prevent infinite load state
this.auth.deleteCurrentToken();
}
// Check that namespaces is enabled and if not,
// clear the namespace by transition to this route w/o it