mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
Watch for summary changes in job-row
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
import { inject as service } from '@ember/service';
|
||||
import Component from '@ember/component';
|
||||
import { lazyClick } from '../helpers/lazy-click';
|
||||
import { watchRelationship } from 'nomad-ui/utils/properties/watch';
|
||||
|
||||
export default Component.extend({
|
||||
store: service(),
|
||||
|
||||
tagName: 'tr',
|
||||
classNames: ['job-row', 'is-interactive'],
|
||||
|
||||
@@ -17,7 +21,11 @@ export default Component.extend({
|
||||
// Reload the job in order to get detail information
|
||||
const job = this.get('job');
|
||||
if (job && !job.get('isLoading')) {
|
||||
job.reload();
|
||||
job.reload().then(() => {
|
||||
this.get('watch').perform(job, 100);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
watch: watchRelationship('summary').drop(),
|
||||
});
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
<td data-test-job-type>{{job.displayType}}</td>
|
||||
<td data-test-job-priority>{{job.priority}}</td>
|
||||
<td data-test-job-task-groups>
|
||||
{{#if job.isReloading}}
|
||||
...
|
||||
{{else}}
|
||||
{{#if job.taskGroups.length}}
|
||||
{{job.taskGroups.length}}
|
||||
{{else}}
|
||||
--
|
||||
{{/if}}
|
||||
</td>
|
||||
<td data-test-job-allocations>
|
||||
|
||||
Reference in New Issue
Block a user