Perioidic and Parameterized jobs need to watch /jobs for child updates

This commit is contained in:
Michael Lange
2018-03-20 13:51:42 -07:00
parent 1c0d133f25
commit 80246b4deb

View File

@@ -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, {
@@ -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'),
});