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 () {
|
||||
|
||||
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…
Add table
Reference in a new issue