open-vault/ui/app/templates/components/token-expire-warning.hbs
2018-11-20 15:15:52 -08:00

12 lines
437 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}}