aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2012-11-29 18:41:51 +0000
committerPatrick J Cherry <patrick@bytemark.co.uk>2012-11-29 18:41:51 +0000
commit17120a9adf733185b5fc08cccf6644a09c995330 (patch)
tree457dd6374b78bcff072519faf0bb97b193a246b7
parent5d05cc179c552f130b85dcc0cc5621ecefd47e75 (diff)
Added suppression information to views
-rw-r--r--views/_alerts_table_alert_detail.haml2
-rw-r--r--views/_alerts_table_alert_summary.haml2
-rw-r--r--views/alert.haml4
3 files changed, 8 insertions, 0 deletions
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} &bull;
+ - if alert.suppressed?
+ Notifications suppressed until #{alert.suppress_until.to_s_human} &bull;
- if alert.acknowledged?
Ack'd at #{alert.acknowledged_at.to_s_human} by #{alert.acknowledged_by} &bull;
Source: #{alert.source} &bull;
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 &darr;
%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