# HG changeset patch # User Drew Perttula # Date 2017-05-19 07:33:11 # Node ID c8cffe82b53788c8c939be74337324ed98ab3040 # Parent 60e559cb1a5e01bc3c52837990ae7f3096c6f8c3 collector gui updates Ignore-this: d8ab8247884e674a2332684297920c6a diff --git a/bin/collector b/bin/collector --- a/bin/collector +++ b/bin/collector @@ -51,9 +51,11 @@ class WebListeners(object): def addClient(self, client): self.clients.append([client, {}]) + log.info('added client %s', client) def delClient(self, client): self.clients = [[c, t] for c, t in self.clients if c != client] + log.info('delClient %s, %s left', client, len(self.clients)) def outputAttrsSet(self, dev, attrs, outputMap): now = time.time() @@ -75,7 +77,7 @@ class WebListeners(object): output, index = outputMap[(dev, attr)] attrRows.append({'attr': attr.rsplit('/')[-1], 'val': val, - 'chan': (output.shortId(), index)}) + 'chan': (output.shortId(), index + 1)}) attrRows.sort(key=lambda r: r['chan']) for row in attrRows: row['chan'] = '%s %s' % (row['chan'][0], row['chan'][1]) @@ -86,6 +88,7 @@ class WebListeners(object): class Updates(cyclone.websocket.WebSocketHandler): def connectionMade(self, *args, **kwargs): + log.info('socket connect %s', self) self.settings.listeners.addClient(self) def connectionLost(self, reason): diff --git a/bin/homepageConfig b/bin/homepageConfig --- a/bin/homepageConfig +++ b/bin/homepageConfig @@ -28,6 +28,7 @@ def location(path, server): proxy_set_header Host $host; proxy_pass %(server)s; + proxy_buffering off; rewrite /[^/]+/(.*) /$1 break; }""" % vars() diff --git a/light9/collector/web/index.html b/light9/collector/web/index.html --- a/light9/collector/web/index.html +++ b/light9/collector/web/index.html @@ -12,6 +12,9 @@ + diff --git a/makefile b/makefile --- a/makefile +++ b/makefile @@ -1,4 +1,4 @@ -NOSEARGS="--no-path-adjustment light9.rdfdb.rdflibpatch light9.rdfdb.patch light9.effecteval.test_effect light9.collector light9.rdfdb.graphfile_test light9.paint" +NOSEARGS="--no-path-adjustment light9.rdfdb.rdflibpatch light9.rdfdb.patch light9.effecteval.test_effect light9.collector light9.rdfdb.graphfile_test light9.paint light9.effect" tests: eval env/bin/nosetests -x $(NOSEARGS)