From: Brian Warner Date: Mon, 11 Jun 2007 17:51:11 +0000 (-0700) Subject: webish: display program/library versions on the welcome page X-Git-Tag: allmydata-tahoe-0.4.0~54 X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/vdrive?a=commitdiff_plain;h=48a8c32ed7eac75dab1c3aca409b614ea60e349d;p=tahoe-lafs%2Ftahoe-lafs.git webish: display program/library versions on the welcome page --- diff --git a/src/allmydata/node.py b/src/allmydata/node.py index 6fcc0f09..941b4d29 100644 --- a/src/allmydata/node.py +++ b/src/allmydata/node.py @@ -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. diff --git a/src/allmydata/web/welcome.xhtml b/src/allmydata/web/welcome.xhtml index b4c3b94f..16f5cda0 100644 --- a/src/allmydata/web/welcome.xhtml +++ b/src/allmydata/web/welcome.xhtml @@ -15,6 +15,7 @@

Grid Status

My nodeid:
+
My version:
Introducer:
Connected to introducer?:
Connected to vdrive?:
diff --git a/src/allmydata/webish.py b/src/allmydata/webish.py index daf6cdf0..043c645e 100644 --- a/src/allmydata/webish.py +++ b/src/allmydata/webish.py @@ -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):