1
0
Fork 0

fixed a coordinator bug in the web ui

This commit is contained in:
hkernbach 2016-05-20 21:12:34 +02:00
parent f8a837207f
commit 97ad8b462f
2 changed files with 9 additions and 5 deletions

View File

@ -288,7 +288,6 @@
this.navigate("#dashboard", {trigger: true});
return;
}
this.nodesView = new window.NodesView({
coordinators: this.coordinatorCollection,
dbServers: this.dbServers[0],
@ -308,6 +307,10 @@
this.navigate("#dashboard", {trigger: true});
return;
}
if (this.dbServers.length === 0) {
this.navigate("#cNodes", {trigger: true});
return;
}
this.nodesView = new window.NodesView({
coordinators: this.coordinatorCollection,

View File

@ -47,13 +47,11 @@
render: function () {
window.arangoHelper.buildNodesSubNav(this.toRender);
var callback = function() {
this.continueRender();
}.bind(this);
if (!this.initDone) {
if (!this.initDoneCoords) {
this.waitForCoordinators(callback);
}
else {
@ -64,6 +62,7 @@
continueRender: function() {
var coords;
if (this.toRender === 'coordinator') {
coords = this.coordinators.toJSON();
}
@ -75,6 +74,8 @@
coords: coords,
type: this.toRender
}));
window.arangoHelper.buildNodesSubNav(this.toRender);
},
waitForCoordinators: function(callback) {
@ -85,7 +86,7 @@
self.waitForCoordinators(callback);
}
else {
this.initDone = true;
this.initDoneCoords = true;
callback();
}
}, 200);