open-consul/ui-v2/app/templates/dc/nodes/-sessions.hbs
John Cowen 411fb2e25c ui: Move to angle brackets for ember components (#7321)
* Modify templates with codemods angle brackets

* ui: Fix up problem with intention filter action attribute

Co-authored-by: Kenia <19161242+kaxcode@users.noreply.github.com>
2020-05-12 17:14:05 +00:00

59 lines
2.1 KiB
Handlebars

{{#if (gt sessions.length 0)}}
{{#tabular-collection
data-test-sessions
class="sessions"
items=sessions as |item index|
}}
<BlockSlot @name="header">
<th>Name</th>
<th>ID</th>
<th>Delay</th>
<th>TTL</th>
<th>Behavior</th>
<th>Checks</th>
<th>&nbsp;</th>
</BlockSlot>
<BlockSlot @name="row">
<td>
{{item.Name}}
</td>
<td>
{{item.ID}}
</td>
<td>
{{item.LockDelay}}
</td>
<td data-test-session-ttl="{{item.TTL}}">
{{item.TTL}}
</td>
<td>
{{item.Behavior}}
</td>
<td>
{{#if (gt item.Checks.length 0)}}
{{ join ', ' item.Checks}}
{{/if}}
</td>
<td>
<ConfirmationDialog @message="Are you sure you want to invalidate this session?">
<BlockSlot @name="action" as |confirm|>
<button data-test-delete type="button" class="type-delete" {{action confirm 'invalidateSession' item}}>Invalidate</button>
</BlockSlot>
<BlockSlot @name="dialog" as |execute cancel message|>
<p>
{{message}}
</p>
<button type="button" class="type-delete" {{action execute}}>Confirm Invalidate</button>
<button type="button" class="type-cancel" {{ action cancel}}>Cancel</button>
</BlockSlot>
</ConfirmationDialog>
</td>
</BlockSlot>
{{/tabular-collection}}
{{else}}
<p>
There are no Lock Sessions for this Node. For more information, view <a href="{{ env 'CONSUL_DOCS_URL'}}/internals/sessions.html" rel="help noopener noreferrer" target="_blank">our documentation</a>
</p>
{{/if}}