diff --git a/ui/app/templates/allocations/allocation/index.hbs b/ui/app/templates/allocations/allocation/index.hbs index e049e7e24..0069a9fba 100644 --- a/ui/app/templates/allocations/allocation/index.hbs +++ b/ui/app/templates/allocations/allocation/index.hbs @@ -5,11 +5,19 @@
-

{{this.error.title}}

+

{{this.error.title}}

{{this.error.description}}

- +
@@ -17,13 +25,19 @@

- Allocation {{this.model.name}} - {{this.model.clientStatus}} + Allocation + {{this.model.name}} + {{this.model.clientStatus}}
{{#if this.model.isRunning}}
- +
+ @disabled={{or + this.stopAllocation.isRunning + this.restartAllocation.isRunning + }} + @onConfirm={{perform this.stopAllocation}} + /> + @disabled={{or + this.stopAllocation.isRunning + this.restartAllocation.isRunning + }} + @onConfirm={{perform this.restartAllocation}} + /> {{/if}}

@@ -55,13 +77,24 @@
-
+
Allocation Details Job - {{this.model.job.name}} + {{this.model.job.name}} Client - {{this.model.node.shortId}} + {{this.model.node.shortId}}
@@ -74,16 +107,26 @@ {{#if this.model.isRunning}}
- +
- +
{{else}}
-

Allocation isn't running

-

Only running allocations utilize resources.

+

Allocation isn't running

+

Only running allocations utilize + resources.

{{/if}}
@@ -95,13 +138,17 @@
Tasks
-
+
{{#if this.sortedStates.length}} + @class="is-striped" + as |t| + > Name @@ -116,13 +163,20 @@ + @onClick={{action "taskClick" row.model.allocation row.model}} + /> {{else}}
-

No Tasks

-

Allocations will not have tasks until they are in a running state.

+

No Tasks

+

Allocations will not have tasks until they are in a running state.

{{/if}}
@@ -144,7 +198,11 @@ {{row.model.label}} - {{row.model.hostIp}}:{{row.model.value}} + {{row.model.hostIp}}:{{row.model.value}} {{row.model.to}} @@ -173,11 +231,21 @@ {{row.model.name}} {{row.model.portLabel}} - {{join ", " row.model.tags}} + {{join + ", " + row.model.tags + }} {{row.model.onUpdate}} - {{if row.model.connect "Yes" "No"}} + {{if + row.model.connect + "Yes" + "No" + }} - {{#each row.model.connect.sidecarService.proxy.upstreams as |upstream|}} + {{#each + row.model.connect.sidecarService.proxy.upstreams + as |upstream| + }} {{upstream.destinationName}}:{{upstream.localBindPort}} {{/each}} @@ -207,48 +275,81 @@
- + {{this.preempter.clientStatus}} - {{this.preempter.name}} - {{this.preempter.shortId}} + {{this.preempter.name}} + {{this.preempter.shortId}} Job - {{this.preempter.job.name}} + {{this.preempter.job.name}} Priority - {{this.preempter.job.priority}} + {{this.preempter.job.priority}} Client - {{this.preempter.node.shortId}} + {{this.preempter.node.shortId}} Reserved CPU - {{format-scheduled-hertz this.preempter.resources.cpu}} + {{format-scheduled-hertz + this.preempter.resources.cpu + }} Reserved Memory - {{format-scheduled-bytes this.preempter.resources.memory start="MiB"}} + {{format-scheduled-bytes + this.preempter.resources.memory + start="MiB" + }}
{{else}}

Allocation is gone

-

This allocation has been stopped and garbage collected.

+

This allocation has been stopped and + garbage collected.

{{/if}}
{{/if}} - {{#if (and this.model.preemptedAllocations.isFulfilled this.model.preemptedAllocations.length)}} + {{#if + (and + this.model.preemptedAllocations.isFulfilled + this.model.preemptedAllocations.length + ) + }}
Preempted Allocations
+ @class="allocations is-isolated" + as |t| + > ID @@ -262,7 +363,11 @@ Memory - +
diff --git a/ui/tests/acceptance/allocation-detail-test.js b/ui/tests/acceptance/allocation-detail-test.js index 733fafcf1..ed447d456 100644 --- a/ui/tests/acceptance/allocation-detail-test.js +++ b/ui/tests/acceptance/allocation-detail-test.js @@ -76,7 +76,7 @@ module('Acceptance | allocation detail', function (hooks) { await Allocation.details.visitJob(); assert.equal( currentURL(), - `/jobs/${job.id}@default`, + `/jobs/${job.id}`, 'Job link navigates to the job' ); @@ -499,10 +499,11 @@ module('Acceptance | allocation detail (preemptions)', function (hooks) { ); await Allocation.visit({ id: allocation.id }); + await Allocation.preempter.visitJob(); assert.equal( currentURL(), - `/jobs/${preempterJob.id}@default`, + `/jobs/${preempterJob.id}`, 'Clicking the preempter job link navigates to the preempter job page' );