h1 = @ip ' 's IP profile ul li = link "View images this IP has uploaded", to: Routes.search_path(@conn, :index, q: "ip:#{@ip}") li = link "View comments this IP has posted", to: Routes.comment_path(@conn, :index, cq: "ip:#{@ip}") li = link "View posts this IP has made", to: Routes.post_path(@conn, :index, pq: "ip:#{@ip}") = render PhilomenaWeb.BanView, "_bans.html", bans: @subnet_bans, conn: @conn h4 Geolocation = case @geo do - {:ok, data} -> table.table thead tr td Country td City td ASN td Timezone tbody tr td = data["country"]["names"]["en"] || data["registered_country"]["names"]["en"] || "Unavailable" td = data["city"]["names"]["en"] || "Unavailable" td = if {:ok, asn} = @asn do = asn["autonomous_system_organization"] td = data["location"]["time_zone"] || "Unavailable" - :not_found -> p Could not geolocate IP address. - {:error, {:invalid_address, _}} -> p The provided IP address is invalid. - {:error, :database_unknown} -> p GeoIP is not configured on this instance. - _ -> p An error ocurred while geolocating the IP. h2 Administration Options ul li = link "View tag changes", to: Routes.ip_profile_tag_change_path(@conn, :index, to_string(@ip)) li = link "View source URL history", to: Routes.ip_profile_source_change_path(@conn, :index, to_string(@ip)) li = link "View reports this IP has made", to: Routes.admin_report_path(@conn, :index, rq: "ip:#{@ip}") li = link "View IP ban history", to: Routes.admin_subnet_ban_path(@conn, :index, ip: to_string(@ip)) li = link "Ban this sucker", to: Routes.admin_subnet_ban_path(@conn, :new, specification: to_string(@ip)) h2 Actions ul li = link "Revert all tag changes", to: Routes.tag_change_full_revert_path(@conn, :create, [ip: to_string(@ip)]), data: [confirm: "Are you really, really sure?", method: "create"] li = link "...the button above didn't work (use carefully, this is resource-intensive)", to: Routes.tag_change_full_revert_path(@conn, :create, [ip: to_string(@ip), batch_size: 1]), data: [confirm: "Please confirm that you're aware that this may crash the site and are ready to take on the full wrath of the admins if it does so after you press this button.", method: "create"] h4 Observed users table.table thead tr th Username th Account Used th Last Seen th Created At tbody = for uip <- @user_ips do tr td = link uip.user.name, to: Routes.profile_path(@conn, :show, uip.user) td => uip.uses ' times td => pretty_time uip.updated_at td => pretty_time uip.user.created_at