From 94a28ebe5302dfe1b4a757853bb872f16144f791 Mon Sep 17 00:00:00 2001 From: Alexandre FLAMENT Date: Fri, 2 Sep 2022 08:30:38 +0000 Subject: [PATCH 1/2] Stats: display only the score per result, no anymore the score --- searx/templates/simple/stats.html | 5 +---- searx/webapp.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/searx/templates/simple/stats.html b/searx/templates/simple/stats.html index 378fedd43..d2d5ae2b1 100644 --- a/searx/templates/simple/stats.html +++ b/searx/templates/simple/stats.html @@ -33,10 +33,7 @@ {{ engine_stat.name }} {% if engine_stat.score %} - {{ engine_stat.score|round(1) }} - + {{ engine_stat.score_per_result|round(1) }} {% endif %} diff --git a/searx/webapp.py b/searx/webapp.py index 8c2046b5c..d697766c5 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -145,7 +145,7 @@ result_templates = get_result_templates(templates_path) STATS_SORT_PARAMETERS = { 'name': (False, 'name', ''), - 'score': (True, 'score', 0), + 'score': (True, 'score_per_result', 0), 'result_count': (True, 'result_count', 0), 'time': (False, 'total', 0), 'reliability': (False, 'reliability', 100), From 66f72a006ff0b15d30457a645e562c08ca6c0662 Mon Sep 17 00:00:00 2001 From: Alexandre FLAMENT Date: Fri, 2 Sep 2022 08:52:23 +0000 Subject: [PATCH 2/2] 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/base.html | 6 +++--- searx/templates/simple/preferences.html | 8 ++++---- searx/webapp.py | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.html index a2464a1a5..66c1b7434 100644 --- a/searx/templates/simple/base.html +++ b/searx/templates/simple/base.html @@ -62,9 +62,9 @@