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:
parent
88125d41ac
commit
4f8d490419
|
@ -0,0 +1,3 @@
|
|||
```release-note:fix
|
||||
ui: fix missing navbar items on login to namespace
|
||||
```
|
|
@ -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);
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -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}}
|
Loading…
Reference in New Issue