Commit bc3c59c3 authored by Michael Lange's avatar Michael Lange
Browse files

Add a loading state to job information on allocation row.

This information is already loaded when traversing to an alloc row from
a job, but not when traversing to an alloc row from a node.
parent 5b009562
Showing with 21 additions and 2 deletions
+21 -2
......@@ -18,4 +18,19 @@ export default Component.extend({
click(event) {
lazyClick([this.get('onClick'), event]);
},
didReceiveAttrs() {
// If the job for this allocation is incomplete, reload it to get
// detailed information.
const allocation = this.get('allocation');
if (
allocation &&
allocation.get('job') &&
!allocation.get('job.isPending') &&
!allocation.get('taskGroup')
) {
const job = allocation.get('job.content');
job && job.reload();
}
},
});
......@@ -11,8 +11,12 @@
<td><a href="{{href-to "nodes.node" allocation.node}}">{{allocation.node.shortId}}</a></td>
{{else if (eq context "node")}}
<td>
<a href="{{href-to "jobs.job" allocation.job}}">{{allocation.job.name}}</a>
<span class="is-faded">/ {{allocation.taskGroup.name}}</span>
{{#if (or allocation.job.isPending allocation.job.isReloading)}}
...
{{else}}
<a href="{{href-to "jobs.job" allocation.job}}">{{allocation.job.name}}</a>
<span class="is-faded">/ {{allocation.taskGroup.name}}</span>
{{/if}}
</td>
{{/if}}
<td>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment