app/views/pg_hero/home/queries.html.erb in pghero-0.1.10 vs app/views/pg_hero/home/queries.html.erb in pghero-1.0.0

- old
+ new

@@ -1,9 +1,17 @@ <div class="content"> - <h1>Live Queries</h1> + <% if @query_stats_enabled %> + <%= button_to "Reset", reset_query_stats_path, class: "btn btn-danger", style: "float: right;" %> + <% end %> - <%= render partial: "queries_table", locals: {queries: @running_queries} %> + <h1>Queries</h1> - <p><%= button_to "Kill all connections", kill_all_path, class: "btn btn-danger" %></p> - - <p class="text-muted">You may need to restart your Rails server afterwards.</p> + <% if @query_stats_enabled %> + <% if @query_stats.any? %> + <%= render partial: "queries_table", locals: {queries: @query_stats} %> + <% else %> + <p>Stats are not available yet. Come back soon!</p> + <% end %> + <% else %> + <p>Query stats are not enabled.</p> + <% end %> </div>