summaryrefslogtreecommitdiff
path: root/searx/static/themes/oscar
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2021-05-16 13:16:44 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2021-05-17 17:41:22 +0200
commitcdfb4b7ff9829cb9048b573f7f1775dc8029f75a (patch)
tree62b056ab6e7e934de9629f4d04d41ffc79c93c7b /searx/static/themes/oscar
parent965817f2942c31eddba44ace307b6c872479b922 (diff)
downloadsearxng-cdfb4b7ff9829cb9048b573f7f1775dc8029f75a.tar.gz
searxng-cdfb4b7ff9829cb9048b573f7f1775dc8029f75a.zip
[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>
Diffstat (limited to 'searx/static/themes/oscar')
-rw-r--r--searx/static/themes/oscar/src/less/logicodev-dark/oscar.less1
-rw-r--r--searx/static/themes/oscar/src/less/logicodev/oscar.less1
-rw-r--r--searx/static/themes/oscar/src/less/logicodev/preferences.less14
-rw-r--r--searx/static/themes/oscar/src/less/pointhi/oscar.less1
-rw-r--r--searx/static/themes/oscar/src/less/pointhi/preferences.less15
5 files changed, 3 insertions, 29 deletions
diff --git a/searx/static/themes/oscar/src/less/logicodev-dark/oscar.less b/searx/static/themes/oscar/src/less/logicodev-dark/oscar.less
index 44d3154a8..53ee7ae31 100644
--- a/searx/static/themes/oscar/src/less/logicodev-dark/oscar.less
+++ b/searx/static/themes/oscar/src/less/logicodev-dark/oscar.less
@@ -1,5 +1,6 @@
@import "../logicodev/variables.less";
@import "../../../../__common__/less/new_issue.less";
+@import "../../../../__common__/less/stats.less";
@stacked-bar-chart: rgb(213, 216, 215, 1);
diff --git a/searx/static/themes/oscar/src/less/logicodev/oscar.less b/searx/static/themes/oscar/src/less/logicodev/oscar.less
index 3415af30b..57c351bd9 100644
--- a/searx/static/themes/oscar/src/less/logicodev/oscar.less
+++ b/searx/static/themes/oscar/src/less/logicodev/oscar.less
@@ -1,5 +1,6 @@
@import "variables.less";
@import "../../../../__common__/less/new_issue.less";
+@import "../../../../__common__/less/stats.less";
@import "navbar.less";
@import "footer.less";
diff --git a/searx/static/themes/oscar/src/less/logicodev/preferences.less b/searx/static/themes/oscar/src/less/logicodev/preferences.less
index 790ed10b7..32e230413 100644
--- a/searx/static/themes/oscar/src/less/logicodev/preferences.less
+++ b/searx/static/themes/oscar/src/less/logicodev/preferences.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;
-}
diff --git a/searx/static/themes/oscar/src/less/pointhi/oscar.less b/searx/static/themes/oscar/src/less/pointhi/oscar.less
index 4ac8da564..689fc1471 100644
--- a/searx/static/themes/oscar/src/less/pointhi/oscar.less
+++ b/searx/static/themes/oscar/src/less/pointhi/oscar.less
@@ -1,5 +1,6 @@
@import "variables.less";
@import "../../../../__common__/less/new_issue.less";
+@import "../../../../__common__/less/stats.less";
@import "footer.less";
@import "checkbox.less";
diff --git a/searx/static/themes/oscar/src/less/pointhi/preferences.less b/searx/static/themes/oscar/src/less/pointhi/preferences.less
index 352aed513..25ba100d6 100644
--- a/searx/static/themes/oscar/src/less/pointhi/preferences.less
+++ b/searx/static/themes/oscar/src/less/pointhi/preferences.less
@@ -77,18 +77,3 @@ th:hover .engine-tooltip, td: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;
-}
-