!!! 5 - nav = render_haml('_nav.haml', self) - css = render_haml('_css.haml', self) %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=" + CGI.escape(entity) + "&check=" + CGI.escape(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