1
0
Fork 0

fixed web interface in non-cluster mode

This commit is contained in:
Jan Steemann 2014-01-24 13:54:35 +01:00
parent 5a585db592
commit cb5af05a76
1 changed files with 76 additions and 69 deletions

View File

@ -35,8 +35,13 @@
// Initialise a new FoxxController called controller under the urlPrefix: "cluster".
var FoxxController = require("org/arangodb/foxx").Controller,
controller = new FoxxController(applicationContext),
_ = require("underscore"),
Communication = require("org/arangodb/sharding/agency-communication"),
cluster = require("org/arangodb/cluster"),
_ = require("underscore");
if (cluster.isCluster()) {
// only make these functions available in cluster mode!
var Communication = require("org/arangodb/sharding/agency-communication"),
comm = new Communication.Communication(),
beats = comm.sync.Heartbeats(),
servers = comm.current.DBServers(),
@ -118,4 +123,6 @@
);
});
} // end isCluster()
}());