open-consul/ui/packages/consul-lock-sessions/app/components/consul/lock-session/notifications/index.hbs

46 lines
1.4 KiB
Handlebars
Raw Normal View History

{{#if (eq @type 'remove')}}
{{#if @error}}
<Notice
class="notification-delete"
@type="error"
...attributes
as |notice|>
<notice.Header>
<strong>Error!</strong>
</notice.Header>
<notice.Body>
<p>
There was an error invalidating the Lock Session.
{{#if (and @error.status @error.detail)}}
<br />{{@error.status}}: {{@error.detail}}
{{/if}}
</p>
</notice.Body>
</Notice>
{{else}}
<Notice
class="notification-delete"
@type="success"
...attributes
as |notice|>
<notice.Header>
<strong>Success!</strong>
</notice.Header>
<notice.Body>
<p>
Your Lock Session has been invalidated.
</p>
</notice.Body>
</Notice>
{{/if}}
{{else if (eq @type 'kv')}}
<Hds::Alert @type='inline' @color='warning' class='mb-3' data-test-session-warning as |A|>
<A.Title>Warning</A.Title>
<A.Description>This KV has a lock session. You can edit KV's with lock sessions, but we recommend doing so with care, or not doing so at all. It may negatively impact the active node it's associated with. See below for more details on the Lock Session.</A.Description>
<A.Link::Standalone @text='Learn more'
@href="{{env 'CONSUL_DOCS_URL'}}/internals/sessions.html"
@icon='docs-link'
@iconPosition='trailing' />
</Hds::Alert>
{{/if}}