mirror of https://github.com/status-im/consul.git
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
f546342062
commit
ecbeaa87c1
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
ui: Add conditionals to lock sessions tab
|
||||
```
|
|
@ -1,9 +1,20 @@
|
|||
{{#if (gt items.length 0)}}
|
||||
<ListCollection @items={{items}} class="consul-lock-session-list" as |item index|>
|
||||
<BlockSlot @name="header">
|
||||
{{#if item.Name}}
|
||||
<span>{{item.Name}}</span>
|
||||
{{else}}
|
||||
<span>
|
||||
{{item.ID}}
|
||||
<CopyButton
|
||||
@value={{item.ID}}
|
||||
@name="ID"
|
||||
/>
|
||||
</span>
|
||||
{{/if}}
|
||||
</BlockSlot>
|
||||
<BlockSlot @name="details">
|
||||
{{#if item.Name}}
|
||||
<dl>
|
||||
<dt>
|
||||
<CopyButton
|
||||
|
@ -13,6 +24,7 @@
|
|||
</dt>
|
||||
<dd>{{item.ID}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
<dl class="lock-delay">
|
||||
<dt>
|
||||
<Tooltip>
|
||||
|
@ -27,7 +39,11 @@
|
|||
TTL
|
||||
</Tooltip>
|
||||
</dt>
|
||||
{{#if (eq item.TTL "")}}
|
||||
<dd data-test-session-ttl={{item.TTL}}>-</dd>
|
||||
{{else}}
|
||||
<dd data-test-session-ttl={{item.TTL}}>{{item.TTL}}</dd>
|
||||
{{/if}}
|
||||
</dl>
|
||||
<dl class="behavior">
|
||||
<dt>
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
margin-left: 4px;
|
||||
}
|
||||
%composite-row-detail .copy-button {
|
||||
margin-right: 4px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
%composite-row .copy-button button {
|
||||
|
|
Loading…
Reference in New Issue