UI ember engines (#6718)

Adds replication engine and core in-repo addon
This commit is contained in:
Matthew Irish
2019-05-13 14:05:25 -05:00
committed by GitHub
parent 377064c521
commit 6d273dc368
478 changed files with 2526 additions and 1554 deletions

View File

@@ -0,0 +1,27 @@
import { hash } from 'rsvp';
import Base from '../../replication-base';
export default Base.extend({
model() {
return hash({
cluster: this.modelFor('mode.secondaries'),
mounts: this.fetchMounts(),
});
},
redirect(model) {
const replicationMode = this.paramsFor('mode').replication_mode;
if (!model.cluster.get(`${replicationMode}.isPrimary`) || !model.cluster.get('canAddSecondary')) {
return this.transitionTo('mode', replicationMode);
}
},
setupController(controller, model) {
controller.set('model', model.cluster);
controller.set('mounts', model.mounts);
},
resetController(controller) {
controller.reset();
},
});