open-vault/ui/app/templates/components/token-expire-warning.hbs
2018-12-10 11:44:37 -05:00

16 lines
470 B
Handlebars

{{#if (and expirationDate (is-after (now interval=1000) expirationDate))}}
<div class="token-expire-warning">
<AlertBanner
@type="danger"
@message="Your auth token expired on
{{date-format expirationDate "MMMM Do YYYY, h:mm:ss a"}}
. You will need to re-authenticate."
>
{{#link-to "vault.cluster.logout" class="button link"}}
Reauthenticate
{{/link-to}}
</AlertBanner>
</div>
{{else}}
{{yield}}
{{/if}}