ui: Add conditionals to Lock Session list items (#10121)
* Add conditionals to Lock Session list items * Add changelog * Show ID in details if there is a name to go in title * Add copy-button if ID is in the title * Update TTL conditional * Update .changelog/10121.txt Co-authored-by: John Cowen <johncowen@users.noreply.github.com> Co-authored-by: John Cowen <johncowen@users.noreply.github.com>
This commit is contained in:
parent
ff3abc3b48
commit
7103f9f44e
|
@ -0,0 +1,3 @@
|
||||||
|
```release-note:bug
|
||||||
|
ui: Add conditionals to lock sessions tab
|
||||||
|
```
|
|
@ -1,9 +1,20 @@
|
||||||
{{#if (gt items.length 0)}}
|
{{#if (gt items.length 0)}}
|
||||||
<ListCollection @items={{items}} class="consul-lock-session-list" as |item index|>
|
<ListCollection @items={{items}} class="consul-lock-session-list" as |item index|>
|
||||||
<BlockSlot @name="header">
|
<BlockSlot @name="header">
|
||||||
|
{{#if item.Name}}
|
||||||
<span>{{item.Name}}</span>
|
<span>{{item.Name}}</span>
|
||||||
|
{{else}}
|
||||||
|
<span>
|
||||||
|
{{item.ID}}
|
||||||
|
<CopyButton
|
||||||
|
@value={{item.ID}}
|
||||||
|
@name="ID"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
{{/if}}
|
||||||
</BlockSlot>
|
</BlockSlot>
|
||||||
<BlockSlot @name="details">
|
<BlockSlot @name="details">
|
||||||
|
{{#if item.Name}}
|
||||||
<dl>
|
<dl>
|
||||||
<dt>
|
<dt>
|
||||||
<CopyButton
|
<CopyButton
|
||||||
|
@ -13,6 +24,7 @@
|
||||||
</dt>
|
</dt>
|
||||||
<dd>{{item.ID}}</dd>
|
<dd>{{item.ID}}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
{{/if}}
|
||||||
<dl class="lock-delay">
|
<dl class="lock-delay">
|
||||||
<dt>
|
<dt>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
|
@ -27,7 +39,11 @@
|
||||||
TTL
|
TTL
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</dt>
|
</dt>
|
||||||
|
{{#if (eq item.TTL "")}}
|
||||||
|
<dd data-test-session-ttl={{item.TTL}}>-</dd>
|
||||||
|
{{else}}
|
||||||
<dd data-test-session-ttl={{item.TTL}}>{{item.TTL}}</dd>
|
<dd data-test-session-ttl={{item.TTL}}>{{item.TTL}}</dd>
|
||||||
|
{{/if}}
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="behavior">
|
<dl class="behavior">
|
||||||
<dt>
|
<dt>
|
||||||
|
|
|
@ -57,7 +57,6 @@
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
%composite-row-detail .copy-button {
|
%composite-row-detail .copy-button {
|
||||||
margin-right: 4px;
|
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
%composite-row .copy-button button {
|
%composite-row .copy-button button {
|
||||||
|
|
Loading…
Reference in New Issue