1
0
Fork 0

The Plan is now thrown away after deleting it and not maintained locally in the browser

This commit is contained in:
Michael Hackstein 2014-03-01 13:17:49 +01:00
parent 16ac2c7fe9
commit b34b2b17b9
2 changed files with 17 additions and 4 deletions

View File

@ -51,6 +51,16 @@
}
});
return result;
},
isSymmetricSetup: function() {
var count = _.size(this.get("config").dispatchers);
return count === config.numberOfCoordinators
&& count === config.numberOfDBservers;
},
isTestSetup: function() {
return _.size(this.get("config").dispatchers);
}
});

View File

@ -37,18 +37,21 @@
});
},
editPlan: function() {
var config = window.App.clusterPlan.get("config");
if (_.size(config.dispatchers) === 1) {
var plan = window.App.clusterPlan;
if (plan.isTestSetup()) {
window.App.navigate("planTest", {trigger : true});
return;
}
//TODO
// window.App.navigate("planSymmetrical", {trigger : true});
if (plan.isSymmetricSetup()) {
window.App.navigate("planSymmetrical", {trigger : true});
return;
}
window.App.navigate("planAsymmetrical", {trigger : true});
},
deletePlan: function() {
window.App.clusterPlan.destroy();
window.App.clusterPlan = new window.ClusterPlan();
window.App.planScenario();
}