open-vault/ui/app/routes/vault/cluster/access/control-groups.js
2018-08-28 00:03:55 -05:00

18 lines
456 B
JavaScript

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() {
return this.get('version').hasFeature('Control Groups') ? this.store.createRecord('control-group') : null;
},
});