diff options
| author | Markus Heiser <markus.heiser@darmarIT.de> | 2021-05-22 13:34:44 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-22 13:34:44 +0000 |
| commit | 2398e9a1fea6c5c8c2822766d5b0ba38031aec2e (patch) | |
| tree | 336981aabb7d53f325db95b3ca2729cfb1b6bba3 /searx/templates/simple/stats.html | |
| parent | 2f76b570ab4dae3b2c85aaddddc41831548b1ff8 (diff) | |
| parent | 7728e25b11698edd01be048bb8e3b866001cf5c8 (diff) | |
Merge pull request #85 from searxng/fix-metrics-offline-engine
Fix metrics offline engine
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> |