aboutsummaryrefslogtreecommitdiff
path: root/views/_search_table_row.haml
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2012-11-30 12:40:52 +0000
committerPatrick J Cherry <patrick@bytemark.co.uk>2012-11-30 12:40:52 +0000
commit1b6d738c7d2115e73f8d54431b2f157a9ce03011 (patch)
tree3137eac2e4df2e2b614f72c665fbc3e0c66a103e /views/_search_table_row.haml
parent9c54a386f2b1684b210dacc1d9c2a964362019c4 (diff)
Added search views.
Diffstat (limited to 'views/_search_table_row.haml')
-rw-r--r--views/_search_table_row.haml18
1 files changed, 18 insertions, 0 deletions
diff --git a/views/_search_table_row.haml b/views/_search_table_row.haml
new file mode 100644
index 0000000..3226bc7
--- /dev/null
+++ b/views/_search_table_row.haml
@@ -0,0 +1,18 @@
+- alert = search_table_row if defined? search_table_row
+- row_class = (row_class || []) + [ cycle(nil, "hilight"), alert.raised? && "triggered", alert.acknowledged? && "acknowledged", alert.level]
+%tr{ :class => row_class, :id => ["tr", "summary", alert.id] }
+ %td
+ %input{ :type => "checkbox", :id => "alerts[#{alert.id}]", :name => "alerts[#{alert.id}]", :class => 'alert' }
+ %td
+ %label{ :for => "alerts[#{alert.id}]" }
+ %strong= alert.subject
+ = alert.summary
+ - if alert.suppressed?
+ (suppressed)
+ %a{ :id => ["a","detail", alert.id], |
+ :href => "/alert/#{alert.id}", |
+ :onclick => "fetchDetail('#{alert.id}'); return false;"}
+ Details &darr;
+ %td
+ = (alert.update_type || "cleared").capitalize
+ = ((alert.raised? && alert.raised_at) || (alert.acknowledged? && alert.acknowledged_at) || alert.cleared_at || alert.updated_at || Time.now).to_s_relative