summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/intruders/_index_core.html.haml17
1 files changed, 13 insertions, 4 deletions
diff --git a/app/views/intruders/_index_core.html.haml b/app/views/intruders/_index_core.html.haml
index b9c5a76..1fca601 100644
--- a/app/views/intruders/_index_core.html.haml
+++ b/app/views/intruders/_index_core.html.haml
@@ -9,16 +9,25 @@
%th= t('intruders.index.contacts_per_second')
%th= t('intruders.index.user_agent')
%th= t('intruders.index.to_user')
+ %th
- for intruder in intruders
- %tr
+ - if intruder.list_type == 'whitelist'
+ - entry_class = 'success'
+ - elsif intruder.bans.to_i > 0
+ - entry_class = 'error'
+ - elsif intruder.points.to_i > 0
+ - entry_class = 'warn'
+ - else
+ - entry_class = ''
+ %tr{:class => "table #{entry_class}"}
%td
- - if intruder.list_type == 'whitelist'
+ - if entry_class == 'success'
%i.icon-ok
- - elsif intruder.bans.to_i > 0
+ - elsif entry_class == 'error'
%i.icon-fire
- - elsif intruder.points.to_i > 0
+ - elsif entry_class == 'warn'
%i.icon-warning-sign
%td= intruder.contact_ip