Changeset - c8cffe82b537
[Not reviewed]
default
0 4 0
Drew Perttula - 8 years ago 2017-05-19 07:33:11
drewp@bigasterisk.com
collector gui updates
Ignore-this: d8ab8247884e674a2332684297920c6a
4 files changed with 9 insertions and 2 deletions:
0 comments (0 inline, 0 general)
bin/collector
Show inline comments
 
@@ -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):
bin/homepageConfig
Show inline comments
 
@@ -28,6 +28,7 @@ def location(path, server):
 
      proxy_set_header Host $host;
 

	
 
      proxy_pass %(server)s;
 
      proxy_buffering off;
 
      rewrite /[^/]+/(.*) /$1 break;
 
    }""" % vars()
 

	
light9/collector/web/index.html
Show inline comments
 
@@ -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>
 

	
makefile
Show inline comments
 
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)
0 comments (0 inline, 0 general)