open-vault/ui/app/routes/vault/cluster/access/control-groups.js
madalynrose 554446ae4e
Licensing in the UI (#5437)
Add licensing to the UI
2018-10-12 15:03:01 -04:00

20 lines
502 B
JavaScript

import { inject as service } from '@ember/service';
import Route from '@ember/routing/route';
import UnloadModel from 'vault/mixins/unload-model-route';
export default Route.extend(UnloadModel, {
version: 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;
},
});