{{title "Client " (or model.name model.shortId)}}
{{#if eligibilityError}}

Eligibility Error

{{eligibilityError}}

{{/if}} {{#if stopDrainError}}

Stop Drain Error

{{stopDrainError}}

{{/if}} {{#if drainError}}

Drain Error

{{drainError}}

{{/if}} {{#if showDrainStoppedNotification}}

Drain Stopped

The drain has been stopped and the node has been set to ineligible.

{{/if}} {{#if showDrainUpdateNotification}}

Drain Updated

The new drain specification has been applied.

{{/if}} {{#if showDrainNotification}}

Drain Complete

Allocations have been drained and the node has been set to ineligible.

{{/if}}
{{x-icon model.compositeStatusIcon}}

{{or model.name model.shortId}}

{{model.id}} {{copy-button clipboardText=model.id}}

{{#if model.isDraining}} {{two-step-button data-test-drain-stop idleText="Stop Drain" cancelText="Cancel" confirmText="Yes, Stop" confirmationMessage="Are you sure you want to stop this drain?" awaitingConfirmation=stopDrain.isRunning onConfirm=(perform stopDrain)}} {{/if}}
{{drain-popover client=model isDisabled=(cannot "write client") onDrain=(action "drainNotify") onError=(action "drainError")}}
Client Details Status {{model.status}} Address {{model.httpAddr}} Datacenter {{model.datacenter}} Drivers {{#if model.unhealthyDrivers.length}} {{x-icon "warning" class="is-text is-warning"}} {{model.unhealthyDrivers.length}} of {{model.detectedDrivers.length}} {{pluralize "driver" model.detectedDrivers.length}} unhealthy {{else}} All healthy {{/if}}
{{#if model.drainStrategy}}
Drain Strategy
{{#if (not model.drainStrategy.hasNoDeadline)}} Duration {{#if model.drainStrategy.isForced}} -- {{else}} {{format-duration model.drainStrategy.deadline}} {{/if}} {{/if}} {{if model.drainStrategy.hasNoDeadline "Deadline" "Remaining"}} {{#if model.drainStrategy.hasNoDeadline}} No deadline {{else if model.drainStrategy.isForced}} -- {{else}} {{moment-from-now model.drainStrategy.forceDeadline interval=1000 hideAffix=true}} {{/if}} Force Drain {{#if model.drainStrategy.isForced}} {{x-icon "warning" class="is-text is-warning"}} Yes {{else}} No {{/if}} Drain System Jobs {{if model.drainStrategy.ignoreSystemJobs "No" "Yes"}}
{{#if (not model.drainStrategy.isForced)}}
{{two-step-button data-test-force alignRight=true isInfoAction=true idleText="Force Drain" cancelText="Cancel" confirmText="Yes, Force Drain" confirmationMessage="Are you sure you want to force drain?" awaitingConfirmation=forceDrain.isRunning onConfirm=(perform forceDrain)}}
{{/if}}

Complete

{{model.completeAllocations.length}}

Migrating

{{model.migratingAllocations.length}}

Remaining

{{model.runningAllocations.length}}

Status

{{#if model.lastMigrateTime}}

{{moment-to-now model.lastMigrateTime interval=1000 hideAffix=true}} since an allocation was successfully migrated.

{{else}}

No allocations migrated.

{{/if}}
{{/if}}
Resource Utilization
{{primary-metric resource=model metric="cpu"}}
{{primary-metric resource=model metric="memory"}}
Allocations {{#if preemptions.length}} {{/if}}
{{search-box searchTerm=(mut searchTerm) onChange=(action resetPagination) placeholder="Search allocations..." class="is-inline pull-right" inputClass="is-compact"}}
{{#list-pagination source=sortedAllocations size=pageSize page=currentPage as |p|}} {{#list-table source=p.list sortProperty=sortProperty sortDescending=sortDescending class="with-foot" as |t|}} {{#t.head}} {{#t.sort-by prop="shortId"}}ID{{/t.sort-by}} {{#t.sort-by prop="modifyIndex" title="Modify Index"}}Modified{{/t.sort-by}} {{#t.sort-by prop="createIndex" title="Create Index"}}Created{{/t.sort-by}} {{#t.sort-by prop="statusIndex"}}Status{{/t.sort-by}} {{#t.sort-by prop="job.name"}}Job{{/t.sort-by}} {{#t.sort-by prop="jobVersion"}}Version{{/t.sort-by}} Volume CPU Memory {{/t.head}} {{#t.body as |row|}} {{allocation-row allocation=row.model context="node" onClick=(action "gotoAllocation" row.model) data-test-allocation=row.model.id}} {{/t.body}} {{/list-table}}
{{/list-pagination}}
Client Events
{{#list-table source=sortedEvents class="is-striped" as |t|}} {{#t.head}} Time Subsystem Message {{/t.head}} {{#t.body as |row|}} {{format-ts row.model.time}} {{row.model.subsystem}} {{#if row.model.message}} {{#if row.model.driver}} {{row.model.driver}} {{/if}} {{row.model.message}} {{else}} No message {{/if}} {{/t.body}} {{/list-table}}
{{#if sortedHostVolumes.length}}
Host Volumes
{{#list-table source=sortedHostVolumes class="is-striped" as |t|}} {{#t.head}} Name Source Permissions {{/t.head}} {{#t.body as |row|}} {{row.model.name}} {{row.model.path}} {{if row.model.readOnly "Read" "Read/Write"}} {{/t.body}} {{/list-table}}
{{/if}}
Driver Status
{{#list-accordion source=sortedDrivers key="name" as |a|}} {{#a.head buttonLabel="details" isExpandable=a.item.detected}}
{{a.item.name}}
{{#if a.item.detected}} {{if a.item.healthy "Healthy" "Unhealthy"}} {{/if}}
Detected {{if a.item.detected "Yes" "No"}} Last Updated {{moment-from-now a.item.updateTime interval=1000}}
{{/a.head}} {{#a.body}}

{{a.item.healthDescription}}

{{capitalize a.item.name}} Attributes
{{#if a.item.attributes.attributesStructured}}
{{attributes-table attributes=a.item.attributesShort class="attributes-table"}}
{{else}}

No Driver Attributes

{{/if}}
{{/a.body}} {{/list-accordion}}
Attributes
{{attributes-table data-test-attributes attributes=model.attributes.attributesStructured class="attributes-table"}}
Meta
{{#if model.meta.attributesStructured}}
{{attributes-table data-test-meta attributes=model.meta.attributesStructured class="attributes-table"}}
{{else}}

No Meta Attributes

This client is configured with no meta attributes.

{{/if}}