2018-09-25 16:28:26 +00:00
|
|
|
import { inject as service } from '@ember/service';
|
|
|
|
import Route from '@ember/routing/route';
|
2018-07-19 01:59:04 +00:00
|
|
|
import UnloadModel from 'vault/mixins/unload-model-route';
|
|
|
|
|
2018-09-25 16:28:26 +00:00
|
|
|
export default Route.extend(UnloadModel, {
|
|
|
|
version: service(),
|
2018-07-19 01:59:04 +00:00
|
|
|
|
|
|
|
beforeModel() {
|
2018-10-12 19:03:01 +00:00
|
|
|
return this.get('version')
|
|
|
|
.fetchFeatures()
|
|
|
|
.then(() => {
|
|
|
|
return this._super(...arguments);
|
|
|
|
});
|
2018-07-19 01:59:04 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
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
|
|
|
},
|
|
|
|
});
|