Path matching

This commit is contained in:
Dan Milne
2025-11-17 12:12:17 +11:00
parent 093ee71c9f
commit 830810305b
14 changed files with 721 additions and 45 deletions

View File

@@ -302,8 +302,15 @@
<% @recent_events.first(3).each do |event| %>
<div class="flex items-center justify-between text-sm">
<div class="flex items-center">
<div class="w-2 h-2 rounded-full mr-2
<%= event.waf_action == 'allow' ? 'bg-green-500' : 'bg-red-500' %>"></div>
<% dot_color = case event.waf_action
when 'allow' then 'bg-green-500'
when 'deny' then 'bg-red-500'
when 'redirect' then 'bg-blue-500'
when 'challenge' then 'bg-yellow-500'
when 'log' then 'bg-gray-500'
else 'bg-gray-500'
end %>
<div class="w-2 h-2 rounded-full mr-2 <%= dot_color %>"></div>
<span class="text-gray-900 truncate max-w-[120px]"><%= event.ip_address %></span>
</div>
<span class="text-gray-500"><%= time_ago_in_words(event.timestamp) %> ago</span>