github.com/hernad/nomad@v1.6.112/ui/app/templates/components/task-row.hbs (about) 1 {{! 2 Copyright (c) HashiCorp, Inc. 3 SPDX-License-Identifier: MPL-2.0 4 ~}} 5 6 <td class="is-narrow"> 7 {{#unless this.task.driverStatus.healthy}} 8 <span 9 data-test-icon="unhealthy-driver" 10 class="tooltip text-center" 11 aria-label="{{this.task.driver}} is unhealthy" 12 > 13 {{x-icon "alert-triangle" class="is-warning"}} 14 </span> 15 {{/unless}} 16 </td> 17 <td data-test-name class="nowrap"> 18 <LinkTo 19 @route="allocations.allocation.task" 20 @models={{array this.task.allocation this.task}} 21 class="is-primary" 22 > 23 {{this.task.name}} 24 {{#if this.task.isConnectProxy}} 25 <ProxyTag @class="bumper-left" /> 26 {{/if}} 27 </LinkTo> 28 </td> 29 <td data-test-state> 30 {{this.task.state}} 31 </td> 32 <td data-test-message> 33 {{#if this.task.events.lastObject.message}} 34 {{this.task.events.lastObject.message}} 35 {{else}} 36 <em> 37 No message 38 </em> 39 {{/if}} 40 </td> 41 <td data-test-time> 42 {{format-ts this.task.events.lastObject.time}} 43 </td> 44 <td data-test-volumes> 45 <ul> 46 {{#each this.task.task.volumeMounts as |volume|}} 47 <li data-test-volume> 48 <strong> 49 {{volume.volume}} 50 : 51 </strong> 52 {{#if volume.isCSI}} 53 <LinkTo 54 @route="csi.volumes.volume" 55 @model={{concat 56 (format-volume-name 57 source=volume.source 58 isPerAlloc=volume.volumeDeclaration.perAlloc 59 volumeExtension=this.task.allocation.volumeExtension) 60 "@" 61 volume.namespace.id 62 }} 63 > 64 {{format-volume-name 65 source=volume.source 66 isPerAlloc=volume.volumeDeclaration.perAlloc 67 volumeExtension=this.task.allocation.volumeExtension}} 68 </LinkTo> 69 {{else}} 70 {{volume.source}} 71 {{/if}} 72 </li> 73 {{/each}} 74 </ul> 75 </td> 76 <td data-test-cpu class="is-1 has-text-centered"> 77 {{#if this.task.isRunning}} 78 {{#if (and (not this.cpu) this.fetchStats.isRunning)}} 79 ... 80 {{else if this.statsError}} 81 <span 82 class="tooltip text-center" 83 role="tooltip" 84 aria-label="Couldn't collect stats" 85 > 86 {{x-icon "alert-triangle" class="is-warning"}} 87 </span> 88 {{else}} 89 <div 90 class="inline-chart is-small tooltip" 91 role="tooltip" 92 aria-label="{{format-hertz this.cpu.used}} 93 / 94 {{format-hertz this.taskStats.reservedCPU}}" 95 > 96 <progress 97 class="progress is-info is-small" 98 value="{{this.cpu.percent}}" 99 max="1" 100 > 101 {{this.cpu.percent}} 102 </progress> 103 </div> 104 {{/if}} 105 {{/if}} 106 </td> 107 <td data-test-mem class="is-1 has-text-centered"> 108 {{#if this.task.isRunning}} 109 {{#if (and (not this.memory) this.fetchStats.isRunning)}} 110 ... 111 {{else if this.statsError}} 112 <span 113 class="tooltip is-small text-center" 114 role="tooltip" 115 aria-label="Couldn't collect stats" 116 > 117 {{x-icon "alert-triangle" class="is-warning"}} 118 </span> 119 {{else}} 120 <div 121 class="inline-chart tooltip" 122 role="tooltip" 123 aria-label="{{format-bytes this.memory.used}} 124 / 125 {{format-bytes this.taskStats.reservedMemory start="MiB"}}" 126 > 127 <progress 128 class="progress is-danger is-small" 129 value="{{this.memory.percent}}" 130 max="1" 131 > 132 {{this.memory.percent}} 133 </progress> 134 </div> 135 {{/if}} 136 {{/if}} 137 </td>