Purpose: Create a web application displaying solar plant data according to the user access rights.
- Data is contained in the
measure
table,value
column. measure.equipment_id
links toequipment.id_equipment
.equipment.site_id
links tosite.id_site
.measure.variable_id
links tovariable.id_variable
.user.client_id
andsite.client_id
both link toclient.id_client
.
Note: the database has been reduce to 5 days of measurement history (from 25/09/2019 until 30/09/2019)
- auxilaries.py functions: get_name and build_options
- graph_layout.py: generic and specific layouts for graph
- html_components.py: build function for html bricks: banner, menu, graphs
- loading_data.py: loading data functions from database
- server.py: core of the dash app: css links, app layout, callbacks
- main.py: running file
- Admin users can see everything (client_id = 0)
- Non-admin users can only see their own sites (
user.client_id = site.client_id
) (client_id = 1 or 2)
Note: add the following URL extension "/client_id" to have access to the client data
The app upload data from sqlite_demo_wpo.db according to the selected site and variable.
- Selection menu: site, variable and timeframe selection
- Displayed graphs: line plot and box plot