Remove the name column and add a created column to allocation rows
This commit is contained in:
parent
578403b193
commit
de80f65efe
|
@ -100,7 +100,7 @@
|
||||||
<th class="is-narrow"></th>
|
<th class="is-narrow"></th>
|
||||||
{{#t.sort-by prop="shortId"}}ID{{/t.sort-by}}
|
{{#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="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="statusIndex"}}Status{{/t.sort-by}}
|
||||||
{{#t.sort-by prop="job.name"}}Job{{/t.sort-by}}
|
{{#t.sort-by prop="job.name"}}Job{{/t.sort-by}}
|
||||||
{{#t.sort-by prop="jobVersion"}}Version{{/t.sort-by}}
|
{{#t.sort-by prop="jobVersion"}}Version{{/t.sort-by}}
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
{{allocation.shortId}}
|
{{allocation.shortId}}
|
||||||
{{/link-to}}
|
{{/link-to}}
|
||||||
</td>
|
</td>
|
||||||
<td data-test-modify-time>{{moment-format allocation.modifyTime "MM/DD HH:mm:ss"}}</td>
|
<td data-test-create-time>{{moment-format allocation.createTime "MM/DD HH:mm:ss"}}</td>
|
||||||
<td data-test-name>{{allocation.name}}</td>
|
<td data-test-modify-time>{{moment-from-now allocation.modifyTime}}</td>
|
||||||
<td data-test-client-status class="is-one-line">
|
<td data-test-client-status class="is-one-line">
|
||||||
<span class="color-swatch {{allocation.clientStatus}}" /> {{allocation.clientStatus}}
|
<span class="color-swatch {{allocation.clientStatus}}" /> {{allocation.clientStatus}}
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
{{#t.head}}
|
{{#t.head}}
|
||||||
<th class="is-narrow"></th>
|
<th class="is-narrow"></th>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
|
<th>Created</th>
|
||||||
<th>Modified</th>
|
<th>Modified</th>
|
||||||
<th>Name</th>
|
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th>Version</th>
|
<th>Version</th>
|
||||||
<th>Node</th>
|
<th>Node</th>
|
||||||
|
|
|
@ -63,8 +63,8 @@
|
||||||
{{#t.head}}
|
{{#t.head}}
|
||||||
<th class="is-narrow"></th>
|
<th class="is-narrow"></th>
|
||||||
{{#t.sort-by prop="shortId"}}ID{{/t.sort-by}}
|
{{#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="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="statusIndex"}}Status{{/t.sort-by}}
|
||||||
{{#t.sort-by prop="jobVersion"}}Version{{/t.sort-by}}
|
{{#t.sort-by prop="jobVersion"}}Version{{/t.sort-by}}
|
||||||
{{#t.sort-by prop="node.shortId"}}Client{{/t.sort-by}}
|
{{#t.sort-by prop="node.shortId"}}Client{{/t.sort-by}}
|
||||||
|
|
|
@ -129,12 +129,16 @@ test('each allocation should have high-level details for the allocation', functi
|
||||||
const allocationRow = ClientDetail.allocations.objectAt(0);
|
const allocationRow = ClientDetail.allocations.objectAt(0);
|
||||||
|
|
||||||
assert.equal(allocationRow.id, allocation.id.split('-')[0], 'Allocation short ID');
|
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(
|
assert.equal(
|
||||||
allocationRow.modifyTime,
|
allocationRow.modifyTime,
|
||||||
moment(allocation.modifyTime / 1000000).format('MM/DD HH:mm:ss'),
|
moment(allocation.modifyTime / 1000000).fromNow(),
|
||||||
'Allocation modify time'
|
'Allocation modify time'
|
||||||
);
|
);
|
||||||
assert.equal(allocationRow.name, allocation.name, 'Allocation name');
|
|
||||||
assert.equal(allocationRow.status, allocation.clientStatus, 'Client status');
|
assert.equal(allocationRow.status, allocation.clientStatus, 'Client status');
|
||||||
assert.equal(allocationRow.job, server.db.jobs.find(allocation.jobId).name, 'Job name');
|
assert.equal(allocationRow.job, server.db.jobs.find(allocation.jobId).name, 'Job name');
|
||||||
assert.ok(allocationRow.taskGroup, 'Task group name');
|
assert.ok(allocationRow.taskGroup, 'Task group name');
|
||||||
|
|
|
@ -143,12 +143,16 @@ test('each allocation should show basic information about the allocation', funct
|
||||||
|
|
||||||
andThen(() => {
|
andThen(() => {
|
||||||
assert.equal(allocationRow.shortId, allocation.id.split('-')[0], 'Allocation short id');
|
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(
|
assert.equal(
|
||||||
allocationRow.modifyTime,
|
allocationRow.modifyTime,
|
||||||
moment(allocation.modifyTime / 1000000).format('MM/DD HH:mm:ss'),
|
moment(allocation.modifyTime / 1000000).fromNow(),
|
||||||
'Allocation modify time'
|
'Allocation modify time'
|
||||||
);
|
);
|
||||||
assert.equal(allocationRow.name, allocation.name, 'Allocation name');
|
|
||||||
assert.equal(allocationRow.status, allocation.clientStatus, 'Client status');
|
assert.equal(allocationRow.status, allocation.clientStatus, 'Client status');
|
||||||
assert.equal(allocationRow.jobVersion, allocation.jobVersion, 'Job Version');
|
assert.equal(allocationRow.jobVersion, allocation.jobVersion, 'Job Version');
|
||||||
assert.equal(
|
assert.equal(
|
||||||
|
|
|
@ -38,8 +38,8 @@ export default create({
|
||||||
|
|
||||||
allocations: collection('[data-test-allocation]', {
|
allocations: collection('[data-test-allocation]', {
|
||||||
id: text('[data-test-short-id]'),
|
id: text('[data-test-short-id]'),
|
||||||
|
createTime: text('[data-test-create-time]'),
|
||||||
modifyTime: text('[data-test-modify-time]'),
|
modifyTime: text('[data-test-modify-time]'),
|
||||||
name: text('[data-test-name]'),
|
|
||||||
status: text('[data-test-client-status]'),
|
status: text('[data-test-client-status]'),
|
||||||
job: text('[data-test-job]'),
|
job: text('[data-test-job]'),
|
||||||
taskGroup: text('[data-test-task-group]'),
|
taskGroup: text('[data-test-task-group]'),
|
||||||
|
|
|
@ -34,8 +34,8 @@ export default create({
|
||||||
allocations: collection('[data-test-allocation]', {
|
allocations: collection('[data-test-allocation]', {
|
||||||
id: attribute('data-test-allocation'),
|
id: attribute('data-test-allocation'),
|
||||||
shortId: text('[data-test-short-id]'),
|
shortId: text('[data-test-short-id]'),
|
||||||
|
createTime: text('[data-test-create-time]'),
|
||||||
modifyTime: text('[data-test-modify-time]'),
|
modifyTime: text('[data-test-modify-time]'),
|
||||||
name: text('[data-test-name]'),
|
|
||||||
status: text('[data-test-client-status]'),
|
status: text('[data-test-client-status]'),
|
||||||
jobVersion: text('[data-test-job-version]'),
|
jobVersion: text('[data-test-job-version]'),
|
||||||
client: text('[data-test-client]'),
|
client: text('[data-test-client]'),
|
||||||
|
|
Loading…
Reference in a new issue