From 54c6cb16ab6be2c9d388256289fa8207d0bfe0ea Mon Sep 17 00:00:00 2001 From: coulisse Date: Fri, 20 Jan 2023 18:41:50 +0100 Subject: [PATCH] style and unsecure cookie management --- cfg/webapp_log_config.ini | 2 +- docs/CHANGELOG.md | 2 +- nohup_test.sh | 2 +- static/css/dev/style.css | 5 +++++ static/css/rel/style.min.css | 2 +- static/html/rel/offline.html | 12 ++++++------ static/js/dev/common.js | 10 ++++++++-- templates/_base.html | 12 ++++++------ templates/callsign.html | 2 +- templates/index.html | 4 ++-- templates/plots.html | 16 ++++++++-------- 11 files changed, 40 insertions(+), 29 deletions(-) diff --git a/cfg/webapp_log_config.ini b/cfg/webapp_log_config.ini index 9584aad..843a930 100644 --- a/cfg/webapp_log_config.ini +++ b/cfg/webapp_log_config.ini @@ -12,7 +12,7 @@ level=INFO handlers=stream_handler,file_handler [logger_webapp] -level=INFO +level=DEBUG handlers=stream_handler,file_handler qualname=webapp propagate=0 diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 2505474..3370bbf 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,5 @@ ### Change log -Date: 16/01/2023 +Date: 18/01/2023 Release: v2.4.1 - changed dimensions of spots in world dx spost charts - managed empty data in data providers for charts diff --git a/nohup_test.sh b/nohup_test.sh index 86b32a0..6aba4e4 100755 --- a/nohup_test.sh +++ b/nohup_test.sh @@ -1 +1 @@ -nohup ./test.sh -r >/dev/null 2>&1 & +nohup ./test.sh >/dev/null 2>&1 & diff --git a/static/css/dev/style.css b/static/css/dev/style.css index bb19354..445ad3f 100644 --- a/static/css/dev/style.css +++ b/static/css/dev/style.css @@ -110,4 +110,9 @@ span.search-callsign { .spider_chart { width: 600px; height: 480px; +} + +#silo-propagation-img { + width: 95%; + height: auto; } \ No newline at end of file diff --git a/static/css/rel/style.min.css b/static/css/rel/style.min.css index 5842359..9e0ba31 100644 --- a/static/css/rel/style.min.css +++ b/static/css/rel/style.min.css @@ -1 +1 @@ -@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.1/font/bootstrap-icons.css");@font-face{font-display:swap;font-family:bootstrap-icons}.badge-responsive{width:70px}@media screen and (max-width:768px){.text-responsive{font-size:12px}.badge-responsive{width:40px}#collapseFilters.collapsing{position:absolute!important;z-index:20}#collapseFilters.collapse.show{display:block;position:absolute;z-index:20}.navbar-collapse{max-height:none!important}}.img-flag{background-color:#fff;background-size:cover!important;border:1px solid #ddd;border-radius:2px;-webkit-box-shadow:0 2px 10px rgba(0,0,0,.5),0 2px 3px rgba(0,0,0,.5);-moz-box-shadow:0 2px 10px rgba(0,0,0,.5),0 2px 3px rgba(0,0,0,.5);-o-box-shadow:0 2px 10px rgba(0,0,0,.5),0 2px 3px rgba(0,0,0,.5);box-shadow:0 2px 10px rgba(0,0,0,.5),0 2px 3px rgba(0,0,0,.5);height:19px!important;max-height:auto;max-width:auto;padding:3px;width:32px!important}.ipcs{background-image:url(/static/images/background.webp);background-repeat:no-repeat;background-size:cover}.copyleft{display:inline-block;transform:rotate(180deg)}span.search-callsign{background:url(/static/images/search-callsign.svg) no-repeat 0 0;background-size:contain;cursor:pointer;display:inline-block;height:16px;width:20px}#input-group-callsign{margin-bottom:.5rem;margin-right:1rem}#collapseFilters{background-color:#dde2e6;margin-top:10px}#spotsTable{margin-top:10px}#band{margin-top:5px}#dashboard{gap:10px;padding:10px}#telnet-thead{position:sticky;top:0}#chart-band_activity{height:400px;width:100%}.spider_chart{height:480px;width:600px} \ No newline at end of file +@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.1/font/bootstrap-icons.css");@font-face{font-display:swap;font-family:bootstrap-icons}.badge-responsive{width:70px}@media screen and (max-width:768px){.text-responsive{font-size:12px}.badge-responsive{width:40px}#collapseFilters.collapsing{position:absolute!important;z-index:20}#collapseFilters.collapse.show{display:block;position:absolute;z-index:20}.navbar-collapse{max-height:none!important}}.img-flag{background-color:#fff;background-size:cover!important;border:1px solid #ddd;border-radius:2px;-webkit-box-shadow:0 2px 10px rgba(0,0,0,.5),0 2px 3px rgba(0,0,0,.5);-moz-box-shadow:0 2px 10px rgba(0,0,0,.5),0 2px 3px rgba(0,0,0,.5);-o-box-shadow:0 2px 10px rgba(0,0,0,.5),0 2px 3px rgba(0,0,0,.5);box-shadow:0 2px 10px rgba(0,0,0,.5),0 2px 3px rgba(0,0,0,.5);height:19px!important;max-height:auto;max-width:auto;padding:3px;width:32px!important}.ipcs{background-image:url(/static/images/background.webp);background-repeat:no-repeat;background-size:cover}.copyleft{display:inline-block;transform:rotate(180deg)}span.search-callsign{background:url(/static/images/search-callsign.svg) no-repeat 0 0;background-size:contain;cursor:pointer;display:inline-block;height:16px;width:20px}#input-group-callsign{margin-bottom:.5rem;margin-right:1rem}#collapseFilters{background-color:#dde2e6;margin-top:10px}#spotsTable{margin-top:10px}#band{margin-top:5px}#dashboard{gap:10px;padding:10px}#telnet-thead{position:sticky;top:0}#chart-band_activity{height:400px;width:100%}.spider_chart{height:480px;width:600px}#silo-propagation-img{height:auto;width:100%} \ No newline at end of file diff --git a/static/html/rel/offline.html b/static/html/rel/offline.html index 18a743c..ac22fb2 100644 --- a/static/html/rel/offline.html +++ b/static/html/rel/offline.html @@ -12,14 +12,14 @@ - + - + @@ -106,18 +106,18 @@ v2.4.1 - + - + - + @@ -145,7 +145,7 @@ - + diff --git a/static/js/dev/common.js b/static/js/dev/common.js index 49b8834..252531b 100644 --- a/static/js/dev/common.js +++ b/static/js/dev/common.js @@ -9,8 +9,14 @@ function setCookie(cname, cvalue, exdays) { const d = new Date(); d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); let expires = 'expires=' + d.toUTCString(); - document.cookie = cname + '=' + cvalue + ';' + expires + ';path=/' + ';Samesite=Strict;Secure=True'; -}; + try { + document.cookie = cname + '=' + cvalue + ';' + expires + ';path=/' + ';Samesite=Strict;Secure=True'; + } + catch { + console.log('could not set secure cookie: try with Samsite Lax...'); + document.cookie = cname + '=' + cvalue + ';' + expires + ';path=/' + ';Samesite=Lax'; + } +} /** * get a cookie diff --git a/templates/_base.html b/templates/_base.html index ca7e516..62c319f 100644 --- a/templates/_base.html +++ b/templates/_base.html @@ -9,14 +9,14 @@ - + - + @@ -103,19 +103,19 @@ v2.4.1 - + - + {% block app_scripts %} - + {% endblock app_scripts %} {% block inline_scripts %} {% endblock inline_scripts %} @@ -145,7 +145,7 @@ - + {% endif %} diff --git a/templates/callsign.html b/templates/callsign.html index 0b6c033..50d7675 100644 --- a/templates/callsign.html +++ b/templates/callsign.html @@ -13,5 +13,5 @@
{% endblock filters %} {% block inline_scripts %} - + {% endblock %} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 699ca2a..578e6f8 100644 --- a/templates/index.html +++ b/templates/index.html @@ -204,8 +204,8 @@ var band_frequencies={{bands["bands"]|tojson|safe}}; {% endblock app_data %} {% block app_scripts %} {{ super() }} - + {% endblock %} {% block inline_scripts %} - + {% endblock %} \ No newline at end of file diff --git a/templates/plots.html b/templates/plots.html index 068b081..c46bce8 100644 --- a/templates/plots.html +++ b/templates/plots.html @@ -25,7 +25,7 @@ {% endblock %} {% block contents %} -
+
@@ -47,8 +47,8 @@
- - + propagation trend
@@ -94,10 +94,10 @@ var band_frequencies={{bands["bands"]|tojson|safe}}; {% block app_scripts %} {{ super() }} - - - - - + + + + + {% endblock app_scripts %} \ No newline at end of file