Sha256: 2b07a66ec57bbf3754a16a4124114da86da7e0b2d6f5b5923d54094b89cfcbfa

Contents?: true

Size: 1.14 KB

Versions: 9

Compression:

Stored size: 1.14 KB

Contents

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

  <%= form_tag explain_path do %>
    <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;" %>
      <% if @explain_analyze_enabled %>
        <%= submit_tag "Analyze", class: "btn btn-danger", style: "margin-right: 10px;" %>
      <% end %>
      <%= submit_tag "Visualize", class: "btn btn-danger" %>
    </p>
  <% end %>

  <% if @explanation %>
    <% if @visualize %>
      <p>Paste the output below into the <%= link_to "explain visualizer", PgHero.visualize_url, target: "_blank" %></p>
    <% end %>
    <pre><code><%= @explanation %></code></pre>
    <% unless @visualize %>
      <p><%= link_to "See how to interpret this", "https://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

9 entries across 9 versions & 1 rubygems

Version Path
pghero-3.4.1 app/views/pg_hero/home/explain.html.erb
pghero-3.4.0 app/views/pg_hero/home/explain.html.erb
pghero-3.3.4 app/views/pg_hero/home/explain.html.erb
pghero-3.3.3 app/views/pg_hero/home/explain.html.erb
pghero-3.3.2 app/views/pg_hero/home/explain.html.erb
pghero-3.3.1 app/views/pg_hero/home/explain.html.erb
pghero-3.3.0 app/views/pg_hero/home/explain.html.erb
pghero-3.2.0 app/views/pg_hero/home/explain.html.erb
pghero-3.1.0 app/views/pg_hero/home/explain.html.erb