diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-11-30 22:48:33 +0000 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-11-30 22:48:33 +0000 |
commit | 72b7c36a26b424f372dab905eda416353013f994 (patch) | |
tree | 92c71e374237859a99ab9c854ae1dbf10c639bb8 /views | |
parent | 45ae88e9087e87852f76bfbd62bcf6e66500da70 (diff) |
Search table row is now more informative about times.
Diffstat (limited to 'views')
-rw-r--r-- | views/_search_table_row.haml | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/views/_search_table_row.haml b/views/_search_table_row.haml index e971c42..bb13298 100644 --- a/views/_search_table_row.haml +++ b/views/_search_table_row.haml @@ -14,5 +14,28 @@ :onclick => "fetchDetail('#{alert.id}'); return false;"} Details ↓ %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 + - case alert.update_type + - when "cleared" + - if alert.will_raise_at + Will raise at + = alert.will_raise_at.to_s_human + - else + Cleared at + = alert.cleared_at.to_s_human + - when /(re-)?raised/ + - if alert.will_clear_at + Will clear at + = alert.will_clear_at.to_s_human + - else + = alert.update_type.capitalize + at + = alert.raised_at.to_s_human + - when /acknowledged/ + Ack'd at + = alert.acknowledged_at.to_s_human + until + = alert.will_unacknowledge_at.to_s_human + - else + = alert.update_type.capitalize + at + = alert.updated_at |