!!! 5 - nav_haml = Haml::Engine.new(File.read(File.dirname(__FILE__) + '/_nav.haml')) - nav = nav_haml.render - css_haml = Haml::Engine.new(File.read(File.dirname(__FILE__) + '/_css.haml')) - css = css_haml.render %html %head %title Flapjack = css %body %div#wrapper = nav %h1 Flapjack Status %h4 Events queued: = @events_queued %h4 All checks: %a(title='all checks' href='/') = @count_all_checks %h4 Failing checks: %a(title='failing checks' href='/failing') = @count_failing_checks %h3 All Checks %table %tr %th Entity %th Check %th State %th Last State Change %th Last Update %th Last Notification - @states.each do |entity, check, status, changed, updated, in_unscheduled_outage, in_scheduled_outage, notified_kind, notified| %tr %td= entity %td - link = "/check?entity=" + entity + "&check=" + check %a(title='check detail' href=link) #{check} %td{:class => status} = status.upcase = " (Acknowledged)" if in_unscheduled_outage = " (Scheduled Maintenance)" if in_scheduled_outage %td= relative_time_ago(Time.at(changed.to_i)) + ' ago' %td= (Time.now.to_i - updated.to_i).to_s + ' seconds ago' - if notified && (notified > 0) - last_notified = relative_time_ago(Time.at(notified.to_i)) + " ago, #{notified_kind}" - else - last_notified = 'never' %td= last_notified -#%ul -#- @keys.each do |key| -#%li= key