Browse Source

Remove _filter so all nodes can be listed

oz123 11 years ago
parent
commit
834d646c3d
1 changed files with 6 additions and 1 deletions
  1. 6 1
      scripts/webui.py

+ 6 - 1
scripts/webui.py

@@ -177,6 +177,8 @@ def listnodes():
         _filter = request.POST.get('tag')
         if _filter:
             db._filtertags = [TagNew(_filter.strip())]
+        if _filter == 'None':
+            db._filtertags = []
 
     nodeids = db.listnodes()
     nodes = db.getnodes(nodeids)
@@ -187,7 +189,10 @@ def listnodes():
         nodesd[idx] = ('@'.join((node.username, node.url)), ','.join(ntags))
 
     if not TAGS:
-        TAGS =set([''.join(node.tags).strip() for node in nodes])
+        TAGS = list(set([''.join(node.tags).strip() for node in nodes]))
+        TAGS.sort()
+        TAGS.insert(0, 'None')
+        TAGS.insert(0, 'None')
         print(len(TAGS))
     output = template(tmplt, nodes=nodesd, tags=TAGS)
     return output