From b12aeb139b50d0ff00c41f5d88e4aa55bca881d1 Mon Sep 17 00:00:00 2001 From: Norwin Roosen Date: Sat, 29 Jun 2019 16:02:53 +0200 Subject: [PATCH] hack: add monthly rain link --- app/assets/scripts/views/app.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/assets/scripts/views/app.js b/app/assets/scripts/views/app.js index 1e7e779..0edcdcd 100644 --- a/app/assets/scripts/views/app.js +++ b/app/assets/scripts/views/app.js @@ -13,14 +13,22 @@ var App = React.createClass({ }, render: function () { + + const monthStart = new Date('2019-01-01').toISOString(); + const monthEnd = new Date().toISOString(); + const monthRainUrl = `https://api.opensensemap.org/statistics/descriptive?boxid=${config.senseBox.id}&from-date=${monthStart}&to-date=${monthEnd}&phenomenon=Niederschlag&window=30d&operation=sum&columns=boxName,unit&format=json&download=false` + return (
-

- {config.title} -

+ {config.title} + + 🗺️ Karte +
+ Niederschlag / Monat +