mirror of
https://github.com/coulisse/spiderweb.git
synced 2024-09-21 07:27:09 +00:00
new version
This commit is contained in:
commit
85da257729
4
.gitignore
vendored
4
.gitignore
vendored
@ -4,3 +4,7 @@ config.json
|
|||||||
__init__/
|
__init__/
|
||||||
__pycache__/
|
__pycache__/
|
||||||
.vscode/
|
.vscode/
|
||||||
|
*report.html
|
||||||
|
venv/
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
@ -24,5 +24,10 @@ keywords:
|
|||||||
- dxcluster
|
- dxcluster
|
||||||
- spiderweb
|
- spiderweb
|
||||||
license: GPL-3.0
|
license: GPL-3.0
|
||||||
|
<<<<<<< HEAD
|
||||||
version: v2.4.2
|
version: v2.4.2
|
||||||
date-released: 2023-02-12
|
date-released: 2023-02-12
|
||||||
|
=======
|
||||||
|
version: v2.4.5
|
||||||
|
date-released: 2023-11-11
|
||||||
|
>>>>>>> staging
|
||||||
|
@ -3,14 +3,13 @@
|
|||||||
|
|
||||||
### Ham radio cluster web viewer for DxSpider
|
### Ham radio cluster web viewer for DxSpider
|
||||||
[![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](http://perso.crans.org/besson/LICENSE.html)
|
[![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](http://perso.crans.org/besson/LICENSE.html)
|
||||||
[![Linux](https://svgshare.com/i/Zhy.svg)](https://svgshare.com/i/Zhy.svg)
|
|
||||||
[![made-with-python](https://img.shields.io/badge/B.e.-Python-1f425f.svg)](https://www.python.org/)
|
[![made-with-python](https://img.shields.io/badge/B.e.-Python-1f425f.svg)](https://www.python.org/)
|
||||||
[![made-with-javascript](https://img.shields.io/badge/F.e.-JavaScript-yellow)](https://www.javascript.com)
|
[![made-with-javascript](https://img.shields.io/badge/F.e.-JavaScript-yellow)](https://www.javascript.com)
|
||||||
[![bootstrap](https://img.shields.io/badge/CSS%20Fwk-Bootstrap-purple)](https://getbootstrap.com/)
|
[![bootstrap](https://img.shields.io/badge/CSS%20Fwk-Bootstrap-purple)](https://getbootstrap.com/)
|
||||||
[![CodeFactor](https://www.codefactor.io/repository/github/coulisse/spiderweb/badge)](https://www.codefactor.io/repository/github/coulisse/spiderweb)
|
[![CodeFactor](https://www.codefactor.io/repository/github/coulisse/spiderweb/badge)](https://www.codefactor.io/repository/github/coulisse/spiderweb)
|
||||||
|
|
||||||
|
|
||||||
- **Release:** v2.4.2
|
- **Release:** v2.4.5
|
||||||
- **Author:** Corrado Gerbaldo - [IU1BOW](https://www.qrz.com/db/IU1BOW)
|
- **Author:** Corrado Gerbaldo - [IU1BOW](https://www.qrz.com/db/IU1BOW)
|
||||||
- **Mail:** <corrado.gerbaldo@gmail.com>
|
- **Mail:** <corrado.gerbaldo@gmail.com>
|
||||||
- **Licensing:** Gpl V3.0 see [LICENSE](LICENSE) file.
|
- **Licensing:** Gpl V3.0 see [LICENSE](LICENSE) file.
|
||||||
|
@ -71,9 +71,9 @@
|
|||||||
{ "WPX": "60", "ISO": "fr", "desc": "French Guiana" },
|
{ "WPX": "60", "ISO": "fr", "desc": "French Guiana" },
|
||||||
{ "WPX": "61", "ISO": "gb", "desc": "England" },
|
{ "WPX": "61", "ISO": "gb", "desc": "England" },
|
||||||
{ "WPX": "62", "ISO": "im", "desc": "Isle of Man" },
|
{ "WPX": "62", "ISO": "im", "desc": "Isle of Man" },
|
||||||
{ "WPX": "63", "ISO": "ie", "desc": "Northern Ireland" },
|
{ "WPX": "63", "ISO": "gb-nir", "desc": "Northern Ireland" },
|
||||||
{ "WPX": "64", "ISO": "je", "desc": "Jersey" },
|
{ "WPX": "64", "ISO": "je", "desc": "Jersey" },
|
||||||
{ "WPX": "65", "ISO": "gb", "desc": "Scotland" },
|
{ "WPX": "65", "ISO": "gb-sct", "desc": "Scotland" },
|
||||||
{ "WPX": "66", "ISO": "gg", "desc": "Guernsey" },
|
{ "WPX": "66", "ISO": "gg", "desc": "Guernsey" },
|
||||||
{ "WPX": "67", "ISO": "gb", "desc": "Wales" },
|
{ "WPX": "67", "ISO": "gb", "desc": "Wales" },
|
||||||
{ "WPX": "68", "ISO": "sb", "desc": "Solomon Islands" },
|
{ "WPX": "68", "ISO": "sb", "desc": "Solomon Islands" },
|
||||||
|
244
cfg/modes.json
244
cfg/modes.json
@ -11,100 +11,103 @@
|
|||||||
"min": 3500.0,
|
"min": 3500.0,
|
||||||
"max": 3569.9
|
"max": 3569.9
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 7000.0,
|
"min": 7000.0,
|
||||||
"max": 7039.9
|
"max": 7039.9
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 10100.0,
|
"min": 10100.0,
|
||||||
"max": 10129.9
|
"max": 10129.9
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 14000.0,
|
"min": 14000.0,
|
||||||
"max": 14069.9
|
"max": 14069.9
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 18068.0,
|
"min": 18068.0,
|
||||||
"max": 18099.9
|
"max": 18099.9
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 21000.0,
|
"min": 21000.0,
|
||||||
"max": 21069.9
|
"max": 21069.9
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 24890.0,
|
"min": 24890.0,
|
||||||
"max": 24914.9
|
"max": 24914.9
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 28000.0,
|
"min": 28000.0,
|
||||||
"max": 28069.9
|
"max": 28069.9
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 50000.0,
|
"min": 50000.0,
|
||||||
|
"max": 50312.9
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"min": 50314.0,
|
||||||
"max": 50499.9
|
"max": 50499.9
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 51000.0,
|
"min": 51000.0,
|
||||||
"max": 52000.0
|
"max": 52000.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 70030,
|
"min": 70030,
|
||||||
"max": 70250
|
"max": 70250
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 144000,
|
"min": 144000,
|
||||||
"max": 144150
|
"max": 144150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 432000,
|
"min": 432000,
|
||||||
"max": 432150
|
"max": 432150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 1296000,
|
"min": 1296000,
|
||||||
"max": 1296150
|
"max": 1296150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 2320100,
|
"min": 2320100,
|
||||||
"max": 2320150
|
"max": 2320150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 3400000,
|
"min": 3400000,
|
||||||
"max": 3402000
|
"max": 3402000
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 5668000,
|
"min": 5668000,
|
||||||
"max": 5670000
|
"max": 5670000
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 5760000,
|
"min": 5760000,
|
||||||
"max": 5762000
|
"max": 5762000
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 10368000,
|
"min": 10368000,
|
||||||
"max": 10370000
|
"max": 10370000
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 10450000,
|
"min": 10450000,
|
||||||
"max": 10452000
|
"max": 10452000
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 24048000,
|
"min": 24048000,
|
||||||
"max": 24050000
|
"max": 24050000
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 47087000,
|
"min": 47087000,
|
||||||
"max": 47089000
|
"max": 47089000
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "digi",
|
"id": "digi",
|
||||||
"freq": [
|
"freq": [
|
||||||
{
|
{
|
||||||
"min": 1840.0,
|
"min": 1840.0,
|
||||||
"max": 1841.0
|
"max": 1841.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 3570.0,
|
"min": 3570.0,
|
||||||
"max": 3600.0
|
"max": 3600.0
|
||||||
@ -129,7 +132,7 @@
|
|||||||
"min": 21070.0,
|
"min": 21070.0,
|
||||||
"max": 21100.0
|
"max": 21100.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 21140.0,
|
"min": 21140.0,
|
||||||
"max": 21141.0
|
"max": 21141.0
|
||||||
},
|
},
|
||||||
@ -144,13 +147,17 @@
|
|||||||
{
|
{
|
||||||
"min": 28180.0,
|
"min": 28180.0,
|
||||||
"max": 28180.0
|
"max": 28180.0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"min": 50313.0,
|
||||||
|
"max": 50313.9
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"min": 50500.0,
|
"min": 50500.0,
|
||||||
"max": 51000.0
|
"max": 51000.0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "phone",
|
"id": "phone",
|
||||||
"freq": [
|
"freq": [
|
||||||
@ -177,7 +184,7 @@
|
|||||||
{
|
{
|
||||||
"min": 21100.0,
|
"min": 21100.0,
|
||||||
"max": 21139.0
|
"max": 21139.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 21141.0,
|
"min": 21141.0,
|
||||||
"max": 21450.0
|
"max": 21450.0
|
||||||
@ -190,60 +197,59 @@
|
|||||||
"min": 28120.0,
|
"min": 28120.0,
|
||||||
"max": 29700.0
|
"max": 29700.0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 50100,
|
"min": 50100,
|
||||||
"max": 50500
|
"max": 50500
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 70030,
|
"min": 70030,
|
||||||
"max": 70250
|
"max": 70250
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 144150,
|
"min": 144150,
|
||||||
"max": 144500
|
"max": 144500
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 432150,
|
"min": 432150,
|
||||||
"max": 432500
|
"max": 432500
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 1296150,
|
"min": 1296150,
|
||||||
"max": 1296800
|
"max": 1296800
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 2320150,
|
"min": 2320150,
|
||||||
"max": 2320800
|
"max": 2320800
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 3400000,
|
"min": 3400000,
|
||||||
"max": 3402000
|
"max": 3402000
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 5668000,
|
"min": 5668000,
|
||||||
"max": 5670000
|
"max": 5670000
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 5760000,
|
"min": 5760000,
|
||||||
"max": 5762000
|
"max": 5762000
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 10368000,
|
"min": 10368000,
|
||||||
"max": 10370000
|
"max": 10370000
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 10450000,
|
"min": 10450000,
|
||||||
"max": 10452000
|
"max": 10452000
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 24048000,
|
"min": 24048000,
|
||||||
"max": 24050000
|
"max": 24050000
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"min": 47087000,
|
"min": 47087000,
|
||||||
"max": 47089000
|
"max": 47089000
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,29 @@
|
|||||||
### Change log
|
### Change log
|
||||||
|
<<<<<<< HEAD
|
||||||
Date: 12/02/2023
|
Date: 12/02/2023
|
||||||
|
=======
|
||||||
|
Date: 11/11/2023
|
||||||
|
Release: v2.4.5
|
||||||
|
- added "back to top" button
|
||||||
|
- enancement request #44 : added reset filter
|
||||||
|
- fixed dependencie #32 : mysql connector
|
||||||
|
- fixed FT8 frequency on CW 6 meter band #40
|
||||||
|
- upgraded echarts library from 5.4.1 to 5.4.3
|
||||||
|
- upgraded flag icons library from 6.6.0 to 6.15
|
||||||
|
- upgraded bootstrap to 5.2.3
|
||||||
|
|
||||||
|
___
|
||||||
|
Date: 26/02/2023
|
||||||
|
Release: v2.4.4
|
||||||
|
- replaced multipart form post with url encoded for security reasons
|
||||||
|
- fixed bands and continents in band activity chart
|
||||||
|
- upgraded Werkzeug to 2.2.3
|
||||||
|
- changed some api call from get to post method in order to not caching it
|
||||||
|
- fixed flags of Scothland and Northern Ireland
|
||||||
|
|
||||||
|
___
|
||||||
|
Date: 11/02/2023
|
||||||
|
>>>>>>> staging
|
||||||
Release: v2.4.2
|
Release: v2.4.2
|
||||||
- changed cache-control header
|
- changed cache-control header
|
||||||
- fixed Layout scrolling (SEO)
|
- fixed Layout scrolling (SEO)
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
#
|
|
||||||
# little script used to build static pages
|
|
||||||
#
|
|
||||||
__author__ = "IU1BOW - Corrado"
|
|
||||||
import sys
|
|
||||||
from staticjinja import Site
|
|
||||||
|
|
||||||
def csrf_token():
|
|
||||||
return "none"
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
print (sys.argv)
|
|
||||||
site = Site.make_site(
|
|
||||||
searchpath=sys.argv[1],
|
|
||||||
outpath=sys.argv[2],
|
|
||||||
env_globals={
|
|
||||||
"cookies_check": False,
|
|
||||||
"csrf_token": csrf_token,
|
|
||||||
"telnet": "none",
|
|
||||||
"mail": "none"
|
|
||||||
},
|
|
||||||
)
|
|
||||||
site.render(use_reloader=False)
|
|
@ -1,13 +1,14 @@
|
|||||||
astroid==2.12.14
|
astroid==2.12.14
|
||||||
|
blinker==1.6.2
|
||||||
charset-normalizer==2.1.1
|
charset-normalizer==2.1.1
|
||||||
click==8.1.3
|
click==8.1.3
|
||||||
dill==0.3.6
|
dill==0.3.6
|
||||||
docopt-ng==0.8.1
|
docopt-ng==0.8.1
|
||||||
easywatch==0.0.5
|
easywatch==0.0.5
|
||||||
Flask==2.2.2
|
Flask==2.2.5
|
||||||
Flask-Consent==0.0.3
|
Flask-Consent==0.0.3
|
||||||
Flask-Minify==0.41
|
Flask-Minify==0.41
|
||||||
Flask-WTF==1.0.1
|
Flask-WTF==1.1.1
|
||||||
htmlmin==0.1.12
|
htmlmin==0.1.12
|
||||||
idna==3.4
|
idna==3.4
|
||||||
isort==5.11.4
|
isort==5.11.4
|
||||||
@ -16,9 +17,10 @@ Jinja2==3.1.2
|
|||||||
jsmin==3.0.1
|
jsmin==3.0.1
|
||||||
lazy-object-proxy==1.9.0
|
lazy-object-proxy==1.9.0
|
||||||
lesscpy==0.15.1
|
lesscpy==0.15.1
|
||||||
|
markup==0.2
|
||||||
MarkupSafe==2.1.1
|
MarkupSafe==2.1.1
|
||||||
mccabe==0.7.0
|
mccabe==0.7.0
|
||||||
mysql-connector-python==8.0.31
|
mysql-connector-python>=8.0.31
|
||||||
numpy==1.24.1
|
numpy==1.24.1
|
||||||
pandas==1.5.2
|
pandas==1.5.2
|
||||||
platformdirs==2.6.2
|
platformdirs==2.6.2
|
||||||
@ -27,11 +29,11 @@ protobuf==4.21.12
|
|||||||
python-dateutil==2.8.2
|
python-dateutil==2.8.2
|
||||||
pytz==2022.7
|
pytz==2022.7
|
||||||
rcssmin==1.1.1
|
rcssmin==1.1.1
|
||||||
requests==2.28.1
|
requests==2.31.0
|
||||||
six==1.16.0
|
six==1.16.0
|
||||||
tomlkit==0.11.6
|
tomlkit==0.11.6
|
||||||
urllib3==1.26.13
|
urllib3==2.0.7
|
||||||
watchdog==2.2.0
|
watchdog==3.0.0
|
||||||
Werkzeug==2.2.2
|
Werkzeug==2.2.2
|
||||||
wrapt==1.14.1
|
wrapt==1.14.1
|
||||||
WTForms==3.0.1
|
WTForms==3.0.1
|
||||||
|
@ -129,6 +129,9 @@ if [ "$1" == "-r" ]; then
|
|||||||
sed -i '/staticjinja==/d' ../requirements.txt
|
sed -i '/staticjinja==/d' ../requirements.txt
|
||||||
sed -i '/lighthouse==/d' ../requirements.txt
|
sed -i '/lighthouse==/d' ../requirements.txt
|
||||||
|
|
||||||
|
echo 'force some requirements...'
|
||||||
|
sed -i 's/mysql-connector-python==8.0.31/mysql-connector-python>=8.0.31/' ../requirements.txt
|
||||||
|
|
||||||
if ! sed -i '13,20s/level=DEBUG/level=INFO/g' ${app_ini}; then
|
if ! sed -i '13,20s/level=DEBUG/level=INFO/g' ${app_ini}; then
|
||||||
echo 'ERROR settimg loglevel=INFO '
|
echo 'ERROR settimg loglevel=INFO '
|
||||||
exit 12
|
exit 12
|
||||||
@ -260,31 +263,31 @@ elif [ "${1}" == "-d" ]; then
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
static_build_path_i=$(mktemp -d /tmp/spiderweb_static_build_i-XXXXXXXXX)
|
#static_build_path_i=$(mktemp -d /tmp/spiderweb_static_build_i-XXXXXXXXX)
|
||||||
static_build_path_o=$(mktemp -d /tmp/spiderweb_static_build_o-XXXXXXXXX)
|
#static_build_path_o=$(mktemp -d /tmp/spiderweb_static_build_o-XXXXXXXXX)
|
||||||
|
#
|
||||||
cp ${path_templates}/_base.html ${static_build_path_i}
|
#cp ${path_templates}/_base.html ${static_build_path_i}
|
||||||
cp ${path_templates}/offline.html ${static_build_path_i}
|
#cp ${path_templates}/offline.html ${static_build_path_i}
|
||||||
|
#
|
||||||
echo 'generating static pages...'
|
#echo 'generating static pages...'
|
||||||
if ! python ../lib/static_build.py ${static_build_path_i} ${static_build_path_o}
|
#if ! python ../lib/static_build.py ${static_build_path_i} ${static_build_path_o}
|
||||||
then
|
#then
|
||||||
echo 'ERROR generating static pages'
|
# echo 'ERROR generating static pages'
|
||||||
rm -rf ${static_build_path_i}
|
# rm -rf ${static_build_path_i}
|
||||||
rm -rf ${static_build_path_o}
|
# rm -rf ${static_build_path_o}
|
||||||
exit 50
|
# exit 50
|
||||||
fi
|
#fi
|
||||||
|
#
|
||||||
if ! cp ${static_build_path_o}/offline.html ${path_static_html}
|
#if ! cp ${static_build_path_o}/offline.html ${path_static_html}
|
||||||
then
|
#then
|
||||||
echo 'ERROR copying static pages'
|
# echo 'ERROR copying static pages'
|
||||||
rm -rf ${static_build_path_i}
|
# rm -rf ${static_build_path_i}
|
||||||
rm -rf ${static_build_path_o}
|
# rm -rf ${static_build_path_o}
|
||||||
exit 51
|
# exit 51
|
||||||
fi
|
#fi
|
||||||
|
#
|
||||||
rm -rf ${static_build_path_i}
|
#rm -rf ${static_build_path_i}
|
||||||
rm -rf ${static_build_path_o}
|
#rm -rf ${static_build_path_o}
|
||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
@ -115,4 +115,12 @@ span.search-callsign {
|
|||||||
#silo-propagation-img {
|
#silo-propagation-img {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#btn-back-to-top {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 20px;
|
||||||
|
right: 20px;
|
||||||
|
display: none;
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
2
static/css/rel/style.min.css
vendored
2
static/css/rel/style.min.css
vendored
@ -1 +1 @@
|
|||||||
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.3/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:95%}
|
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.3/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:95%}#btn-back-to-top{bottom:20px;display:none;opacity:.7;position:fixed;right:20px}
|
File diff suppressed because it is too large
Load Diff
@ -1,124 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
|
|
||||||
<title>Spiderweb: OFFLINE</title>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="description" content="Web Ham Radio DX Cluster and spot search">
|
|
||||||
<meta name="author" content="Corrado Gerbaldo - IU1BOW">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<meta name="theme-color" content="#2196f3">
|
|
||||||
<link rel="icon" href="/static/images/icons/favicon.ico">
|
|
||||||
<link rel="icon" href="/static/images/icons/spider_ico_master.svg" type="image/svg+xml">
|
|
||||||
<link rel="apple-touch-icon" href="/static/images/icons/icon-apple.png">
|
|
||||||
<link rel="manifest" href="/static/pwa/manifest.webmanifest">
|
|
||||||
<link rel="stylesheet" href="/static/css/rel/style.min.css">
|
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
|
|
||||||
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/6.6.6/css/flag-icons.min.css"
|
|
||||||
integrity="sha512-uvXdJud8WaOlQFjlz9B15Yy2Au/bMAvz79F7Xa6OakCl2jvQPdHD0hb3dEqZRdSwG4/sknePXlE7GiarwA/9Wg=="
|
|
||||||
crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<header>
|
|
||||||
|
|
||||||
<!-- nav bar -->
|
|
||||||
<nav class="navbar px-2 navbar-expand-lg navbar-dark bg-dark">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<a class="navbar-brand" href="/">
|
|
||||||
<img src="/static/images/icons/icon-72x72.png" width="30" height="30"
|
|
||||||
class="d-inline-block align-top" alt="">
|
|
||||||
|
|
||||||
</a>
|
|
||||||
<button class="navbar-toggler" type="button" aria-controls="navbarToggler01" aria-expanded="false"
|
|
||||||
aria-label="Toggle navigation" data-bs-toggle="collapse" data-bs-target="#navbarToggler01">
|
|
||||||
<span class="navbar-toggler-icon"></span>
|
|
||||||
</button>
|
|
||||||
<div class="collapse navbar-collapse" id="navbarToggler01">
|
|
||||||
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<div id="MyClockDisplay" class="text-white-50 d-none d-lg-block"></div>
|
|
||||||
<div class="text-white-50 d-none d-lg-block"> (UTC) </div>
|
|
||||||
|
|
||||||
<form method="POST" class="d-flex" id="form-callsign" enctype="multipart/form-data">
|
|
||||||
<input type="hidden" name="csrf_token" value="none" />
|
|
||||||
<div class="input-group" id='input-group-callsign'>
|
|
||||||
<input type="text" class="form-control" placeholder="callsign" aria-label="callsign"
|
|
||||||
aria-describedby="button-addon2" id="callsignInput">
|
|
||||||
<div class="input-group-append">
|
|
||||||
<button id="btn-callsign-search" class="btn btn-secondary" type="submit">
|
|
||||||
<span class="bi-search" role="button" aria-label="search-callsign"></span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
</header>
|
|
||||||
<div class="container-fluid mt-1 ml-0 mr-0 px-0">
|
|
||||||
<div class="ipcs bg-light p-4 rounded-lg m-2">
|
|
||||||
|
|
||||||
<h1 class="display-4 text-white">WEB DX Cluster</h1>
|
|
||||||
<p class="lead text-light">Missing connection  <i class="bi-wifi-off"></i></p>
|
|
||||||
|
|
||||||
<p class="text-light">Telnet access: <a href="telnet://none" class="text-white">none</a></p>
|
|
||||||
<p class="text-light">For connect your cluster, write to <a
|
|
||||||
href="mailto:none?Subject=Connect%20my%20DxCluster%20node" target="_top" class="text-white">none</a></p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="jumbotron alert" role="alert">
|
|
||||||
<h2 class="display-4">No internet connection</h2>
|
|
||||||
<p class="lead">The features in this area require Internet connectivity. Please connect your computer to the
|
|
||||||
Internet</p>
|
|
||||||
<p class="lead">
|
|
||||||
<a class="btn btn-primary btn-lg" href="/" role="button">Try again</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<footer class="page-footer font-small blue">
|
|
||||||
<div class="footer-copyright text-center py-3">
|
|
||||||
<span class="copyleft">©</span> Copyleft:
|
|
||||||
<span id="copyDate"></span>
|
|
||||||
<a href="https://github.com/coulisse/spiderweb/" target="blank" rel="noopener">IU1BOW - Spiderweb</a>
|
|
||||||
<span id="version">v2.4.2</span>
|
|
||||||
<!--
|
|
||||||
<a href="https://github.com/coulisse/spiderweb/" target="blank" rel="noopener"><img src="/static/images/icons/github-mark.svg" alt="github.com" width="16px" height="16px"></a>
|
|
||||||
-->
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
<script async src="static/js/rel/load-sw.min.js"></script>
|
|
||||||
<script nonce="">
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<script defer src="static/js/rel/common.min.js"></script>
|
|
||||||
<script defer src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js"
|
|
||||||
integrity="sha384-A3rJD856KowSb7dwlZdYEkO39Gagi7vIsF0jrRAoQmDKKtQBHUuLZ9AsSv4jD4Xa"
|
|
||||||
crossorigin="anonymous"></script>
|
|
||||||
|
|
||||||
<script async src="static/js/rel/callsign_search.min.js"></script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- cookie consent management -->
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
@ -5,9 +5,22 @@
|
|||||||
//var my_adxo_events=jQuery.parseJSON(my_adxo_events_json.replaceAll("\t",""));
|
//var my_adxo_events=jQuery.parseJSON(my_adxo_events_json.replaceAll("\t",""));
|
||||||
var my_adxo_events = JSON.parse(my_adxo_events_json.replaceAll('\t', ''));
|
var my_adxo_events = JSON.parse(my_adxo_events_json.replaceAll('\t', ''));
|
||||||
|
|
||||||
//var qryString = 'spotlist?c=' + my_callsign;
|
|
||||||
var qryString = 'spotlist?c=' + callsign;
|
//var qryString = 'spotlist?c=' + callsign;
|
||||||
fetch(qryString)
|
let params = {};
|
||||||
|
params['callsign']=callsign;
|
||||||
|
|
||||||
|
//let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content");
|
||||||
|
|
||||||
|
fetch('spotlist', {
|
||||||
|
method: 'POST',
|
||||||
|
cache: 'no-cache',
|
||||||
|
credentials: 'same-origin',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify( params )
|
||||||
|
})
|
||||||
.then((response) => response.json())
|
.then((response) => response.json())
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
try {
|
try {
|
||||||
|
@ -9,7 +9,6 @@ function myCallsignSearch(event) {
|
|||||||
//construct query parameters
|
//construct query parameters
|
||||||
if (callsign.replace(/\s/g, '').length > 0) {
|
if (callsign.replace(/\s/g, '').length > 0) {
|
||||||
location.href = ('/callsign.html?c=').concat((callsign.trim()).toUpperCase());
|
location.href = ('/callsign.html?c=').concat((callsign.trim()).toUpperCase());
|
||||||
console.log(location.href);
|
|
||||||
//form.action="index.html";
|
//form.action="index.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ function getCookie(cname) {
|
|||||||
function get_last_refresh(data) {
|
function get_last_refresh(data) {
|
||||||
let dt_refresh = new Date(0); // The 0 there is the key, which sets the date to the epoch
|
let dt_refresh = new Date(0); // The 0 there is the key, which sets the date to the epoch
|
||||||
//var dt_refresh;
|
//var dt_refresh;
|
||||||
dt_refresh.setUTCSeconds(data["last_refresh"]);
|
dt_refresh.setUTCSeconds(data['last_refresh']);
|
||||||
const pad = (n, s = 2) => (`${new Array(s).fill(0)}${n}`).slice(-s);
|
const pad = (n, s = 2) => (`${new Array(s).fill(0)}${n}`).slice(-s);
|
||||||
const hours = pad(dt_refresh.getHours());
|
const hours = pad(dt_refresh.getHours());
|
||||||
const minutes = pad(dt_refresh.getMinutes());
|
const minutes = pad(dt_refresh.getMinutes());
|
||||||
@ -57,7 +57,7 @@ function get_last_refresh(data) {
|
|||||||
const month = months_names[dt_refresh.getMonth()];
|
const month = months_names[dt_refresh.getMonth()];
|
||||||
const day = dt_refresh.getDate();
|
const day = dt_refresh.getDate();
|
||||||
const year = dt_refresh.getFullYear();
|
const year = dt_refresh.getFullYear();
|
||||||
const last_refresh = "Data refresh: " + day + " of " + month + " " + year + " at " + hours + ":" + minutes;
|
const last_refresh = 'Data refresh: ' + day + ' of ' + month + ' ' + year + ' at ' + hours + ':' + minutes;
|
||||||
return last_refresh;
|
return last_refresh;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,29 +145,46 @@ function setText(id, newvalue) {
|
|||||||
s.innerHTML = newvalue;
|
s.innerHTML = newvalue;
|
||||||
}
|
}
|
||||||
|
|
||||||
function showTime(){
|
function showTime() {
|
||||||
let date=new Date();
|
let date = new Date();
|
||||||
let utc = new Date(date.getTime() + date.getTimezoneOffset() * 60000);
|
let utc = new Date(date.getTime() + date.getTimezoneOffset() * 60000);
|
||||||
let time = utc.toTimeString().split(' ')[0];
|
let time = utc.toTimeString().split(' ')[0];
|
||||||
time = time.split(':')[0]+':'+time.split(':')[1];
|
time = time.split(':')[0] + ':' + time.split(':')[1];
|
||||||
document.getElementById("MyClockDisplay").innerText = time;
|
document.getElementById('MyClockDisplay').innerText = time;
|
||||||
document.getElementById("MyClockDisplay").textContent = time;
|
document.getElementById('MyClockDisplay').textContent = time;
|
||||||
setTimeout(showTime, 1000);
|
setTimeout(showTime, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
document.getElementById('MyClockDisplay').addEventListener('load',showTime());
|
document.getElementById('MyClockDisplay').addEventListener('load', showTime());
|
||||||
document.getElementById('copyDate').innerHTML='2020-'.concat(new Date().getFullYear());
|
document.getElementById('copyDate').innerHTML = '2020-'.concat(new Date().getFullYear());
|
||||||
/*
|
|
||||||
function doRefresh(){
|
|
||||||
|
|
||||||
var chartDom = document.getElementById('chart-dx_spots_trend');
|
//Get the button for return to top page
|
||||||
var myChart = echarts.init(chartDom);
|
let button_top = document.getElementById('btn-back-to-top');
|
||||||
plot_dst.refresh(myChart,'/plot_get_dx_spots_trend');
|
|
||||||
|
|
||||||
};
|
// When the user scrolls down 20px from the top of the document, show the button
|
||||||
|
window.onscroll = function () {
|
||||||
|
scrollFunction();
|
||||||
|
};
|
||||||
|
|
||||||
setInterval(function(){doRefresh()}, 5000);
|
function scrollFunction() {
|
||||||
|
if (
|
||||||
|
document.body.scrollTop > 20 ||
|
||||||
|
document.documentElement.scrollTop > 20
|
||||||
|
) {
|
||||||
|
button_top.style.display = 'block';
|
||||||
|
} else {
|
||||||
|
button_top.style.display = 'none';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// When the user clicks on the button, scroll to the top of the document
|
||||||
|
//button_top.addEventListener('click', backToTop);
|
||||||
|
|
||||||
*/
|
// When the user clicks on the button, scroll to the top of the document
|
||||||
|
button_top.addEventListener('click', backToTop);
|
||||||
|
|
||||||
|
|
||||||
|
function backToTop() {
|
||||||
|
document.body.scrollTop = 0;
|
||||||
|
document.documentElement.scrollTop = 0;
|
||||||
|
}
|
||||||
|
@ -14,4 +14,5 @@ window.onload = () => {
|
|||||||
document.getElementById('form-filters').addEventListener('submit', mySearch);
|
document.getElementById('form-filters').addEventListener('submit', mySearch);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
document.getElementById('MyClockDisplay').addEventListener('load',showTime());
|
document.getElementById('MyClockDisplay').addEventListener('load',showTime());
|
@ -1,25 +1,25 @@
|
|||||||
class plot_base {
|
class plot_base {
|
||||||
|
|
||||||
//refresh = function(){
|
//refresh = function(){
|
||||||
refresh() {
|
refresh() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Chart creator
|
* Chart creator
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {String} chart_id The HTML id where place chart
|
* @param {String} chart_id The HTML id where place chart
|
||||||
* @param {string} end_point This is backend end-point for chart datas
|
* @param {string} end_point This is backend end-point for chart datas
|
||||||
*/
|
*/
|
||||||
constructor(chart_id,end_point) {
|
constructor(chart_id, end_point) {
|
||||||
// Initialize the echarts instance based on the prepared dom
|
// Initialize the echarts instance based on the prepared dom
|
||||||
let chartDom = document.getElementById(chart_id);
|
let chartDom = document.getElementById(chart_id);
|
||||||
this.end_point=end_point;
|
this.end_point = end_point;
|
||||||
this.myChart = echarts.init(chartDom);
|
this.myChart = echarts.init(chartDom);
|
||||||
|
|
||||||
//resize
|
//resize
|
||||||
let chart = echarts.init(document.querySelector('#'+chart_id), null);
|
let chart = echarts.init(document.querySelector('#' + chart_id), null);
|
||||||
window.addEventListener('resize',function(){
|
window.addEventListener('resize', function () {
|
||||||
chart.resize();
|
chart.resize();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -33,13 +33,13 @@ class plot_base {
|
|||||||
class band_activity extends plot_base {
|
class band_activity extends plot_base {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* refresh and populate chart
|
* refresh and populate chart
|
||||||
*
|
*
|
||||||
* @param {string} region This is the continent name (EU,AF,NA...) of the selected
|
* @param {string} region This is the continent name (EU,AF,NA...) of the selected
|
||||||
*/
|
*/
|
||||||
//refresh = function(this.myChart, end_point, region, bands, continents){
|
//refresh = function(this.myChart, end_point, region, bands, continents){
|
||||||
//refresh = function(region){
|
//refresh = function(region){
|
||||||
refresh (region) {
|
refresh(region) {
|
||||||
super.refresh();
|
super.refresh();
|
||||||
console.log('refresh band_activity');
|
console.log('refresh band_activity');
|
||||||
if (typeof region !== 'undefined') {
|
if (typeof region !== 'undefined') {
|
||||||
@ -47,12 +47,25 @@ class band_activity extends plot_base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Asynchronous Data Loading
|
// Asynchronous Data Loading
|
||||||
fetch(this.end_point+'?continent='+this.selectedContinent)
|
//fetch(this.end_point + '?continent=' + this.selectedContinent)
|
||||||
.then((response) => response.json())
|
const params = {
|
||||||
|
continent: this.selectedContinent
|
||||||
|
};
|
||||||
|
|
||||||
|
fetch(this.end_point, {
|
||||||
|
method: 'POST',
|
||||||
|
cache: 'no-cache',
|
||||||
|
credentials: 'same-origin',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify( params )
|
||||||
|
})
|
||||||
|
.then((response) => response.json())
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
// Fill in the data
|
// Fill in the data
|
||||||
var last_refresh=get_last_refresh(data);
|
var last_refresh = get_last_refresh(data);
|
||||||
var dataMap=Array.from(data['band activity']).map(function (item) {
|
var dataMap = Array.from(data['band activity']).map(function (item) {
|
||||||
return [item[1], item[0], item[2] || '-'];
|
return [item[1], item[0], item[2] || '-'];
|
||||||
});
|
});
|
||||||
//options
|
//options
|
||||||
@ -60,29 +73,29 @@ class band_activity extends plot_base {
|
|||||||
tooltip: {
|
tooltip: {
|
||||||
position: 'top',
|
position: 'top',
|
||||||
formatter: function (p) {
|
formatter: function (p) {
|
||||||
var format = p.seriesName +' on ' + p.name +' band: '+'<strong>'+p.data[2]+'</strong>';
|
var format = p.seriesName + ' on ' + p.name + ' band: ' + '<strong>' + p.data[2] + '</strong>';
|
||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
text:'Band activity',
|
text: 'Band activity',
|
||||||
subtext: last_refresh,
|
subtext: last_refresh,
|
||||||
top: 'top',
|
top: 'top',
|
||||||
left:'left'
|
left: 'left'
|
||||||
},
|
},
|
||||||
toolbox: {
|
toolbox: {
|
||||||
show: true,
|
show: true,
|
||||||
showTitle: false,
|
showTitle: false,
|
||||||
orient: 'vertical',
|
orient: 'vertical',
|
||||||
right: 'right',
|
right: 'right',
|
||||||
top : 'bottom',
|
top: 'bottom',
|
||||||
feature: {
|
feature: {
|
||||||
mark: { show: true },
|
mark: { show: true },
|
||||||
dataView: { show: true, readOnly: true },
|
dataView: { show: true, readOnly: true },
|
||||||
restore: { show: true },
|
restore: { show: true },
|
||||||
saveAsImage: { show: true }
|
saveAsImage: { show: true }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
height: '80%',
|
height: '80%',
|
||||||
left: 25,
|
left: 25,
|
||||||
@ -90,12 +103,12 @@ class band_activity extends plot_base {
|
|||||||
right: 60,
|
right: 60,
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
show: true,
|
show: true,
|
||||||
backgroundColor: 'rgb(255, 255, 255)',
|
backgroundColor: 'rgb(255, 255, 255)',
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: this.bands,
|
data: this.bands,
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: true,
|
show: true,
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
@ -108,12 +121,12 @@ class band_activity extends plot_base {
|
|||||||
yAxis: {
|
yAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: this.continents,
|
data: this.continents,
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: true,
|
show: true,
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
splitArea: {
|
splitArea: {
|
||||||
show: true
|
show: true
|
||||||
}
|
}
|
||||||
@ -125,10 +138,10 @@ class band_activity extends plot_base {
|
|||||||
top: 'center',
|
top: 'center',
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 30,
|
max: 30,
|
||||||
inRange : {
|
inRange: {
|
||||||
color: ['#ffffe6','yellow','red']
|
color: ['#ffffe6', 'yellow', 'red']
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
@ -147,56 +160,58 @@ class band_activity extends plot_base {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Chart creator
|
* Chart creator
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {String} chart_id The HTML id where place chart
|
* @param {String} chart_id The HTML id where place chart
|
||||||
* @param {string} end_point This is backend end-point for chart datas
|
* @param {string} end_point This is backend end-point for chart datas
|
||||||
* @param {integer} refresh_time Time to refesh chart
|
* @param {integer} refresh_time Time to refesh chart
|
||||||
* @param {Json} cont_cq The continent list( EU, SA, ...)
|
* @param {Json} cont_cq The continent list( EU, SA, ...)
|
||||||
* @param {Json} band_freq The frequency band list (160, 80, 60... UHF, SHF)
|
* @param {Json} band_freq The frequency band list (160, 80, 60... UHF, SHF)
|
||||||
*/
|
*/
|
||||||
constructor(chart_id, end_point, cont_cq, band_freq) {
|
constructor(chart_id, end_point, cont_cq, band_freq) {
|
||||||
super(chart_id,end_point);
|
super(chart_id, end_point);
|
||||||
|
|
||||||
//populate continents array
|
//populate continents array
|
||||||
var continents=[];
|
let continents = [];
|
||||||
cont_cq.forEach(function myFunction(item, index) {
|
cont_cq.forEach(function myFunction(item, index) {
|
||||||
continents[index]=item['id'];
|
continents[index] = item['id'];
|
||||||
});
|
});
|
||||||
|
this.continents = continents;
|
||||||
|
|
||||||
//populate bands array
|
//populate bands array
|
||||||
var bands=[];
|
let bands = [];
|
||||||
band_freq.forEach(function myFunction(item, index) {
|
band_freq.forEach(function myFunction(item, index) {
|
||||||
bands[index]=item['id'];
|
bands[index] = item['id'];
|
||||||
});
|
});
|
||||||
|
this.bands = bands;
|
||||||
|
|
||||||
//managing region
|
//managing region
|
||||||
var selectedContinent=getCookie('user_region');
|
var selectedContinent = getCookie('user_region');
|
||||||
var selectedContinent_desc=getCookie('user_region_desc');
|
var selectedContinent_desc = getCookie('user_region_desc');
|
||||||
if (!selectedContinent) {
|
if (!selectedContinent) {
|
||||||
selectedContinent='EU';
|
selectedContinent = 'EU';
|
||||||
selectedContinent_desc='Europe';
|
selectedContinent_desc = 'Europe';
|
||||||
setCookie('user_region',selectedContinent,60);
|
setCookie('user_region', selectedContinent, 60);
|
||||||
setCookie('user_region_desc',selectedContinent_desc,60);
|
setCookie('user_region_desc', selectedContinent_desc, 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
selectElement('continentInput', selectedContinent);
|
selectElement('continentInput', selectedContinent);
|
||||||
|
|
||||||
addEventHandler(document.getElementById('continentInput'), 'change', function() {
|
addEventHandler(document.getElementById('continentInput'), 'change', function () {
|
||||||
selectedContinent=this.value;
|
selectedContinent = this.value;
|
||||||
selectedContinent_desc=this.options[this.selectedIndex].text;
|
selectedContinent_desc = this.options[this.selectedIndex].text;
|
||||||
setCookie('user_region',selectedContinent,60);
|
setCookie('user_region', selectedContinent, 60);
|
||||||
setCookie('user_region_desc',selectedContinent_desc,60);
|
setCookie('user_region_desc', selectedContinent_desc, 60);
|
||||||
plot_ba.refresh(selectedContinent);
|
plot_ba.refresh(selectedContinent);
|
||||||
setText('txt_continent','\xa0 Based on DX SPOTS from stations in '+ selectedContinent_desc +' during the last 15 minutes, displayed by Continent and Band');
|
setText('txt_continent', '\xa0 Based on DX SPOTS from stations in ' + selectedContinent_desc + ' during the last 15 minutes, displayed by Continent and Band');
|
||||||
});
|
});
|
||||||
|
|
||||||
setText('txt_continent','\xa0 Based on DX SPOTS from stations in '+ selectedContinent_desc +' during the last 15 minutes, displayed by Continent and Band');
|
setText('txt_continent', '\xa0 Based on DX SPOTS from stations in ' + selectedContinent_desc + ' during the last 15 minutes, displayed by Continent and Band');
|
||||||
this.refresh(selectedContinent);
|
this.refresh(selectedContinent);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -208,7 +223,7 @@ class band_activity extends plot_base {
|
|||||||
* ******************************************************************************/
|
* ******************************************************************************/
|
||||||
|
|
||||||
class world_dx_spots_live extends plot_base {
|
class world_dx_spots_live extends plot_base {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* refresh and populate chart
|
* refresh and populate chart
|
||||||
*
|
*
|
||||||
@ -217,23 +232,32 @@ class world_dx_spots_live extends plot_base {
|
|||||||
super.refresh();
|
super.refresh();
|
||||||
console.log('refresh world_dx_spots_live');
|
console.log('refresh world_dx_spots_live');
|
||||||
// Asynchronous Data Loading
|
// Asynchronous Data Loading
|
||||||
fetch(this.end_point)
|
|
||||||
.then((response) => response.json())
|
fetch(this.end_point, {
|
||||||
.then((data) => {
|
method: 'POST',
|
||||||
|
cache: 'no-cache',
|
||||||
|
credentials: 'same-origin',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((data) => {
|
||||||
fetch('world.json')
|
fetch('world.json')
|
||||||
.then(response => response.text())
|
.then(response => response.text())
|
||||||
.then(geoJson => {
|
.then(geoJson => {
|
||||||
var last_refresh=get_last_refresh(data);
|
var last_refresh = get_last_refresh(data);
|
||||||
var dataMap=[];
|
var dataMap = [];
|
||||||
data['world_dx_spots_live'].forEach(function myFunction(item, index) {
|
data['world_dx_spots_live'].forEach(function myFunction(item, index) {
|
||||||
//lon, lat, number of qso
|
//lon, lat, number of qso
|
||||||
dataMap.push({'value':[item['lat'],item['lon'],item['count']]});
|
dataMap.push({ 'value': [item['lat'], item['lon'], item['count']] });
|
||||||
});
|
});
|
||||||
|
|
||||||
this.myChart.hideLoading();
|
this.myChart.hideLoading();
|
||||||
echarts.registerMap('WR', geoJson);
|
echarts.registerMap('WR', geoJson);
|
||||||
|
|
||||||
this.myChart.setOption( {
|
this.myChart.setOption({
|
||||||
|
|
||||||
visualMap: {
|
visualMap: {
|
||||||
show: false,
|
show: false,
|
||||||
@ -241,7 +265,7 @@ class world_dx_spots_live extends plot_base {
|
|||||||
max: 30,
|
max: 30,
|
||||||
inRange: {
|
inRange: {
|
||||||
symbolSize: [5, 20]
|
symbolSize: [5, 20]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
geo: {
|
geo: {
|
||||||
@ -259,36 +283,36 @@ class world_dx_spots_live extends plot_base {
|
|||||||
},
|
},
|
||||||
emphasis: {
|
emphasis: {
|
||||||
areaColor: '#3ba272' //3ba272 91cc75
|
areaColor: '#3ba272' //3ba272 91cc75
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
emphasis: {
|
emphasis: {
|
||||||
show: false
|
show: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'item',
|
trigger: 'item',
|
||||||
formatter: function(val) {
|
formatter: function (val) {
|
||||||
var out='Spots: <STRONG>'+ val.value[2] +'</STRONG>';
|
var out = 'Spots: <STRONG>' + val.value[2] + '</STRONG>';
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
toolbox: {
|
toolbox: {
|
||||||
show: true,
|
show: true,
|
||||||
showTitle: false,
|
showTitle: false,
|
||||||
orient: 'vertical',
|
orient: 'vertical',
|
||||||
left: 'right',
|
left: 'right',
|
||||||
top: 'center',
|
top: 'center',
|
||||||
feature: {
|
feature: {
|
||||||
mark: { show: true },
|
mark: { show: true },
|
||||||
dataView: { show: true, readOnly: false },
|
dataView: { show: true, readOnly: false },
|
||||||
restore: { show: true },
|
restore: { show: true },
|
||||||
saveAsImage: { show: true }
|
saveAsImage: { show: true }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
@ -296,13 +320,13 @@ class world_dx_spots_live extends plot_base {
|
|||||||
text: 'World DX SPOTS in last hour',
|
text: 'World DX SPOTS in last hour',
|
||||||
subtext: last_refresh,
|
subtext: last_refresh,
|
||||||
top: 'top',
|
top: 'top',
|
||||||
right:'right',
|
right: 'right',
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
type: 'scatter',
|
type: 'scatter',
|
||||||
coordinateSystem: 'geo',
|
coordinateSystem: 'geo',
|
||||||
data:dataMap,
|
data: dataMap,
|
||||||
label: {
|
label: {
|
||||||
emphasis: {
|
emphasis: {
|
||||||
position: 'right',
|
position: 'right',
|
||||||
@ -314,20 +338,20 @@ class world_dx_spots_live extends plot_base {
|
|||||||
color: '#fc8452',
|
color: '#fc8452',
|
||||||
borderColor: '#fa0a0a',
|
borderColor: '#fa0a0a',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/*
|
/*
|
||||||
symbolSize: function (val) {
|
symbolSize: function (val) {
|
||||||
return val[2] / 4;
|
return val[2] / 4;
|
||||||
},
|
},
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
}); //end options
|
}); //end options
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Chart creator
|
* Chart creator
|
||||||
@ -335,9 +359,9 @@ class world_dx_spots_live extends plot_base {
|
|||||||
* @constructor
|
* @constructor
|
||||||
* @param {String} chart_id The HTML id where place chart
|
* @param {String} chart_id The HTML id where place chart
|
||||||
* @param {string} end_point This is backend end-point for chart datas
|
* @param {string} end_point This is backend end-point for chart datas
|
||||||
*/
|
*/
|
||||||
constructor(chart_id, end_point) {
|
constructor(chart_id, end_point) {
|
||||||
super(chart_id,end_point);
|
super(chart_id, end_point);
|
||||||
this.refresh();
|
this.refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -348,7 +372,7 @@ class world_dx_spots_live extends plot_base {
|
|||||||
* ******************************************************************************/
|
* ******************************************************************************/
|
||||||
|
|
||||||
class hour_band extends plot_base {
|
class hour_band extends plot_base {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* refresh and populate chart
|
* refresh and populate chart
|
||||||
*
|
*
|
||||||
@ -358,39 +382,47 @@ class hour_band extends plot_base {
|
|||||||
|
|
||||||
// Asynchronous Data Loading
|
// Asynchronous Data Loading
|
||||||
super.refresh();
|
super.refresh();
|
||||||
console.log ('refresh hour_band');
|
console.log('refresh hour_band');
|
||||||
fetch(this.end_point)
|
|
||||||
.then((response) => response.json())
|
fetch(this.end_point, {
|
||||||
.then((data) => {
|
method: 'POST',
|
||||||
|
cache: 'no-cache',
|
||||||
|
credentials: 'same-origin',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((data) => {
|
||||||
// Fill in the dat
|
// Fill in the dat
|
||||||
var last_refresh=get_last_refresh(data);
|
var last_refresh = get_last_refresh(data);
|
||||||
//set hour indicator names
|
//set hour indicator names
|
||||||
var hour_indicators=[];
|
var hour_indicators = [];
|
||||||
|
|
||||||
for (let i = 23; i > -1; i--) {
|
for (let i = 23; i > -1; i--) {
|
||||||
var hour_name={};
|
var hour_name = {};
|
||||||
var s=i.toString();
|
var s = i.toString();
|
||||||
hour_name['name']=s;
|
hour_name['name'] = s;
|
||||||
hour_indicators.push(hour_name);
|
hour_indicators.push(hour_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
//cycling whithin each bands and hours
|
//cycling whithin each bands and hours
|
||||||
var dataMap=[];
|
var dataMap = [];
|
||||||
this.bands.forEach(band_item => {
|
this.bands.forEach(band_item => {
|
||||||
var qso=[];
|
var qso = [];
|
||||||
|
|
||||||
for (let i = 23; i > -1; i--) {
|
for (let i = 23; i > -1; i--) {
|
||||||
try {
|
try {
|
||||||
var value=data['hour_band'][band_item][i];
|
var value = data['hour_band'][band_item][i];
|
||||||
if (typeof value == 'undefined') {
|
if (typeof value == 'undefined') {
|
||||||
value = 0;
|
value = 0;
|
||||||
}
|
}
|
||||||
qso.push(value);
|
qso.push(value);
|
||||||
} catch (TypeError) {
|
} catch (TypeError) {
|
||||||
//TODO
|
//TODO
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var tot={'value':qso,'name':band_item};
|
var tot = { 'value': qso, 'name': band_item };
|
||||||
dataMap.push(tot);
|
dataMap.push(tot);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -398,17 +430,17 @@ class hour_band extends plot_base {
|
|||||||
//options
|
//options
|
||||||
this.myChart.setOption({
|
this.myChart.setOption({
|
||||||
legend: {
|
legend: {
|
||||||
|
|
||||||
orient: 'horizontal',
|
orient: 'horizontal',
|
||||||
left: 'left',
|
left: 'left',
|
||||||
bottom: 'bottom'
|
bottom: 'bottom'
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
text: 'DX SPOTS per hour in last month',
|
text: 'DX SPOTS per hour in last month',
|
||||||
subtext: last_refresh,
|
subtext: last_refresh,
|
||||||
top: 'top',
|
top: 'top',
|
||||||
right: 'right',
|
right: 'right',
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
},
|
},
|
||||||
@ -417,23 +449,23 @@ class hour_band extends plot_base {
|
|||||||
showTitle: false,
|
showTitle: false,
|
||||||
orient: 'vertical',
|
orient: 'vertical',
|
||||||
left: 'right',
|
left: 'right',
|
||||||
top: 'center',
|
top: 'center',
|
||||||
feature: {
|
feature: {
|
||||||
mark: { show: true },
|
mark: { show: true },
|
||||||
dataView: { show: true, readOnly: true },
|
dataView: { show: true, readOnly: true },
|
||||||
restore: { show: true },
|
restore: { show: true },
|
||||||
saveAsImage: { show: true }
|
saveAsImage: { show: true }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
radar: {
|
radar: {
|
||||||
shape: 'circle',
|
shape: 'circle',
|
||||||
//startAngle: 285, //0 on left side
|
//startAngle: 285, //0 on left side
|
||||||
startAngle: 105, //0 on top
|
startAngle: 105, //0 on top
|
||||||
indicator: hour_indicators,
|
indicator: hour_indicators,
|
||||||
center: ['47%', '46%'],
|
center: ['47%', '46%'],
|
||||||
axisName: {
|
axisName: {
|
||||||
color: 'rgb(80,80,80)',
|
color: 'rgb(80,80,80)',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
@ -441,25 +473,25 @@ class hour_band extends plot_base {
|
|||||||
width: 2
|
width: 2
|
||||||
},
|
},
|
||||||
type: 'radar',
|
type: 'radar',
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
data: dataMap,
|
data: dataMap,
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'item',
|
trigger: 'item',
|
||||||
formatter: (params) => {
|
formatter: (params) => {
|
||||||
return 'Band: '+params.name;
|
return 'Band: ' + params.name;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
emphasis: {
|
emphasis: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
width: 4
|
width: 4
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Chart creator
|
* Chart creator
|
||||||
@ -468,15 +500,15 @@ class hour_band extends plot_base {
|
|||||||
* @param {String} chart_id The HTML id where place chart
|
* @param {String} chart_id The HTML id where place chart
|
||||||
* @param {string} end_point This is backend end-point for chart datas
|
* @param {string} end_point This is backend end-point for chart datas
|
||||||
* @param {Json} band_freq The frequency band list (160, 80, 60... UHF, SHF)
|
* @param {Json} band_freq The frequency band list (160, 80, 60... UHF, SHF)
|
||||||
*/
|
*/
|
||||||
constructor(chart_id,end_point,band_freq) {
|
constructor(chart_id, end_point, band_freq) {
|
||||||
// Initialize the echarts instance based on the prepared dom
|
// Initialize the echarts instance based on the prepared dom
|
||||||
super(chart_id,end_point);
|
super(chart_id, end_point);
|
||||||
|
|
||||||
//populate bands array
|
//populate bands array
|
||||||
let lcl_bands=[];
|
let lcl_bands = [];
|
||||||
band_freq.forEach(function myFunction(item, index) {
|
band_freq.forEach(function myFunction(item, index) {
|
||||||
lcl_bands[index]=item['id'];
|
lcl_bands[index] = item['id'];
|
||||||
});
|
});
|
||||||
this.bands = lcl_bands;
|
this.bands = lcl_bands;
|
||||||
this.refresh();
|
this.refresh();
|
||||||
@ -489,22 +521,30 @@ class hour_band extends plot_base {
|
|||||||
* javascript used to build dx spots per month chart
|
* javascript used to build dx spots per month chart
|
||||||
* ******************************************************************************/
|
* ******************************************************************************/
|
||||||
|
|
||||||
class dx_spots_per_month extends plot_base {
|
class dx_spots_per_month extends plot_base {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* refresh and populate chart
|
* refresh and populate chart
|
||||||
*/
|
*/
|
||||||
refresh() {
|
refresh() {
|
||||||
|
|
||||||
console.log('refresh dx_spots_per_month');
|
console.log('refresh dx_spots_per_month');
|
||||||
// Asynchronous Data Loading
|
// Asynchronous Data Loading
|
||||||
|
|
||||||
//$.getJSON(end_point).done(function(data) {
|
//$.getJSON(end_point).done(function(data) {
|
||||||
fetch(this.end_point)
|
|
||||||
.then((response) => response.json())
|
fetch(this.end_point, {
|
||||||
.then((data) => {
|
method: 'POST',
|
||||||
|
cache: 'no-cache',
|
||||||
|
credentials: 'same-origin',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((data) => {
|
||||||
// Fill in the data
|
// Fill in the data
|
||||||
var last_refresh=get_last_refresh(data);
|
var last_refresh = get_last_refresh(data);
|
||||||
var year_now = new Date().getFullYear();
|
var year_now = new Date().getFullYear();
|
||||||
var year_0 = (year_now - 0).toString();
|
var year_0 = (year_now - 0).toString();
|
||||||
var year_1 = (year_now - 1).toString();
|
var year_1 = (year_now - 1).toString();
|
||||||
@ -512,14 +552,14 @@ class dx_spots_per_month extends plot_base {
|
|||||||
|
|
||||||
var months_name = get_months_names();
|
var months_name = get_months_names();
|
||||||
|
|
||||||
var dataMap_year_0=[];
|
var dataMap_year_0 = [];
|
||||||
var dataMap_year_1=[];
|
var dataMap_year_1 = [];
|
||||||
var dataMap_year_2=[];
|
var dataMap_year_2 = [];
|
||||||
for (let i = 1; i < 13; i++) {
|
for (let i = 1; i < 13; i++) {
|
||||||
dataMap_year_0.push(data.spots_per_month[i].year_0);
|
dataMap_year_0.push(data.spots_per_month[i].year_0);
|
||||||
dataMap_year_1.push(data.spots_per_month[i].year_1);
|
dataMap_year_1.push(data.spots_per_month[i].year_1);
|
||||||
dataMap_year_2.push(data.spots_per_month[i].year_2);
|
dataMap_year_2.push(data.spots_per_month[i].year_2);
|
||||||
}
|
}
|
||||||
|
|
||||||
//options
|
//options
|
||||||
this.myChart.setOption({
|
this.myChart.setOption({
|
||||||
@ -533,11 +573,11 @@ class dx_spots_per_month extends plot_base {
|
|||||||
text: 'DX SPOTS per month',
|
text: 'DX SPOTS per month',
|
||||||
subtext: last_refresh,
|
subtext: last_refresh,
|
||||||
top: 'top',
|
top: 'top',
|
||||||
left:'left'
|
left: 'left'
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
data: [year_2, year_1, year_0],
|
data: [year_2, year_1, year_0],
|
||||||
bottom: 'bottom'
|
bottom: 'bottom'
|
||||||
},
|
},
|
||||||
toolbox: {
|
toolbox: {
|
||||||
show: true,
|
show: true,
|
||||||
@ -564,7 +604,7 @@ class dx_spots_per_month extends plot_base {
|
|||||||
{
|
{
|
||||||
type: 'value',
|
type: 'value',
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
formatter: (function (value){
|
formatter: (function (value) {
|
||||||
return format_u_k_m(value);
|
return format_u_k_m(value);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -587,7 +627,7 @@ class dx_spots_per_month extends plot_base {
|
|||||||
focus: 'series'
|
focus: 'series'
|
||||||
},
|
},
|
||||||
data: dataMap_year_1
|
data: dataMap_year_1
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: year_0,
|
name: year_0,
|
||||||
@ -595,9 +635,9 @@ class dx_spots_per_month extends plot_base {
|
|||||||
emphasis: {
|
emphasis: {
|
||||||
focus: 'series'
|
focus: 'series'
|
||||||
},
|
},
|
||||||
data: dataMap_year_0
|
data: dataMap_year_0
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -608,9 +648,9 @@ class dx_spots_per_month extends plot_base {
|
|||||||
* @constructor
|
* @constructor
|
||||||
* @param {String} chart_id The HTML id where place chart
|
* @param {String} chart_id The HTML id where place chart
|
||||||
* @param {string} end_point This is backend end-point for chart datas
|
* @param {string} end_point This is backend end-point for chart datas
|
||||||
*/
|
*/
|
||||||
constructor(chart_id, end_point) {
|
constructor(chart_id, end_point) {
|
||||||
super(chart_id,end_point);
|
super(chart_id, end_point);
|
||||||
this.refresh();
|
this.refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -620,27 +660,34 @@ class dx_spots_per_month extends plot_base {
|
|||||||
* ******************************************************************************/
|
* ******************************************************************************/
|
||||||
|
|
||||||
class dx_spots_trend extends plot_base {
|
class dx_spots_trend extends plot_base {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* refresh and populate chart
|
* refresh and populate chart
|
||||||
*/
|
*/
|
||||||
refresh() {
|
refresh() {
|
||||||
|
|
||||||
console.log('refresh dx_spots_trend');
|
console.log('refresh dx_spots_trend');
|
||||||
// Asynchronous Data Loading
|
// Asynchronous Data Loading
|
||||||
|
|
||||||
fetch(this.end_point)
|
fetch(this.end_point, {
|
||||||
.then((response) => response.json())
|
method: 'POST',
|
||||||
.then((data) => {
|
cache: 'no-cache',
|
||||||
|
credentials: 'same-origin',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((data) => {
|
||||||
// Fill in the data
|
// Fill in the data
|
||||||
var last_refresh=get_last_refresh(data);
|
var last_refresh = get_last_refresh(data);
|
||||||
var dataMap=[];
|
var dataMap = [];
|
||||||
for (const [key, value] of Object.entries(data['spots_trend'])) {
|
for (const [key, value] of Object.entries(data['spots_trend'])) {
|
||||||
var tuple=[];
|
var tuple = [];
|
||||||
tuple.push(key);
|
tuple.push(key);
|
||||||
tuple.push(value);
|
tuple.push(value);
|
||||||
dataMap.push(tuple);
|
dataMap.push(tuple);
|
||||||
}
|
}
|
||||||
//options
|
//options
|
||||||
this.myChart.setOption({
|
this.myChart.setOption({
|
||||||
tooltip: {
|
tooltip: {
|
||||||
@ -653,22 +700,22 @@ class dx_spots_trend extends plot_base {
|
|||||||
text: 'DX SPOTS trend',
|
text: 'DX SPOTS trend',
|
||||||
subtext: last_refresh,
|
subtext: last_refresh,
|
||||||
top: 'top',
|
top: 'top',
|
||||||
left:'left'
|
left: 'left'
|
||||||
},
|
},
|
||||||
toolbox: {
|
toolbox: {
|
||||||
show: true,
|
show: true,
|
||||||
showTitle: false,
|
showTitle: false,
|
||||||
orient: 'vertical',
|
orient: 'vertical',
|
||||||
left: 'right',
|
left: 'right',
|
||||||
top: 'center',
|
top: 'center',
|
||||||
feature: {
|
feature: {
|
||||||
dataView: { show: true, readOnly: false },
|
dataView: { show: true, readOnly: false },
|
||||||
dataZoom: {
|
dataZoom: {
|
||||||
yAxisIndex: 'none'
|
yAxisIndex: 'none'
|
||||||
},
|
},
|
||||||
restore: {},
|
restore: {},
|
||||||
magicType: { show: true, type: ['line', 'bar'] },
|
magicType: { show: true, type: ['line', 'bar'] },
|
||||||
saveAsImage: {},
|
saveAsImage: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
@ -679,10 +726,10 @@ class dx_spots_trend extends plot_base {
|
|||||||
type: 'value',
|
type: 'value',
|
||||||
boundaryGap: [0, '10%'],
|
boundaryGap: [0, '10%'],
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
formatter: (function (value){
|
formatter: (function (value) {
|
||||||
return format_u_k_m(value);
|
return format_u_k_m(value);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dataZoom: [
|
dataZoom: [
|
||||||
{
|
{
|
||||||
@ -704,53 +751,54 @@ class dx_spots_trend extends plot_base {
|
|||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: '#078513'
|
color: '#078513'
|
||||||
},
|
},
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
{
|
{
|
||||||
offset: 0,
|
offset: 0,
|
||||||
color: '#57fa75'
|
color: '#57fa75'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
offset: 1,
|
offset: 1,
|
||||||
color: '#118226'
|
color: '#118226'
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
data: dataMap
|
data: dataMap
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Chart creator
|
* Chart creator
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {String} chart_id The HTML id where place chart
|
* @param {String} chart_id The HTML id where place chart
|
||||||
* @param {string} end_point This is backend end-point for chart datas
|
* @param {string} end_point This is backend end-point for chart datas
|
||||||
*/
|
*/
|
||||||
constructor(chart_id,end_point) {
|
constructor(chart_id, end_point) {
|
||||||
// Initialize the echarts instance based on the prepared dom
|
// Initialize the echarts instance based on the prepared dom
|
||||||
super(chart_id,end_point);
|
super(chart_id, end_point);
|
||||||
this.refresh();
|
this.refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//create objects and timing
|
//create objects and timing
|
||||||
var plot_ba = new band_activity ('chart-band_activity','/plot_get_heatmap_data', continents_cq,band_frequencies);
|
|
||||||
setInterval(function(){plot_ba.refresh();},5*60*1000);
|
|
||||||
|
|
||||||
var plot_wdsl = new world_dx_spots_live ('chart-world_dx_spots_live','/plot_get_world_dx_spots_live');
|
var plot_ba = new band_activity('chart-band_activity', '/plot_get_heatmap_data', continents_cq, band_frequencies);
|
||||||
setInterval(function(){plot_wdsl.refresh();},5*60*1000);
|
setInterval(function () { plot_ba.refresh(); }, 5 * 60 * 1000);
|
||||||
|
|
||||||
var plot_hb = new hour_band('chart-hour_band','/plot_get_hour_band',band_frequencies);
|
var plot_wdsl = new world_dx_spots_live('chart-world_dx_spots_live', '/plot_get_world_dx_spots_live');
|
||||||
setInterval(function(){plot_hb.refresh();},1*60*60*1000);
|
setInterval(function () { plot_wdsl.refresh(); }, 5 * 60 * 1000);
|
||||||
|
|
||||||
var plot_dspm = new dx_spots_per_month ('chart-dx_spots_x_month','/plot_get_dx_spots_per_month');
|
var plot_hb = new hour_band('chart-hour_band', '/plot_get_hour_band', band_frequencies);
|
||||||
setInterval(function(){plot_dspm.refresh();},12*60*60*1000);
|
setInterval(function () { plot_hb.refresh(); }, 1 * 60 * 60 * 1000);
|
||||||
|
|
||||||
var plot_dst = new dx_spots_trend ('chart-dx_spots_trend','/plot_get_dx_spots_trend');
|
var plot_dspm = new dx_spots_per_month('chart-dx_spots_x_month', '/plot_get_dx_spots_per_month');
|
||||||
setInterval(function(){plot_dst.refresh();},12*60*60*1000);
|
setInterval(function () { plot_dspm.refresh(); }, 12 * 60 * 60 * 1000);
|
||||||
|
|
||||||
|
var plot_dst = new dx_spots_trend('chart-dx_spots_trend', '/plot_get_dx_spots_trend');
|
||||||
|
setInterval(function () { plot_dst.refresh(); }, 12 * 60 * 60 * 1000);
|
@ -164,7 +164,7 @@ class table_builder {
|
|||||||
const td_comm = document.createElement('td');
|
const td_comm = document.createElement('td');
|
||||||
td_comm.className = 'd-none d-lg-table-cell d-xl-table-cell';
|
td_comm.className = 'd-none d-lg-table-cell d-xl-table-cell';
|
||||||
try {
|
try {
|
||||||
td_comm.textContent = line.comm.substring(0,100);
|
td_comm.textContent = line.comm.substring(0, 100);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
td_comm.textContent = '';
|
td_comm.textContent = '';
|
||||||
}
|
}
|
||||||
@ -245,7 +245,7 @@ class table_builder {
|
|||||||
return new bootstrap.Popover(popoverTriggerEl);
|
return new bootstrap.Popover(popoverTriggerEl);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.first_time=false;
|
this.first_time = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} //end class
|
} //end class
|
||||||
@ -257,7 +257,7 @@ class table_builder {
|
|||||||
const adxo_url = 'https://www.ng3k.com/misc/adxo.html';
|
const adxo_url = 'https://www.ng3k.com/misc/adxo.html';
|
||||||
const qrz_url = 'https://www.qrz.com/db/';
|
const qrz_url = 'https://www.qrz.com/db/';
|
||||||
const tb = new table_builder('bodyspot');
|
const tb = new table_builder('bodyspot');
|
||||||
var qryAll_sv = '';
|
var params_sv = {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decode Announced Dx Operation (ng3k)
|
* Decode Announced Dx Operation (ng3k)
|
||||||
@ -274,6 +274,8 @@ function findAdxo(adxo, callsign_to_find) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to filter spot when pressed the search button on filter
|
* Function to filter spot when pressed the search button on filter
|
||||||
* This function trigger the search, also triggered by timer
|
* This function trigger the search, also triggered by timer
|
||||||
@ -287,38 +289,42 @@ function mySearch(event) {
|
|||||||
* Function for construct query string for single value selection
|
* Function for construct query string for single value selection
|
||||||
*
|
*
|
||||||
* @param id {string} The html identifier used for filter
|
* @param id {string} The html identifier used for filter
|
||||||
* @param param {string}the parameter for the query
|
|
||||||
* @param len {number} The maximum number of element that could be selected; use -1 if the filter permits a single selection
|
* @param len {number} The maximum number of element that could be selected; use -1 if the filter permits a single selection
|
||||||
* @param qrystr {string} Th initial query string to be completed with the new filter
|
* @param qry_json {object} The input json
|
||||||
*/
|
*/
|
||||||
function getFilter(id, param, len, qrystr) {
|
function compose_filter(id, len, qry_json) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let selectedFilter = [].map.call(document.getElementById(id).selectedOptions, option => option.value);
|
let selectedFilter = [].map.call(document.getElementById(id).selectedOptions, option => option.value);
|
||||||
let qryFilter = '';
|
if (selectedFilter.length < len) {
|
||||||
if (selectedFilter.length < len || len == -1) {
|
qry_json[id] = [];
|
||||||
qryFilter = selectedFilter.map(function (el) {
|
selectedFilter.map(function (el) {
|
||||||
if (el) {
|
if (el) {
|
||||||
return param + '=' + el;
|
qry_json[id].push(el);
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}).join('&');
|
});
|
||||||
qrystr = qrystr.concat('&'.concat(qryFilter));
|
} else if (len == -1) {
|
||||||
if (qrystr.substring(0, 1) == '&') {
|
selectedFilter.map(function (el) {
|
||||||
qrystr = qrystr.substring(1);
|
if (el) {
|
||||||
}
|
qry_json[id]=el;
|
||||||
}
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
if (err.name == 'TypeError') {
|
if (err.name == 'TypeError') {
|
||||||
/* error managed: it is ok: probabilly ther is no filter on cq region */
|
console.error(err.name);
|
||||||
|
/* error managed: it is ok: probabilly ther is no filter on cq region */
|
||||||
} else {
|
} else {
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return qrystr;
|
return qry_json;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -328,35 +334,41 @@ function getFilter(id, param, len, qrystr) {
|
|||||||
*/
|
*/
|
||||||
function refresh_timer() {
|
function refresh_timer() {
|
||||||
|
|
||||||
let qryAll = '';
|
let params = {};
|
||||||
|
|
||||||
//get other filters
|
//get other filters
|
||||||
qryAll = getFilter('band', 'b', 14, qryAll);
|
params = compose_filter('band', 14, params);
|
||||||
qryAll = getFilter('de_re', 'e', 7, qryAll);
|
params = compose_filter('de_re', 7, params);
|
||||||
qryAll = getFilter('dx_re', 'x', 7, qryAll);
|
params = compose_filter('dx_re', 7, params);
|
||||||
qryAll = getFilter('mode', 'm', 3, qryAll);
|
params = compose_filter('mode', 3, params);
|
||||||
qryAll = getFilter('cqdeInput', 'qe', -1, qryAll);
|
params = compose_filter('cqdeInput', -1, params);
|
||||||
qryAll = getFilter('cqdxInput', 'qx', -1, qryAll);
|
params = compose_filter('cqdxInput', -1, params);
|
||||||
|
|
||||||
//Composing query string
|
|
||||||
let qryString;
|
|
||||||
|
|
||||||
|
delete params_sv['lr']; //remove line row number, for future param comparison
|
||||||
//If the filter is changed we need to reset the data table and restart from rowid=0
|
//If the filter is changed we need to reset the data table and restart from rowid=0
|
||||||
if (qryAll != qryAll_sv) {
|
if (JSON.stringify(params) !== JSON.stringify(params_sv)) {
|
||||||
tb.resetData();
|
tb.resetData();
|
||||||
qryAll_sv = qryAll;
|
params_sv = params;
|
||||||
}
|
}
|
||||||
|
params['lr']=tb.getLastRowId();
|
||||||
qryString = ('spotlist?lr=').concat(tb.getLastRowId());
|
|
||||||
|
|
||||||
if (qryAll) {
|
|
||||||
qryString = qryString.concat('&'.concat(qryAll));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//Open a new connection, using the GET request on the URL endpoint
|
//Open a new connection, using the GET request on the URL endpoint
|
||||||
|
<<<<<<< HEAD
|
||||||
qryString=qryString.concat('&'.concat(Math.random())); //used to prevent caching
|
qryString=qryString.concat('&'.concat(Math.random())); //used to prevent caching
|
||||||
fetch(qryString)
|
fetch(qryString)
|
||||||
|
=======
|
||||||
|
//let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content");
|
||||||
|
fetch('spotlist', {
|
||||||
|
method: 'POST',
|
||||||
|
cache: 'no-cache',
|
||||||
|
credentials: 'same-origin',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify( params )
|
||||||
|
})
|
||||||
|
>>>>>>> staging
|
||||||
.then((response) => response.json())
|
.then((response) => response.json())
|
||||||
.then((data_new) => {
|
.then((data_new) => {
|
||||||
try {
|
try {
|
||||||
|
2
static/js/rel/callsign_inline.min.js
vendored
2
static/js/rel/callsign_inline.min.js
vendored
@ -1 +1 @@
|
|||||||
var my_adxo_events=JSON.parse(my_adxo_events_json.replaceAll("\t","")),qryString="spotlist?c="+callsign;fetch(qryString).then(l=>l.json()).then(o=>{try{tb.build(o,callsign)}catch(l){console.log(l),console.log(l.stack),console.log(o)}});
|
var my_adxo_events=JSON.parse(my_adxo_events_json.replaceAll("\t",""));let params={};params.callsign=callsign,fetch("spotlist",{method:"POST",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify(params)}).then(e=>e.json()).then(a=>{try{tb.build(a,callsign)}catch(e){console.log(e),console.log(e.stack),console.log(a)}});
|
||||||
|
2
static/js/rel/callsign_search.min.js
vendored
2
static/js/rel/callsign_search.min.js
vendored
@ -1 +1 @@
|
|||||||
function myCallsignSearch(e){e.preventDefault(),0<(callsign=document.getElementById("callsignInput").value).replace(/\s/g,"").length&&(location.href="/callsign.html?c=".concat(callsign.trim().toUpperCase()),console.log(location.href))}document.getElementById("form-callsign").addEventListener("submit",myCallsignSearch);
|
function myCallsignSearch(e){e.preventDefault(),0<(callsign=document.getElementById("callsignInput").value).replace(/\s/g,"").length&&(location.href="/callsign.html?c=".concat(callsign.trim().toUpperCase()))}document.getElementById("form-callsign").addEventListener("submit",myCallsignSearch);
|
||||||
|
2
static/js/rel/common.min.js
vendored
2
static/js/rel/common.min.js
vendored
@ -1 +1 @@
|
|||||||
function setCookie(e,t,n){var o=new Date,n=(o.setTime(o.getTime()+24*n*60*60*1e3),"expires="+o.toUTCString());"https:"==location.protocol?document.cookie=e+"="+t+";"+n+";path=/;Samesite=Strict;Secure=True":(console.log("Warning: could not set secure cookie: try with Samsite Lax..."),document.cookie=e+"="+t+";"+n+";path=/;Samesite=Lax")}function getCookie(e){var n=e+"=",o=decodeURIComponent(document.cookie).split(";");for(let t=0;t<o.length;t++){let e=o[t];for(;" "==e.charAt(0);)e=e.substring(1);if(0==e.indexOf(n))return e.substring(n.length,e.length)}return""}function get_last_refresh(e){var t=new Date(0),e=(t.setUTCSeconds(e.last_refresh),(e,t=2)=>(""+new Array(t).fill(0)+e).slice(-t)),n=e(t.getHours()),e=e(t.getMinutes()),o=get_months_names()[t.getMonth()];return"Data refresh: "+t.getDate()+" of "+o+" "+t.getFullYear()+" at "+n+":"+e}function get_months_names(){var t=[];for(let e=1;e<13;e++){var n=new Date;n.setMonth(e-1),t.push(n.toLocaleString("en-US",{month:"short"}))}return t}function format_u_k_m(e){let t,n=1;e<0&&(n=-1);e=Math.abs(e);return 0==e?t=e:0<e&&e<1e3?t=e*n:1e3<=e&&e<1e6?t=e/1e3*n+"K":1e6<=e&&(t=e/1e6*n+"M"),t}function selectElement(e,t){document.getElementById(e).value=t}function addEventHandler(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,n)}function setText(e,t){document.getElementById(e).innerHTML=t}function showTime(){var e=new Date;let t=new Date(e.getTime()+6e4*e.getTimezoneOffset()).toTimeString().split(" ")[0];t=t.split(":")[0]+":"+t.split(":")[1],document.getElementById("MyClockDisplay").innerText=t,document.getElementById("MyClockDisplay").textContent=t,setTimeout(showTime,1e3)}document.getElementById("MyClockDisplay").addEventListener("load",showTime()),document.getElementById("copyDate").innerHTML="2020-".concat((new Date).getFullYear());
|
function setCookie(e,t,n){var o=new Date,n=(o.setTime(o.getTime()+24*n*60*60*1e3),"expires="+o.toUTCString());"https:"==location.protocol?document.cookie=e+"="+t+";"+n+";path=/;Samesite=Strict;Secure=True":(console.log("Warning: could not set secure cookie: try with Samsite Lax..."),document.cookie=e+"="+t+";"+n+";path=/;Samesite=Lax")}function getCookie(e){var n=e+"=",o=decodeURIComponent(document.cookie).split(";");for(let t=0;t<o.length;t++){let e=o[t];for(;" "==e.charAt(0);)e=e.substring(1);if(0==e.indexOf(n))return e.substring(n.length,e.length)}return""}function get_last_refresh(e){var t=new Date(0),e=(t.setUTCSeconds(e.last_refresh),(e,t=2)=>(""+new Array(t).fill(0)+e).slice(-t)),n=e(t.getHours()),e=e(t.getMinutes()),o=get_months_names()[t.getMonth()];return"Data refresh: "+t.getDate()+" of "+o+" "+t.getFullYear()+" at "+n+":"+e}function get_months_names(){var t=[];for(let e=1;e<13;e++){var n=new Date;n.setMonth(e-1),t.push(n.toLocaleString("en-US",{month:"short"}))}return t}function format_u_k_m(e){let t,n=1;e<0&&(n=-1);e=Math.abs(e);return 0==e?t=e:0<e&&e<1e3?t=e*n:1e3<=e&&e<1e6?t=e/1e3*n+"K":1e6<=e&&(t=e/1e6*n+"M"),t}function selectElement(e,t){document.getElementById(e).value=t}function addEventHandler(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,n)}function setText(e,t){document.getElementById(e).innerHTML=t}function showTime(){var e=new Date;let t=new Date(e.getTime()+6e4*e.getTimezoneOffset()).toTimeString().split(" ")[0];t=t.split(":")[0]+":"+t.split(":")[1],document.getElementById("MyClockDisplay").innerText=t,document.getElementById("MyClockDisplay").textContent=t,setTimeout(showTime,1e3)}document.getElementById("MyClockDisplay").addEventListener("load",showTime()),document.getElementById("copyDate").innerHTML="2020-".concat((new Date).getFullYear());let button_top=document.getElementById("btn-back-to-top");function scrollFunction(){20<document.body.scrollTop||20<document.documentElement.scrollTop?button_top.style.display="block":button_top.style.display="none"}function backToTop(){document.body.scrollTop=0,document.documentElement.scrollTop=0}window.onscroll=function(){scrollFunction()},button_top.addEventListener("click",backToTop);
|
||||||
|
2
static/js/rel/plot.min.js
vendored
2
static/js/rel/plot.min.js
vendored
File diff suppressed because one or more lines are too long
4
static/js/rel/table.min.js
vendored
4
static/js/rel/table.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "IU1BOW Spiderweb v2.4.2",
|
"name": "IU1BOW Spiderweb v2.4.5",
|
||||||
"description": "DXCluser for ham radio by IU1BOW",
|
"description": "DXCluser for ham radio by IU1BOW",
|
||||||
"short_name": "Spiderweb",
|
"short_name": "Spiderweb",
|
||||||
"theme_color": "#f3b221",
|
"theme_color": "#f3b221",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// Dichiarazione della costante per il nome della cache
|
// Dichiarazione della costante per il nome della cache
|
||||||
const CACHE_NAME = 'pwa-spiderweb_v2.4.2'
|
const CACHE_NAME = 'pwa-spiderweb_v2.4.5'
|
||||||
|
|
||||||
// Dichiarazione della costante per gli URL da mettere in cache
|
// Dichiarazione della costante per gli URL da mettere in cache
|
||||||
const URLS_TO_CACHE = [
|
const URLS_TO_CACHE = [
|
||||||
@ -21,9 +21,10 @@ const URLS_TO_CACHE = [
|
|||||||
'/static/js/rel/callsign_inline.min.js',
|
'/static/js/rel/callsign_inline.min.js',
|
||||||
'/static/js/rel/callsign_search.min.js',
|
'/static/js/rel/callsign_search.min.js',
|
||||||
'/static/js/rel/common.min.js',
|
'/static/js/rel/common.min.js',
|
||||||
|
'/index.html',
|
||||||
|
'/plots.html',
|
||||||
'/privacy.html',
|
'/privacy.html',
|
||||||
'/cookies.html',
|
'/cookies.html'
|
||||||
'/offline.html',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
@ -65,7 +66,7 @@ self.addEventListener('fetch', event => {
|
|||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.status === 502) {
|
if (response.status === 502) {
|
||||||
console.log("response status: " + response.status);
|
console.log("response status: " + response.status);
|
||||||
return caches.match('/offline.html');
|
return caches.match('/index.html');
|
||||||
}
|
}
|
||||||
if (!response || response.status !== 200 || response.type !== 'basic') {
|
if (!response || response.status !== 200 || response.type !== 'basic') {
|
||||||
console.log("response: " + response.status);
|
console.log("response: " + response.status);
|
||||||
@ -80,7 +81,7 @@ self.addEventListener('fetch', event => {
|
|||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
return caches.match('/offline.html');
|
return caches.match('/index.html');
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
@ -17,9 +17,8 @@
|
|||||||
<link rel="stylesheet" href="/static/css/rel/style.min.css">
|
<link rel="stylesheet" href="/static/css/rel/style.min.css">
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
|
||||||
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
|
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/6.15.0/css/flag-icons.min.css"
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/6.6.6/css/flag-icons.min.css"
|
integrity="sha512-bZBu2H0+FGFz/stDN/L0k8J0G8qVsAL0ht1qg5kTwtAheiXwiRKyCq1frwfbSFSJN3jooR5kauE0YjtPzhZtJQ=="
|
||||||
integrity="sha512-uvXdJud8WaOlQFjlz9B15Yy2Au/bMAvz79F7Xa6OakCl2jvQPdHD0hb3dEqZRdSwG4/sknePXlE7GiarwA/9Wg=="
|
|
||||||
crossorigin="anonymous" referrerpolicy="no-referrer" />
|
crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||||
|
|
||||||
{% endblock head %}
|
{% endblock head %}
|
||||||
@ -44,18 +43,18 @@
|
|||||||
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
||||||
{% for dict_item in menu_list %}
|
{% for dict_item in menu_list %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link {% if request.path == dict_item["link"] %} active {% endif %}" href="{{dict_item["link"]}}"
|
<a class="nav-link {% if request.path == dict_item["link"] %} active {% endif %}" href="{{dict_item['link']}}"
|
||||||
{% if dict_item["external"] %}
|
{% if dict_item['external'] %}
|
||||||
target="blank" rel="noopener"
|
target="blank" rel="noopener"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
>{{dict_item["label"]}}<span class="sr-only"></span></a>
|
>{{dict_item["label"]}}<span class="sr-only"></span></a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
<div id="MyClockDisplay" class="text-white-50 d-none d-lg-block"></div>
|
<div id="MyClockDisplay" class="text-white-50 d-none d-lg-block"></div>
|
||||||
<div class="text-white-50 d-none d-lg-block"> (UTC) </div>
|
<div class="text-white-50 d-none d-lg-block"> (UTC) </div>
|
||||||
{% block callsign %}
|
{% block callsign %}
|
||||||
<form method="POST" class="d-flex" id="form-callsign" enctype="multipart/form-data">
|
<form method="POST" class="d-flex" id="form-callsign" enctype="application/x-www-form-urlencoded">
|
||||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||||
<div class="input-group" id='input-group-callsign'>
|
<div class="input-group" id='input-group-callsign'>
|
||||||
<input type="text" class="form-control" placeholder="callsign" aria-label="callsign"
|
<input type="text" class="form-control" placeholder="callsign" aria-label="callsign"
|
||||||
@ -92,10 +91,7 @@
|
|||||||
<span class="copyleft">©</span> Copyleft:
|
<span class="copyleft">©</span> Copyleft:
|
||||||
<span id="copyDate"></span>
|
<span id="copyDate"></span>
|
||||||
<a href="https://github.com/coulisse/spiderweb/" target="blank" rel="noopener">IU1BOW - Spiderweb</a>
|
<a href="https://github.com/coulisse/spiderweb/" target="blank" rel="noopener">IU1BOW - Spiderweb</a>
|
||||||
<span id="version">v2.4.2</span>
|
<span id="version">v2.4.5</span>
|
||||||
<!--
|
|
||||||
<a href="https://github.com/coulisse/spiderweb/" target="blank" rel="noopener"><img src="/static/images/icons/github-mark.svg" alt="github.com" width="16px" height="16px"></a>
|
|
||||||
-->
|
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<script async src="static/js/rel/load-sw.min.js"></script>
|
<script async src="static/js/rel/load-sw.min.js"></script>
|
||||||
@ -105,9 +101,11 @@
|
|||||||
{% endblock app_data %}
|
{% endblock app_data %}
|
||||||
</script>
|
</script>
|
||||||
<script defer src="static/js/rel/common.min.js"></script>
|
<script defer src="static/js/rel/common.min.js"></script>
|
||||||
<script defer src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js"
|
<script defer src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"
|
||||||
integrity="sha384-A3rJD856KowSb7dwlZdYEkO39Gagi7vIsF0jrRAoQmDKKtQBHUuLZ9AsSv4jD4Xa"
|
integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4"
|
||||||
crossorigin="anonymous"></script>
|
crossorigin="anonymous"></script>
|
||||||
|
|
||||||
|
</body>
|
||||||
{% block app_scripts %}
|
{% block app_scripts %}
|
||||||
<script async src="static/js/rel/callsign_search.min.js"></script>
|
<script async src="static/js/rel/callsign_search.min.js"></script>
|
||||||
{% endblock app_scripts %}
|
{% endblock app_scripts %}
|
||||||
@ -119,7 +117,6 @@
|
|||||||
{# then user has already consented so no requirement for consent banner #}
|
{# then user has already consented so no requirement for consent banner #}
|
||||||
{% else %}
|
{% else %}
|
||||||
{# show a cookie consent banner #}
|
{# show a cookie consent banner #}
|
||||||
|
|
||||||
<!-- Modal for cookie consent-->
|
<!-- Modal for cookie consent-->
|
||||||
<div class="modal fade" id="cookie_consent_modal" tabindex="-1" aria-labelledby="cookie-consent-container"
|
<div class="modal fade" id="cookie_consent_modal" tabindex="-1" aria-labelledby="cookie-consent-container"
|
||||||
aria-hidden="true">
|
aria-hidden="true">
|
||||||
@ -142,7 +139,11 @@
|
|||||||
|
|
||||||
<script defer src="static/js/rel/cookie_consent.min.js"></script>
|
<script defer src="static/js/rel/cookie_consent.min.js"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock cookie %}
|
{% endblock cookie %}
|
||||||
|
<!-- Back to top button -->
|
||||||
|
<button type="button" class="btn btn-secondary btn-floating btn-lg" id="btn-back-to-top">
|
||||||
|
<i class="bi bi-arrow-up"></i>
|
||||||
|
</button>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -24,7 +24,7 @@
|
|||||||
<div class="row mx-auto">
|
<div class="row mx-auto">
|
||||||
<!--Sidebar content-->
|
<!--Sidebar content-->
|
||||||
<div class="col-md-auto ml-2 collapse rounded-sm shadow mb-5 bg-body" id="collapseFilters">
|
<div class="col-md-auto ml-2 collapse rounded-sm shadow mb-5 bg-body" id="collapseFilters">
|
||||||
<form method="POST" id="form-filters" enctype="multipart/form-data">
|
<form method="POST" id="form-filters" enctype="application/x-www-form-urlencoded">
|
||||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||||
<strong>Band</strong>
|
<strong>Band</strong>
|
||||||
<select class="form-select overflow-hidden" id="band" size="14" multiple>
|
<select class="form-select overflow-hidden" id="band" size="14" multiple>
|
||||||
@ -167,7 +167,14 @@
|
|||||||
<button type="submit" class="btn btn-primary btn-block w-100" aria-pressed="true" data-toggle="collapse"
|
<button type="submit" class="btn btn-primary btn-block w-100" aria-pressed="true" data-toggle="collapse"
|
||||||
data-target="#collapseFilters" aria-expanded="false" aria-controls="collapseFilters"
|
data-target="#collapseFilters" aria-expanded="false" aria-controls="collapseFilters"
|
||||||
aria-label="filter">Search</button>
|
aria-label="filter">Search</button>
|
||||||
|
<p></p>
|
||||||
|
<button type="Reset" class="btn btn-primary btn-block w-100" aria-pressed="true" data-toggle="collapse"
|
||||||
|
data-target="#collapseFilters" aria-expanded="false" aria-controls="collapseFilters"
|
||||||
|
aria-label="reset_filter">Reset</button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mx-auto">
|
||||||
|
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -288,7 +295,6 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<div id="dashboard" class="d-flex flex-wrap justify-content-around">
|
<div id="dashboard" class="d-flex flex-wrap justify-content-around">
|
||||||
<div class="shadow-lg mb-5 rounded spider_chart" id="form-band_activity">
|
<div class="shadow-lg mb-5 rounded spider_chart" id="form-band_activity">
|
||||||
<div class="d-flex flex-column">
|
<div class="d-flex flex-column">
|
||||||
<form method="POST" id="form-continents" enctype="multipart/form-data">
|
<form method="POST" id="form-continents" enctype="application/x-www-form-urlencoded">
|
||||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||||
<div class="container">
|
<div class="container">
|
||||||
Your continent is:
|
Your continent is:
|
||||||
@ -86,8 +86,8 @@ var band_frequencies={{bands["bands"]|tojson|safe}};
|
|||||||
|
|
||||||
{% block app_scripts %}
|
{% block app_scripts %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/echarts/5.4.1/echarts.min.js"
|
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/echarts/5.4.3/echarts.min.js"
|
||||||
integrity="sha512-OTbGFYPLe3jhy4bUwbB8nls0TFgz10kn0TLkmyA+l3FyivDs31zsXCjOis7YGDtE2Jsy0+fzW+3/OVoPVujPmQ=="
|
integrity="sha512-EmNxF3E6bM0Xg1zvmkeYD3HDBeGxtsG92IxFt1myNZhXdCav9MzvuH/zNMBU1DmIPN6njrhX1VTbqdJxQ2wHDg=="
|
||||||
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||||
<script defer src="static/js/rel/plot.min.js"></script>
|
<script defer src="static/js/rel/plot.min.js"></script>
|
||||||
{% endblock app_scripts %}
|
{% endblock app_scripts %}
|
74
webapp.py
74
webapp.py
@ -30,6 +30,7 @@ app.config.update(
|
|||||||
inline_script_nonce = ""
|
inline_script_nonce = ""
|
||||||
|
|
||||||
csrf = CSRFProtect(app)
|
csrf = CSRFProtect(app)
|
||||||
|
|
||||||
logger.debug(app.config)
|
logger.debug(app.config)
|
||||||
|
|
||||||
if app.config["DEBUG"]:
|
if app.config["DEBUG"]:
|
||||||
@ -94,17 +95,24 @@ def query_build_callsign(callsign):
|
|||||||
return query_string
|
return query_string
|
||||||
|
|
||||||
|
|
||||||
def query_build():
|
def query_build(parameters):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# get url parameters
|
last_rowid = str(parameters["lr"]) # Last rowid fetched by front end
|
||||||
last_rowid = request.args.get("lr") # Last rowid fetched by front end
|
|
||||||
band = request.args.getlist("b") # band filter
|
get_param = lambda parameters, parm_name: parameters[parm_name] if (parm_name in parameters) else []
|
||||||
dere = request.args.getlist("e") # DE continent filter
|
band=get_param(parameters, "band")
|
||||||
dxre = request.args.getlist("x") # Dx continent filter
|
dere=get_param(parameters, "de_re")
|
||||||
mode = request.args.getlist("m") # mode filter
|
dxre=get_param(parameters, "dx_re")
|
||||||
decq = request.args.getlist("qe") # DE cq zone filter
|
mode=get_param(parameters, "mode")
|
||||||
dxcq = request.args.getlist("qx") # DX cq zone filter
|
|
||||||
|
decq = []
|
||||||
|
if "cqdeInput" in parameters:
|
||||||
|
decq[0] = parameters["cqdeInput"]
|
||||||
|
|
||||||
|
dxcq = []
|
||||||
|
if "cqdxInput" in parameters:
|
||||||
|
dxcq[0] = parameters["cqdxInput"]
|
||||||
|
|
||||||
query_string = ""
|
query_string = ""
|
||||||
|
|
||||||
@ -120,7 +128,6 @@ def query_build():
|
|||||||
)
|
)
|
||||||
|
|
||||||
band_qry_string += "))"
|
band_qry_string += "))"
|
||||||
|
|
||||||
# construct mode query
|
# construct mode query
|
||||||
mode_qry_string = " AND (("
|
mode_qry_string = " AND (("
|
||||||
for i, item_mode in enumerate(mode):
|
for i, item_mode in enumerate(mode):
|
||||||
@ -138,7 +145,6 @@ def query_build():
|
|||||||
)
|
)
|
||||||
|
|
||||||
mode_qry_string += "))"
|
mode_qry_string += "))"
|
||||||
|
|
||||||
# construct DE continent region query
|
# construct DE continent region query
|
||||||
dere_qry_string = " AND spottercq IN ("
|
dere_qry_string = " AND spottercq IN ("
|
||||||
for i, item_dere in enumerate(dere):
|
for i, item_dere in enumerate(dere):
|
||||||
@ -179,6 +185,7 @@ def query_build():
|
|||||||
+ last_rowid
|
+ last_rowid
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if len(band) > 0:
|
if len(band) > 0:
|
||||||
query_string += band_qry_string
|
query_string += band_qry_string
|
||||||
|
|
||||||
@ -210,15 +217,15 @@ def query_build():
|
|||||||
# the main query to show spots
|
# the main query to show spots
|
||||||
# it gets url parameter in order to apply the build the right query
|
# it gets url parameter in order to apply the build the right query
|
||||||
# and apply the filter required. It returns a json with the spots
|
# and apply the filter required. It returns a json with the spots
|
||||||
def spotquery():
|
def spotquery(parameters):
|
||||||
try:
|
try:
|
||||||
|
|
||||||
callsign = request.args.get("c") # search specific callsign
|
if 'callsign' in parameters:
|
||||||
|
logging.debug('search callsign')
|
||||||
if callsign:
|
query_string = query_build_callsign( parameters['callsign'] )
|
||||||
query_string = query_build_callsign(callsign)
|
|
||||||
else:
|
else:
|
||||||
query_string = query_build()
|
logging.debug('search eith other filters')
|
||||||
|
query_string = query_build(parameters)
|
||||||
|
|
||||||
qm.qry(query_string)
|
qm.qry(query_string)
|
||||||
data = qm.get_data()
|
data = qm.get_data()
|
||||||
@ -246,11 +253,9 @@ def spotquery():
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(e)
|
logger.error(e)
|
||||||
|
|
||||||
|
|
||||||
# find adxo events
|
# find adxo events
|
||||||
adxo_events = None
|
adxo_events = None
|
||||||
|
|
||||||
|
|
||||||
def get_adxo():
|
def get_adxo():
|
||||||
global adxo_events
|
global adxo_events
|
||||||
adxo_events = get_adxo_events()
|
adxo_events = get_adxo_events()
|
||||||
@ -267,15 +272,19 @@ bubble_graph_hb = HourBand(logger, qm, band_frequencies)
|
|||||||
geo_graph_wdsl = WorldDxSpotsLive(logger, qm, pfxt)
|
geo_graph_wdsl = WorldDxSpotsLive(logger, qm, pfxt)
|
||||||
|
|
||||||
# ROUTINGS
|
# ROUTINGS
|
||||||
@app.route("/spotlist", methods=["GET"])
|
@app.route("/spotlist", methods=["POST"])
|
||||||
|
@csrf.exempt
|
||||||
def spotlist():
|
def spotlist():
|
||||||
response = flask.Response(json.dumps(spotquery()))
|
logger.debug(request.json)
|
||||||
|
response = flask.Response(json.dumps(spotquery(request.json)))
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
def who_is_connected():
|
def who_is_connected():
|
||||||
host_port = cfg["telnet"].split(":")
|
host_port = cfg["telnet"].split(":")
|
||||||
response = who(host_port[0], host_port[1], cfg["mycallsign"])
|
response = who(host_port[0], host_port[1], cfg["mycallsign"])
|
||||||
|
logger.debug("list of connected clusters:")
|
||||||
|
logger.debug(response)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
#Calculate nonce token used in inline script and in csp "script-src" header
|
#Calculate nonce token used in inline script and in csp "script-src" header
|
||||||
@ -313,7 +322,6 @@ def sw():
|
|||||||
def root():
|
def root():
|
||||||
return app.send_static_file("html/offline.html")
|
return app.send_static_file("html/offline.html")
|
||||||
|
|
||||||
|
|
||||||
@app.route("/world.json")
|
@app.route("/world.json")
|
||||||
def world_data():
|
def world_data():
|
||||||
return app.send_static_file("data/world.json")
|
return app.send_static_file("data/world.json")
|
||||||
@ -336,7 +344,6 @@ def plots():
|
|||||||
)
|
)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
@app.route("/cookies.html", methods=["GET"])
|
@app.route("/cookies.html", methods=["GET"])
|
||||||
def cookies():
|
def cookies():
|
||||||
response = flask.Response(
|
response = flask.Response(
|
||||||
@ -351,7 +358,6 @@ def cookies():
|
|||||||
)
|
)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
@app.route("/privacy.html", methods=["GET"])
|
@app.route("/privacy.html", methods=["GET"])
|
||||||
def privacy():
|
def privacy():
|
||||||
response = flask.Response(
|
response = flask.Response(
|
||||||
@ -366,7 +372,6 @@ def privacy():
|
|||||||
)
|
)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
@app.route("/sitemap.xml")
|
@app.route("/sitemap.xml")
|
||||||
def sitemap():
|
def sitemap():
|
||||||
return app.send_static_file("sitemap.xml")
|
return app.send_static_file("sitemap.xml")
|
||||||
@ -404,9 +409,12 @@ def find_callsign():
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
@app.route("/plot_get_heatmap_data", methods=["GET"])
|
@app.route("/plot_get_heatmap_data", methods=["POST"])
|
||||||
|
@csrf.exempt
|
||||||
def get_heatmap_data():
|
def get_heatmap_data():
|
||||||
continent = request.args.get("continent")
|
#continent = request.args.get("continent")
|
||||||
|
continent = request.json['continent']
|
||||||
|
logger.debug(request.get_json());
|
||||||
response = flask.Response(json.dumps(heatmap_cbp.get_data(continent)))
|
response = flask.Response(json.dumps(heatmap_cbp.get_data(continent)))
|
||||||
logger.debug(response)
|
logger.debug(response)
|
||||||
if response is None:
|
if response is None:
|
||||||
@ -414,7 +422,8 @@ def get_heatmap_data():
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
@app.route("/plot_get_dx_spots_per_month", methods=["GET"])
|
@app.route("/plot_get_dx_spots_per_month", methods=["POST"])
|
||||||
|
@csrf.exempt
|
||||||
def get_dx_spots_per_month():
|
def get_dx_spots_per_month():
|
||||||
response = flask.Response(json.dumps(bar_graph_spm.get_data()))
|
response = flask.Response(json.dumps(bar_graph_spm.get_data()))
|
||||||
logger.debug(response)
|
logger.debug(response)
|
||||||
@ -423,7 +432,8 @@ def get_dx_spots_per_month():
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
@app.route("/plot_get_dx_spots_trend", methods=["GET"])
|
@app.route("/plot_get_dx_spots_trend", methods=["POST"])
|
||||||
|
@csrf.exempt
|
||||||
def get_dx_spots_trend():
|
def get_dx_spots_trend():
|
||||||
response = flask.Response(json.dumps(line_graph_st.get_data()))
|
response = flask.Response(json.dumps(line_graph_st.get_data()))
|
||||||
logger.debug(response)
|
logger.debug(response)
|
||||||
@ -432,7 +442,8 @@ def get_dx_spots_trend():
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
@app.route("/plot_get_hour_band", methods=["GET"])
|
@app.route("/plot_get_hour_band", methods=["POST"])
|
||||||
|
@csrf.exempt
|
||||||
def get_dx_hour_band():
|
def get_dx_hour_band():
|
||||||
response = flask.Response(json.dumps(bubble_graph_hb.get_data()))
|
response = flask.Response(json.dumps(bubble_graph_hb.get_data()))
|
||||||
logger.debug(response)
|
logger.debug(response)
|
||||||
@ -441,7 +452,8 @@ def get_dx_hour_band():
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
@app.route("/plot_get_world_dx_spots_live", methods=["GET"])
|
@app.route("/plot_get_world_dx_spots_live", methods=["POST"])
|
||||||
|
@csrf.exempt
|
||||||
def get_world_dx_spots_live():
|
def get_world_dx_spots_live():
|
||||||
response = flask.Response(json.dumps(geo_graph_wdsl.get_data()))
|
response = flask.Response(json.dumps(geo_graph_wdsl.get_data()))
|
||||||
logger.debug(response)
|
logger.debug(response)
|
||||||
|
Loading…
Reference in New Issue
Block a user