Skip to content

Commit

Permalink
move version check to beforeModel
Browse files Browse the repository at this point in the history
  • Loading branch information
meirish committed May 10, 2018
1 parent 1c46fc4 commit e9721df
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ui/app/routes/vault/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export default Ember.Route.extend(ModelBoundaryRoute, ClusterRoute, {
const params = this.paramsFor(this.routeName);
const id = this.getClusterId(params);
if (id) {
return this.get('auth').setCluster(id);
this.get('auth').setCluster(id);
return this.get('version').fetchFeatures();
} else {
return Ember.RSVP.reject({ httpStatus: 404, message: 'not found', path: params.cluster_name });
}
Expand All @@ -31,9 +32,7 @@ export default Ember.Route.extend(ModelBoundaryRoute, ClusterRoute, {
model(params) {
const id = this.getClusterId(params);

return this.get('version').fetchFeatures().then(() => {
return this.get('store').findRecord('cluster', id);
});
},

stopPoll: Ember.on('deactivate', function() {
Expand Down

0 comments on commit e9721df

Please sign in to comment.