Web Interface for DXSpider hamradio cluster
Go to file
coulisse 777e44f63f 002
2020-10-11 16:37:38 +00:00
.github/ISSUE_TEMPLATE Update issue templates 2020-09-26 18:03:14 +02:00
cfg 002 2020-10-11 16:37:38 +00:00
docs 002 2020-10-11 16:37:38 +00:00
scripts 002 2020-10-11 16:37:38 +00:00
static 002 2020-10-11 16:37:38 +00:00
templates 002 2020-10-11 16:37:38 +00:00
CHANGELOG.md 1.2 2020-09-20 05:10:13 +00:00
CODE_OF_CONDUCT.md 1.2.1 2020-09-26 16:07:19 +00:00
LICENSE auto refresh 2020-02-01 06:12:53 +00:00
README.md 002 2020-10-11 16:37:38 +00:00
webapp.py 002 2020-10-11 16:37:38 +00:00
wsgi.py restiling 2020-02-08 09:14:30 +00:00

SPIDERWEB

Ham radio cluster web viewer for DxSpider

  • Author: Corrado Gerbaldo - IU1BOW.
  • Mail: corrado.gerbaldo@gmail.com
  • Licensing: Gpl V3.0 see "LICENSE" file.
  • Languages: This application is written in Python/flask,Javascript and HTML

DXSpider is a great DX Cluster software that has a usefull telnet interface. I wrote this application in order to add a web user interface to DXSpider and show the spots collected. The user could see 50 spots at time and filter them by band, spotter continent and spotted continent.

For this application I've used:

  • Bootstrap for stylesheet CSS
  • Jquery In the header you can find the link to MS link
  • qrz.com For each callsing found you can click on lens and you'll see him on qrz.com
  • www.countryflags.io I used it for show the country flags
  • cookie-bar.eu I use it for cookie bar

You can find my web site at https://dxcluster.iu1bow.it

Changelog

see it on file "CHANGELOG.md"

Install

1) DXSpider First of all you have to installed [DXspider] (http://www.dxcluster.org/) and connected with some other cluster nodes.

2) MariaDB / MySQL Then you have to install MariaDB on your web server, on the same server where DXSpider is running and configure DXSpider to use it: in your spider folder edit local/DXVars.pm adding these lines:

# the SQL database DBI dsn
$dsn = "dbi:mysql:dxcluster:localhost:3306";
$dbuser = "your-user";
$dbpass = "your-password"; 

If you would change some MariaDB parameters, then you can find them in /etc/mysql/my.cnf or /etc/my.cnf, depending on your distro.

3) Python / Flask First of all you have to install the python3 pip installer

foo@bar:~$ sudo apt install python3-pip

This application is based on Flask To install Flask:

foo@bar:~$ pip3 install flask 

or

foo@bar:~$ sudo -H pip3 install flask --system 

Then you have to install mysql libraries**:

foo@bar:~$ pip3 install flask_mysqldb  
or
foo@bar:~$ sudo -H pip3 install flask_mysqldb --system 

Finally you have to install matplotlib in order to plots some graphics

foo@bar:~$ pip3 install matplotlib 
or
foo@bar:~$ sudo -H pip3 install matplotlib --system   

4) Configuration In the path spiderweb/cfg/ rename config.json.template in config.json:

foo@bar:~$ mv config.json.template config.json

then edit it and set the user and password of your database, the menu items, and other stuffs (callsign, mail address...). Othewhise, if you preferr, you could use an utility for edit your configuration and menu. Go in "script" folder and run ./config.sh

foo@bar:~$ cd scripts
foo@bar:~$ ./config.sh

*** DxSpider configuration ***
Configuration file loaded from: ../cfg/config.json

   h:  help
   vc: view config.
   ec: edit config.
   vm: view menu
   em: edit menu
   s:  save
   t:  load config. from template

   x:  exit

Make your choiche: 

In order to show the right plots, you have to generate them! To do so you have to run .sh files inside scripts folders, or the better way is to schedule them with your crontab

foo@bar:~$ crontab -e

then edit it in a manner like this:

0 23 * * * /foo/bar/spiderweb/scripts/qso_months.sh > /dev/null 2>&1
*/15 * * * * /foo/bar/spiderweb/scripts/propagation_heatmaps.sh > /dev/null 2>&1

Run test

Now you can run your web application with the following command:

foo@bar:~$ python3 webapp.py

The flask default port is 5000, so you can see your web app, typing http://localhost:5000 in your web browser. Keep in mind that the flask web server, usually is used as a test server.

Production

If your would run your application a production web server, install it on Gunicorn and NGINX (obviously you can choose your preferred proxy/web server instead). I'm also using certbot in order to manage SSL Let's encrypt certificates.

At this link (in italian language) you can find a guide for install certbot, gunicorn and NGINX After installed it you can configure

Search engine indexing When you are on-line, if you would to index your website on search engines, you have to generate a file named sitemap.xml and put it in /static/ folder. There are many tool to generate sitemap.xml, for example https://www.xml-sitemaps.com/

**Index on MySQL If you would to increase speed on callsign search, you could define some index on the table 'spot'. You can see more details on 'scripts/create_mysql_index.sql' ~

Screenshots


TODO

see it on file "TODO.md"