diff --git a/ui/app/models/allocation.js b/ui/app/models/allocation.js index ffe55cff2..048e31e55 100644 --- a/ui/app/models/allocation.js +++ b/ui/app/models/allocation.js @@ -86,8 +86,8 @@ export default Model.extend({ 'followUpEvaluation', function() { return ( - !this.get('nextAllocation') && - !this.get('followUpEvaluation') && + !this.get('nextAllocation.content') && + !this.get('followUpEvaluation.content') && this.get('clientStatus') === 'failed' ); } diff --git a/ui/app/templates/allocations/allocation/index.hbs b/ui/app/templates/allocations/allocation/index.hbs index 8356eefa7..c26fb9a23 100644 --- a/ui/app/templates/allocations/allocation/index.hbs +++ b/ui/app/templates/allocations/allocation/index.hbs @@ -91,5 +91,45 @@ {{/list-table}} + + {{#if model.hasRescheduleEvents}} +
+
+ Reschedule Events +
+
+
    + {{#if model.nextAllocation}} + {{reschedule-event-row + label="Next Allocation" + allocation=model.nextAllocation + time=model.nextAllocation.modifyTime}} + {{/if}} + {{#if model.hasStoppedRescheduling}} +
  1. + {{x-icon "warning" class="is-warning is-text"}} Nomad has stopped attempting to reschedule this allocation. +
  2. + {{/if}} + {{#if (and model.followUpEvaluation.waitUntil (not model.nextAllocation))}} +
  3. + {{x-icon "clock" class="is-info is-text"}} Nomad will attempt to reschedule + {{moment-from-now model.followUpEvaluation.waitUntil interval=1000}} +
  4. + {{/if}} + {{reschedule-event-row + label="This Allocation" + allocation=model + linkToAllocation=false + time=model.modifyTime}} + + {{#each (reverse model.rescheduleEvents) as |event|}} + {{reschedule-event-row + allocationId=event.previousAllocationId + time=event.time}} + {{/each}} +
+
+
+ {{/if}} {{/gutter-menu}} diff --git a/ui/app/templates/components/reschedule-event-row.hbs b/ui/app/templates/components/reschedule-event-row.hbs index a0793b598..a494ee3cd 100644 --- a/ui/app/templates/components/reschedule-event-row.hbs +++ b/ui/app/templates/components/reschedule-event-row.hbs @@ -1,33 +1,43 @@
  • - {{#if label}} - {{label}} - {{/if}} {{moment-format time "MMMM D, YYYY HH:mm:ss"}}
  • -
    - - {{allocation.clientStatus}} - - - Allocation - {{#if linkToAllocation}} - {{#link-to "allocations.allocation" allocation.id}} - {{allocation.shortId}} - {{/link-to}} - {{else}} - {{allocation.shortId}} - {{/if}} - - - Client - - {{#link-to "clients.client" allocation.node.id}} - {{allocation.node.id}} - {{/link-to}} - - + {{#unless linkToAllocation}} +
    + This Allocation +
    + {{/unless}} +
    +
    +
    + + {{allocation.clientStatus}} + +
    +
    +
    + + Allocation + {{#if linkToAllocation}} + {{#link-to "allocations.allocation" allocation.id}} + {{allocation.shortId}} + {{/link-to}} + {{else}} + {{allocation.shortId}} + {{/if}} + + + Client + + {{#link-to "clients.client" allocation.node.id}} + {{allocation.node.id}} + {{/link-to}} + + +
    +
    +
  • diff --git a/ui/public/images/icons/clock.svg b/ui/public/images/icons/clock.svg new file mode 100644 index 000000000..d7f8a6dd4 --- /dev/null +++ b/ui/public/images/icons/clock.svg @@ -0,0 +1,3 @@ + + +