2018-05-08 18:24:11 +00:00
|
|
|
<td data-test-icon class="is-narrow">
|
2020-07-09 20:19:07 +00:00
|
|
|
{{#if this.node.unhealthyDrivers.length}}
|
2018-10-17 14:17:24 +00:00
|
|
|
<span class="tooltip text-center" role="tooltip" aria-label="Client has unhealthy drivers">
|
2020-10-26 21:52:25 +00:00
|
|
|
{{x-icon "alert-triangle" class="is-warning"}}
|
2018-05-08 18:24:11 +00:00
|
|
|
</span>
|
|
|
|
{{/if}}
|
|
|
|
</td>
|
2020-07-09 20:19:07 +00:00
|
|
|
<td data-test-client-id><LinkTo @route="clients.client" @model={{this.node.id}} class="is-primary">{{this.node.shortId}}</LinkTo></td>
|
|
|
|
<td data-test-client-name class="is-200px is-truncatable" title="{{this.node.name}}">{{this.node.name}}</td>
|
UI: Fix client sorting (#6817)
There are two changes here, and some caveats/commentary:
1. The “State“ table column was actually sorting only by status. The state was not an actual property, just something calculated in each client row, as a product of status, isEligible, and isDraining. This PR adds isDraining as a component of compositeState so it can be used for sorting.
2. The Sortable mixin declares dependent keys that cause the sort to be live-updating, but only if the members of the array change, such as if a new client is added, but not if any of the sortable properties change. This PR adds a SortableFactory function that generates a mixin whose listSorted computed property includes dependent keys for the sortable properties, so the table will live-update if any of the sortable properties change, not just the array members. There’s a warning if you use SortableFactory without dependent keys and via the original Sortable interface, so we can eventually migrate away from it.
2019-12-12 19:06:54 +00:00
|
|
|
<td data-test-client-composite-status>
|
2020-07-09 20:19:07 +00:00
|
|
|
<span class="tooltip" aria-label="{{this.node.status}} / {{if this.node.isDraining "draining" "not draining"}} / {{if this.node.isEligible "eligible" "not eligible"}}">
|
|
|
|
<span class="{{this.compositeStatusClass}}">{{this.node.compositeStatus}}</span>
|
2019-06-19 17:11:17 +00:00
|
|
|
</span>
|
2018-05-29 17:36:09 +00:00
|
|
|
</td>
|
2020-07-09 20:19:07 +00:00
|
|
|
<td data-test-client-address>{{this.node.httpAddr}}</td>
|
|
|
|
<td data-test-client-datacenter>{{this.node.datacenter}}</td>
|
|
|
|
<td data-test-client-volumes>{{if this.node.hostVolumes.length this.node.hostVolumes.length}}</td>
|
2018-01-05 20:59:36 +00:00
|
|
|
<td data-test-client-allocations>
|
2020-07-09 20:19:07 +00:00
|
|
|
{{#if this.node.allocations.isPending}}
|
2017-09-19 14:47:10 +00:00
|
|
|
...
|
|
|
|
{{else}}
|
2020-07-09 20:19:07 +00:00
|
|
|
{{this.node.runningAllocations.length}}
|
2017-09-19 14:47:10 +00:00
|
|
|
{{/if}}
|
|
|
|
</td>
|