fixed readme

This commit is contained in:
2EEEB 2020-04-08 15:26:01 +02:00
parent 9001a0bb2a
commit 3bd706f44d
Signed by: 2EEEB
GPG Key ID: 8F12BD6D9D435DB2

View File

@ -1,22 +1,25 @@
#webapp
# webapp
Flask web app for data visalization. Client side is built with [Chart.js](https://chartjs.org) and [justgage](https://github.com/toorshia/justgage) js libraries and jQuery.
The app exposes a simple api for querying the database and source sensor status available at /api/*function*.
The functions are:
-/api/getData
-Method: GET, POST
-Number of samples can be specified with argument samples=*desired number*, defaults to 120 i.e 2 hours.
-Returns json with the datasets and information about sensor status
-/api/heartbeat
-Method: GET
-Returns json with status info and last received message timestamp
-Method: POST
-Reserved for internal use in reporting sensor status. Requires a secret to be set.
- /api/getData
- Method: GET, POST
- Number of samples can be specified with argument samples=*desired number*, defaults to 120 i.e 2 hours.
- Returns json with the datasets and information about sensor status
- /api/heartbeat
- Method: GET
- Returns json with status info and last received message timestamp
- Method: POST
- Reserved for internal use in reporting sensor status. Requires a secret to be set.
The client side comprises of several parts:
-`templates/index.html` provides the basic html structure
-`static/styles/chartstyle.css` takes care of some basic styling and layout
-`static/main.js` script taking care of creating the plots and gauges, requesting data from server and updating the view every two minutes.
- `templates/index.html` provides the basic html structure
- `static/styles/chartstyle.css` takes care of some basic styling and layout
- `static/main.js` script taking care of creating the plots and gauges, requesting data from server and updating the view every two minutes.