hack: add monthly rain link
This commit is contained in:
parent
5ed4d33c74
commit
b12aeb139b
1 changed files with 11 additions and 3 deletions
|
@ -13,14 +13,22 @@ var App = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function () {
|
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 (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<header className='site-header' role='banner'>
|
<header className='site-header' role='banner'>
|
||||||
<div className='inner'>
|
<div className='inner'>
|
||||||
<div className='site-headline'>
|
<div className='site-headline'>
|
||||||
<h1 className='site-title'>
|
<span className='site-title'>{config.title}</span>
|
||||||
<a href={'https://opensensemap.org/explore/' + config.senseBox.id}>{config.title}</a>
|
<span>
|
||||||
</h1>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
Loading…
Add table
Reference in a new issue