summaryrefslogtreecommitdiff
path: root/searx/templates/oscar
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-04-29 14:37:12 +0200
committerGitHub <noreply@github.com>2021-04-29 14:37:12 +0200
commite5bcc3cbbecb067b0acd8a7c061d9a16453381ed (patch)
tree14b280ae6e41ebe71057cc4203966a6d00e9dfb7 /searx/templates/oscar
parent3c755688adbe771463b5730046ff9a42f2495c13 (diff)
parent8026ed0d3799e999fdae8e361d7f1478d4d8d52f (diff)
Merge pull request #40 from searxng/link-to-stats
[mod] engine errors: link to the stats to create an github issue
Diffstat (limited to 'searx/templates/oscar')
-rw-r--r--searx/templates/oscar/messages/no_results.html9
-rw-r--r--searx/templates/oscar/preferences.html25
-rw-r--r--searx/templates/oscar/results.html7
3 files changed, 28 insertions, 13 deletions
diff --git a/searx/templates/oscar/messages/no_results.html b/searx/templates/oscar/messages/no_results.html
index 82bf2f77a..7ad6423c5 100644
--- a/searx/templates/oscar/messages/no_results.html
+++ b/searx/templates/oscar/messages/no_results.html
@@ -2,11 +2,14 @@
{% if unresponsive_engines %}
<div class="alert alert-danger fade in" role="alert">
<p><strong class="lead">{{ icon('remove-sign') }} {{ _('Error!') }}</strong> {{ _('Engines cannot retrieve results.') }}</p>
+ {%- for engine_name, error_type in unresponsive_engines -%}
<p>
- {% for engine_name, error_type in unresponsive_engines %}
- {{ engine_name }} ({{ error_type }}){% if not loop.last %}, {% endif %}
- {% endfor %}
+ {{- engine_name }} (
+ <a href="{{ url_for('stats', engine=engine_name|e) }}" title="{{ _('View error logs and submit a bug report') }}">
+ {{- error_type -}}
+ </a> ){{- '' -}}
</p>
+ {%- endfor -%}
<p><small>{{ _('Please, try again later or find another searx instance.') }} (<a href="{{ brand.PUBLIC_INSTANCES }}">{{ _('Public instances') }}</a>)</small></p>
</div>
{% else %}
diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html
index e8cae1ca5..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 %}
@@ -50,9 +55,11 @@
{% endif %}
{% if checker_result or errors %}
<td class="{{ css_align_class }} {{ label }}">{{- "" -}}
- <span aria-labelledby="{{engine_name}}_reliablity">
- {%- if reliabilities[engine_name].checker %}{{ icon('exclamation-sign', 'The checker fails on the some tests') }}{% endif %} {{ r -}}
- </span>{{- "" -}}
+ <a href="{{ url_for('stats', engine=engine_name|e) }}">{{- "" -}}
+ <span aria-labelledby="{{engine_name}}_reliablity">
+ {%- if reliabilities[engine_name].checker %}{{ icon('exclamation-sign', 'The checker fails on the some tests') }}{% endif %} {{ r -}}</a>
+ </span>{{- "" -}}
+ </a>{{- "" -}}
<div class="engine-tooltip text-left" role="tooltip" id="{{engine_name}}_reliablity">
{%- if checker_result -%}
<p>{{ _("Failed checker test(s): ") }} {{ ', '.join(checker_result) }}</p>
@@ -418,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/oscar/results.html b/searx/templates/oscar/results.html
index df2d42430..ec84e489b 100644
--- a/searx/templates/oscar/results.html
+++ b/searx/templates/oscar/results.html
@@ -31,7 +31,12 @@
<div class="alert alert-danger fade in" role="alert">
<p>{{ _('Engines cannot retrieve results') }}:</p>
{%- for engine_name, error_type in unresponsive_engines -%}
- {{- engine_name }} ({{ error_type }}){% if not loop.last %}, {% endif %}{{- "" -}}
+ <p>{{- '' -}}
+ {{- engine_name }} (
+ <a href="{{ url_for('stats', engine=engine_name|e) }}" title="{{ _('View error logs and submit a bug report') }}">
+ {{- error_type -}}
+ </a> ){{- '' -}}
+ </p>
{%- endfor -%}
</div>
{%- endif %}