Sha256: 9e4731e0c01dae92778b085e6733fbdfa8af88c46beb8a717cde096ab5f95352
Contents?: true
Size: 1.88 KB
Versions: 12
Compression:
Stored size: 1.88 KB
Contents
!!! 5 - nav = render_haml('_nav.haml', self) - head = render_haml('_head.haml', self) - foot = render_haml('_foot.haml', self) %html %head %title Flapjack - #{@entity} (entity) = head %body %div#wrap %div{:class => "container"} %div{:class => "page-header"} = nav %h2 #{@entity} - if @states.length > 0 %table{:class => "table table-bordered table-hover table-condensed"} %tr %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| - colour_class = status - case status - when 'critical', 'unknown' - colour_class = 'error' - when 'ok', 'up' - colour_class = 'success' %tr{:class => colour_class} %td - link = "/check?entity=" + CGI.escape(entity) + "&check=" + CGI.escape(check) %a(title='check detail' href=link) #{check} %td = 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 - else %div#foo %p This entity has no check output associated with it %div#push %div#footer = foot
Version data entries
12 entries across 12 versions & 1 rubygems