From 682aa220b831f5bbb6fda703a214081be8be66ad Mon Sep 17 00:00:00 2001 From: evazion Date: Tue, 12 Nov 2019 20:51:48 -0600 Subject: [PATCH] /ip_addresses: add to sitemap; add IP info links. --- app/views/ip_addresses/_index.html.erb | 2 ++ app/views/ip_addresses/_index_by_ip_addr.html.erb | 2 ++ app/views/ip_addresses/index.html.erb | 2 +- app/views/static/site_map.html.erb | 3 ++- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/views/ip_addresses/_index.html.erb b/app/views/ip_addresses/_index.html.erb index 686c71f77..229c1504b 100644 --- a/app/views/ip_addresses/_index.html.erb +++ b/app/views/ip_addresses/_index.html.erb @@ -6,6 +6,7 @@ IP Address User Date + @@ -22,6 +23,7 @@ <%= link_to "»", ip_addresses_path(search: { user_id: ip.user_id, group_by: "ip_addr" }) %> <%= time_ago_in_words_tagged ip.created_at %> + <%= link_to "IP info", "https://ipinfo.io/#{ip.ip_addr}" %> <% end %> diff --git a/app/views/ip_addresses/_index_by_ip_addr.html.erb b/app/views/ip_addresses/_index_by_ip_addr.html.erb index 512bfced3..8161fe4f1 100644 --- a/app/views/ip_addresses/_index_by_ip_addr.html.erb +++ b/app/views/ip_addresses/_index_by_ip_addr.html.erb @@ -7,6 +7,7 @@ IP Address Uses + @@ -17,6 +18,7 @@ <%= link_to "»", ip_addresses_path(search: { ip_addr: ip.to_s, group_by: "user" }) %> <%= link_to ip.count_all, ip_addresses_path(search: { ip_addr: ip.to_s }) %> + <%= link_to "IP info", "https://ipinfo.io/#{ip.ip_addr}" %> <% end %> diff --git a/app/views/ip_addresses/index.html.erb b/app/views/ip_addresses/index.html.erb index d5afb1d6a..844889b80 100644 --- a/app/views/ip_addresses/index.html.erb +++ b/app/views/ip_addresses/index.html.erb @@ -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: 'CIDR notation 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] %> diff --git a/app/views/static/site_map.html.erb b/app/views/static/site_map.html.erb index b26835e86..0c8b306ab 100644 --- a/app/views/static/site_map.html.erb +++ b/app/views/static/site_map.html.erb @@ -154,10 +154,11 @@
  • <%= link_to("Janitor Trials", janitor_trials_path) %>
  • <% if CurrentUser.is_member? %> -
  • <%= link_to("User Name Change Requests", user_name_change_requests_path) %>
  • +
  • <%= link_to("User Name Change Requests", user_name_change_requests_path) %>
  • <% end %> <% if CurrentUser.is_moderator? %> +
  • <%= link_to("IP Addresses", ip_addresses_path) %>
  • <%= link_to("IP Bans", ip_bans_path) %>
  • <% end %>