mirror of
https://github.com/coulisse/spiderweb.git
synced 2024-09-21 07:27:09 +00:00
documentation, log config
This commit is contained in:
parent
609cc7aa4e
commit
28fc19ae35
38
README.md
38
README.md
@ -17,17 +17,17 @@
|
||||
- **Languages:** This application is written in Python 3.11/flask,Javascript and HTML
|
||||
|
||||
___
|
||||
**DXSpider** is a great DX Cluster software that has a usefull telnet interface.
|
||||
**DXSpider** is a great DX Cluster software that has useful 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:
|
||||
For this application, I've used:
|
||||
- **Bootstrap** for stylesheet CSS
|
||||
- **Apache ECharts** for managing charts
|
||||
- **qrz.com** For each callsing found you can click on lens and you'll see him on qrz.com
|
||||
- **flag-icon-css** [https://github.com/lipis/flag-icon-css](https://github.com/lipis/flag-icon-css) I used it for show the country flags
|
||||
- **qrz.com** For each callsing, found you can click on lens and you'll see him on qrz.com
|
||||
- **flag-icon-css** [https://github.com/lipis/flag-icon-css](https://github.com/lipis/flag-icon-css) I used it to show the country flags
|
||||
- **ng3k.com** [ng3k.com](http://ng3k.com/misc/adxo.html) I used to get information about "Announced Dx Operations". Thanks to Bill/NG3K !!!
|
||||
- **silso** [sidc.be/silso](https://sidc.be/silso/) used to show propagation trend in "Chart & stats" secion
|
||||
- **silso** [sidc.be/silso](https://sidc.be/silso/) used to show propagation trend in "Chart & stats" section
|
||||
|
||||
You can find my web site at [https://www.iu1bow.it](https://www.i1bow.it)
|
||||
|
||||
@ -88,7 +88,7 @@ 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...).
|
||||
There is also a specific parameter, named "enable_cq_filter" used to enable the CQ Zone filtering.
|
||||
|
||||
Othewhise, if you prefer, you could use an utility for edit your configuration and menu. Go in "script" folder and run ./config.sh
|
||||
Othewhise, if you prefer, you could use a utility to edit your configuration and menu. Go in "script" folder and run ./config.sh
|
||||
|
||||
```console
|
||||
foo@bar:~$ cd scripts
|
||||
@ -107,16 +107,16 @@ Configuration file loaded from: ../cfg/config.json
|
||||
|
||||
x: exit
|
||||
|
||||
Make your choiche:
|
||||
Make your choice:
|
||||
|
||||
```
|
||||
|
||||
### Crontab
|
||||
Starting from version 2.4, since all activities are managed by the application, you don't need to schedule anythings
|
||||
Starting from version 2.4, since all activities are managed by the application, you don't need to schedule anything.
|
||||
|
||||
|
||||
### Run test
|
||||
Now you can run your web application with the following command:
|
||||
Now, you can run your web application with the following command:
|
||||
```console
|
||||
foo@bar:~$ python3 webapp.py
|
||||
```
|
||||
@ -131,7 +131,7 @@ Cloudflare + Nginx + Bjoern
|
||||
|
||||
**Bjoern is a lightweight WSGI for python.**
|
||||
|
||||
for install it:
|
||||
for installing it:
|
||||
```console
|
||||
foo@bar:~$ sudo apt install libev-dev libevdev2
|
||||
foo@bar:~$ pip3 install bjoern
|
||||
@ -178,7 +178,7 @@ foo@bar:~$ sudo systemctl status spiderweb.service
|
||||
|
||||
Oct 25 09:56:35 dxcluster01 systemd[1]: Started bjoern instance spiderweb.
|
||||
```
|
||||
Now you can install and configur **NGINX**
|
||||
Now you can install and configure **NGINX**
|
||||
|
||||
Install with:
|
||||
```console
|
||||
@ -208,10 +208,10 @@ server {
|
||||
|
||||
```
|
||||
|
||||
For SSL I'm using [Cloudflare](https://www.cloudflare.com/). This is a free service that alow you to use https and a proxy cache.
|
||||
For SSL, I'm using [Cloudflare](https://www.cloudflare.com/). This is a free service that allow you to use https and a proxy cache.
|
||||
|
||||
|
||||
**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 [www.xml-sitemaps.com](https://www.xml-sitemaps.com/)
|
||||
**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 tools to generate sitemap.xml, for example [www.xml-sitemaps.com](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 ["create_mysql_index.sql"](scripts/create_mysql_index.sql)
|
||||
|
||||
@ -228,17 +228,17 @@ to
|
||||
|
||||
|
||||
### Mobile
|
||||
This application is designed for desktop and mobile phone. It is a [PWA](https://en.wikipedia.org/wiki/Progressive_web_app) so it could installed and used like an app on mobile.
|
||||
This application is designed for desktop and mobile phone. It is a [PWA](https://en.wikipedia.org/wiki/Progressive_web_app), so it could be installed and used like an app on mobile.
|
||||
|
||||
|
||||
### API
|
||||
**Spot list**
|
||||
|
||||
You can retrive last spots calling "**/spotlist**"; For example [www.iu1bow.com/spotlist](https://www.iu1bow.com/spotlist)
|
||||
You can retrieve last spots calling "**/spotlist**"; For example [www.iu1bow.com/spotlist](https://www.iu1bow.com/spotlist)
|
||||
|
||||
**Country of a callsign**
|
||||
|
||||
You cam retrive some informations about a callsign with **callsign**; For example [www.iu1bow.com/callsign?c=IU1BOW](https://www.iu1bow.com/callsign?c=IU1BOW)
|
||||
You can retrive some information about a callsign with **callsign**; for example: [www.iu1bow.com/callsign?c=IU1BOW](https://www.iu1bow.com/callsign?c=IU1BOW)
|
||||
|
||||
|
||||
### Development
|
||||
@ -267,11 +267,11 @@ You cam retrive some informations about a callsign with **callsign**; For exampl
|
||||
```
|
||||
**Application description**
|
||||
|
||||
The main **server** application ```webapp.py``` is in the root folder. In this application there are routing to html dynamic templates and serves also back-end API. This is whapped by ```wsgi.py``` for using with **bjoern** server.
|
||||
The main **server** application ```webapp.py``` is in the root folder. In this application there are routing to html dynamic templates and serves also back-end API. This is wrapped by ```wsgi.py``` for using with **bjoern** server.
|
||||
|
||||
Static files (css, js...) are in ```static``` directory: here there are subdirectories:
|
||||
- ```dev``` where you can edit and modify sources
|
||||
- ```rel``` here there are release files created with the building process and used in producion
|
||||
- ```rel``` here there are release files created with the building process and used in production
|
||||
|
||||
**Lint**
|
||||
|
||||
@ -289,7 +289,7 @@ Prerequisites:
|
||||
| staticjinja | python module used to create static page starting from a html template | ```pip install staticjinja``` |
|
||||
|
||||
|
||||
You can build the software for test (dev), or for production (release) environements.
|
||||
You can build the software for test (dev), or for production (release) environments.
|
||||
In ```scripts``` directory launch:
|
||||
- ```./build.sh -d``` for dev environment
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
[loggers]
|
||||
keys=root
|
||||
keys=root,webapp
|
||||
|
||||
[handlers]
|
||||
keys=stream_handler,file_handler
|
||||
@ -11,8 +11,14 @@ keys=formatter
|
||||
level=INFO
|
||||
handlers=stream_handler,file_handler
|
||||
|
||||
[logger_webapp]
|
||||
level=INFO
|
||||
handlers=stream_handler,file_handler
|
||||
qualname=webapp
|
||||
propagate=0
|
||||
|
||||
[handler_stream_handler]
|
||||
level=INFO
|
||||
level=DEBUG
|
||||
class=StreamHandler
|
||||
formatter=formatter
|
||||
args=(sys.stderr,)
|
||||
|
@ -1,5 +1,5 @@
|
||||
### Change log
|
||||
Date: 07/01/2023
|
||||
Date: 08/01/2023
|
||||
Release: v2.4.1
|
||||
- changed dimensions of spots in world dx spost charts
|
||||
- managed empty data in data providers for charts
|
||||
@ -7,6 +7,8 @@ Release: v2.4.1
|
||||
- for spot refresh get only new spots starting from last rowid
|
||||
- modified building script
|
||||
- moved cty file in data directory
|
||||
- fixed issue #28
|
||||
- cut comments too long
|
||||
___
|
||||
Date: 01/01/2023
|
||||
Release: v2.4
|
||||
|
@ -122,7 +122,7 @@ if [ "$1" == "-r" ]; then
|
||||
sed -i '/certifi==/d' ../requirements.txt
|
||||
sed -i '/staticjinja==/d' ../requirements.txt
|
||||
|
||||
if ! sed -i 's/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 '
|
||||
exit 12
|
||||
fi
|
||||
@ -133,7 +133,7 @@ if [ "$1" == "-d" ]; then
|
||||
echo 'creating DEBUG application'
|
||||
html_change_references -d
|
||||
|
||||
if ! sed -i 's/level=INFO/level=DEBUG/g' ${app_ini}; then
|
||||
if ! sed -i '13,20s/level=INFO/level=DEBUG/g' ${app_ini}; then
|
||||
echo 'ERROR settimg loglevel=DEBUG '
|
||||
exit 12
|
||||
fi
|
||||
|
@ -165,7 +165,11 @@ class table_builder {
|
||||
//Column: Comment
|
||||
const td_comm = document.createElement('td');
|
||||
td_comm.className = 'd-none d-lg-table-cell d-xl-table-cell';
|
||||
td_comm.textContent = line.comm;
|
||||
try {
|
||||
td_comm.textContent = line.comm.substring(0,100);
|
||||
} catch (err) {
|
||||
td_comm.textContent = '';
|
||||
}
|
||||
row.appendChild(td_comm);
|
||||
|
||||
//Column: UTC
|
||||
@ -350,8 +354,6 @@ function refresh_timer() {
|
||||
}
|
||||
|
||||
|
||||
console.log(qryString);
|
||||
|
||||
//Open a new connection, using the GET request on the URL endpoint
|
||||
fetch(qryString)
|
||||
.then((response) => response.json())
|
||||
|
2
static/js/rel/table.min.js
vendored
2
static/js/rel/table.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user