/ip_addresses: add to sitemap; add IP info links.

This commit is contained in:
evazion
2019-11-12 20:51:48 -06:00
parent f9881e5414
commit 682aa220b8
4 changed files with 7 additions and 2 deletions

View File

@@ -6,6 +6,7 @@
<th>IP Address</th>
<th>User</th>
<th>Date</th>
<th></th>
</tr>
</thead>
<tbody>
@@ -22,6 +23,7 @@
<%= link_to "»", ip_addresses_path(search: { user_id: ip.user_id, group_by: "ip_addr" }) %>
</td>
<td><%= time_ago_in_words_tagged ip.created_at %></td>
<td><%= link_to "IP info", "https://ipinfo.io/#{ip.ip_addr}" %></td>
</tr>
<% end %>
</tbody>

View File

@@ -7,6 +7,7 @@
<tr>
<th>IP Address</th>
<th>Uses</th>
<th></th>
</tr>
</thead>
<tbody>
@@ -17,6 +18,7 @@
<%= link_to "»", ip_addresses_path(search: { ip_addr: ip.to_s, group_by: "user" }) %>
</td>
<td><%= link_to ip.count_all, ip_addresses_path(search: { ip_addr: ip.to_s }) %></td>
<td><%= link_to "IP info", "https://ipinfo.io/#{ip.ip_addr}" %></td>
</tr>
<% end %>
</tbody>

View File

@@ -3,7 +3,7 @@
<%= search_form_for(ip_addresses_path) do |f| %>
<%= f.input :user_id, label: "User ID", input_html: { value: params[:search][:user_id] }, hint: "Separate with spaces" %>
<%= f.input :user_name, label: "User Name", input_html: { "data-autocomplete": "user", value: params[:search][:user_name] }, hint: "Use * for wildcard" %>
<%= f.input :ip_addr, label: "IP Address", input_html: { value: params[:search][:ip_addr] } %>
<%= f.input :ip_addr, label: "IP Address", input_html: { value: params[:search][:ip_addr] }, hint: '<a href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#CIDR_notation">CIDR notation</a> supported.'.html_safe %>
<%= f.input :created_at, label: "Date", input_html: { value: params[:search][:created_at] } %>
<%= f.input :model_type, label: "Source", collection: IpAddress.model_types, include_blank: true, selected: params[:search][:model_type] %>
<%= f.input :group_by, label: "Group By", collection: [["User", "user"], ["IP Address", "ip_addr"]], include_blank: true, selected: params[:search][:group_by] %>

View File

@@ -154,10 +154,11 @@
<li><%= link_to("Janitor Trials", janitor_trials_path) %></li>
<% if CurrentUser.is_member? %>
<li><%= link_to("User Name Change Requests", user_name_change_requests_path) %></li>
<li><%= link_to("User Name Change Requests", user_name_change_requests_path) %></li>
<% end %>
<% if CurrentUser.is_moderator? %>
<li><%= link_to("IP Addresses", ip_addresses_path) %></li>
<li><%= link_to("IP Bans", ip_bans_path) %></li>
<% end %>