diff --git a/ui/app/components/token-expire-warning.js b/ui/app/components/token-expire-warning.js index d17911572..dcd4c88f0 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 000000000..d761b9f70 --- /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 0b19ace12..5ca445492 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 c2aa2c68d..1ebafafbb 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 4dfe0785a..5f8a50463 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 000000000..dc1618250 --- /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 176195ce3..92c890c8c 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 eeefdde49..28d9d9e7c 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}}