2018-09-25 16:28:26 +00:00
|
|
|
import { alias } from '@ember/object/computed';
|
|
|
|
import { inject as service } from '@ember/service';
|
|
|
|
import { hash, resolve } from 'rsvp';
|
|
|
|
import Route from '@ember/routing/route';
|
2018-04-03 14:16:57 +00:00
|
|
|
import UnloadModelRouteMixin from 'vault/mixins/unload-model-route';
|
|
|
|
|
2018-09-25 16:28:26 +00:00
|
|
|
export default Route.extend(UnloadModelRouteMixin, {
|
2018-04-03 14:16:57 +00:00
|
|
|
modelPath: 'model.config',
|
|
|
|
fetchMounts() {
|
2018-09-25 16:28:26 +00:00
|
|
|
return hash({
|
|
|
|
mounts: this.store.findAll('secret-engine'),
|
|
|
|
auth: this.store.findAll('auth-method'),
|
|
|
|
}).then(({ mounts, auth }) => {
|
|
|
|
return resolve(mounts.toArray().concat(auth.toArray()));
|
|
|
|
});
|
2018-04-03 14:16:57 +00:00
|
|
|
},
|
|
|
|
|
2018-09-25 16:28:26 +00:00
|
|
|
version: service(),
|
|
|
|
rm: service('replication-mode'),
|
|
|
|
replicationMode: alias('rm.mode'),
|
2018-04-03 14:16:57 +00:00
|
|
|
});
|