Sync upstream

This commit is contained in:
github-actions[bot] 2024-09-04 00:31:30 +00:00
commit 97e3470ef7
12 changed files with 106 additions and 75 deletions

View file

@ -1,27 +1,34 @@
<div id="engines_msg">
{% if not results and not answers %}
<details class="sidebar-collapsable" open>
<summary class="title" id="engines_msg-title">{{ _('Messages from the search engines') }}</summary>
{% else %}
<details class="sidebar-collapsable">
<summary class="title" id="engines_msg-title">{{ _('Response time') }}: {{ max_response_time | round(1) }} {{ _('seconds') }}</summary>
{% endif %}
<summary class="title" id="engines_msg-title">{{ _('Messages from the search engines') }}</summary>
<div class="dialog-error" role="alert">
{{ icon_big('warning') }}
<div>
<p>
<strong>{{ _('Error!') }}</strong>
{{ _('Engines cannot retrieve results') }}:
</p>
{%- for engine_name, error_type in unresponsive_engines -%}
<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>
</div>
<table class="engine-stats" id="engines_msg-table">
{%- for engine_name, error_type in unresponsive_engines -%}
<tr>
<td class="engine-name">
<a href="{{ url_for('stats', engine=engine_name|e) }}"
title="{{ _('View error logs and submit a bug report') }}">
{{- engine_name -}}
</a>
</td>
<td class="response-error">{{- error_type -}}</td>
</tr>
{%- endfor -%}
{%- for engine_name, response_time in timings -%}
<tr>
<td class="engine-name"><a href="{{ url_for('stats', engine=engine_name|e) }}">{{ engine_name }}</a></td>
<td class="response-time">
<div class="bar-chart-value">{{- response_time | round(1) -}}</div>
<div class="bar-chart-graph" aria-labelledby="{{engine_name}}_time" aria-hidden="true">
<div class="bar-chart-bar bar{{ (100 * response_time / max_response_time) | round | int }}"></div>
</div>
</td>
</tr>
{%- endfor -%}
</table>
</details>
</div>

View file

@ -38,7 +38,7 @@
{%- macro plugin_preferences(section) -%}
{%- for plugin in plugins -%}
{%- if plugin.preference_section == section and (plugin.is_allowed() if plugin.is_allowed else True) -%}
{%- if plugin.preference_section == section -%}
<fieldset>{{- '' -}}
<legend>{{ _(plugin.name) }}</legend>{{- '' -}}
<div class="value">

View file

@ -57,14 +57,12 @@
{%- include 'simple/elements/suggestions.html' -%}
{%- endif -%}
{%- include 'simple/elements/engines_msg.html' -%}
{%- if method == 'POST' -%}
{%- include 'simple/elements/search_url.html' -%}
{%- endif -%}
{%- if unresponsive_engines -%}
{%- include 'simple/elements/engines_msg.html' -%}
{%- endif -%}
{%- if search_formats -%}
{%- include 'simple/elements/apis.html' -%}
{%- endif -%}