-
- <%= query[:query] %>
+ |
+ <%= query[:query] %>
<% if query[:query] == "" %>
For security reasons, only superusers can see queries executed by other users.
<% end %>
diff --git a/app/views/pg_hero/home/_query_stats_slider.html.erb b/app/views/pg_hero/home/_query_stats_slider.html.erb
index 4a11cf2c8..41eb90686 100644
--- a/app/views/pg_hero/home/_query_stats_slider.html.erb
+++ b/app/views/pg_hero/home/_query_stats_slider.html.erb
@@ -4,7 +4,7 @@
-
+<% end %>
diff --git a/app/views/pg_hero/home/_suggested_index.html.erb b/app/views/pg_hero/home/_suggested_index.html.erb
index 45605fe69..4afb71d31 100644
--- a/app/views/pg_hero/home/_suggested_index.html.erb
+++ b/app/views/pg_hero/home/_suggested_index.html.erb
@@ -1,11 +1,11 @@
<% if index && !details[:covering_index] %>
<% unless @debug %>
- Details
+ Details
<% end %>
- CREATE INDEX CONCURRENTLY ON <%= index[:table] %><% if index[:using] %> USING <%= index[:using] %><% end %> (<%= index[:columns].join(", ") %>)
+ CREATE INDEX CONCURRENTLY ON <%= index[:table] %><% if index[:using] %> USING <%= index[:using] %><% end %> (<%= index[:columns].join(", ") %>)
<% end %>
-">
- <% if details[:explanation] %><%= details[:explanation] %>
+">
+ <% if details[:explanation] %><%= details[:explanation] %>
<% end %><% if details[:row_estimates] %>Rows: <%= details[:rows] %>
Row progression: <%= details[:row_progression].to_a.join(", ") %>
diff --git a/app/views/pg_hero/home/connections.html.erb b/app/views/pg_hero/home/connections.html.erb
index 981608669..507fe72fd 100644
--- a/app/views/pg_hero/home/connections.html.erb
+++ b/app/views/pg_hero/home/connections.html.erb
@@ -7,24 +7,24 @@
By Database
Loading...
-
+ <% end %>
By User
Loading...
-
+ <% end %>
<% if @connections_by_ssl_status %>
By Security
Loading...
-
+ <% end %>
<% end %>
<%= render partial: "connections_table", locals: {connection_sources: @connection_sources} %>
diff --git a/app/views/pg_hero/home/explain.html.erb b/app/views/pg_hero/home/explain.html.erb
index 127f9908c..194e2dc80 100644
--- a/app/views/pg_hero/home/explain.html.erb
+++ b/app/views/pg_hero/home/explain.html.erb
@@ -4,9 +4,9 @@
<%= form_tag explain_path do %>
<%= text_area_tag :query, @query, placeholder: "Enter a SQL query" %>
- <%= submit_tag "Explain", class: "btn btn-info", style: "margin-right: 10px;" %>
+ <%= submit_tag "Explain", class: "btn btn-info right-5" %>
<% if @explain_analyze_enabled %>
- <%= submit_tag "Analyze", class: "btn btn-danger", style: "margin-right: 10px;" %>
+ <%= submit_tag "Analyze", class: "btn btn-danger right-5" %>
<% end %>
<%= submit_tag "Visualize", class: "btn btn-danger" %>
diff --git a/app/views/pg_hero/home/index.html.erb b/app/views/pg_hero/home/index.html.erb
index d492eae67..9e0cbcda0 100644
--- a/app/views/pg_hero/home/index.html.erb
+++ b/app/views/pg_hero/home/index.html.erb
@@ -127,7 +127,7 @@
- Column |
+ Column |
Sequence |
@@ -251,7 +251,7 @@
Table |
- Transactions Left |
+ Transactions Left |
@@ -279,9 +279,9 @@
Column |
- Type |
- Values Left |
- % Left |
+ Type |
+ Values Left |
+ % Left |
@@ -332,7 +332,7 @@
-
+ |
DROP INDEX CONCURRENTLY <%= pghero_pretty_ident(index[:name], schema: index[:schema]) %>;
<%= index[:definition].sub("CREATE INDEX ", "CREATE INDEX CONCURRENTLY ") %>;
|
@@ -366,7 +366,7 @@
-
+ |
ALTER TABLE <%= pghero_pretty_ident(constraint[:table], schema: constraint[:schema]) %> VALIDATE CONSTRAINT <%= pghero_pretty_ident(constraint[:name]) %>;
|
@@ -383,15 +383,15 @@
These indexes exist, but aren’t needed. Remove them
<% if @show_migrations %>
- with a migration
+ with a migration
<% end %>
for faster writes.
-
+
rails generate migration remove_unneeded_indexes
And paste
- <% @duplicate_indexes.each do |query| %>
+ <% @duplicate_indexes.each do |query| %>
<%= pghero_remove_index(query[:unneeded_index]) %><% end %>
@@ -426,14 +426,14 @@
Add indexes to speed up queries.
<% if @show_migrations %>
Here’s a
- migration to help.
+ migration to help.
<% end %>
-
+
rails generate migration add_suggested_indexes
And paste
- commit_db_transaction
+ commit_db_transaction
<% @suggested_indexes.each do |index| %>
<% if index[:using] && index[:using] != "btree" %>
add_index <%= index[:table].to_sym.inspect %>, <%= index[:columns].first.inspect %>, using: <%= index[:using].inspect %>, algorithm: :concurrently
@@ -487,15 +487,15 @@ pg_stat_statements.track = all
Unused indexes cause unnecessary overhead. Remove them
<% if @show_migrations %>
- with a migration
+ with a migration
<% end %>
for faster writes.
-
+
rails generate migration remove_unused_indexes
And paste
- <% @unused_indexes.each do |query| %>
+ <% @unused_indexes.each do |query| %>
<%= pghero_remove_index(query)%><% end %>
@@ -503,7 +503,7 @@ pg_stat_statements.track = all
Name |
- Index Size |
+ Index Size |
@@ -518,6 +518,6 @@ pg_stat_statements.track = all
<% end %>
-
+<% end %>
diff --git a/app/views/pg_hero/home/index_bloat.html.erb b/app/views/pg_hero/home/index_bloat.html.erb
index 238f3c6b3..7d5e23795 100644
--- a/app/views/pg_hero/home/index_bloat.html.erb
+++ b/app/views/pg_hero/home/index_bloat.html.erb
@@ -25,15 +25,15 @@ ALTER INDEX new_index RENAME TO index;
Index |
- Bloat |
- Size |
+ Bloat |
+ Size |
<% @index_bloat.each do |index| %>
- <%= index[:index] %>
+ <%= index[:index] %>
<% if index[:primary] %>
PRIMARY
<% end %>
@@ -43,7 +43,7 @@ ALTER INDEX new_index RENAME TO index;
|
<% if @show_sql && !index[:primary] %>
-
+ |
<% new_index = "new_#{index[:index]}".first(63) %>
<%= index[:definition].sub(" INDEX ", " INDEX CONCURRENTLY \n ").sub(index[:index], new_index) %>;
@@ -67,6 +67,6 @@ ALTER INDEX <%= pghero_pretty_ident(new_index) %>
<% end %>
-
+<% end %>
diff --git a/app/views/pg_hero/home/maintenance.html.erb b/app/views/pg_hero/home/maintenance.html.erb
index 149ad050b..f3bf2d1f7 100644
--- a/app/views/pg_hero/home/maintenance.html.erb
+++ b/app/views/pg_hero/home/maintenance.html.erb
@@ -5,10 +5,10 @@
Table |
- Last Vacuum |
- Last Analyze |
+ Last Vacuum |
+ Last Analyze |
<% if @show_dead_rows %>
- Dead Rows |
+ Dead Rows |
<% end %>
diff --git a/app/views/pg_hero/home/queries.html.erb b/app/views/pg_hero/home/queries.html.erb
index 801375a42..16e00c7db 100644
--- a/app/views/pg_hero/home/queries.html.erb
+++ b/app/views/pg_hero/home/queries.html.erb
@@ -4,13 +4,13 @@
<% end %>
<% if !@historical_query_stats_enabled %>
- Queries
+ Queries
<% end %>
<% if @historical_query_stats_enabled %>
<%= render partial: "query_stats_slider" %>
<% elsif @database.query_stats_table_exists? && (columns = @database.missing_query_stats_columns).any? %>
-
+
Add missing columns to re-enable historical query stats.
<% @database.missing_query_stats_columns.each do |column| %>ALTER TABLE pghero_query_stats ADD COLUMN "<%= column %>" <%= column == "query_hash" ? "bigint" : "text" %>;
<% end %>
@@ -23,9 +23,9 @@
Cannot understand start or end time.
<% elsif @query_stats.any? || @historical_query_stats_enabled %>
<%= render partial: "queries_table", locals: {queries: @query_stats, sort_headers: true} %>
-
+ <% end %>
<% else %>
Stats are not available yet. Come back soon!
<% end %>
diff --git a/app/views/pg_hero/home/relation_space.html.erb b/app/views/pg_hero/home/relation_space.html.erb
index c3f4e3d1b..9d0a99290 100644
--- a/app/views/pg_hero/home/relation_space.html.erb
+++ b/app/views/pg_hero/home/relation_space.html.erb
@@ -7,8 +7,8 @@
Size
- Loading...
-
+ <% end %>
diff --git a/app/views/pg_hero/home/show_query.html.erb b/app/views/pg_hero/home/show_query.html.erb
index 911cd4bf2..41dfb254e 100644
--- a/app/views/pg_hero/home/show_query.html.erb
+++ b/app/views/pg_hero/home/show_query.html.erb
@@ -1,8 +1,8 @@
- <%= @query %>
-
+ <% end %>
<% if @explain_enabled && @explainable_query %>
@@ -11,11 +11,11 @@
<% end %>
<% if @origins && @origins.keys.select { |k| k.length > 0 }.any? %>
-
+
- Approx. Time
+ Approx. Time
Origin
|
@@ -23,14 +23,14 @@
<% @origins.sort_by { |o, c| [-c, o.to_s] }.each do |origin, count| %>
-
+ |
<% if origin.length > 0 %>
<%= origin %>
<% else %>
Unknown
<% end %>
|
-
+ |
<% pct = (100.0 * count / @total_count).round %>
<% if pct == 0 %>
< 1%
@@ -47,22 +47,22 @@
<% if @chart_data %>
Total Time ms
- Loading...
-
+ <% end %>
Average Time ms
- Loading...
-
+ <% end %>
Calls
- Loading...
-
+ <% end %>
<% else %>
Enable
@@ -77,8 +77,8 @@
- Name |
- Rows |
+ Name |
+ Rows |
Indexes |
diff --git a/app/views/pg_hero/home/space.html.erb b/app/views/pg_hero/home/space.html.erb
index 0376b291b..50b032299 100644
--- a/app/views/pg_hero/home/space.html.erb
+++ b/app/views/pg_hero/home/space.html.erb
@@ -4,10 +4,10 @@
Database Size: <%= @database_size %>
<% if @system_stats_enabled %>
- Loading...
-
+ <% end %>
<% end %>
|
|
|