hack: add monthly rain link

master
Norwin 5 years ago
parent 5ed4d33c74
commit b12aeb139b

@ -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 (
<div>
<header className='site-header' role='banner'>
<div className='inner'>
<div className='site-headline'>
<h1 className='site-title'>
<a href={'https://opensensemap.org/explore/' + config.senseBox.id}>{config.title}</a>
</h1>
<span className='site-title'>{config.title}</span>
<span>
<a target='_blank' href={'https://opensensemap.org/explore/' + config.senseBox.id}>🗺 Karte</a>
<br/>
<a target='_blank' href={monthRainUrl}>Niederschlag / Monat</a>
</span>
</div>
</div>
</header>

Loading…
Cancel
Save