github.com/manicqin/nomad@v0.9.5/ui/app/templates/components/allocation-row.hbs (about) 1 <td data-test-indicators class="is-narrow"> 2 {{#if allocation.unhealthyDrivers.length}} 3 <span data-test-icon="unhealthy-driver" class="tooltip text-center" role="tooltip" aria-label="Allocation depends on unhealthy drivers"> 4 {{x-icon "warning" class="is-warning"}} 5 </span> 6 {{/if}} 7 {{#if allocation.nextAllocation}} 8 <span data-test-icon="reschedule" class="tooltip text-center" role="tooltip" aria-label="Allocation was rescheduled"> 9 {{x-icon "history" class="is-faded"}} 10 </span> 11 {{/if}} 12 {{#if allocation.wasPreempted}} 13 <span data-test-icon="preemption" class="tooltip text-center" role="tooltip" aria-label="Allocation was preempted"> 14 {{x-icon "boot" class="is-faded"}} 15 </span> 16 {{/if}} 17 </td> 18 <td data-test-short-id> 19 {{#link-to "allocations.allocation" allocation class="is-primary"}} 20 {{allocation.shortId}} 21 {{/link-to}} 22 </td> 23 {{#if (eq context "job")}} 24 <td data-test-task-group> 25 {{#link-to "jobs.job.task-group" allocation.job allocation.taskGroupName (query-params jobNamespace=allocation.job.namespace.id)}} 26 {{allocation.taskGroupName}} 27 {{/link-to}} 28 </td> 29 {{/if}} 30 <td data-test-create-time>{{format-month-ts allocation.createTime}}</td> 31 <td data-test-modify-time> 32 <span class="tooltip" aria-label="{{format-month-ts allocation.modifyTime}}"> 33 {{moment-from-now allocation.modifyTime}} 34 </span> 35 </td> 36 <td data-test-client-status class="is-one-line"> 37 <span class="color-swatch {{allocation.clientStatus}}" /> {{allocation.clientStatus}} 38 </td> 39 {{#if (or (eq context "taskGroup") (eq context "job"))}} 40 <td data-test-job-version>{{allocation.jobVersion}}</td> 41 <td data-test-client>{{#link-to "clients.client" allocation.node}}{{allocation.node.shortId}}{{/link-to}}</td> 42 {{else if (eq context "node")}} 43 <td> 44 {{#if (or allocation.job.isPending allocation.job.isReloading)}} 45 ... 46 {{else}} 47 {{#link-to "jobs.job" allocation.job (query-params jobNamespace=allocation.job.namespace.id) data-test-job}}{{allocation.job.name}}{{/link-to}} 48 <span class="is-faded" data-test-task-group>/ {{allocation.taskGroup.name}}</span> 49 {{/if}} 50 </td> 51 <td data-test-job-version class="is-1">{{allocation.jobVersion}}</td> 52 {{/if}} 53 <td data-test-cpu class="is-1 has-text-centered"> 54 {{#if allocation.isRunning}} 55 {{#if (and (not cpu) fetchStats.isRunning)}} 56 ... 57 {{else if statsError}} 58 <span class="tooltip text-center" role="tooltip" aria-label="Couldn't collect stats"> 59 {{x-icon "warning" class="is-warning"}} 60 </span> 61 {{else}} 62 <div class="inline-chart is-small tooltip" role="tooltip" aria-label="{{cpu.used}} / {{stats.reservedCPU}} MHz"> 63 <progress 64 class="progress is-info is-small" 65 value="{{cpu.percent}}" 66 max="1"> 67 {{cpu.percent}} 68 </progress> 69 </div> 70 {{/if}} 71 {{/if}} 72 </td> 73 <td data-test-mem class="is-1 has-text-centered"> 74 {{#if allocation.isRunning}} 75 {{#if (and (not memory) fetchStats.isRunning)}} 76 ... 77 {{else if statsError}} 78 <span class="tooltip is-small text-center" role="tooltip" aria-label="Couldn't collect stats"> 79 {{x-icon "warning" class="is-warning"}} 80 </span> 81 {{else}} 82 <div class="inline-chart tooltip" role="tooltip" aria-label="{{format-bytes memory.used}} / {{stats.reservedMemory}} MiB"> 83 <progress 84 class="progress is-danger is-small" 85 value="{{memory.percent}}" 86 max="1"> 87 {{memory.percent}} 88 </progress> 89 </div> 90 {{/if}} 91 {{/if}} 92 </td>