diff --git a/ui/app/components/plugin-allocation-row.js b/ui/app/components/plugin-allocation-row.js new file mode 100644 index 000000000..f3fef64d8 --- /dev/null +++ b/ui/app/components/plugin-allocation-row.js @@ -0,0 +1,7 @@ +import { alias } from '@ember/object/computed'; +import AllocationRow from 'nomad-ui/components/allocation-row'; + +export default AllocationRow.extend({ + pluginAllocation: null, + allocation: alias('pluginAllocation.allocation'), +}); diff --git a/ui/app/templates/components/plugin-allocation-row.hbs b/ui/app/templates/components/plugin-allocation-row.hbs new file mode 100644 index 000000000..cbe5c2909 --- /dev/null +++ b/ui/app/templates/components/plugin-allocation-row.hbs @@ -0,0 +1,70 @@ +{{#if allocation}} + + {{#if allocation.unhealthyDrivers.length}} + + {{x-icon "warning" class="is-warning"}} + + {{/if}} + {{#if allocation.nextAllocation}} + + {{x-icon "history" class="is-faded"}} + + {{/if}} + {{#if allocation.wasPreempted}} + + {{x-icon "boot" class="is-faded"}} + + {{/if}} + + + + {{#link-to "allocations.allocation" allocation class="is-primary"}} + {{allocation.shortId}} + {{/link-to}} + + + + + {{format-month-ts allocation.createTime short=true}} + + + + + + {{moment-from-now allocation.modifyTime}} + + + + {{if pluginAllocation.healthy "Healthy" "Unhealthy"}} + + {{#link-to "clients.client" allocation.node}}{{allocation.node.shortId}}{{/link-to}} + + {{#if (or allocation.job.isPending allocation.job.isReloading)}} + ... + {{else}} + {{#link-to "jobs.job" allocation.job (query-params jobNamespace=allocation.job.namespace.id) data-test-job}}{{allocation.job.name}}{{/link-to}} + / {{allocation.taskGroup.name}} + {{/if}} + + {{allocation.jobVersion}} + {{if allocation.taskGroup.volumes.length "Yes"}} + + + {{allocation-stat + metric="cpu" + allocation=allocation + statsTracker=stats + isLoading=fetchStats.isRunning + error=statsError}} + + + {{allocation-stat + metric="memory" + allocation=allocation + statsTracker=stats + isLoading=fetchStats.isRunning + error=statsError}} + +{{else}} + … +{{/if}}