mirror of https://gitlab.com/bashrc2/epicyon
Aliases for post and get
parent
4d02c11c89
commit
16f8f023e5
11
daemon.py
11
daemon.py
|
@ -12681,6 +12681,10 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if authorized and '/performance?graph=' in self.path:
|
if authorized and '/performance?graph=' in self.path:
|
||||||
graph = self.path.split('?graph=')[1]
|
graph = self.path.split('?graph=')[1]
|
||||||
if htmlGET and not graph.endswith('.json'):
|
if htmlGET and not graph.endswith('.json'):
|
||||||
|
if graph == 'post':
|
||||||
|
graph == '_POST'
|
||||||
|
elif graph == 'get':
|
||||||
|
graph == '_GET'
|
||||||
msg = \
|
msg = \
|
||||||
htmlWatchPointsGraph(self.server.baseDir,
|
htmlWatchPointsGraph(self.server.baseDir,
|
||||||
self.server.fitness,
|
self.server.fitness,
|
||||||
|
@ -12695,12 +12699,15 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
graph = graph.replace('.json', '')
|
graph = graph.replace('.json', '')
|
||||||
|
if graph == 'post':
|
||||||
|
graph == '_POST'
|
||||||
|
elif graph == 'get':
|
||||||
|
graph == '_GET'
|
||||||
watchPointsJson = sortedWatchPoints(self.server.fitness, graph)
|
watchPointsJson = sortedWatchPoints(self.server.fitness, graph)
|
||||||
msg = json.dumps(watchPointsJson,
|
msg = json.dumps(watchPointsJson,
|
||||||
ensure_ascii=False).encode('utf-8')
|
ensure_ascii=False).encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
self._set_headers('application/json',
|
self._set_headers('application/json', msglen,
|
||||||
msglen,
|
|
||||||
None, callingDomain, False)
|
None, callingDomain, False)
|
||||||
self._write(msg)
|
self._write(msg)
|
||||||
fitnessPerformance(GETstartTime, self.server.fitness,
|
fitnessPerformance(GETstartTime, self.server.fitness,
|
||||||
|
|
Loading…
Reference in New Issue