consul/ui-v2/app/templates/dc/nodes/-sessions.hbs

57 lines
2.0 KiB
Handlebars

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