2018-07-19 01:59:04 +00:00
|
|
|
import Ember from 'ember';
|
|
|
|
import UnloadModel from 'vault/mixins/unload-model-route';
|
|
|
|
const { inject } = Ember;
|
|
|
|
|
|
|
|
export default Ember.Route.extend(UnloadModel, {
|
|
|
|
version: inject.service(),
|
|
|
|
|
|
|
|
beforeModel() {
|
|
|
|
return this.get('version').fetchFeatures().then(() => {
|
|
|
|
return this._super(...arguments);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
model() {
|
2018-08-28 05:03:55 +00:00
|
|
|
return this.get('version').hasFeature('Control Groups') ? this.store.createRecord('control-group') : null;
|
2018-07-19 01:59:04 +00:00
|
|
|
},
|
|
|
|
});
|