diff --git a/ui/app/components/allocation-row.js b/ui/app/components/allocation-row.js index d6236d6a2..dab830468 100644 --- a/ui/app/components/allocation-row.js +++ b/ui/app/components/allocation-row.js @@ -24,7 +24,8 @@ export default Component.extend({ stats: null, statsError: false, - enablePolling: computed(() => !Ember.testing), + // enablePolling: computed(() => !Ember.testing), + enablePolling: false, onClick() {}, @@ -59,12 +60,11 @@ export default Component.extend({ const allocation = this.get('allocation'); if (allocation) { - this.get('fetchStats').perform(allocation); + run.scheduleOnce('afterRender', this, qualifyAllocation); } else { this.get('fetchStats').cancelAll(); this.set('stats', null); } - run.scheduleOnce('afterRender', this, qualifyJob); }, fetchStats: task(function*(allocation) { @@ -84,6 +84,14 @@ export default Component.extend({ }).drop(), }); +function qualifyAllocation() { + const allocation = this.get('allocation'); + return allocation.reload().then(() => { + this.get('fetchStats').perform(allocation); + run.scheduleOnce('afterRender', this, qualifyJob); + }); +} + function qualifyJob() { const allocation = this.get('allocation'); if (allocation.get('originalJobId')) {