Remove the name column and add a created column to allocation rows

This commit is contained in:
Michael Lange 2018-07-19 13:30:08 -07:00
parent 578403b193
commit de80f65efe
8 changed files with 19 additions and 11 deletions

View File

@ -100,7 +100,7 @@
<th class="is-narrow"></th>
{{#t.sort-by prop="shortId"}}ID{{/t.sort-by}}
{{#t.sort-by prop="modifyIndex" title="Modify Index"}}Modified{{/t.sort-by}}
{{#t.sort-by prop="name"}}Name{{/t.sort-by}}
{{#t.sort-by prop="createIndex" title="Create Index"}}Created{{/t.sort-by}}
{{#t.sort-by prop="statusIndex"}}Status{{/t.sort-by}}
{{#t.sort-by prop="job.name"}}Job{{/t.sort-by}}
{{#t.sort-by prop="jobVersion"}}Version{{/t.sort-by}}

View File

@ -15,8 +15,8 @@
{{allocation.shortId}}
{{/link-to}}
</td>
<td data-test-modify-time>{{moment-format allocation.modifyTime "MM/DD HH:mm:ss"}}</td>
<td data-test-name>{{allocation.name}}</td>
<td data-test-create-time>{{moment-format allocation.createTime "MM/DD HH:mm:ss"}}</td>
<td data-test-modify-time>{{moment-from-now allocation.modifyTime}}</td>
<td data-test-client-status class="is-one-line">
<span class="color-swatch {{allocation.clientStatus}}" /> {{allocation.clientStatus}}
</td>

View File

@ -9,8 +9,8 @@
{{#t.head}}
<th class="is-narrow"></th>
<th>ID</th>
<th>Created</th>
<th>Modified</th>
<th>Name</th>
<th>Status</th>
<th>Version</th>
<th>Node</th>

View File

@ -63,8 +63,8 @@
{{#t.head}}
<th class="is-narrow"></th>
{{#t.sort-by prop="shortId"}}ID{{/t.sort-by}}
{{#t.sort-by prop="createIndex" title="Create Index"}}Created{{/t.sort-by}}
{{#t.sort-by prop="modifyIndex" title="Modify Index"}}Modified{{/t.sort-by}}
{{#t.sort-by prop="name"}}Name{{/t.sort-by}}
{{#t.sort-by prop="statusIndex"}}Status{{/t.sort-by}}
{{#t.sort-by prop="jobVersion"}}Version{{/t.sort-by}}
{{#t.sort-by prop="node.shortId"}}Client{{/t.sort-by}}

View File

@ -129,12 +129,16 @@ test('each allocation should have high-level details for the allocation', functi
const allocationRow = ClientDetail.allocations.objectAt(0);
assert.equal(allocationRow.id, allocation.id.split('-')[0], 'Allocation short ID');
assert.equal(
allocationRow.createTime,
moment(allocation.createTime / 1000000).format('MM/DD HH:mm:ss'),
'Allocation create time'
);
assert.equal(
allocationRow.modifyTime,
moment(allocation.modifyTime / 1000000).format('MM/DD HH:mm:ss'),
moment(allocation.modifyTime / 1000000).fromNow(),
'Allocation modify time'
);
assert.equal(allocationRow.name, allocation.name, 'Allocation name');
assert.equal(allocationRow.status, allocation.clientStatus, 'Client status');
assert.equal(allocationRow.job, server.db.jobs.find(allocation.jobId).name, 'Job name');
assert.ok(allocationRow.taskGroup, 'Task group name');

View File

@ -143,12 +143,16 @@ test('each allocation should show basic information about the allocation', funct
andThen(() => {
assert.equal(allocationRow.shortId, allocation.id.split('-')[0], 'Allocation short id');
assert.equal(
allocationRow.createTime,
moment(allocation.createTime / 1000000).format('MM/DD HH:mm:ss'),
'Allocation create time'
);
assert.equal(
allocationRow.modifyTime,
moment(allocation.modifyTime / 1000000).format('MM/DD HH:mm:ss'),
moment(allocation.modifyTime / 1000000).fromNow(),
'Allocation modify time'
);
assert.equal(allocationRow.name, allocation.name, 'Allocation name');
assert.equal(allocationRow.status, allocation.clientStatus, 'Client status');
assert.equal(allocationRow.jobVersion, allocation.jobVersion, 'Job Version');
assert.equal(

View File

@ -38,8 +38,8 @@ export default create({
allocations: collection('[data-test-allocation]', {
id: text('[data-test-short-id]'),
createTime: text('[data-test-create-time]'),
modifyTime: text('[data-test-modify-time]'),
name: text('[data-test-name]'),
status: text('[data-test-client-status]'),
job: text('[data-test-job]'),
taskGroup: text('[data-test-task-group]'),

View File

@ -34,8 +34,8 @@ export default create({
allocations: collection('[data-test-allocation]', {
id: attribute('data-test-allocation'),
shortId: text('[data-test-short-id]'),
createTime: text('[data-test-create-time]'),
modifyTime: text('[data-test-modify-time]'),
name: text('[data-test-name]'),
status: text('[data-test-client-status]'),
jobVersion: text('[data-test-job-version]'),
client: text('[data-test-client]'),