diff --git a/db.py b/db.py index 97ed5d2..c698ac0 100644 --- a/db.py +++ b/db.py @@ -38,20 +38,20 @@ def logChargeRun(entry): def getRecentPumpRuns(): logs = pumpDB.all() if (len(logs) > 25): - return logs[-25] + return logs[-25:] else: return logs def getRecentFanRuns(): logs = fanDB.all() if (len(logs) > 25): - return logs[-25] + return logs[-25:] else: return logs def getRecentChargeRuns(): logs = chargeDB.all() if (len(logs) > 25): - return logs[-25] + return logs[-25:] else: return logs diff --git a/static/styles.css b/static/styles.css index 54d8739..d2c5bd1 100644 --- a/static/styles.css +++ b/static/styles.css @@ -1,3 +1,32 @@ -.logs-table { - border: 1px solid red; +html { + font-size: 1em; +} + +table { + font-size:16px; + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + border-collapse: collapse; + border-spacing: 0; + width: 100%; +} + +table th { + padding-top: 11px; + padding-bottom: 11px; + background-color: #4CAF50; + color: white; +} + +table td, table th { + border: 1px solid #ddd; + text-align: left; + padding: 8px; +} + +table tr:nth-child(even){background-color: #f2f2f2} + +button { + width: 100%; + height: 40px; + margin-bottom: 20px; } diff --git a/webtemplates/index.html b/webtemplates/index.html index 80a31ec..26f8d0e 100644 --- a/webtemplates/index.html +++ b/webtemplates/index.html @@ -4,7 +4,7 @@ - WaterPI - WaterPI loves plants! + GardenPI - GardenPI loves plants! @@ -75,7 +75,7 @@ -

WaterPI - WaterPI loves plants!

+

GardenPI - GardenPI loves plants!

@@ -86,15 +86,17 @@

WaterPI - WaterPI loves plants!

They feel alone and hungry.

- Thankfully, WaterPI is here, to take care of your plant friends when you're out. + Thankfully, GardenPI is here, to take care of your plant friends when you're out.

-


+

System Status

Temperature: $temp



+
+

Recent Pump Logs (Auto-updates every 30secs)

@@ -113,7 +115,6 @@

Recent Charge Logs (Auto-updates every 10 minutes)



-