Sha256: 545a517f087a88724cad56773539c65afc899a0215efed6815124dd1416ac4c6
Contents?: true
Size: 1.2 KB
Versions: 5
Compression:
Stored size: 1.2 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> <% now = Time.now %> <% queries.reverse.each do |query| %> <tr> <td><%= query["pid"] %></td> <td><%= query["started_at"] ? "#{number_with_delimiter(((now - Time.parse(query["started_at"])) * 1000).round)} ms" : nil %></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
5 entries across 5 versions & 1 rubygems