Hamid Ghaf e55c18ed12
adding copyright header (#19555)
* adding copyright header

* fix fmt and a test
2023-03-15 09:00:52 -07:00

24 lines
493 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Base from '../../replication-base';
export default Base.extend({
model() {
return this.modelFor('mode.secondaries');
},
redirect(model) {
const replicationMode = this.replicationMode;
if (!model.get(`${replicationMode}.isPrimary`) || !model.get('canRevokeSecondary')) {
return this.transitionTo('index');
}
},
resetController(controller) {
controller.reset();
},
});