]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
webish: display program/library versions on the welcome page
authorBrian Warner <warner@allmydata.com>
Mon, 11 Jun 2007 17:51:11 +0000 (10:51 -0700)
committerBrian Warner <warner@allmydata.com>
Mon, 11 Jun 2007 17:51:11 +0000 (10:51 -0700)
src/allmydata/node.py
src/allmydata/web/welcome.xhtml
src/allmydata/webish.py

index 6fcc0f094c670a47a5878b6c6c4dec138cbad770..941b4d29364da0fba6bc0ce31a8f404c498700eb 100644 (file)
@@ -66,6 +66,12 @@ class Node(service.MultiService):
                  % (allmydata.__version__, foolscap.__version__,
                     twisted.__version__, zfec.__version__,))
 
+    def get_versions(self):
+        return {'allmydata': allmydata.__version__,
+                'foolscap': foolscap.__version__,
+                'twisted': twisted.__version__,
+                'zfec': zfec.__version__,
+                }
 
     def startService(self):
         # note: this class can only be started and stopped once.
index b4c3b94f53435b7b1cec5dfe61cd698c97016cc6..16f5cda09d0a96511190bf817d2250ae25850015 100644 (file)
@@ -15,6 +15,7 @@
 <h2>Grid Status</h2>
 
 <div>My nodeid: <span n:render="string" n:data="my_nodeid" /></div>
+<div>My version: <span n:render="string" n:data="version" /></div>
 <div>Introducer: <span n:render="string" n:data="introducer_furl" /></div>
 <div>Connected to introducer?: <span n:render="string" n:data="connected_to_introducer" /></div>
 <div>Connected to vdrive?: <span n:render="string" n:data="connected_to_vdrive" /></div>
index daf6cdf0b4304297d1a189d6359fb62271883697..043c645ee923b0dd0b905a54c4630c5bb8a81621 100644 (file)
@@ -28,6 +28,11 @@ class Welcome(rend.Page):
     addSlash = True
     docFactory = getxmlfile("welcome.xhtml")
 
+    def data_version(self, ctx, data):
+        v = IClient(ctx).get_versions()
+        return "tahoe: %s, zfec: %s, foolscap: %s, twisted: %s" % \
+               (v['allmydata'], v['zfec'], v['foolscap'], v['twisted'])
+
     def data_my_nodeid(self, ctx, data):
         return idlib.b2a(IClient(ctx).nodeid)
     def data_introducer_furl(self, ctx, data):