1
0
mirror of https://gitlab.com/depesz/explain.depesz.com.git synced 2025-11-27 22:59:08 +02:00
Files
explain.depesz.com/templates/controller/index.html.ep

68 lines
3.3 KiB
Plaintext
Raw Normal View History

% layout 'default';
% my $title = 'New explain';
2017-05-19 18:45:41 +02:00
% $title = 'New optimization for plan #' . stash('original_plan_id') if stash('optimization');
% title $title;
<h1><%= $title =%></h1>
% if ( stash( 'message' ) ) {
<div class="message">
<p class="message"><%= stash( 'message' ) =%></p>
<p class="hint">You might want to <a href="<%= url_for 'contact' %>">contact</a> me if you think that the problem is on <a href="http://explain.depesz.com/">explain.depesz.com</a> side.</p>
</div>
% }
% if ( flash( 'message' ) ) {
<div class="message">
<p class="message"><%= flash( 'message' ) =%></p>
</div>
% }
2017-05-19 18:45:41 +02:00
<form id="new-explain" method="post" action="<%= url_for 'new-explain' %>">
<div class="fe fe-first fe_plan">
<label for="title">Optional title for plan:</label>
2017-05-19 18:45:41 +02:00
% if ( stash('optimization') ) {
% my $new_title = "Optimization for: ";
% $new_title .= stash('original_title') . ";" if stash('original_title');
% $new_title .= " plan #" . stash('original_plan_id');
<input id="title" name="title" value="<%= $new_title %>"/>
<input id="optimization_for" name="optimization_for" type="hidden" value="<%= stash('original_plan_id') %>"/>
% } else {
<input id="title" name="title" class="auto-hint" title="Optional title"/>
2017-05-19 18:45:41 +02:00
% }
<label for="plan">Paste your explain/explain analyze here:</label>
<textarea id="plan" name="plan" class="auto-hint" title="For example:
QUERY PLAN
---------------------------------------------------------------------------------------------------------------------------
Sort (cost=146.63..148.65 rows=808 width=138) (actual time=55.009..55.012 rows=71 loops=1)
Sort Key: n.nspname, p.proname, (pg_get_function_arguments(p.oid))
Sort Method: quicksort Memory: 43kB
-> Hash Join (cost=1.14..107.61 rows=808 width=138) (actual time=42.495..54.854 rows=71 loops=1)
Hash Cond: (p.pronamespace = n.oid)
-> Seq Scan on pg_proc p (cost=0.00..89.30 rows=808 width=78) (actual time=0.052..53.465 rows=2402 loops=1)
Filter: pg_function_is_visible(oid)
-> Hash (cost=1.09..1.09 rows=4 width=68) (actual time=0.011..0.011 rows=4 loops=1)
Buckets: 1024 Batches: 1 Memory Usage: 1kB
-> Seq Scan on pg_namespace n (cost=0.00..1.09 rows=4 width=68) (actual time=0.005..0.007 rows=4 loops=1)
Filter: ((nspname <> 'pg_catalog'::name) AND (nspname <> 'information_schema'::name))"></textarea>
</div>
<div class="fe fe_is_public">
<label for="is_public">I want this plan to be visible on the <a href="<%= url_for 'history' %>" title="link to: history">history</a> page.</label>
<input type="checkbox" class="checkbox" id="is_public" name="is_public" value="1" checked="checked" />
</div>
<div class="fe fe_is_anon">
<label for="is_anon">I want this plan to be <a href="http://www.depesz.com/index.php/2011/06/11/explain-depesz-com-new-feature-and-some-new-stats/" title="link to: anonymization description">anonymized</a> before saving.</label>
<input type="checkbox" class="checkbox" id="is_anon" name="is_anon" value="1"/>
</div>
<div class="fe fe-last fe-buttons">
<button type="submit" name="submit_plan" id="submit_plan"><span>Submit</span></button>
</div>
</form>