summaryrefslogtreecommitdiff
path: root/searx/templates/simple/elements
diff options
context:
space:
mode:
authorGenericMale <genericmale00@gmail.com>2024-08-22 19:14:24 +0200
committerBnyro <bnyro@tutanota.com>2024-09-03 17:49:33 +0200
commite65edb141d4c5ac7811a77874390492be1872a9b (patch)
tree71342c19a7e26d627099f11008d49cef991cc186 /searx/templates/simple/elements
parentb09aa7e36038307703fdc22cc352920a4d6b9366 (diff)
downloadsearxng-e65edb141d4c5ac7811a77874390492be1872a9b.tar.gz
searxng-e65edb141d4c5ac7811a77874390492be1872a9b.zip
[feat] results: show response times
Diffstat (limited to 'searx/templates/simple/elements')
-rw-r--r--searx/templates/simple/elements/engines_msg.html45
1 files changed, 26 insertions, 19 deletions
diff --git a/searx/templates/simple/elements/engines_msg.html b/searx/templates/simple/elements/engines_msg.html
index db1cefaaf..8ce784582 100644
--- a/searx/templates/simple/elements/engines_msg.html
+++ b/searx/templates/simple/elements/engines_msg.html
@@ -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>