Files
nomad/ui/app/templates/components/client-node-row.hbs
Phil Renaud cf8dde0850 [ui] Color indicators for server/client status (#18318)
* Color the status cell for servers and nodes

* Testfix and changelog

* Leader indicator moved post-word

* Icon and badge treatment

* Capitalizing test checks

* HDS badges dont expose statusClass like we used to, so stop checking for it
2023-09-20 17:05:04 -04:00

39 lines
1.5 KiB
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}
<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>