mirror of
https://github.com/searxng/searxng.git
synced 2025-07-27 23:22:23 +02:00
[fix] make /stats more CSP compliant - bar graph
Replace bar graph's *styles* (see below) by CSP compliant implementation in ``searx/static/themes/__common__/less/stats.less`` :: ./simple/stats.html:49: <span style="width: calc(max(2px, 100%*{{ (engine_stat.result_count / engine_stats.max_result_count )|round(3) }}))" class="stacked-bar-chart-serie1"></span>{{- "" -}} ./simple/stats.html:57: <span style="width: calc(max(2px, 100%*{{ (engine_stat.http / engine_stats.max_time )|round(3) }}))" class="stacked-bar-chart-serie1"></span>{{- "" -}} ./simple/stats.html:58: <span style="width: calc(100%*{{ engine_stat.processing / engine_stats.max_time |round(3) }})" class="stacked-bar-chart-serie2"></span>{{- "" -}} ./oscar/stats.html:50: <span style="width: calc(max(2px, 100%*{{ (engine_stat.result_count / engine_stats.max_result_count )|round(3) }}))" class="stacked-bar-chart-serie1"></span>{{- "" -}} ./oscar/stats.html:58: <span style="width: calc(max(2px, 100%*{{ (engine_stat.http / engine_stats.max_time )|round(3) }}))" class="stacked-bar-chart-serie1"></span>{{- "" -}} ./oscar/stats.html:59: <span style="width: calc(100%*{{ engine_stat.processing / engine_stats.max_time |round(3) }})" class="stacked-bar-chart-serie2"></span>{{- "" -}} Reported-by: https://github.com/searxng/searxng/issues/57 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
965817f294
commit
cdfb4b7ff9
10 changed files with 62 additions and 61 deletions
|
@ -1,5 +1,6 @@
|
|||
@import "variables.less";
|
||||
@import "../../../../__common__/less/new_issue.less";
|
||||
@import "../../../../__common__/less/stats.less";
|
||||
|
||||
@import "navbar.less";
|
||||
@import "footer.less";
|
||||
|
|
|
@ -89,17 +89,3 @@ td:hover .engine-tooltip, th:hover .engine-tooltip, .engine-tooltip:hover {
|
|||
padding: 0.4rem 0;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.stacked-bar-chart-serie1 {
|
||||
.stacked-bar-chart-base();
|
||||
background: #5bc0de;
|
||||
box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);
|
||||
padding: 0.4rem 0;
|
||||
}
|
||||
|
||||
.stacked-bar-chart-serie2 {
|
||||
.stacked-bar-chart-base();
|
||||
background: #deb15b;
|
||||
box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);
|
||||
padding: 0.4rem 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue