Sha256: c7fd4e4979a20242e85827939930ac7aa0225e9fc9194b100f6806e912782877

Contents?: true

Size: 1.89 KB

Versions: 2

Compression:

Stored size: 1.89 KB

Contents

<div class="container grid-1280">
  <h1>Pollables</h1>
  <table id="pollables-list" class="table">
    <thead>
      <tr>
        <th> Pollable </th>
        <th> Count </th>
        <th> Polls* </th>
        <th> Error Rate** </th>
        <th> Lock Rate** </th>
      </tr>
    </thead>
    <tbody>
      <% @pollable_classes.each do |pollable_class| %>
        <tr>
          <td> <%= link_to pollable_class.name, pollable_path(id: pollable_class.name) %> </td>
          <td> <%= pollable_class.count %> </td>
          <td>
            <%=
              Aeternitas::Metrics.polls(
                pollable_class,
                from: 24.hours.ago,
                to: Time.now,
                resolution: :hour
                ).map { |v| v[:count] }.sum
            %>
          </td>
          <td>
            <div class="sparkline" style="max-width:250px; max-height:30px">
              <%=
                Aeternitas::Metrics
                  .failure_ratio(pollable_class, from: 2.weeks.ago, to: Time.now, resolution: :day)
                  .map {|v| v[:ratio]}
                  .join(",")
              %>
            </div>
          </td>
          <td>
            <div class="sparkline" style="max-width:250px; max-height:30px">
              <%=
                Aeternitas::Metrics
                  .guard_locked_ratio(pollable_class, from: 2.weeks.ago, to: Time.now, resolution: :day)
                  .map {|v| v[:ratio]}
                  .join(",")
              %>
            </div>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
  <script>
    $(document).ready(function() {
      $('#pollables-list').DataTable({
          columns: [
              null,
              null,
              null,
              {orderable: false},
              {orderable: false},
          ]
      });
    } );
  </script>
  <small>* within the last 24h | ** within the last 2 weeks</small>
</div>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
aeternitas_web_ui-0.2.1 app/views/aeternitas/web_ui/pollables/index.html.erb
aeternitas_web_ui-0.2.0 app/views/aeternitas/web_ui/pollables/index.html.erb