Testing & fixing GUI fail-over code.
Change-Id: I64843186bf05020ce77a1508a300391e0db6bf48
diff --git a/web/gui/src/main/webapp/app/fw/remote/websocket.js b/web/gui/src/main/webapp/app/fw/remote/websocket.js
index f1a4d52..ca2840d 100644
--- a/web/gui/src/main/webapp/app/fw/remote/websocket.js
+++ b/web/gui/src/main/webapp/app/fw/remote/websocket.js
@@ -40,10 +40,12 @@
var builtinHandlers = {
bootstrap: function (data) {
- clusterNodes = data.instances;
+ clusterNodes = data.clusterNodes;
clusterNodes.forEach(function (d, i) {
if (d.uiAttached) {
clusterIndex = i;
+ $log.info('Connected to cluster node ' + d.ip);
+ // TODO: add connect info to masthead somewhere
}
});
}
@@ -228,7 +230,11 @@
wsock = _wsock_;
vs = _vs_;
- bindHandlers(builtinHandlers);
+ // TODO: Consider how to simplify handler structure
+ // Now it is an object of key -> object that has a method named 'key'.
+ bindHandlers({
+ bootstrap: builtinHandlers
+ });
return {
resetSid: resetSid,