diff --git a/plugins/analysis/client/plugin.go b/plugins/analysis/client/plugin.go index 369702a4ba73de559b1dbd69eac2dab54deacd81..c3d4abcf4c3bfe886936fe4a9db3f09723c3f88d 100644 --- a/plugins/analysis/client/plugin.go +++ b/plugins/analysis/client/plugin.go @@ -157,7 +157,7 @@ func reportAcceptedNeighbors(dispatchers *EventDispatchers) { if autopeering.Selection != nil { for _, acceptedNeighbor := range autopeering.Selection.GetIncomingNeighbors() { //dispatchers.AddNode(acceptedNeighbor.ID().Bytes()) - dispatchers.ConnectNodes(local.GetInstance().ID().Bytes(), acceptedNeighbor.ID().Bytes()) + dispatchers.ConnectNodes(acceptedNeighbor.ID().Bytes(), local.GetInstance().ID().Bytes()) } } } diff --git a/plugins/analysis/webinterface/httpserver/index.go b/plugins/analysis/webinterface/httpserver/index.go index 894e36b59eabde0e1491ce0d4120d0c680f12f68..4da63b851fed0c8ef68a6b97d0cb8b6effb7ad36 100644 --- a/plugins/analysis/webinterface/httpserver/index.go +++ b/plugins/analysis/webinterface/httpserver/index.go @@ -144,6 +144,8 @@ func index(w http.ResponseWriter, r *http.Request) { var existingLinks = {}; let highlightNodes = []; + let highlightInbound = []; + let highlightOutbound = []; let highlightLinks = []; let highlightLink = null; @@ -244,7 +246,7 @@ func index(w http.ResponseWriter, r *http.Request) { } function connectNodes(sourceNodeId, targetNodeId) { - if(existingLinks[sourceNodeId + targetNodeId] == undefined && existingLinks[targetNodeId + sourceNodeId] == undefined) { + if(existingLinks[sourceNodeId + targetNodeId] == undefined) { if (!(sourceNodeId in nodesById)) { addNode(sourceNodeId); } @@ -261,9 +263,8 @@ func index(w http.ResponseWriter, r *http.Request) { } function disconnectNodes(sourceNodeId, targetNodeId) { - data.links = data.links.filter(l => !(l.source.id == sourceNodeId && l.target.id == targetNodeId) && !(l.source.id == targetNodeId && l.target.id == sourceNodeId)); + data.links = data.links.filter(l => !(l.source.id == sourceNodeId && l.target.id == targetNodeId)); delete existingLinks[sourceNodeId + targetNodeId]; - delete existingLinks[targetNodeId + sourceNodeId]; updateGraph(); }