Sha256: a8b82339305a266d6a2ba8b19eee93fc17ce7f89ab6b78a4ee2c9a456ea7e87f

Contents?: true

Size: 1.08 KB

Versions: 11

Compression:

Stored size: 1.08 KB

Contents

<div class="content">
  <h1>Explain</h1>

  <%= form_tag explain_path do %>
    <%= text_area_tag :query, @query, placeholder: "Enter a SQL query" %>
    <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" %>
    </p>
  <% end %>

  <% if @explanation %>
    <% if @visualize %>
      <p>Paste the output below into the <%= link_to "Postgres Explain Visualizer", "http://tatiyants.com/pev/#/plans/new", target: "_blank" %></p>
    <% end %>
    <pre><code><%= @explanation %></code></pre>
    <% unless @visualize %>
      <p><%= link_to "See how to interpret this", "http://www.postgresql.org/docs/current/static/using-explain.html", target: "_blank" %></p>
    <% end %>
    <% if (index = @suggested_index) %>
      <%= render partial: "suggested_index", locals: {index: index, details: index[:details]} %>
    <% end %>
  <% elsif @error %>
    <div class="alert alert-danger"><%= @error %></div>
  <% end %>
</div>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
pghero-2.1.1 app/views/pg_hero/home/explain.html.erb
pghero-2.1.0 app/views/pg_hero/home/explain.html.erb
pghero-2.0.8 app/views/pg_hero/home/explain.html.erb
pghero-2.0.7 app/views/pg_hero/home/explain.html.erb
pghero-2.0.6 app/views/pg_hero/home/explain.html.erb
pghero-2.0.5 app/views/pg_hero/home/explain.html.erb
pghero-2.0.4 app/views/pg_hero/home/explain.html.erb
pghero-2.0.3 app/views/pg_hero/home/explain.html.erb
pghero-2.0.2 app/views/pg_hero/home/explain.html.erb
pghero-2.0.1 app/views/pg_hero/home/explain.html.erb
pghero-2.0.0 app/views/pg_hero/home/explain.html.erb