Repository navigation
NMS-20416: Make the custom graph builder filter-driven - #8932
Conversation
Each column accepts a filter. Nodes take an OpenNMS filter rule or a label. Resources and datasources take a wildcard pattern. The graph shows all matches unless the user selects items. Links store the filters and are evaluated again when opened.
|
Problems / errors
It would be better to check the count first, or to request id and label only.
Expect UI jank. The deep: true watch is also unnecessary, because the computed returns a new array each time anyway.
Users aren't told about either.
Side effects
|
Count rule matches before fetching, and fetch no more than the node limit. Debounce the resource and datasource boxes. Tell the user when a selection pins a filtered column. Cancel a pending filter on Clear. Keep selections when a filter narrows, drop them only on deselection. Report failed lookups.
marshallmassengill
left a comment
There was a problem hiding this comment.
I think this is good to go. Probably worth some others providing input but overall, much more usable.
|
Errors / likely bugs
Side effects
|
|
@christianpape Run it again :) |
|
Errors
Side effects
|
Print counts as plain digits. Treat a selection the filters cannot reach as no selection, show it as set aside, and drop datasource picks with their node. Give series and expressions the first free palette colour. Show and prune removed series, prune stale edits, cancel a settling filter when the last series is removed, and refresh only the effective nodes.
marshallmassengill
left a comment
There was a problem hiding this comment.
Blocker now and something else worth looking at I think:
Blocker: a failed load deletes the edits of a link.
- Commit 710d2b5 causes this problem. Prior one doesn't have it.
- If the rule fails, the rule matches too many nodes, or a fornode request fails, the page deletes the label and color edits.
- After the user corrects the problem, the edits do not come back.
- After 400 ms, the page writes the address bar again without o=. A reload or a bookmark does not restore the edits.
- Possible fix: do not delete edits after a load that has failures, a rule error, or too many matches.
Finding: Unchecking the last visible pick deletes the hidden picks.
- The column sends [], and the page clears all picks.
- The PR test at AdhocGraphBuilder.test.ts:378-381 says that this must not occur, but it tests that it does occur.
Prune edits only after a load with nothing missing, so a failed rule or node lookup does not delete a link's edits. Make Clear its own event, so unchecking the last listed item keeps the selections set aside. Enable Refresh whenever there are nodes to reload.
|
Mmm... yeah. That should be fixed now. |
marshallmassengill
left a comment
There was a problem hiding this comment.
Good enough for me!
|
Chandra said to just merge it. Full send! |
Each column accepts a filter. Nodes take an OpenNMS filter rule or a label. Resources and datasources take a wildcard pattern. The graph shows all matches unless the user selects items. Links store the filters and are evaluated again when opened.
Might could use additional docs around this. 🤷
External References