diff --git a/ui/app/components/token-expire-warning.js b/ui/app/components/token-expire-warning.js index d17911572aaf..dcd4c88f0da4 100644 --- a/ui/app/components/token-expire-warning.js +++ b/ui/app/components/token-expire-warning.js @@ -1,6 +1,7 @@ import Ember from 'ember'; export default Ember.Component.extend({ + classNames: 'token-expire-warning', auth: Ember.inject.service(), routing: Ember.inject.service('-routing'), diff --git a/ui/app/styles/components/token-expire-warning.scss b/ui/app/styles/components/token-expire-warning.scss new file mode 100644 index 000000000000..d761b9f70f6c --- /dev/null +++ b/ui/app/styles/components/token-expire-warning.scss @@ -0,0 +1,19 @@ +.token-expire-warning { + position: absolute; + z-index: 200; + display: flex; + justify-content: center; + box-shadow: $box-shadow-highest; + top: 1rem; + left: 1rem; + right: 1rem; +} +.token-expire-warning .content p { + padding-right: $size-6; +} +.token-expire-warning .message-in-page { + margin: 0; +} +.token-expire-warning .message { + width: 100%; +} diff --git a/ui/app/styles/core.scss b/ui/app/styles/core.scss index 0b19ace12848..5ca445492831 100644 --- a/ui/app/styles/core.scss +++ b/ui/app/styles/core.scss @@ -65,6 +65,7 @@ @import "./components/sidebar"; @import "./components/status-menu"; @import "./components/sub-nav"; +@import "./components/token-expire-warning"; @import "./components/tool-tip"; @import "./components/upgrade-overlay"; @import "./components/vault-loading"; diff --git a/ui/app/templates/components/identity/item-aliases.hbs b/ui/app/templates/components/identity/item-aliases.hbs index c2aa2c68d9f4..1ebafafbbaa4 100644 --- a/ui/app/templates/components/identity/item-aliases.hbs +++ b/ui/app/templates/components/identity/item-aliases.hbs @@ -17,7 +17,7 @@
{{item.id}}
- {{item.mountType}} + {{item.mountType}} {{item.mountAccessor}} diff --git a/ui/app/templates/components/token-expire-warning.hbs b/ui/app/templates/components/token-expire-warning.hbs index 4dfe0785a231..5f8a504635db 100644 --- a/ui/app/templates/components/token-expire-warning.hbs +++ b/ui/app/templates/components/token-expire-warning.hbs @@ -3,7 +3,7 @@ {{#message-in-page type="danger"}}

- Your auth token expired at {{moment-format auth.tokenExpirationDate 'YYYY-MM-DD HH:mm:ss'}}. + Your auth token expired on {{moment-format auth.tokenExpirationDate 'MMMM Do YYYY, h:mm:ss a'}}. You will need to re-authenticate.

diff --git a/ui/app/templates/vault/cluster/access/error.hbs b/ui/app/templates/vault/cluster/access/error.hbs new file mode 100644 index 000000000000..dc1618250d74 --- /dev/null +++ b/ui/app/templates/vault/cluster/access/error.hbs @@ -0,0 +1,25 @@ + {{#if (eq model.httpStatus 404)}} + {{not-found model=model}} + {{else}} + +
+ {{#if model.message}} +

{{model.message}}

+ {{/if}} + {{#each model.errors as |error|}} +

{{error}}

+ {{/each}} +
+ {{/if}} diff --git a/ui/app/templates/vault/cluster/access/identity/aliases/index.hbs b/ui/app/templates/vault/cluster/access/identity/aliases/index.hbs index 176195ce3e39..92c890c8c6fc 100644 --- a/ui/app/templates/vault/cluster/access/identity/aliases/index.hbs +++ b/ui/app/templates/vault/cluster/access/identity/aliases/index.hbs @@ -25,7 +25,7 @@
{{item.id}}
- {{item.mountType}} + {{item.mountType}} {{item.mountAccessor}} diff --git a/ui/app/templates/vault/cluster/access/identity/index.hbs b/ui/app/templates/vault/cluster/access/identity/index.hbs index eeefdde49c8e..28d9d9e7c26b 100644 --- a/ui/app/templates/vault/cluster/access/identity/index.hbs +++ b/ui/app/templates/vault/cluster/access/identity/index.hbs @@ -27,11 +27,8 @@
- {{#if (eq item.identityType "entity")}} - {{#if item.aliases.length}} - {{pluralize item.aliases.length "alias"}} - {{/if}} - {{else}} + {{#if item.aliases.length}} + {{pluralize item.aliases.length "alias"}} {{/if}}