Explorar o código

Add some content to the main view

 * list all the nodes in the database
oz123 %!s(int64=11) %!d(string=hai) anos
pai
achega
0c420eb630
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      scripts/webui.py

+ 8 - 0
scripts/webui.py

@@ -135,6 +135,14 @@ def listnodes():
     nodeids = db.listnodes()
     nodes = db.getnodes(nodeids)
 
+    nodesd = [''] * len(nodes)
+    for idx, node in enumerate(nodes):
+        tags = node.tags
+        tags = filter(None, tags)
+        nodesd[idx]=('@'.join((node.username, node.url)), ','.join(tags))
+
+    output = template('make_table', rows=nodesd)
+    return output
 
 debug(True)
 run(reloader=True)