{{!
  Copyright (c) HashiCorp, Inc.
  SPDX-License-Identifier: MPL-2.0
~}}

<td data-test-icon class="is-narrow">
  {{#if this.node.unhealthyDrivers.length}}
    <span class="tooltip text-center" role="tooltip" aria-label="Client has unhealthy drivers">
      {{x-icon "alert-triangle" class="is-warning"}}
    </span>
  {{/if}}
</td>
<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>
<td data-test-client-composite-status>
  <span class="tooltip" aria-label="{{this.node.status}} / {{if this.node.isDraining "draining" "not draining"}} / {{if this.node.isEligible "eligible" "not eligible"}}">
    <Hds::Badge
      @text={{capitalize this.node.compositeStatus}}
      @icon={{this.nodeStatusIcon}}
      @color={{this.nodeStatusColor}}
      @size="large"
    />
  </span>
</td>
<td data-test-client-address class="is-200px is-truncatable">{{this.node.httpAddr}}</td>
<td data-test-client-node-pool title="{{this.node.nodePool}}">
  {{#if this.node.nodePool}}{{this.node.nodePool}}{{else}}-{{/if}}
</td>
<td data-test-client-datacenter>{{this.node.datacenter}}</td>
<td data-test-client-version>{{this.node.version}}</td>
<td data-test-client-volumes>{{if this.node.hostVolumes.length this.node.hostVolumes.length}}</td>
<td data-test-client-allocations>
  {{#if this.node.allocations.isPending}}
    ...
  {{else}}
    {{this.node.runningAllocations.length}}
  {{/if}}
</td>
