-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report number of filtered nodes in topology stats. #519
Conversation
107f601
to
00304c9
Compare
Fixes #207 |
@@ -100,6 +100,17 @@ func makeReportPostHandler(a xfer.Adder) http.HandlerFunc { | |||
} | |||
} | |||
|
|||
func decorateTopoloyForRequest(r *http.Request, topology *topologyView) { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Looks great! I'd propose replacing "0 filtered" with just nothing, i.e. "11 nodes, 0 filtered" becomes just "11 nodes". |
When clicking hide system containers, it doesn't hide them any more. No error reported in logs. Also, we're not counting filtered psuedo nodes. I'll fix. |
Show/hide works for me. Got a report? |
Report: https://gist.github.com/tomwilkie/bfda494869cfc95a14c1 I'm also seeing an occasional "Uncaught TypeError: Cannot read property 'get' of undefined" in the console. |
Have tested and can confirm UI works as expected: LGTM for those bits. Can someone give the go bits a quick look please? |
@davkal got another issue - "System container hidden" but "2 nodes" showing in status - should be "0 nodes (2 filtered)" To reproduce:
|
@@ -11,6 +11,18 @@ import ( | |||
type Renderer interface { | |||
Render(report.Report) RenderableNodes | |||
EdgeMetadata(rpt report.Report, localID, remoteID string) report.EdgeMetadata | |||
Stats(report.Report) Stats | |||
} |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
@paulbellamy @tomwilkie if I click hide system containers in the containers topology, do I expect system nodes to be hidden in other topologies, too? Or should that be independent of other topologies? |
@davkal independent right now. Each topologies defines their own filters. |
Include filtered psuedo nodes in stats.
* always set updated topology object when received * track whether route was set on initial load * removed connection count from status bar (was not deemed important) * fixed issue where topology option changes did not affect details pane * only show filtered nodes when count > 0 * clear nodes graph when empty topology is loaded * also prevent JS error if nodes are hovered over that should be gone * fixed options sync issue between graph and status bar * implemented topology options with immutable DS
That works well @davkal. I'll rebase, and we're just waiting on an LGTM from @paulbellamy |
db445e2
to
2d7e546
Compare
LGTM. |
Report number of filtered nodes in topology stats.
@davkal this adds a filtered_nodes field to the /api/topology endpoint. You'll need to ensure you pass the same query parameters (ie system=show) to this endpoint to get accurate stats. Could you do the UI pieces?
Fixes #509