2018-05-25 15:36:23 +00:00
|
|
|
<div class="popup-menu-content">
|
|
|
|
<div class="box">
|
|
|
|
<div class="menu-label">
|
2018-04-03 14:16:57 +00:00
|
|
|
{{auth.authData.displayName}}
|
2018-05-25 15:36:23 +00:00
|
|
|
</div>
|
|
|
|
<nav class="menu">
|
|
|
|
<ul class="menu-list">
|
2018-11-05 16:56:59 +00:00
|
|
|
{{#if canExpire}}
|
|
|
|
<li class="action">
|
2018-11-14 00:55:07 +00:00
|
|
|
<AlertBanner @type="warning" @message="We've stopped auto-renewing your token due to inactivity.
|
|
|
|
It will expire in {{date-from-now auth.tokenExpirationDate interval=1000 hideSuffix=true}}.
|
|
|
|
on {{date-format auth.tokenExpirationDate 'MMMM Do YYYY, h:mm:ss a'}}" />
|
2018-11-05 16:56:59 +00:00
|
|
|
</li>
|
|
|
|
{{/if}}
|
2018-05-25 15:36:23 +00:00
|
|
|
{{#if (is-before (now interval=1000) auth.tokenExpirationDate)}}
|
|
|
|
{{#if auth.authData.renewable}}
|
|
|
|
<li class="action">
|
|
|
|
<button type="button" {{action "renewToken"}} class="link button {{if isRenewing 'is-loading'}}">
|
|
|
|
Renew token
|
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
<li class="action">
|
|
|
|
{{#confirm-action
|
2018-11-05 16:56:59 +00:00
|
|
|
onConfirmAction=(action "revokeToken")
|
|
|
|
confirmMessage=(concat "Are you sure you want to revoke the token for " (get auth 'authData.displayName') "?")
|
|
|
|
confirmButtonText="Revoke"
|
|
|
|
confirmButtonClasses="button is-primary"
|
|
|
|
buttonClasses="button link"
|
|
|
|
showConfirm=shouldRevoke
|
|
|
|
class=(if shouldRevoke "message is-block is-warning is-outline")
|
|
|
|
containerClasses="message-body is-block"
|
|
|
|
messageClasses="is-block"
|
2018-05-25 15:36:23 +00:00
|
|
|
}}
|
|
|
|
Revoke token
|
|
|
|
{{/confirm-action}}
|
|
|
|
</li>
|
|
|
|
{{else}}
|
|
|
|
<li class="action text-right">
|
|
|
|
{{#confirm-action
|
2018-11-05 16:56:59 +00:00
|
|
|
onConfirmAction=(action "revokeToken")
|
|
|
|
confirmMessage=(concat "Are you sure you want to revoke the token for " (get auth 'authData.displayName') "?")
|
|
|
|
confirmButtonText="Revoke"
|
|
|
|
confirmButtonClasses="button is-primary"
|
|
|
|
buttonClasses="button link"
|
|
|
|
showConfirm=shouldRevoke
|
|
|
|
class=(if shouldRevoke "message is-block is-warning is-outline")
|
|
|
|
containerClasses="message-body is-block"
|
|
|
|
messageClasses="is-block"
|
2018-05-25 15:36:23 +00:00
|
|
|
}}
|
|
|
|
Revoke token
|
|
|
|
{{/confirm-action}}
|
|
|
|
</li>
|
|
|
|
{{/if}}
|
2018-04-03 14:16:57 +00:00
|
|
|
{{/if}}
|
2019-01-17 22:36:54 +00:00
|
|
|
<li class="action">
|
2019-03-29 18:15:57 +00:00
|
|
|
<CopyButton @clipboardText={{auth.currentToken}} class="link" @buttonType="button" @success={{action (set-flash-message 'Token copied!')}}>
|
2019-01-17 22:36:54 +00:00
|
|
|
Copy token
|
|
|
|
</CopyButton>
|
|
|
|
</li>
|
2018-08-28 05:03:55 +00:00
|
|
|
<li class="action">
|
2019-03-29 18:15:57 +00:00
|
|
|
<button type="button" class="link" onclick={{action "restartGuide"}}>
|
2018-08-28 05:03:55 +00:00
|
|
|
Restart guide
|
|
|
|
</button>
|
|
|
|
</li>
|
2018-05-25 15:36:23 +00:00
|
|
|
<li class="action">
|
2018-10-21 19:19:34 +00:00
|
|
|
{{#link-to "vault.cluster.logout" activeClusterName id="logout" invokeAction=onLinkClick}}
|
2018-05-25 15:36:23 +00:00
|
|
|
Sign out
|
2018-08-16 17:48:24 +00:00
|
|
|
{{/link-to}}
|
2018-05-25 15:36:23 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</div>
|
2018-04-03 14:16:57 +00:00
|
|
|
</div>
|