mirror of https://gitee.com/bigwinds/arangodb
The Plan is now thrown away after deleting it and not maintained locally in the browser
This commit is contained in:
parent
16ac2c7fe9
commit
b34b2b17b9
|
@ -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);
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue