lib/rack/insight/views/panels/sphinx.html.erb in rack-insight-0.5.23 vs lib/rack/insight/views/panels/sphinx.html.erb in rack-insight-0.5.24
- old
+ new
@@ -14,18 +14,32 @@
<table id="Sphinx_breakdown">
<thead>
<tr>
<th>Time (ms)</th>
<th>Command</th>
+ <th class="backtrace"></th>
</tr>
</thead>
<tbody>
<% i = 1 %>
<% stats.queries.each do |query| %>
<tr class="<%= i % 2 == 0 ? "even" : "odd" %>">
<td><%= query.display_time %></td>
<td><%= query.command %></td>
+ <td><%= "<a href='#' class='reveal_backtrace'>Show Backtrace</a>" if query.has_backtrace? %></td>
</tr>
+ <% if query.has_backtrace? %>
+ <tr style="display:none">
+ <td></td>
+ <td colspan="2">
+ <ul>
+ <% query.filtered_backtrace.each do |line| %>
+ <li><%=h line %></li>
+ <% end %>
+ </ul>
+ </td>
+ </tr>
+ <% end %>
<% i += 1 %>
<% end %>
</tbody>
</table>
<% end %>