forked from zaclys/searxng
[fix] offline engines: fix templates /stats and /preferences
This commit is contained in:
parent
3014463fed
commit
99aaf86b73
@ -25,11 +25,13 @@
|
||||
<td class="{{ label }}" style="padding: 2px">{{- "" -}}
|
||||
{%- if stats[engine_name].time != None -%}
|
||||
<span class="stacked-bar-chart-value">{{- stats[engine_name].time -}}</span>{{- "" -}}
|
||||
<span class="stacked-bar-chart" aria-labelledby="{{engine_name}}_chart" aria-hidden="true">{{- "" -}}
|
||||
<span class="stacked-bar-chart" aria-labelledby="{{engine_name}}_chart" aria-hidden="true">
|
||||
{%- if max_rate95 is not none and max_rate95 > 0 -%}
|
||||
<span style="width: calc(max(2px, 100%*{{ (stats[engine_name].time / max_rate95)|round(3) }}))" class="stacked-bar-chart-median"></span>{{- "" -}}
|
||||
<span style="width: calc(100%*{{ ((stats[engine_name].rate80 - stats[engine_name].time) / max_rate95)|round(3) }})" class="stacked-bar-chart-rate80"></span>{{- "" -}}
|
||||
<span style="width: calc(100%*{{ ((stats[engine_name].rate95 - stats[engine_name].rate80) / max_rate95)|round(3) }})" class="stacked-bar-chart-rate95"></span>{{- "" -}}
|
||||
<span class="stacked-bar-chart-rate100"></span>{{- "" -}}
|
||||
<span class="stacked-bar-chart-rate100"></span>
|
||||
{%- endif -%}
|
||||
</span>{{- "" -}}
|
||||
<div class="engine-tooltip text-left" role="tooltip" id="{{engine_name}}_graph">{{- "" -}}
|
||||
<p>{{ _('Median') }}: {{ stats[engine_name].time }}</p>{{- "" -}}
|
||||
|
@ -52,11 +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 text-left" role="tooltip" id="{{engine_stat.name}}_time">{{- "" -}}
|
||||
<table class="table table-striped">
|
||||
@ -69,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>
|
||||
|
@ -39,11 +39,13 @@
|
||||
<td class="{{ label }}" style="padding: 2px; width: 13rem;">{{- "" -}}
|
||||
{%- if stats[engine_name].time != None -%}
|
||||
<span class="stacked-bar-chart-value">{{- stats[engine_name].time -}}</span>{{- "" -}}
|
||||
<span class="stacked-bar-chart" aria-labelledby="{{engine_name}}_chart" aria-hidden="true">{{- "" -}}
|
||||
<span class="stacked-bar-chart" aria-labelledby="{{engine_name}}_chart" aria-hidden="true">
|
||||
{%- if max_rate95 is not none and max_rate95 > 0 -%}
|
||||
<span style="width: calc(max(2px, 100%*{{ (stats[engine_name].time / max_rate95)|round(3) }}))" class="stacked-bar-chart-median"></span>{{- "" -}}
|
||||
<span style="width: calc(100%*{{ ((stats[engine_name].rate80 - stats[engine_name].time) / max_rate95)|round(3) }})" class="stacked-bar-chart-rate80"></span>{{- "" -}}
|
||||
<span style="width: calc(100%*{{ ((stats[engine_name].rate95 - stats[engine_name].rate80) / max_rate95)|round(3) }})" class="stacked-bar-chart-rate95"></span>{{- "" -}}
|
||||
<span class="stacked-bar-chart-rate100"></span>{{- "" -}}
|
||||
<span class="stacked-bar-chart-rate100"></span>
|
||||
{%- endif -%}
|
||||
</span>{{- "" -}}
|
||||
<div class="engine-tooltip text-left" role="tooltip" id="{{engine_name}}_graph">{{- "" -}}
|
||||
<p>{{ _('Median') }}: {{ stats[engine_name].time }}</p>{{- "" -}}
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user