From 3a1d29299dc3f569b63d42bbc8d376aca0c83526 Mon Sep 17 00:00:00 2001 From: dorian Date: Sat, 13 Jul 2019 20:05:46 +0200 Subject: [PATCH] using maxVals is now supported --- js/blueweather.js | 4 ++-- js/dashboard.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/blueweather.js b/js/blueweather.js index 2f09575..5360a27 100644 --- a/js/blueweather.js +++ b/js/blueweather.js @@ -8,7 +8,7 @@ class BlueWeather { this.log("init done", 2) } - getLocationData(locId, range = {from:"", to:""}, async, processingFunction, errorFunction) { + getLocationData(locId, range = {from:"", to:""}, maxVals = 0, async, processingFunction, errorFunction) { this.xhttp.abort() var thisObject = this @@ -32,7 +32,7 @@ class BlueWeather { }; } - var url = "https://api.itsblue.de/weather/json.php?locId="+locId+"&range[from]="+range.from + "&range[to]="+range.to + var url = "https://api.itsblue.de/weather/json.php?locId="+locId+"&range[from]="+range.from + "&range[to]="+range.to + "&maxVals=" + maxVals this.log("starting location request; URL is: " + url, 3) this.xhttp.open("GET", url, async) this.xhttp.send() diff --git a/js/dashboard.js b/js/dashboard.js index 1bf43c5..1fef56a 100644 --- a/js/dashboard.js +++ b/js/dashboard.js @@ -24,7 +24,7 @@ class BlueWeatherDashboard { // set page to loading state mainContent.innerHTML = "
Loading...
" - this.blueweather.getLocationData(this.loc, undefined, true, function (locationData) { + this.blueweather.getLocationData(this.loc, undefined, undefined, true, function (locationData) { // refresh sensors list dashboard.loadSensors(locationData.sensors) @@ -56,7 +56,7 @@ class BlueWeatherDashboard { to = new Date().getTime() / 1000 - parseInt(to) } - this.blueweather.getLocationData(this.loc, { from: from, to: to }, true, function (locationData) { + this.blueweather.getLocationData(this.loc, { from: from, to: to }, undefined, true, function (locationData) { dashboard.loadDiagram("mainContent", locationData, dashboard.currentPage) })