open-vault/ui/app/routes/vault/cluster/replication/replication-base.js

22 lines
677 B
JavaScript
Raw Normal View History

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';
export default Route.extend(UnloadModelRouteMixin, {
2018-04-03 14:16:57 +00:00
modelPath: 'model.config',
fetchMounts() {
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
},
version: service(),
rm: service('replication-mode'),
replicationMode: alias('rm.mode'),
2018-04-03 14:16:57 +00:00
});