summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2021-04-28 17:54:43 +0200
committerAlexandre Flament <alex@al-f.net>2021-04-29 11:11:05 +0200
commit8026ed0d3799e999fdae8e361d7f1478d4d8d52f (patch)
treed198da879b951a21150626af05bc6eccb5b603aa /searx
parent34bced29ae8ca7aff69ef43ee34d265677e3a5a2 (diff)
downloadsearxng-8026ed0d3799e999fdae8e361d7f1478d4d8d52f.tar.gz
searxng-8026ed0d3799e999fdae8e361d7f1478d4d8d52f.zip
[mod] UI: engine pref-page, about toolbox: add link to stats
In the preference page, in the 'about' toolbox of an engine, add a link to the stats page of the engine, if the engine had one or more errors. Condition is:: reliabilities[<engine.name>].errors Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx')
-rw-r--r--searx/templates/oscar/preferences.html17
-rw-r--r--searx/templates/simple/preferences.html6
2 files changed, 17 insertions, 6 deletions
diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html
index 6bf66617b..3f113afec 100644
--- a/searx/templates/oscar/preferences.html
+++ b/searx/templates/oscar/preferences.html
@@ -12,6 +12,11 @@
{%- if stats[search_engine.name]['result_count'] -%}
<p>{{ _('Number of results') }}: {{ stats[search_engine.name]['result_count'] }} ( {{ _('Avg.') }} )</p>{{- "" -}}
{%- endif -%}
+ {%- if reliabilities[search_engine.name].errors -%}
+ <a href="{{ url_for('stats', engine=search_engine.name|e) }}" title="{{ _('View error logs and submit a bug report') }}">
+ {{ _('View error logs and submit a bug report') }}
+ </a>
+ {%- endif -%}
</div>
{%- endif -%}
{%- endmacro %}
@@ -420,22 +425,22 @@
</div>
</div>
- <p class="text-muted">
- {{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
+ <p class="text-muted">
+ {{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
{{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
</p>
<p>
- {{ _('Search URL of the currently saved preferences') }}
- <small class="text-muted">({{ _('Note: specifying custom settings in the search URL can reduce privacy by leaking data to the clicked result sites.') }})</small>:
+ {{ _('Search URL of the currently saved preferences') }}
+ <small class="text-muted">({{ _('Note: specifying custom settings in the search URL can reduce privacy by leaking data to the clicked result sites.') }})</small>:
</p>
- <div class="tab-pane">
+ <div class="tab-pane">
<input readonly="" class="form-control select-all-on-click cursor-text" type="url" value="{{ url_for('index', _external=True) }}?preferences={{ preferences_url_params|e }}{% raw %}&amp;q=%s{% endraw %}">
<input type="submit" class="btn btn-primary" value="{{ _('save') }}" />
<a href="{{ url_for('index') }}"><div class="btn btn-default">{{ _('back') }}</div></a>
<a href="{{ url_for('clear_cookies') }}"><div class="btn btn-default">{{ _('Reset defaults') }}</div></a>
- </div>
+ </div>
</form>
</div>
{% endblock %}
diff --git a/searx/templates/simple/preferences.html b/searx/templates/simple/preferences.html
index 76d56675b..3e0f6d4cd 100644
--- a/searx/templates/simple/preferences.html
+++ b/searx/templates/simple/preferences.html
@@ -25,6 +25,12 @@
<p><a href="{{about.website}}" rel="noreferrer">{{about.website}}</a></p>
{%- if about.wikidata_id -%}<p><a href="https://www.wikidata.org/wiki/{{about.wikidata_id}}" rel="noreferrer">wikidata.org/wiki/{{about.wikidata_id}}</a></p>{%- endif -%}
{%- if search_engine.enable_http %}<p>{{ icon('exclamation-sign', 'No HTTPS') }}{{ _('No HTTPS')}}</p>{% endif -%}
+ {%- if reliabilities[search_engine.name].errors -%}
+ <a href="{{ url_for('stats', engine=search_engine.name|e) }}" title="{{ _('View error logs and submit a bug report') }}">
+ {{ _('View error logs and submit a bug report') }}
+ </a>
+ {%- endif -%}
+
</div>
{%- endif -%}
{%- endmacro %}