Sha256: a0c1e841422f6194285e669af2e1ce285fcf5b6ccb2ef8b0991947d75108ced3

Contents?: true

Size: 1.12 KB

Versions: 4

Compression:

Stored size: 1.12 KB

Contents

<table class="table queries">
  <thead>
    <tr>
      <th style="width: 25%;">Pid</th>
      <th style="width: 25%;">Duration</th>
      <th style="width: 25%;">State</th>
      <th style="width: 25%;"></th>
    </tr>
  </thead>
  <tbody>
    <% queries.reverse.each do |query| %>
      <tr>
        <td><%= query["pid"] %></td>
        <td><%= number_with_delimiter(query["duration_ms"].to_f.round) %> ms</td>
        <td><%= query["state"] %></td>
        <td class="text-right">
          <% button_path, button_options = Rails.version >= "4.1" ? [explain_path, {params: {query: query["query"]}}] : [explain_path(query: query["query"]), {}] %>
          <%= button_to "Explain", button_path, button_options.merge(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;">
          <%= query["source"] %> <span class="text-muted"><%= query["user"] %></span>
          <pre><%= query["query"] %></pre>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pghero-1.7.0 app/views/pg_hero/home/_live_queries_table.html.erb
pghero-1.6.5 app/views/pg_hero/home/_live_queries_table.html.erb
pghero-1.6.4 app/views/pg_hero/home/_live_queries_table.html.erb
pghero-1.6.3 app/views/pg_hero/home/_live_queries_table.html.erb