mirror of https://gitee.com/bigwinds/arangodb
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:
parent
709feb8572
commit
e3dc0f29e2
|
@ -44,6 +44,10 @@
|
||||||
* given in the body
|
* given in the body
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
controller.get("/amIDispatcher", function(req, res) {
|
||||||
|
res.json(!cluster.dispatcherDisabled());
|
||||||
|
});
|
||||||
|
|
||||||
if (!cluster.dispatcherDisabled()) {
|
if (!cluster.dispatcherDisabled()) {
|
||||||
var Plans = require("./repositories/plans.js"),
|
var Plans = require("./repositories/plans.js"),
|
||||||
plans = new Plans.Repository(
|
plans = new Plans.Repository(
|
||||||
|
|
|
@ -3,6 +3,16 @@
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
"use strict";
|
"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() {
|
$(document).ready(function() {
|
||||||
window.App = new window.ClusterRouter();
|
window.App = new window.ClusterRouter();
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,16 @@
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
"use strict";
|
"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() {
|
$(document).ready(function() {
|
||||||
window.App = new window.Router();
|
window.App = new window.Router();
|
||||||
Backbone.history.start();
|
Backbone.history.start();
|
||||||
|
|
Loading…
Reference in New Issue