open-vault/ui/app/templates/components/namespace-link.hbs
Matthew Irish 88cf9e6a76
clear namespaces on logout and properly render nested namespaces in the namepace picker (#7186)
* reset namespace cache when a user logs out

* fix issue where if you log in to a namespace with an initial /, nested namespaces would not show up in the navigation

* set an empty list of namespaces instead of ignoring error

* add tests for namespace bugs

* use this consistently in template
2019-08-01 16:53:57 -05:00

19 lines
563 B
Handlebars

<LinkTo
@params={{array "vault.cluster.secrets" (query-params namespace=this.normalizedNamespace)}}
class={{concat "is-block " class}}
data-test-namespace-link={{this.normalizedNamespace}}
>
{{#if (has-block)}}
{{yield}}
{{else}}
<div class="level is-mobile">
<span class="level-left">{{this.namespaceDisplay}}</span>
<span class="level-right">
<button type="button" class="button is-ghost icon">
<Chevron @isButton={{true}} class="has-text-grey" />
</button>
</span>
</div>
{{/if}}
</LinkTo>