From 66f72a006ff0b15d30457a645e562c08ca6c0662 Mon Sep 17 00:00:00 2001 From: Alexandre FLAMENT Date: Fri, 2 Sep 2022 08:52:23 +0000 Subject: template: when enable_metrics are disabled, hide the empty stats when metrics are disabled: * hide the link to /stats at the bottom of the pages * in /preferences, hide the columns "Response time" and "Reliability" --- searx/templates/simple/preferences.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'searx/templates/simple/preferences.html') diff --git a/searx/templates/simple/preferences.html b/searx/templates/simple/preferences.html index 7f9be5693..b6fba439c 100644 --- a/searx/templates/simple/preferences.html +++ b/searx/templates/simple/preferences.html @@ -310,9 +310,9 @@ {{ _("Supports selected language") }}{{- "" -}} {{ _("SafeSearch") }}{{- "" -}} {{ _("Time range") }}{{- "" -}} - {{ _("Response time") }}{{- "" -}} + {%- if enable_metrics %}{{ _("Response time") }}{% endif -%} {{ _("Max time") }}{{- "" -}} - {{ _("Reliability") }}{{- "" -}} + {%- if enable_metrics %}{{ _("Reliability") }}{% endif -%} {% for group, engines in engines_by_category[categ] | group_engines_in_tab %} {% if loop.length > 1 %} @@ -336,9 +336,9 @@ {{ checkbox(None, supports[search_engine.name]['supports_selected_language'], true) }}{{- "" -}} {{ checkbox(None, supports[search_engine.name]['safesearch'], true) }}{{- "" -}} {{ checkbox(None, supports[search_engine.name]['time_range_support'], true) }}{{- "" -}} - {{- engine_time(search_engine.name) -}} + {%- if enable_metrics %}{{- engine_time(search_engine.name) -}}{% endif -%} {{ search_engine.timeout }}{{- "" -}} - {{ engine_reliability(search_engine.name) -}} + {%- if enable_metrics %}{{ engine_reliability(search_engine.name) -}}{% endif -%} {% endif %} {% endfor %} -- cgit v1.2.3