ConnectedPlacesCatapult / SharingCitiesDashboard

Personalisable dashboard for Sharing Cities IoT data
Apache License 2.0
6 stars 5 forks source link

Fcc 181 alert widget send email #214

Closed kpennels closed 5 years ago

kpennels commented 5 years ago

Updated files Analytics/models/attribute_range.py - added the sensor id and recorded date fields for both minimum and maximum attribute values Analytics/importers/attr_range_decorator.py - store sensor id as well as the timestamp when the minimum and maximum values were recorded. If a new attribute range is created or one is updated, check the alert model table if any alert emails need be sent Analytics/models/attributes.py - Created separate functions to retreive the min and max value and returned the oldest minimum and maximum values

New files Analytics/templates/alert_email.html - the html for when a alert email is sent