Network search for the new global seach feature #11665
Replies: 3 comments 5 replies
-
When searching for 1.2.3.4 I would expect to find:
(and not find 1.2.3.40/XX) When searching for 1.2.3.0/24 I would expect to find:
Looking #11315, it seems the issue is not agreeing on the functionality, but how to implement it within the new global search framework. It seems to me that these IP address searches will need to be special-cased - perhaps this is what you mean by a "Network lookup type". Possibly related is what happens when you enter a partial IP address like "10.9.1" - see #6016 |
Beta Was this translation helpful? Give feedback.
-
This is what I've come up with so far. I've moved away from the separate lookup idea. develop...kkthxbye-code:netbox:poc-ip-search The following functionality is added when doing a Partial lookup search (the default when searching from the global search bar) for a string that parses as an IP address:
This all matches the search bar behavior, except IPs contained in the search query are not returned in the search result. Example searching for a prefix: Example searching for an IP in the prefix: Example searching for a non-existent IP in the prefix: Code changes:
All existing search behavior should be identical otherwise. |
Beta Was this translation helpful? Give feedback.
-
Anyone done any progress on the original issue #11315? The issue (and everyone related) is locked as it turned into a unrelated heated debate. I didn't dig into the new global search, but would a logic like this be acceptable? try:
ipobj = ipaddress.ip(query)
results.append(prefixes_containing(ipobj))
except NotValid:
pass Or will that be non-acceptible? Another way is to prefix the query and look for special keywords; I'm not sure what fits into the future versions of Netbox. Can you give us a headsup @jeremystretch , so people won't work on something that would not be acceptable.. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to gather some feedback for the global seach feature regarding searching for IP related fields.
Related issue: #11315
I have a PoC for a "Network" lookup type in the global search, which would mirror in part the previous global search. However I need feedback as to what is expected when searching for an IP or an IP with mask in this mode. So please contribute your ideal responses for different IP address searches in the new mode.
Please take into consideration all models which provide a field representing an IP address or a prefix, including IPAddress, Prefix and IPRange.
Beta Was this translation helpful? Give feedback.
All reactions