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

48 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')}}
<Notice
@type="warning"
data-test-session-warning
as |notice|>
<notice.Body>
<p>
<strong>Warning.</strong> 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 and see <a href="{{env 'CONSUL_DOCS_URL'}}/internals/sessions.html" target="_blank" rel="noopener noreferrer">our documentation</a> for more information.
</p>
</notice.Body>
</Notice>
{{/if}}