Skip to content

Commit

Permalink
pin bokeh dep, resolves #444, filter graph to only plot online clients,
Browse files Browse the repository at this point in the history
resolves #366 (#445)

Co-authored-by: Andreas Hellander <[email protected]>
  • Loading branch information
ahellander and Andreas Hellander authored Dec 2, 2022
1 parent 5b6fd90 commit cca826a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
22 changes: 12 additions & 10 deletions fedn/fedn/clients/reducer/restservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,15 +328,16 @@ def netgraph():

for client in client_info['active_clients']:
try:
result['nodes'].append({
"id": str(client['_id']),
"label": "Client",
"role": client['role'],
"status": client['status'],
"name": client['name'],
"combiner": client['combiner'],
"type": 'client',
})
if client['status'] != 'offline':
result['nodes'].append({
"id": str(client['_id']),
"label": "Client",
"role": client['role'],
"status": client['status'],
"name": client['name'],
"combiner": client['combiner'],
"type": 'client',
})
except Exception as err:
print(err)

Expand Down Expand Up @@ -375,7 +376,8 @@ def network_graph():
graph = plot.make_netgraph_plot(df_edges, df_nodes)
return json.dumps(json_item(graph, "myplot"))
except Exception:
return ''
raise
# return ''

@app.route('/events')
def events():
Expand Down
2 changes: 1 addition & 1 deletion fedn/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"jinja2",
"plotly",
"pandas",
"bokeh",
"bokeh<3.0.0",
"networkx"
],
license='Apache 2.0',
Expand Down

0 comments on commit cca826a

Please sign in to comment.