diff options
-rw-r--r-- | static/stylesheets/mauve.css | 21 | ||||
-rw-r--r-- | views/_alerts_table.haml | 9 | ||||
-rw-r--r-- | views/_history.haml | 10 | ||||
-rw-r--r-- | views/alerts.haml | 12 |
4 files changed, 34 insertions, 18 deletions
diff --git a/static/stylesheets/mauve.css b/static/stylesheets/mauve.css index 4649775..cac6833 100644 --- a/static/stylesheets/mauve.css +++ b/static/stylesheets/mauve.css @@ -52,27 +52,38 @@ tr.detail { /** Flash notices **/ -div.error { +.error { background-color: #ffe; border: solid 2px #ffc; background-image: url('/images/error.png'); } -div.notice { +.notice { background-color: #eef; border: solid 2px #ccf; background-image: url('/images/information.png'); } -div.flash { +tr.error, tr.notice { margin: 5px 5px 0px; padding: 0px; - padding-left: 20px; + padding-left: 25px; color: black; font-size: large; background-position: 5px; background-repeat: no-repeat; - min-height: 20px; + min-height: 25px; +} + +div.error, div.notice { + margin: 5px 5px 0px; + padding: 0px; + padding-left: 25px; + color: black; + font-size: large; + background-position: 5px; + background-repeat: no-repeat; + min-height: 25px; } div.flash p { 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 03d02d7..cfeec51 100644 --- a/views/_history.haml +++ b/views/_history.haml @@ -4,12 +4,14 @@ %p = history.created_at.strftime("%R") - history.alerts.each do |alert| - %a{ :href => url_for(alert) } + %a{ :href => self.class.url_for(alert) } = alert.id - %strong - = alert.subject + %strong + = alert.subject = alert.summary - if alert.source != alert.subject - = "-- from #{alert.source} + = "(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) |