using maxVals is now supported
This commit is contained in:
parent
01bb8fc51b
commit
3a1d29299d
2 changed files with 4 additions and 4 deletions
|
@ -8,7 +8,7 @@ class BlueWeather {
|
||||||
this.log("init done", 2)
|
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()
|
this.xhttp.abort()
|
||||||
var thisObject = this
|
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.log("starting location request; URL is: " + url, 3)
|
||||||
this.xhttp.open("GET", url, async)
|
this.xhttp.open("GET", url, async)
|
||||||
this.xhttp.send()
|
this.xhttp.send()
|
||||||
|
|
|
@ -24,7 +24,7 @@ class BlueWeatherDashboard {
|
||||||
// set page to loading state
|
// set page to loading state
|
||||||
mainContent.innerHTML = "<div class=\"d-flex justify-content-center\"><div class=\"spinner-border\" role=\"status\"><span class=\"sr-only\">Loading...</span></div></div>"
|
mainContent.innerHTML = "<div class=\"d-flex justify-content-center\"><div class=\"spinner-border\" role=\"status\"><span class=\"sr-only\">Loading...</span></div></div>"
|
||||||
|
|
||||||
this.blueweather.getLocationData(this.loc, undefined, true, function (locationData) {
|
this.blueweather.getLocationData(this.loc, undefined, undefined, true, function (locationData) {
|
||||||
// refresh sensors list
|
// refresh sensors list
|
||||||
dashboard.loadSensors(locationData.sensors)
|
dashboard.loadSensors(locationData.sensors)
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ class BlueWeatherDashboard {
|
||||||
to = new Date().getTime() / 1000 - parseInt(to)
|
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)
|
dashboard.loadDiagram("mainContent", locationData, dashboard.currentPage)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue