Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Port branch add-ui-customization #1

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions app/views/pg_hero/home/explain.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
<div class="field"><%= text_area_tag :query, @query, placeholder: "Enter a SQL query" %></div>
<p>
<%= submit_tag "Explain", class: "btn btn-info", style: "margin-right: 10px;" %>
<%= submit_tag "Analyze", class: "btn btn-danger", style: "margin-right: 10px;" %>
<%= submit_tag "Visualize", class: "btn btn-danger" %>
<% if PgHero.config["show_analyze_and_visualize"] %>
<%= submit_tag "Analyze", class: "btn btn-danger", style: "margin-right: 10px;" %>
<%= submit_tag "Visualize", class: "btn btn-danger" %>
<% end %>
</p>
<% end %>

Expand Down
4 changes: 3 additions & 1 deletion app/views/pg_hero/home/live_queries.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

<%= render partial: "live_queries_table", locals: {queries: @running_queries, vacuum_progress: @vacuum_progress} %>

<p><%= button_to "Kill all connections", kill_all_path, class: "btn btn-danger" %></p>
<% if PgHero.config["show_kill_all_connections"] %>
<p><% button_to "Kill all connections", kill_all_path, class: "btn btn-danger" %></p>
<% end %>

<p class="text-muted">You may need to restart your app servers afterwards.</p>
</div>
6 changes: 6 additions & 0 deletions lib/generators/pghero/templates/config.yml.tt
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,9 @@ databases:

# Filter data from queries (experimental)
# filter_data: true

# Show Kill All Connections button on Live Queries tab
# show_kill_all_connections: true

# On Explain tab, Show Analyze and Visualize options
# show_analyze_and_visualize: true