mirror of https://gitee.com/bigwinds/arangodb
fixed web interface in non-cluster mode
This commit is contained in:
parent
5a585db592
commit
cb5af05a76
|
@ -35,8 +35,13 @@
|
||||||
// Initialise a new FoxxController called controller under the urlPrefix: "cluster".
|
// Initialise a new FoxxController called controller under the urlPrefix: "cluster".
|
||||||
var FoxxController = require("org/arangodb/foxx").Controller,
|
var FoxxController = require("org/arangodb/foxx").Controller,
|
||||||
controller = new FoxxController(applicationContext),
|
controller = new FoxxController(applicationContext),
|
||||||
_ = require("underscore"),
|
cluster = require("org/arangodb/cluster"),
|
||||||
Communication = require("org/arangodb/sharding/agency-communication"),
|
_ = 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(),
|
comm = new Communication.Communication(),
|
||||||
beats = comm.sync.Heartbeats(),
|
beats = comm.sync.Heartbeats(),
|
||||||
servers = comm.current.DBServers(),
|
servers = comm.current.DBServers(),
|
||||||
|
@ -118,4 +123,6 @@
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
} // end isCluster()
|
||||||
|
|
||||||
}());
|
}());
|
||||||
|
|
Loading…
Reference in New Issue