diff options
author | Matt Kohls <mattkohls13@gmail.com> | 2023-12-04 22:44:20 -0500 |
---|---|---|
committer | Matt Kohls <mattkohls13@gmail.com> | 2023-12-04 23:55:28 -0500 |
commit | 8cf24308185d45000b1ce6f29a2edc6cdf00185c (patch) | |
tree | 27cce5a5f7cde07cd8b100e3a9b840a5997e00ac /snag/dashboard.py | |
parent | 9bd50e8bc54dedae84b3eb424d5eba54bfa870f3 (diff) | |
download | sensor-aggregator-master.tar.gz sensor-aggregator-master.tar.bz2 sensor-aggregator-master.zip |
Using new api + D3 and Plot to draw fancy graphs
Diffstat (limited to 'snag/dashboard.py')
-rw-r--r-- | snag/dashboard.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/snag/dashboard.py b/snag/dashboard.py index 7e77124..1eca82c 100644 --- a/snag/dashboard.py +++ b/snag/dashboard.py @@ -16,11 +16,11 @@ def dashboard(): db = get_db() rows = db.execute( - 'SELECT de.deviceId, de.environment, d.deviceName' + 'SELECT de.deviceId, de.environment, de.environmentDescription, d.deviceName, d.deviceLocation' ' FROM device_env de JOIN devices d ON de.deviceId = d.deviceId' ' ORDER BY entry DESC' ).fetchall() - deviceList = [dict(deviceId=row['deviceId'], location=row['environment'], name=row['deviceName']) for row in rows] + deviceList = [dict(deviceId=row['deviceId'], environment=row['environment'], environmentDesc=row['environmentDescription'], name=row['deviceName'], location=row['deviceLocation']) for row in rows] return render_template('dashboard/dashboard.html', deviceList=deviceList, generatedAt=datetime.now()) |