fix file instance time series

This commit is contained in:
2020-06-08 14:56:58 +02:00
parent 5092659a21
commit 611bcd5e27

View File

@@ -56,7 +56,17 @@ DetailsWindow.prototype.setFile = function(file) {
DetailsWindow.prototype.updateGraph = function(file) {
console.log("updating graph")
fetch(file.timeseries_href+"?interval=60?days=14").then(resp => {
let today = new Date()
let start = new Date()
start.setDate(start.getDate()-30)
fetch(
file.timeseries_href+
"?start="+start.toISOString() +
"&end="+today.toISOString() +
"&interval="+60
).then(resp => {
if (!resp.ok) {return null}
return resp.json()
}).then(resp => {