diff --git a/.changelog/18595.txt b/.changelog/18595.txt new file mode 100644 index 00000000000..19ce7cab2a8 --- /dev/null +++ b/.changelog/18595.txt @@ -0,0 +1,3 @@ +```release-note:improvement +ui: simplify presentation of task event times (10m2.230948s bceomes 10m2s etc.) +``` diff --git a/ui/app/models/task-event.js b/ui/app/models/task-event.js index a1c7e7b5ddf..56d879b8d46 100644 --- a/ui/app/models/task-event.js +++ b/ui/app/models/task-event.js @@ -37,6 +37,6 @@ function simplifyTimeMessage(message) { m %= 60; return `${h ? h + 'h' : ''}${h || m ? m + 'm' : ''}${s}s`; - }) || '' + }) || message ); } diff --git a/ui/tests/acceptance/allocation-detail-test.js b/ui/tests/acceptance/allocation-detail-test.js index 5cd4a576a70..95a8f5e1ba0 100644 --- a/ui/tests/acceptance/allocation-detail-test.js +++ b/ui/tests/acceptance/allocation-detail-test.js @@ -209,7 +209,7 @@ module('Acceptance | allocation detail', function (hooks) { assert.equal(taskRow.name, task.name, 'Name'); assert.equal(taskRow.state, task.state, 'State'); - assert.equal(taskRow.message, event.message, 'Event Message'); + assert.equal(taskRow.message, event.displayMessage, 'Event Message'); assert.equal( taskRow.time, moment(event.time / 1000000).format("MMM DD, 'YY HH:mm:ss ZZ"), diff --git a/ui/tests/acceptance/task-detail-test.js b/ui/tests/acceptance/task-detail-test.js index dc73c21bd53..ff2c4c7a142 100644 --- a/ui/tests/acceptance/task-detail-test.js +++ b/ui/tests/acceptance/task-detail-test.js @@ -223,7 +223,7 @@ module('Acceptance | task detail', function (hooks) { 'Event timestamp' ); assert.equal(recentEvent.type, event.type, 'Event type'); - assert.equal(recentEvent.message, event.message, 'Event message'); + assert.equal(recentEvent.message, event.displayMessage, 'Event message'); }); test('when the allocation is not found, the application errors', async function (assert) {