1
0
Fork 0

The interfaces will now redirect based on their arangos rule: Dispatchers point to cluster.html, all others point to index.html

This commit is contained in:
Michael Hackstein 2014-02-28 15:01:38 +01:00
parent 709feb8572
commit e3dc0f29e2
3 changed files with 24 additions and 0 deletions

View File

@ -44,6 +44,10 @@
* given in the body
*/
controller.get("/amIDispatcher", function(req, res) {
res.json(!cluster.dispatcherDisabled());
});
if (!cluster.dispatcherDisabled()) {
var Plans = require("./repositories/plans.js"),
plans = new Plans.Repository(

View File

@ -3,6 +3,16 @@
(function() {
"use strict";
$.get("cluster/amIDispatcher", function(data) {
if (!data) {
var url = window.location.origin;
url += window.location.pathname;
url = url.replace("cluster", "index");
window.location.replace(url);
}
});
$(document).ready(function() {
window.App = new window.ClusterRouter();

View File

@ -3,6 +3,16 @@
(function() {
"use strict";
$.get("cluster/amIDispatcher", function(data) {
if (data) {
var url = window.location.origin;
url += window.location.pathname;
url = url.replace("index", "cluster");
window.location.replace(url);
}
});
$(document).ready(function() {
window.App = new window.Router();
Backbone.history.start();