aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/mauve/notifiers/templates/email.html.erb6
-rw-r--r--lib/mauve/notifiers/templates/xmpp.txt.erb6
-rw-r--r--lib/mauve/web_interface.rb8
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/mauve/notifiers/templates/email.html.erb b/lib/mauve/notifiers/templates/email.html.erb
index c568d77..6c323b0 100644
--- a/lib/mauve/notifiers/templates/email.html.erb
+++ b/lib/mauve/notifiers/templates/email.html.erb
@@ -4,11 +4,11 @@
<p><strong><%= alert.update_type.upcase %>:</strong> <%
case alert.update_type
when :cleared
-%><%= MauveTime.now.to_s_relative(alert.cleared_at.to_time) %><%
+%><%= alert.cleared_at.to_s_relative %><%
when :acknowleged
-%><%= MauveTime.now.to_s_relative(alert.acknowledged_at.to_time) %><%
+%><%= alert.acknowledged_at.to_s_relative %><%
else
-%><%= MauveTime.now.to_s_relative(alert.raised_at.to_time) %><%
+%><%= alert.raised_at.to_s_relative %><%
end
%>: <%= alert.summary %><%
if alert.source != alert.subject
diff --git a/lib/mauve/notifiers/templates/xmpp.txt.erb b/lib/mauve/notifiers/templates/xmpp.txt.erb
index 30ff1e6..eafc12b 100644
--- a/lib/mauve/notifiers/templates/xmpp.txt.erb
+++ b/lib/mauve/notifiers/templates/xmpp.txt.erb
@@ -1,11 +1,11 @@
<%= alert.update_type.upcase %>: <%
case alert.update_type
when :cleared
-%><%= MauveTime.now.to_s_relative(alert.cleared_at.to_time) %><%
+%><%= alert.cleared_at.to_s_relative %><%
when :acknowleged
-%><%= MauveTime.now.to_s_relative(alert.acknowledged_at.to_time) %><%
+%><%= alert.acknowledged_at.to_time.to_s_relative %><%
else
-%><%= MauveTime.now.to_s_relative(alert.raised_at.to_time) %><%
+%><%= alert.raised_at.to_s_relative %><%
end
%>: <%= alert.subject %> <%= alert.summary %><%
if alert.source != alert.subject
diff --git a/lib/mauve/web_interface.rb b/lib/mauve/web_interface.rb
index d999554..2610fc9 100644
--- a/lib/mauve/web_interface.rb
+++ b/lib/mauve/web_interface.rb
@@ -267,7 +267,7 @@ EOF
get '/ajax/alerts_table/:alert_type/:group_by' do
alerts_table(params)
- haml(:_alerts_table)
+ haml :_alerts_table, :layout => false
end
get '/ajax/alerts_table_alert/:alert_id' do
@@ -275,7 +275,7 @@ EOF
alert = Alert.get(params[:alert_id].to_i)
return status(404) unless alert
- haml(:_alerts_table_alert, :locals => {:alert => alert})
+ haml :_alerts_table_alert, :locals => {:alert => alert}, :layout => false
end
get '/ajax/alerts_table_alert_summary/:alert_id' do
@@ -283,7 +283,7 @@ EOF
alert = Alert.get(params[:alert_id].to_i)
return status(404) unless alert
- haml(:_alerts_table_alert_summary, :locals => {:alert => alert, :row_class => []})
+ haml :_alerts_table_alert_summary, :locals => {:alert => alert, :row_class => []}, :layout => false
end
get '/ajax/alerts_table_alert_detail/:alert_id' do
@@ -291,7 +291,7 @@ EOF
alert = Alert.get(params[:alert_id].to_i)
return status(404) unless alert
- haml(:_alerts_table_alert_detail, :locals => {:alert => alert, :row_class => []})
+ haml :_alerts_table_alert_detail, :locals => {:alert => alert, :row_class => []}, :layout => false
end