diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/routers/router.js b/js/apps/system/_admin/aardvark/APP/frontend/js/routers/router.js index baa0eec90f..0fbc003d58 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/routers/router.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/routers/router.js @@ -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, diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/views/nodesView.js b/js/apps/system/_admin/aardvark/APP/frontend/js/views/nodesView.js index 9f4f6b6391..27cacb038f 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/views/nodesView.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/views/nodesView.js @@ -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);