Add new IP address search page.

Add a new IP address search page at /ip_addresses. Replaces the old
search page at /moderator/ip_addrs.

On user profile pages, show the user's last known IP to mods. Also add
search links for finding other IPs or accounts associated with the user.

IP address search uses a big UNION ALL statement to merge IP addresses
across various tables into a single view. This makes searching easier,
but is known to timeout in certain cases.

Fixes #4207 (the new IP search page supports searching by subnet).
This commit is contained in:
evazion
2019-11-10 23:24:28 -06:00
parent 2aac42b112
commit bf6bb94702
17 changed files with 311 additions and 2 deletions

View File

@@ -109,7 +109,7 @@ module ApplicationHelper
end
def link_to_ip(ip)
link_to ip, moderator_ip_addrs_path(:search => {:ip_addr => ip})
link_to ip, ip_addresses_path(search: { ip_addr: ip, group_by: "user" })
end
def link_to_search(search)