diff options
Diffstat (limited to 'views')
| -rw-r--r-- | views/_alerts_table.haml | 9 | ||||
| -rw-r--r-- | views/_history.haml | 9 | ||||
| -rw-r--r-- | views/alerts.haml | 12 | 
3 files changed, 20 insertions, 10 deletions
| diff --git a/views/_alerts_table.haml b/views/_alerts_table.haml index 40b2b1c..ed759be 100644 --- a/views/_alerts_table.haml +++ b/views/_alerts_table.haml @@ -11,7 +11,14 @@          });      %th#summary Summary      %th#time    At -  = partial("alerts_table_group", :collection => @grouped_alerts) +  - if @grouped_alerts.length > 0 +    = partial("alerts_table_group", :collection => @grouped_alerts) +  - else +    %tr{:class => %w(notice)} +      %td +      %td{:style => "text-align: center;"} +        = "No #{@alert_type} alerts found!" +      %td    %tr      %td{ :colspan => 3}        %address diff --git a/views/_history.haml b/views/_history.haml index 61bcf59..cfeec51 100644 --- a/views/_history.haml +++ b/views/_history.haml @@ -4,7 +4,14 @@  %p    = history.created_at.strftime("%R")    - history.alerts.each do |alert| -    = alert.subject +    %a{ :href => self.class.url_for(alert) }  +      = alert.id +      %strong +        = alert.subject      = alert.summary +    - if alert.source != alert.subject  +      = "(from #{alert.source})"    = history.event +  - if history.user +    = "by #{history.user}"    - @today = history.created_at diff --git a/views/alerts.haml b/views/alerts.haml index 896b5a3..88cb82c 100644 --- a/views/alerts.haml +++ b/views/alerts.haml @@ -1,11 +1,7 @@ -- if @grouped_alerts.length > 0 -  %form#alerts{:method => :post, :action => '/alerts/acknowledge'} -    = partial('alerts_table') -    %h2 Actions -    %p= partial('acknowledge_input') -- else -  .notice#alerts_table -    %p No alerts to display. +%form#alerts{:method => :post, :action => '/alerts/acknowledge'} +  = partial('alerts_table') +  %h2 Actions +  %p= partial('acknowledge_input')  :javascript    // Do the magic updates..    setTimeout("updateAlertsTable('#{@alert_type}','#{@group_by}');", 120000) | 
