x
This commit is contained in:
parent
5dd14e6531
commit
e907fe4b75
0
Dockerfile
Normal file → Executable file
0
Dockerfile
Normal file → Executable file
0
bin/dbHandler.js
Normal file → Executable file
0
bin/dbHandler.js
Normal file → Executable file
0
models/PMEntry.js
Normal file → Executable file
0
models/PMEntry.js
Normal file → Executable file
0
models/Status.js
Normal file → Executable file
0
models/Status.js
Normal file → Executable file
0
package.json
Normal file → Executable file
0
package.json
Normal file → Executable file
4
public/javascripts/main.js
Normal file → Executable file
4
public/javascripts/main.js
Normal file → Executable file
@ -133,7 +133,7 @@ function addData(time, pm25, pm10) {
|
|||||||
chart.data.datasets[1].data.push(pm10);
|
chart.data.datasets[1].data.push(pm10);
|
||||||
|
|
||||||
// Begrenze die Anzahl der Datenpunkte auf 100 oder die letzten 12 Stunden
|
// Begrenze die Anzahl der Datenpunkte auf 100 oder die letzten 12 Stunden
|
||||||
var maxPoints = 60;
|
var maxPoints = 5000;
|
||||||
var maxTime = new Date();
|
var maxTime = new Date();
|
||||||
maxTime.setHours(maxTime.getHours() - 12);
|
maxTime.setHours(maxTime.getHours() - 12);
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ function loadValues()
|
|||||||
let last = 0;
|
let last = 0;
|
||||||
for(let i = 0; i < data.length; i++)
|
for(let i = 0; i < data.length; i++)
|
||||||
{
|
{
|
||||||
if(!(last + 900000 > new Date(data[i].createdAt).getTime()) )
|
if(!(last + 1800000 > new Date(data[i].createdAt).getTime()) )
|
||||||
{
|
{
|
||||||
newData.push(data[i]);
|
newData.push(data[i]);
|
||||||
last = new Date(data[i].createdAt).getTime();
|
last = new Date(data[i].createdAt).getTime();
|
||||||
|
0
public/javascripts/main2.js
Normal file → Executable file
0
public/javascripts/main2.js
Normal file → Executable file
0
public/javascripts/web.bundle.js
Normal file → Executable file
0
public/javascripts/web.bundle.js
Normal file → Executable file
0
public/stylesheets/style.css
Normal file → Executable file
0
public/stylesheets/style.css
Normal file → Executable file
0
routes/index.js
Normal file → Executable file
0
routes/index.js
Normal file → Executable file
0
views/error.pug
Normal file → Executable file
0
views/error.pug
Normal file → Executable file
0
views/index.pug
Normal file → Executable file
0
views/index.pug
Normal file → Executable file
0
views/layout.pug
Normal file → Executable file
0
views/layout.pug
Normal file → Executable file
0
webpack.config.js
Normal file → Executable file
0
webpack.config.js
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user