Skip to content

Commit

Permalink
Save and transfer autocomplete and debug value in form. Print times w…
Browse files Browse the repository at this point in the history
…ith pformat as ppretty filter.
  • Loading branch information
MartinMikita committed Jul 21, 2016
1 parent 4e24f71 commit 96427ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion web/templates/answer.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<p>Used index {{result['index_succeed']}} for query <i>{{result['query_succeed']}}</i> with modify {{result['modify']}}</p>
{% if 'times' in result %}
<p>Times: prepare {{result['times']['prepare']}}, total {{result['times']['process']}}</p>
<pre>{{result['times']}}</pre>
<pre>{{result['times'] | ppretty}}</pre>
{% endif %}
<p>Showing <b>{{ result['results'] | length }}</b> results</p>
<table class="entries" width="100%" border="1" style="border-collapse: collapse;">
Expand Down
7 changes: 5 additions & 2 deletions web/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ <h1>OSM Names full text search</h1>
<form name="display_name" action="{{ route }}" method="get">
Search: <input autocomplete="off" id="autocomplete" type="text" name="q" value="{{query}}" class="autocomplete-nominatim" autofocus="autofocus" /><br/>
<input type="hidden" name="format" value="html" />
{% if result and 'times' in result %}
<input type="hidden" name="debug" value="1" />
{% if debug %}
<input type="hidden" name="debug" value="{{debug}}" />
{% endif %}
{% if autocomplete %}
<input type="hidden" name="autocomplete" value="{{autocomplete}}" />
{% endif %}
<input class="btn" type="submit" value="Search" />
</form>
Expand Down

0 comments on commit 96427ce

Please sign in to comment.