From: Brian Warner Date: Mon, 28 Jan 2008 20:56:22 +0000 (-0700) Subject: display the Helper FURL and our connection status on the welcome page. Closes #285. X-Git-Tag: allmydata-tahoe-0.8.0~219 X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/rgr-080307.php?a=commitdiff_plain;h=8485ff53fc1467e54f1498630cf70fa9eb40bb91;p=tahoe-lafs%2Ftahoe-lafs.git display the Helper FURL and our connection status on the welcome page. Closes #285. --- diff --git a/src/allmydata/upload.py b/src/allmydata/upload.py index b1ea5702..b33ec085 100644 --- a/src/allmydata/upload.py +++ b/src/allmydata/upload.py @@ -944,6 +944,10 @@ class Uploader(service.MultiService): def _got_helper(self, helper): self._helper = helper + def get_helper_info(self): + # return a tuple of (helper_furl_or_None, connected_bool) + return (self._helper_furl, bool(self._helper)) + def upload(self, uploadable): # this returns the URI assert self.parent diff --git a/src/allmydata/web/welcome.xhtml b/src/allmydata/web/welcome.xhtml index 05192537..73ad3c9d 100644 --- a/src/allmydata/web/welcome.xhtml +++ b/src/allmydata/web/welcome.xhtml @@ -18,8 +18,13 @@ tool may also be useful.
My nodeid:
My version:
+
Introducer:
Connected to introducer?:
+ +
Helper:
+
Connected to helper?:
+
Known+Connected Peers:
diff --git a/src/allmydata/webish.py b/src/allmydata/webish.py index 93f534b4..6c404466 100644 --- a/src/allmydata/webish.py +++ b/src/allmydata/webish.py @@ -1319,6 +1319,18 @@ class Root(rend.Page): if IClient(ctx).connected_to_introducer(): return "yes" return "no" + + def data_helper_furl(self, ctx, data): + uploader = IClient(ctx).getServiceNamed("uploader") + furl, connected = uploader.get_helper_info() + return furl + def data_connected_to_helper(self, ctx, data): + uploader = IClient(ctx).getServiceNamed("uploader") + furl, connected = uploader.get_helper_info() + if connected: + return "yes" + return "no" + def data_num_peers(self, ctx, data): #client = inevow.ISite(ctx)._client client = IClient(ctx)