changeset 1543:c8cffe82b537

collector gui updates Ignore-this: d8ab8247884e674a2332684297920c6a
author Drew Perttula <drewp@bigasterisk.com>
date Fri, 19 May 2017 07:33:11 +0000
parents 60e559cb1a5e
children fc5675f5b756
files bin/collector bin/homepageConfig light9/collector/web/index.html makefile
diffstat 4 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/bin/collector	Wed May 17 08:02:58 2017 +0000
+++ b/bin/collector	Fri May 19 07:33:11 2017 +0000
@@ -51,9 +51,11 @@
 
     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 @@
             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 Updates(cyclone.websocket.WebSocketHandler):
 
     def connectionMade(self, *args, **kwargs):
+        log.info('socket connect %s', self)
         self.settings.listeners.addClient(self)
 
     def connectionLost(self, reason):
--- a/bin/homepageConfig	Wed May 17 08:02:58 2017 +0000
+++ b/bin/homepageConfig	Fri May 19 07:33:11 2017 +0000
@@ -28,6 +28,7 @@
       proxy_set_header Host $host;
 
       proxy_pass %(server)s;
+      proxy_buffering off;
       rewrite /[^/]+/(.*) /$1 break;
     }""" % vars()
 
--- a/light9/collector/web/index.html	Wed May 17 08:02:58 2017 +0000
+++ b/light9/collector/web/index.html	Fri May 19 07:33:11 2017 +0000
@@ -12,6 +12,9 @@
     <script src="/lib/underscore/underscore-min.js"></script>
 
     <link rel="stylesheet"  href="/style.css">
+    <style>
+     td { white-space: nowrap; }
+    </style>
   </head>
   <body>
 
--- a/makefile	Wed May 17 08:02:58 2017 +0000
+++ b/makefile	Fri May 19 07:33:11 2017 +0000
@@ -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)