From 17120a9adf733185b5fc08cccf6644a09c995330 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Thu, 29 Nov 2012 18:41:51 +0000 Subject: Added suppression information to views --- views/_alerts_table_alert_detail.haml | 2 ++ views/_alerts_table_alert_summary.haml | 2 ++ views/alert.haml | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/views/_alerts_table_alert_detail.haml b/views/_alerts_table_alert_detail.haml index 3bb25c3..4768e94 100644 --- a/views/_alerts_table_alert_detail.haml +++ b/views/_alerts_table_alert_detail.haml @@ -7,6 +7,8 @@ %address - if alert.raised? or alert.acknowledged? Raised at #{(alert.raised_at || Time.now).to_s_human} • + - if alert.suppressed? + Notifications suppressed until #{alert.suppress_until.to_s_human} • - if alert.acknowledged? Ack'd at #{alert.acknowledged_at.to_s_human} by #{alert.acknowledged_by} • Source: #{alert.source} • diff --git a/views/_alerts_table_alert_summary.haml b/views/_alerts_table_alert_summary.haml index f27ceeb..3b03cb0 100644 --- a/views/_alerts_table_alert_summary.haml +++ b/views/_alerts_table_alert_summary.haml @@ -10,5 +10,7 @@ %a{ :id => ["a","detail", alert.id], | :href => "/alert/#{alert.id}", | :onclick => "fetchDetail('#{alert.id}'); return false;"} + - if alert.suppressed? + (suppressed) Details ↓ %td= (alert.raised_at || alert.cleared_at || Time.now).to_s_relative diff --git a/views/alert.haml b/views/alert.haml index ff13a62..6aa2e23 100644 --- a/views/alert.haml +++ b/views/alert.haml @@ -43,6 +43,10 @@ %tr %th{:title => "The time at which the alert will be automatically cleared"} Will clear %td= @alert.will_raise_at.to_s_human + -if @alert.suppressed? + %tr + %th{:title => "The time at which notifications for this alert will start"} Suppressed until + %td= @alert.suppress_until.to_s_human %tr %th History %td -- cgit v1.2.1