Skip to content
Snippets Groups Projects
Commit 51d692b2 authored by Benjamin Bertrand's avatar Benjamin Bertrand
Browse files

Add json extension to data files

Make it easier to write regex for nginx
parent 26299dfd
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,7 @@ for PV in pvlist:
except:
None
with open('/var/www/data/getData','w') as datafile:
with open('/var/www/data/getData.json','w') as datafile:
json.dump(global_dict, datafile)
class epicsQuery(Thread):
......@@ -201,7 +201,7 @@ class epicsQuery(Thread):
publicpvs_return_dict['ISrc-010:TS-EVG-01:Mxc1-Frequency-RB']['value']=''
publicpvs_return_dict['ISrc-010:ISS-EVR-Magtr:Pul0-Width-RB']['value']=''
with open('/var/www/data/getPublicData','w') as datafile:
with open('/var/www/data/getPublicData.json','w') as datafile:
json.dump(publicpvs_return_dict, datafile)
interlocks_return_dict={}
......@@ -216,7 +216,7 @@ class epicsQuery(Thread):
else:
interlocks_return_dict[pv]['units']='n.c.'
interlocks_return_dict[pv]['value']=''
with open('/var/www/data/getInterlocks','w') as datafile:
with open('/var/www/data/getInterlocks.json','w') as datafile:
json.dump(interlocks_return_dict, datafile)
try:
......@@ -341,7 +341,7 @@ class epicsQuery(Thread):
else:
instruments_return_dict[pv]['units']='n.c.'
instruments_return_dict[pv]['value']=''
with open('/var/www/data/getInstruments','w') as datafile:
with open('/var/www/data/getInstruments.json','w') as datafile:
json.dump(instruments_return_dict, datafile)
time.sleep(0.5)
......
......@@ -309,7 +309,7 @@
"name": "Instruments",
"type": "JSON",
"settings": {
"url": "/data/getInstruments",
"url": "/data/getInstruments.json",
"use_thingproxy": false,
"refresh": 1,
"method": "GET"
......
......@@ -148,7 +148,7 @@
"name": "Public Data",
"type": "JSON",
"settings": {
"url": "/data/getInterlocks",
"url": "/data/getInterlocks.json",
"use_thingproxy": false,
"refresh": 1,
"method": "GET"
......
......@@ -309,7 +309,7 @@
"name": "Instruments",
"type": "JSON",
"settings": {
"url": "/data/getInstruments",
"url": "/data/getInstruments.json",
"use_thingproxy": false,
"refresh": 1,
"method": "GET"
......
......@@ -486,7 +486,7 @@
"name": "Public Data",
"type": "JSON",
"settings": {
"url": "/data/getPublicData",
"url": "/data/getPublicData.json",
"use_thingproxy": false,
"refresh": 1,
"method": "GET"
......
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