%= title "Sentinel - #{@sentinel.name}" %>
Sentinel | |
---|---|
<%=h @sentinel.name %> | |
<%=h @sentinel.description %> | |
<%=h @sentinel.action_name %> | |
<%=h @sentinel.cron_interval %> | |
<%=h @sentinel.send_mail %> | |
<%=h @sentinel.include_csv_in_email %> | |
<%=h @sentinel.include_report_in_email %> | |
<%=h @sentinel.mail_to %> | |
<%=h @sentinel.threshold %> | |
View | |
<%= fobj(@sentinel.view) %> | |
<%=h @sentinel.time_range %> (currently: <%= @sentinel.time_range.to_time_range_str rescue "ERROR:#{$!}" %>) | |
<%= @sentinel.filters.map {|f| "'#{fobj(f)}'"}.join(", ") rescue "#{$!}" %> | |
Time Range plus Filters: <%=h @sentinel.conditions rescue "#{$!}" %> | |
<%= link_to "#{@sentinel.view.table_name} WHERE #{@sentinel.conditions}", :controller => "survey", :action => :list, :table => @sentinel.view.table_name, :default_filter => @sentinel.conditions rescue "#{h($!.to_s)}" %> | |
Alarm | |
<%=h @sentinel.alarm_level %> | |
<% @sentinel.alarms.reject {|a| a.acknowledge}.each {|a| %>
<%=h a.created_at %>: <%= fobj(a) %> <% } %> |
|
Report | |
<%= fobj(@sentinel.report_template) %> | |
<% @sentinel.reports.find(:all,:limit => 10, :order => "id DESC").each {|r| %>
<%=h r.date.strftime("%F") %>: <%= fobj(r) %> <% } %> |
|
<%= button_to 'Edit sentinel', :action => 'edit', :id => @sentinel %> <%= button_to 'List all sentinels', :action => 'list' %> <%= button_to 'Manually execute', :action => 'manually_execute', :id => @sentinel %> |