Lots of updates
This commit is contained in:
@@ -123,7 +123,7 @@
|
||||
</thead>
|
||||
<tbody class="bg-white divide-y divide-gray-200">
|
||||
<% @events.each do |event| %>
|
||||
<tr class="hover:bg-gray-50">
|
||||
<tr class="hover:bg-gray-50 cursor-pointer" onclick="window.location='<%= event_path(event) %>'">
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">
|
||||
<div class="text-gray-900" data-timeline-target="timestamp" data-iso="<%= event.timestamp.iso8601 %>">
|
||||
<%= event.timestamp.strftime("%H:%M:%S") %>
|
||||
@@ -135,9 +135,8 @@
|
||||
<td class="px-6 py-4 text-sm text-gray-900">
|
||||
<% network_range = @network_ranges_by_ip[event.ip_address.to_s] %>
|
||||
<% if network_range %>
|
||||
<%= link_to event.ip_address, network_range_path(network_range),
|
||||
<%= link_to event.ip_address, network_range_path(event.ip_address),
|
||||
class: "text-blue-600 hover:text-blue-800 hover:underline font-mono" %>
|
||||
|
||||
<!-- Network Intelligence Summary -->
|
||||
<div class="mt-1 space-y-1">
|
||||
<% if network_range.company.present? %>
|
||||
@@ -161,7 +160,7 @@
|
||||
<% end %>
|
||||
|
||||
<div class="text-xs text-gray-500">
|
||||
<%= network_range.cidr %>
|
||||
<%= link_to network_range.cidr, network_range_path(network_range) %>
|
||||
<% if network_range.asn.present? %>
|
||||
• ASN <%= network_range.asn %>
|
||||
<% end %>
|
||||
@@ -184,8 +183,10 @@
|
||||
<%= event.waf_action %>
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm font-mono text-gray-900 max-w-xs truncate" title="<%= event.request_path %>">
|
||||
<%= event.request_path || '-' %>
|
||||
<td class="px-6 py-4 text-sm font-mono text-gray-900">
|
||||
<div class="max-w-md break-all">
|
||||
<%= event.request_path || '-' %>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">
|
||||
<%= event.request_method ? event.request_method.upcase : '-' %>
|
||||
@@ -202,8 +203,35 @@
|
||||
<span class="text-gray-400">-</span>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="px-6 py-4 text-sm text-gray-900 max-w-xs truncate" title="<%= event.user_agent %>">
|
||||
<%= event.user_agent&.truncate(50) || '-' %>
|
||||
<td class="px-6 py-4 text-sm text-gray-900">
|
||||
<% if event.user_agent.present? %>
|
||||
<% ua = parse_user_agent(event.user_agent) %>
|
||||
<div class="space-y-0.5" title="<%= ua[:raw] %>">
|
||||
<div class="font-medium text-gray-900">
|
||||
<%= ua[:name] if ua[:name].present? %>
|
||||
<% if ua[:version].present? && ua[:name].present? %>
|
||||
<span class="text-gray-500 font-normal"><%= ua[:version] %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if ua[:os_name].present? %>
|
||||
<div class="text-xs text-gray-500">
|
||||
<%= ua[:os_name] %>
|
||||
<% if ua[:os_version].present? %>
|
||||
<%= ua[:os_version] %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if ua[:bot] %>
|
||||
<div class="text-xs">
|
||||
<span class="inline-flex items-center px-2 py-0.5 rounded-full bg-orange-100 text-orange-800">
|
||||
🤖 <%= ua[:bot_name] || 'Bot' %>
|
||||
</span>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<span class="text-gray-400">-</span>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user