Sha256: 66050c577ff581c71bbd6f878b3b7a9fa1557910c012d8f7b3a98b4bf7043f84

Contents?: true

Size: 1.04 KB

Versions: 3

Compression:

Stored size: 1.04 KB

Contents

<table class="table queries">
  <thead>
    <tr>
      <th style="width: 10%;">Pid</th>
      <th style="width: 10%;">State</th>
      <th style="width: 15%;">Duration</th>
      <th>Source</th>
      <th style="width: 25%;"></th>
    </tr>
  </thead>
  <tbody>
    <% now = Time.now %>
    <% queries.each do |query| %>
      <tr>
        <td><%= query["pid"] %></td>
        <td><%= query["state"] %></td>
        <td><%= query["started_at"] ? "#{number_with_delimiter(((now - Time.parse(query["started_at"])) * 1000).round)} ms" : nil %></td>
        <td><%= query["source"] %> <span class="text-muted"><%= query["user"] %></span></td>
        <td class="text-right">
          <%= button_to "Explain", explain_path(query: query["query"]), form: {target: "_blank"}, class: "btn btn-info" %>
          <%= button_to "Kill", kill_path(pid: query["pid"]), class: "btn btn-danger" %>
        </td>
      </tr>
      <tr>
        <td colspan="6" style="border-top: none; padding: 0;"><pre><%= query["query"] %></pre></td>
      </tr>
    <% end %>
  </tbody>
</table>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pghero-1.3.2 app/views/pg_hero/home/_live_queries_table.html.erb
pghero-1.3.1 app/views/pg_hero/home/_live_queries_table.html.erb
pghero-1.3.0 app/views/pg_hero/home/_live_queries_table.html.erb