Sha256: 5e945ec2e725a518b6ad286ee931cc7185006883250c1a32637768dc6deb582e

Contents?: true

Size: 1.68 KB

Versions: 2

Compression:

Stored size: 1.68 KB

Contents

<% page_title "#{@adjective.capitalize} Checks" %>

<div class="page-header">
  <h2><%= @adjective.capitalize %> Checks</h2>
</div>

<p><%= h @count_failing_checks %> failing out of <%= h @count_all_checks %></p>

<table class="table table-bordered table-hover table-condensed">
  <tr>
    <th>Entity</th>
    <th>Check</th>
    <th>State</th>
    <th>Summary</th>
    <th>Last State Change</th>
    <th>Last Update</th>
    <th>Last Notification</th>
  </tr>
  <% @entities_sorted.each do |entity| %>
    <% row_entity = nil %>
    <% entity_link = "/entity/" << u(entity) %>
    <% @states[entity].each do |check, status, summary, changed, updated, in_unscheduled_outage, in_scheduled_outage, notified| %>
      <%
        row_colour = case status
        when 'critical', 'unknown'
          'error'
        when 'ok', 'up'
          'success'
        else
          status
        end

        check_link = "/check?entity=" << u(entity) << "&amp;check=" << u(check)

      %>
      <tr class="<%= row_colour %>">
        <% unless row_entity && entity == row_entity %>
          <td rowspan=<%= @states[entity].length %>>
            <a href="<%= entity_link %>"><%= h entity %></a>
          </td>
          <% row_entity = entity %>
        <% end %>
        <td><a href="<%= check_link %>" title="check detail"><%= h check %></a></td>
        <td class="<%= status %>">
          <%= h status.upcase %>
          <% if in_unscheduled_outage%> (Ack'd)<% end %>
          <% if in_scheduled_outage %> (Sched)<% end %>
        </td>
        <td><%= h summary %></td>
        <td><%= h changed %></td>
        <td><%= h updated %></td>
        <td><%= h notified %></td>
      </tr>

    <% end %>
  <% end %>
</table>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
flapjack-0.8.1 lib/flapjack/gateways/web/views/checks.html.erb
flapjack-0.8.0 lib/flapjack/gateways/web/views/checks.html.erb