From de83746b5a33f1d2ac573f67c94760cb0a67b57e Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Sat, 18 Jun 2011 18:14:38 +0100 Subject: * Don't send acknowledged notifications unless the alert is raised * Unacknowledge a cleared alert or a newly raised one * Fixed interface unexpected nil errors. --- views/_alerts_table_alert_detail.haml | 2 +- views/_alerts_table_alert_summary.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'views') diff --git a/views/_alerts_table_alert_detail.haml b/views/_alerts_table_alert_detail.haml index b5ada45..3bb25c3 100644 --- a/views/_alerts_table_alert_detail.haml +++ b/views/_alerts_table_alert_detail.haml @@ -6,7 +6,7 @@ #{alert.detail} %address - if alert.raised? or alert.acknowledged? - Raised at #{alert.raised_at.to_s_human} • + Raised at #{(alert.raised_at || Time.now).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 24162c6..f27ceeb 100644 --- a/views/_alerts_table_alert_summary.haml +++ b/views/_alerts_table_alert_summary.haml @@ -11,4 +11,4 @@ :href => "/alert/#{alert.id}", | :onclick => "fetchDetail('#{alert.id}'); return false;"} Details ↓ - %td= alert.raised_at.to_s_relative + %td= (alert.raised_at || alert.cleared_at || Time.now).to_s_relative -- cgit v1.2.1