blob: 8bc73b474d1447f54a6eb3883769318e5875d9b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-# Sanity checking.
- group, alerts = alerts_table_group unless alerts_table_group.nil?
- hilight = cycle(nil,"hilight")
- row_class = [ hilight, alerts.first.raised? && "triggered", alerts.first.acknowledged? && "acknowledged", alerts.first.level]
=partial("alerts_table_alert_summary", :locals => {:alert => alerts.pop, :row_class => row_class })
- if alerts.length > 1
%tr{ :class => [ hilight, alerts.first.raised? && "triggered", alerts.first.acknowledged? && "acknowledged"]}
%td
%td{:colspan => 2}
- if alerts.length == 2
There is one more alert in this group.
- else
There is #{alerts.length - 1} more alerts in this group.
=partial("alerts_table_alert_summary", :collection => alerts[1..-1], :locals => { :row_class => row_class + ["hidden"] })
|