Browse Source

Add some content to the main view

 * list all the nodes in the database
oz123 11 năm trước cách đây
mục cha
commit
0c420eb630
1 tập tin đã thay đổi với 8 bổ sung0 xóa
  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)