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
Tree search does not take hosts belonging to a site into account #4293
Comments
Are you looking into this one @browniebraun ? |
Having seen the code in detail, I would expect this scenario to have never been tested. |
yep, similar to the missing sort mechanism for sites within a branch. see my previous patch. :) I believe we have just missed it. |
Cool. I'll assign you then. |
roger that. ;) |
I was out for the last two weeks supporting a move, means I have not forgotten my task. |
What task was that? 🙄 |
Commit it dude 👍 |
Tree search does not take hosts belonging to a site into account
Describe the bug
For my company we are automatically generating a geographic tree with more than 500 sites. Hosts will in general only be assigned to a site. Using that method the tree search will never return a hit for a host that belongs to specific site, because there is no record existing in graph_tree_items referring its individual host_id.
To Reproduce
Create some leaf sites, assign those to the Cacti tree or a tree branch and finally assign some hosts to those new test site records.
Go to the tree view and enter the first characters of one of those hosts.
Expected behavior
Hosts will be found, tree will be opened down to host level, including leaf site branches.
Reality
No hits. Cacti returns nothing.
Solution
Better solutions may exist, but the easiest way is to take the host table in function "get_matching_nodes()" two times (with a RIGHT JOIN) into account as follows:
Screenshot
Patch in place
Version
The text was updated successfully, but these errors were encountered: