open-vault/ui/app/routes/vault/cluster/replication/mode/secondaries/revoke.js
2018-06-04 14:38:35 -04:00

19 lines
487 B
JavaScript

import Base from '../../replication-base';
export default Base.extend({
model() {
return this.modelFor('vault.cluster.replication.mode.secondaries');
},
redirect(model) {
const replicationMode = this.get('replicationMode');
if (!model.get(`${replicationMode}.isPrimary`) || !model.get('canRevokeSecondary')) {
return this.transitionTo('vault.cluster.replication', model.get('name'));
}
},
resetController(controller) {
controller.reset();
},
});