mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 09:55:44 +03:00
Add job submit time to the job children list
This commit is contained in:
@@ -12,6 +12,10 @@ export default class JobRow extends Component {
|
||||
|
||||
job = null;
|
||||
|
||||
// One of independent, parent, or child. Used to customize the template
|
||||
// based on the relationship of this job to others.
|
||||
context = 'independent';
|
||||
|
||||
onClick() {}
|
||||
|
||||
click(event) {
|
||||
|
||||
@@ -23,6 +23,7 @@ export default class Job extends Model {
|
||||
@attr('string') statusDescription;
|
||||
@attr('number') createIndex;
|
||||
@attr('number') modifyIndex;
|
||||
@attr('date') submitTime;
|
||||
|
||||
// True when the job is the parent periodic or parameterized jobs
|
||||
// Instances of periodic or parameterized jobs are false for both properties
|
||||
|
||||
@@ -7,6 +7,8 @@ export default class JobSerializer extends ApplicationSerializer {
|
||||
parameterized: 'ParameterizedJob',
|
||||
};
|
||||
|
||||
separateNanos = ['SubmitTime'];
|
||||
|
||||
normalize(typeHash, hash) {
|
||||
hash.NamespaceID = hash.Namespace;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
@class="with-foot" as |t|>
|
||||
<t.head>
|
||||
<t.sort-by @prop="name">Name</t.sort-by>
|
||||
<t.sort-by @prop="submitTime">Submitted At</t.sort-by>
|
||||
<t.sort-by @prop="status">Status</t.sort-by>
|
||||
<t.sort-by @prop="type">Type</t.sort-by>
|
||||
<t.sort-by @prop="priority">Priority</t.sort-by>
|
||||
@@ -21,7 +22,7 @@
|
||||
<th class="is-3">Summary</th>
|
||||
</t.head>
|
||||
<t.body @key="model.id" as |row|>
|
||||
<JobRow data-test-job-row @job={{row.model}} @onClick={{action this.gotoJob row.model}} />
|
||||
<JobRow data-test-job-row @job={{row.model}} @context="child" @onClick={{action this.gotoJob row.model}} />
|
||||
</t.body>
|
||||
</ListTable>
|
||||
<div class="table-foot">
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<td data-test-job-name><LinkTo @route="jobs.job" @model={{this.job.plainId}} class="is-primary">{{this.job.name}}</LinkTo></td>
|
||||
{{#if (eq @context "child")}}
|
||||
<td data-test-submit-time>{{format-month-ts this.job.submitTime}}</td>
|
||||
{{/if}}
|
||||
<td data-test-job-status>
|
||||
<span class="tag {{this.job.statusClass}}">{{this.job.status}}</span>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user