diff options
author | Alexandre Flament <alex@al-f.net> | 2021-05-19 11:28:57 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2021-05-22 15:17:18 +0200 |
commit | 99aaf86b739b8b93ec0f133822753e8c5ea96e0e (patch) | |
tree | bec5707b488274eac86efa5fde83a0b415b11111 /searx/templates/simple/stats.html | |
parent | 3014463fedd5a4a1e4a7077578a8095e12390c9a (diff) | |
download | searxng-99aaf86b739b8b93ec0f133822753e8c5ea96e0e.tar.gz searxng-99aaf86b739b8b93ec0f133822753e8c5ea96e0e.zip |
[fix] offline engines: fix templates /stats and /preferences
Diffstat (limited to 'searx/templates/simple/stats.html')
-rw-r--r-- | searx/templates/simple/stats.html | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/searx/templates/simple/stats.html b/searx/templates/simple/stats.html index 67c9c79cc..7058d04d4 100644 --- a/searx/templates/simple/stats.html +++ b/searx/templates/simple/stats.html @@ -52,12 +52,11 @@ {%- endif -%} </td> <td class="response-time"> - {%- if engine_stat.total -%} - + {%- if engine_stat.total is not none -%} <div class="bar-chart-value">{{- engine_stat.total | round(1) -}}</div>{{- "" -}} <div class="bar-chart-graph" aria-labelledby="{{engine_stat.name}}_time" aria-hidden="true"> - <div class="bar-chart-serie1 bar{{ (100 * engine_stat.http / engine_stats.max_time)|round }}"></div>{{- "" -}} - <div class="bar-chart-serie2 bar{{ (100 * engine_stat.processing / engine_stats.max_time)|round }}"></div>{{- "" -}} + {% if engine_stat.http is not none and engine_stats.max_time %}<div class="bar-chart-serie1 bar{{ (100 * engine_stat.http / engine_stats.max_time)|round }}"></div>{%- endif -%} + {% if engine_stat.processing is not none and engine_stats.max_time %}<div class="bar-chart-serie2 bar{{ (100 * engine_stat.processing / engine_stats.max_time)|round }}"></div>{%- endif -%} </div> <div class="engine-tooltip" role="tooltip" id="{{engine_stat.name}}_time">{{- "" -}} <table> @@ -70,19 +69,19 @@ <tr> <th scope="col">{{ _('Median') }}</th> <td>{{ engine_stat.total }}</td> - <td>{{ engine_stat.http }}</td> + <td>{{ engine_stat.http or ''}}</td> <td>{{ engine_stat.processing }}</td> </tr> <tr> <th scope="col">{{ _('P80') }}</th> <td>{{ engine_stat.total_p80 }}</td> - <td>{{ engine_stat.http_p80 }}</td> + <td>{{ engine_stat.http_p80 or '' }}</td> <td>{{ engine_stat.processing_p80 }}</td> </tr> <tr> <th scope="col">{{ _('P95') }}</th> <td>{{ engine_stat.total_p95 }}</td> - <td>{{ engine_stat.http_p95 }}</td> + <td>{{ engine_stat.http_p95 or '' }}</td> <td>{{ engine_stat.processing_p95 }}</td> </tr> </table> |