pghero 0.1.10 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pghero might be problematic. Click here for more details.

@@ -1,38 +0,0 @@
1
- <table class="table">
2
- <thead>
3
- <tr>
4
- <th style="width: 33.33%;">Total Time</th>
5
- <th style="width: 33.33%;">Average Time</th>
6
- <th style="width: 33.33%;">Calls</th>
7
- </tr>
8
- </thead>
9
- <tbody>
10
- <% queries.each do |query| %>
11
- <tr>
12
- <td>
13
- <%= query["total_minutes"].to_f.round %> min
14
- <span class="percent">
15
- <% percent = query["total_percent"].to_f %>
16
- <% if percent > 1 %>
17
- <%= percent.round %>%
18
- <% elsif percent > 0.1 %>
19
- <%= percent.round(1) %>%
20
- <% else %>
21
- &lt; 0.1%
22
- <% end %>
23
- </span>
24
- </td>
25
- <td><%= query["average_time"].to_f.round %> ms</td>
26
- <td><%= number_with_delimiter(query["calls"].to_i) %></td>
27
- </tr>
28
- <tr>
29
- <td colspan="3" style="border-top: none; padding: 0;">
30
- <pre><%= query["query"] %></pre>
31
- <% if query["query"] == "<insufficient privilege>" %>
32
- <p class="text-muted">For security reasons, only superusers can see queries executed by other users.</p>
33
- <% end %>
34
- </td>
35
- </tr>
36
- <% end %>
37
- </tbody>
38
- </table>
@@ -1,17 +0,0 @@
1
- <div class="content">
2
- <% if @query_stats_enabled %>
3
- <%= button_to "Reset", reset_query_stats_path, class: "btn btn-danger", style: "float: right;" %>
4
- <% end %>
5
-
6
- <h1>Queries</h1>
7
-
8
- <% if @query_stats_enabled %>
9
- <% if @query_stats.any? %>
10
- <%= render partial: "query_stats_table", locals: {queries: @query_stats} %>
11
- <% else %>
12
- <p>Stats are not available yet. Come back soon!</p>
13
- <% end %>
14
- <% else %>
15
- <p>Query stats are not enabled.</p>
16
- <% end %>
17
- </div>
@@ -1,9 +0,0 @@
1
- <%= javascript_include_tag "//www.google.com/jsapi", "chartkick" %>
2
-
3
- <div class="content">
4
- <h1>CPU Usage</h1>
5
- <div style="margin-bottom: 20px;"><%= line_chart @cpu_usage, max: 101, colors: ["#5bc0de"], library: {pointSize: 0, lineWidth: 5} %></div>
6
-
7
- <h1>Connections</h1>
8
- <div style="margin-bottom: 20px;"><%= line_chart @connection_stats, colors: ["#5bc0de"], library: {pointSize: 0, lineWidth: 5} %></div>
9
- </div>