UI: Fix missing nav links on namespace login (#12478)

* Override loading behavior which breaks query params passed to API calls

* Only show loading state if transition is not queryparams only

* Add changelog

* Skip loader if testing
This commit is contained in:
Chelsea Shaw 2021-09-03 13:46:50 -05:00 committed by GitHub
parent 88125d41ac
commit 4f8d490419
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 12 deletions

3
changelog/12478.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:fix
ui: fix missing navbar items on login to namespace
```

View File

@ -110,5 +110,17 @@ export default Route.extend(ModelBoundaryRoute, ClusterRoute, {
}
return true;
},
loading(transition) {
if (transition.queryParamsOnly || Ember.testing) {
return;
}
// eslint-disable-next-line ember/no-controller-access-in-routes
let controller = this.controllerFor('vault.cluster');
controller.set('currentlyLoading', true);
transition.finally(function() {
controller.set('currentlyLoading', false);
});
},
},
});

View File

@ -113,16 +113,20 @@
{{/flash-message}}
{{/each}}
</div>
{{#if showNav}}
<UiWizard>
<section class="section">
<div class="container is-widescreen">
<TokenExpireWarning @expirationDate={{auth.tokenExpirationDate}}>
{{outlet}}
</TokenExpireWarning>
</div>
</section>
</UiWizard>
{{#if currentlyLoading}}
<LogoSplash />
{{else}}
{{outlet}}
{{/if}}
{{#if showNav}}
<UiWizard>
<section class="section">
<div class="container is-widescreen">
<TokenExpireWarning @expirationDate={{auth.tokenExpirationDate}}>
{{outlet}}
</TokenExpireWarning>
</div>
</section>
</UiWizard>
{{else}}
{{outlet}}
{{/if}}
{{/if}}