]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
webish: add queen pburl and connection status to welcome page
authorBrian Warner <warner@lothar.com>
Tue, 5 Dec 2006 19:51:32 +0000 (12:51 -0700)
committerBrian Warner <warner@lothar.com>
Tue, 5 Dec 2006 19:51:32 +0000 (12:51 -0700)
allmydata/web/welcome.xhtml
allmydata/webish.py

index 9c0fda172ecdb7fe224ad847d92568fa1cba79e2..8ceb6c6f4f1b69dfc5ed6ead0e58e8163feeb868 100644 (file)
@@ -13,6 +13,8 @@
 
 <h2>Mesh Status</h2>
 
+<div>Queen: <span n:render="string" n:data="queen_pburl" /></div>
+<div>Connected to queen?: <span n:render="string" n:data="connected_to_queen" /></div>
 <div>Known Peers: <span n:render="string" n:data="num_peers" /></div>
 <div>Connected Peers: <span n:render="string" n:data="num_connected_peers" /></div>
 
index 83eb8b15561262c3dbcc2d948c6c2e60cf933f63..2346e0f914213d0aa8f5ac2d7c2442fb8243535f 100644 (file)
@@ -52,6 +52,12 @@ class Welcome(rend.Page):
     addSlash = True
     docFactory = getxmlfile("welcome.xhtml")
 
+    def data_queen_pburl(self, ctx, data):
+        return IClient(ctx).queen_pburl
+    def data_connected_to_queen(self, ctx, data):
+        if IClient(ctx).queen:
+            return "yes"
+        return "no"
     def data_num_peers(self, ctx, data):
         #client = inevow.ISite(ctx)._client
         client = IClient(ctx)