Skip to content

Commit

Permalink
Perioidic and Parameterized jobs need to watch /jobs for child updates
Browse files Browse the repository at this point in the history
  • Loading branch information
DingoEatingFuzz committed Mar 20, 2018
1 parent 1c0d133 commit 80246b4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ui/app/routes/jobs/job/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Route from '@ember/routing/route';
import { collect } from '@ember/object/computed';
import { watchRecord, watchRelationship } from 'nomad-ui/utils/properties/watch';
import { watchRecord, watchRelationship, watchAll } from 'nomad-ui/utils/properties/watch';
import WithWatchers from 'nomad-ui/mixins/with-watchers';

export default Route.extend(WithWatchers, {
Expand All @@ -13,13 +13,15 @@ export default Route.extend(WithWatchers, {
summary: this.get('watchSummary').perform(model),
evaluations: this.get('watchEvaluations').perform(model),
deployments: model.get('supportsDeployments') && this.get('watchDeployments').perform(model),
list: model.get('hasChildren') && this.get('watchAll').perform(),
});
},

watch: watchRecord('job'),
watchAll: watchAll('job'),
watchSummary: watchRelationship('summary'),
watchEvaluations: watchRelationship('evaluations'),
watchDeployments: watchRelationship('deployments'),

watchers: collect('watch', 'watchSummary', 'watchEvaluations', 'watchDeployments'),
watchers: collect('watch', 'watchAll', 'watchSummary', 'watchEvaluations', 'watchDeployments'),
});

0 comments on commit 80246b4

Please sign in to comment.