aboutsummaryrefslogtreecommitdiff
path: root/views/_event_list.haml
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-04-13 17:03:16 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-04-13 17:03:16 +0100
commit89a67770e66d11740948e90a41db6cee0482cf8e (patch)
treebe858515fb789a89d68f94975690ab019813726c /views/_event_list.haml
new version.
Diffstat (limited to 'views/_event_list.haml')
-rw-r--r--views/_event_list.haml22
1 files changed, 22 insertions, 0 deletions
diff --git a/views/_event_list.haml b/views/_event_list.haml
new file mode 100644
index 0000000..73b9193
--- /dev/null
+++ b/views/_event_list.haml
@@ -0,0 +1,22 @@
+.alert_full_list
+ .row
+ %h2
+ %h2 Subject
+ %h2 Summary
+ %h2 Raised
+ %h2 Acknowledged
+ %h2 Cleared
+ - alerts.each do |alert|
+ .row{:id => alert.id, :class => cycle('alt','')}
+ .more
+ %a{:href => "/alert/#{alert.id}"} [details]
+ .subject= alert.subject
+ .summary= alert.summary
+ .raised{:class => "up"+alert.update_type}= alert.raised_at ? alert.time_relative(Time.now - alert.raised_at.to_time) : ""
+ .acknowledged{:class => "up"+alert.update_type}
+ - if alert.acknowledged_at
+ = alert.time_relative(Time.now - alert.acknowledged_at.to_time)
+ by
+ = alert.acknowledged_by
+ .cleared{:class => "up"+alert.update_type}= alert.cleared? ? alert.time_relative(Time.now - alert.cleared_at.to_time) : ""
+