ZATAN-uMaine / vismod

MIT License
2 stars 0 forks source link

Serve csv init #109

Closed zachdotscott closed 5 months ago

zachdotscott commented 5 months ago

This rewrites some queries with the updated database construction. There is also some measures in exportInfluxAsCSV for retrieving the units of sensors. In doing this, I also effectively "disallowed" requests with sensors that don't match a master list called ALL_SENSORS. All CSVs now go to a directory in vismod_web called user_csvs. This is so they are accessible to the Flask route in vismod_web/init.py. There are a couple test Flask routes remaining in that file.

We need to make it so that directory cleans itself once in a while. We may also want to limit the number of files that can exist in this directory.

The HTML and JS have been altered slightly. There is now a Download All Sensor Data button. Each node now has the class "sensor", with its ID being its identification in the database. That is, the old version of a node with id=sensor17B now has class=sensor and id=17B.