Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7cfd8d90 authored by Alexandre Flament's avatar Alexandre Flament
Browse files

[mod] oscar: /preferences , engines tab: report engine times

* display the median time instead of the average.
* add a "Reliability" column (sum up the metrics and the checker results).
* the "selected language", "SafeSearch", "Time range" values are displayed as "broken" when the checker tests fail.
parent c27fef1c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ import searx.settings_loader
from os import environ
from os.path import realpath, dirname, join, abspath, isfile


searx_dir = abspath(dirname(__file__))
engine_dir = dirname(realpath(__file__))
static_path = abspath(join(dirname(__file__), 'static'))
+2 −1
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ import types
import functools
import itertools
from time import time
from timeit import default_timer
from urllib.parse import urlparse

import re
@@ -386,7 +387,7 @@ class Checker:
        params = self.processor.get_params(search_query, engineref_category)
        if params is not None:
            counter_inc('engine', search_query.engineref_list[0].name, 'search', 'count', 'sent')
            self.processor.search(search_query.query, params, result_container, time(), 5)
            self.processor.search(search_query.query, params, result_container, default_timer(), 5)
        return result_container

    def get_result_container_tests(self, test_name: str, search_query: SearchQuery) -> ResultContainerTests:
+66 −0
Original line number Diff line number Diff line
@@ -923,12 +923,78 @@ input.cursor-text {
  padding: 0.5rem 1rem;
  margin: 0rem 0 0 2rem;
  border: 1px solid #ddd;
  box-shadow: 2px 2px 2px 0px rgba(0, 0, 0, 0.1);
  background: white;
  font-size: 14px;
  font-weight: normal;
  z-index: 1000000;
}
td:hover .engine-tooltip,
th:hover .engine-tooltip,
.engine-tooltip:hover {
  display: inline-block;
}
/* stacked-bar-chart */
.stacked-bar-chart {
  margin: 0;
  padding: 0 0.125rem 0 3rem;
  width: 100%;
  width: -moz-available;
  width: -webkit-fill-available;
  width: fill;
  flex-direction: row;
  flex-wrap: nowrap;
  flex-grow: 1;
  align-items: center;
  display: inline-flex;
}
.stacked-bar-chart-value {
  width: 3rem;
  display: inline-block;
  position: absolute;
  padding: 0 0.5rem;
  text-align: right;
}
.stacked-bar-chart-base {
  display: flex;
  flex-shrink: 0;
  flex-grow: 0;
  flex-basis: unset;
}
.stacked-bar-chart-median {
  display: flex;
  flex-shrink: 0;
  flex-grow: 0;
  flex-basis: unset;
  background: #000000;
  border: 1px solid rgba(0, 0, 0, 0.9);
  padding: 0.3rem 0;
}
.stacked-bar-chart-rate80 {
  display: flex;
  flex-shrink: 0;
  flex-grow: 0;
  flex-basis: unset;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.3);
  padding: 0.3rem 0;
}
.stacked-bar-chart-rate95 {
  display: flex;
  flex-shrink: 0;
  flex-grow: 0;
  flex-basis: unset;
  background: transparent;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.5);
  padding: 0;
}
.stacked-bar-chart-rate100 {
  display: flex;
  flex-shrink: 0;
  flex-grow: 0;
  flex-basis: unset;
  background: transparent;
  border-left: 1px solid rgba(0, 0, 0, 0.9);
  padding: 0.4rem 0;
  width: 1px;
}
Loading