Skip to content
Snippets Groups Projects
Commit ee8b8311 authored by Emanuele Laface's avatar Emanuele Laface
Browse files

Fixes

parent e6a8b114
No related branches found
No related tags found
No related merge requests found
Pipeline #41431 passed
...@@ -14,9 +14,14 @@ def get_from_archiver(pv, start_date, end_date): ...@@ -14,9 +14,14 @@ def get_from_archiver(pv, start_date, end_date):
pv, start_date, end_date pv, start_date, end_date
) )
entries = int(requests.get(url).json()[0]["data"][0]["val"]) entries = int(requests.get(url).json()[0]["data"][0]["val"])
url = "http://archiver-utgard.cslab.esss.lu.se:17668/retrieval/data/getData.json?pv=nth_{}({})&from={}&to={}".format( if entries > 100:
int(entries // 100), pv, start_date, end_date url = "http://archiver-utgard.cslab.esss.lu.se:17668/retrieval/data/getData.json?pv=nth_{}({})&from={}&to={}".format(
) int(entries // 100), pv, start_date, end_date
)
else:
url = "http://archiver-utgard.cslab.esss.lu.se:17668/retrieval/data/getData.json?pv=nth_{}({})&from={}&to={}".format(
1, pv, start_date, end_date
)
r = requests.get(url).json()[0]["data"] r = requests.get(url).json()[0]["data"]
raw_data = pandas.DataFrame.from_dict(r) raw_data = pandas.DataFrame.from_dict(r)
return list( return list(
......
{ {
"version": 1, "version": 1,
"header_image": "", "header_image": "",
"allow_edit": true, "allow_edit": false,
"plugins": [], "plugins": [],
"panes": [ "panes": [
{ {
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
{ {
"type": "html", "type": "html",
"settings": { "settings": {
"html": "<script>\n function setDatasource(event) {\n\t\tfreeboard.showLoadingIndicator(true);\n\t};\n</script>\n<div style=\"position:relative;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;\">\n <select style=\"padding:0px 0px\" onchange=\"setDatasource()\" id=\"time-series\">\n <option value=\"2w\">Two Weeks</option>\n <option value=\"1w\">One Week</option>\n <option value=\"2d\">Two Days</option>\n <option value=\"1d\">One Day</option>\n <option value=\"live\">Live</option>\n </select>\n</div>", "html": "<script>\n function setDatasource(event) {\n\t\tfreeboard.showLoadingIndicator(true);\n\t};\n</script>\n<div style=\"position:relative;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;\">\n <select style=\"padding:0px 0px\" onchange=\"setDatasource()\" id=\"time-series\">\n <option value=\"2w\">Two Weeks</option>\n <option value=\"1w\">One Week</option>\n <option value=\"2d\">Two Days</option>\n <option value=\"1d\">One Day</option>\n <option value=\"4h\">Four Hours</option>\n <option value=\"1h\">One Hour</option>\n <option value=\"live\">Live</option>\n </select>\n</div>",
"height": 1 "height": 1
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment