mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-04 11:23:50 +00:00
Merge branch 'master' of ssh://localhost:12347/home/trac/git
This commit is contained in:
commit
2180e0fb3c
3 files changed
+6
-6
No files matched your search
@@ -53,7 +53,7 @@ class LiveDataReceiver(threading.Thread):
|
|||||||
|
|
||||||
# blocking call by updatecount setting
|
# blocking call by updatecount setting
|
||||||
conf.setParameters(dict(eventname=self.eventname, racename=self.racename, sinceupdate=self.updatecount))
|
conf.setParameters(dict(eventname=self.eventname, racename=self.racename, sinceupdate=self.updatecount))
|
||||||
conf.setLogging(False)
|
conf.setLogging(True)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# need to lock because other threads could overwrite information
|
# need to lock because other threads could overwrite information
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ def configuredListeners(context, request):
|
|||||||
for key, listener in threaded_listener.items():
|
for key, listener in threaded_listener.items():
|
||||||
out.append( {'host': listener.host, 'port': listener.port,
|
out.append( {'host': listener.host, 'port': listener.port,
|
||||||
'eventname': listener.eventname, 'last_update': listener.last_update and listener.last_update.strftime('%d.%m %H:%M:%S') or '-',
|
'eventname': listener.eventname, 'last_update': listener.last_update and listener.last_update.strftime('%d.%m %H:%M:%S') or '-',
|
||||||
'paused' : listener.paused, 'running': listener.running, 'id' : key,
|
'paused' : listener.paused, 'running': listener.running, 'xid' : str(key),
|
||||||
'racename': listener.racename} )
|
'racename': listener.racename} )
|
||||||
|
|
||||||
return out
|
return out
|
||||||
@@ -209,7 +209,7 @@ def pauseListener(context, request):
|
|||||||
for v in threaded_listener.values():
|
for v in threaded_listener.values():
|
||||||
v.paused = True
|
v.paused = True
|
||||||
else:
|
else:
|
||||||
if threaded_listener.has_key(tid):
|
if threaded_listener.has_key(int(tid)):
|
||||||
threaded_listener.get(tid).paused = True
|
threaded_listener.get(tid).paused = True
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@@ -221,14 +221,14 @@ def unPauseListener(context, request):
|
|||||||
for v in threaded_listener.values():
|
for v in threaded_listener.values():
|
||||||
v.paused = False
|
v.paused = False
|
||||||
else:
|
else:
|
||||||
if threaded_listener.has_key(tid):
|
if threaded_listener.has_key(int(tid)):
|
||||||
threaded_listener.get(tid).paused = False
|
threaded_listener.get(tid).paused = False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@jsonize
|
@jsonize
|
||||||
def stopListener(context, request):
|
def stopListener(context, request):
|
||||||
tid = int(request.params.get('tid', 0))
|
tid = int(request.params.get('tid', 0))
|
||||||
if threaded_listener.has_key(tid):
|
if threaded_listener.has_key(int(tid)):
|
||||||
threaded_listener.get(tid).running = False
|
threaded_listener.get(tid).running = False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
GET('configuredListeners', {}, function(data) {
|
GET('configuredListeners', {}, function(data) {
|
||||||
options = '';
|
options = '';
|
||||||
for (d in data) {
|
for (d in data) {
|
||||||
options += format('<option value="{id}">{host}:{port} | {eventname} | {racename} | Last Update: {last_update} Paused: {paused} Running: {running}</option>', data[d]);
|
options += format('<option value="'+data[d].xid+'">{host}:{port} | {eventname} | {racename} | Last Update: {last_update} Paused: {paused} Running: {running}</option>', data[d]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options == '')
|
if (options == '')
|
||||||
|
|||||||
Reference in new issue
Block a user