Fix grouping bar for topologies that don't support grouping

- fixes #61
- dont clear nodes cache if topo is the same
- combined stores that were interdependent
- dont show topology grouping menu if unsupported
- also harmonized some variable names
- removed old grouping switcher
- moved topo actions to app actions, removed search
- get correct topology url
- first JS test using Jest
- make tests run on circle using the build container.
- replaced jest test runner with karma/jasmine
- Use debian for UI build and test container.
- updated karma-browserify
This commit is contained in:
David Kaltschmidt
2015-05-19 17:19:56 +02:00
committed by Tom Wilkie
parent 8dae139bdf
commit 66d66a4d01
21 changed files with 283 additions and 238 deletions

View File

@@ -1,8 +1,6 @@
var reqwest = require('reqwest');
var TopologyActions = require('../actions/topology-actions');
var AppActions = require('../actions/app-actions');
var AppStore = require('../stores/app-store');
var WS_URL = window.WS_URL || 'ws://' + location.host;
@@ -33,7 +31,7 @@ function createWebsocket(topologyUrl) {
socket.onmessage = function(event) {
var msg = JSON.parse(event.data);
if (msg.add || msg.remove || msg.update) {
TopologyActions.receiveNodesDelta(msg);
AppActions.receiveNodesDelta(msg);
}
};
@@ -48,9 +46,9 @@ function getTopologies() {
});
}
function getNodeDetails(topology, nodeId) {
if (nodeId) {
var url = [AppStore.getUrlForTopology(topology), nodeId].join('/');
function getNodeDetails(topologyUrl, nodeId) {
if (topologyUrl && nodeId) {
var url = [topologyUrl, nodeId].join('/');
reqwest(url, function(res) {
AppActions.receiveNodeDetails(res.node);
});