1 | --- home/omar/pc2/gs/tahoe-lafs/src/allmydata/web/root.py 2010-05-22 20:32:00.000000000 +0100 |
---|
2 | +++ media/disk3/gs/tahoe-lafs/src/allmydata/web/root.py 2010-06-17 20:43:00.000000000 +0100 |
---|
3 | @@ -353,3 +353,24 @@ class Root(rend.Page): |
---|
4 | T.input(type="submit", value="Report!"), |
---|
5 | ]] |
---|
6 | return T.div[form] |
---|
7 | + |
---|
8 | + # In case we configure multiple introducers |
---|
9 | + def data_introducers(self, ctx, data): |
---|
10 | + connection_status = self.client.connected_to_introducers() |
---|
11 | + s = [] |
---|
12 | + furls = self.client.introducer_furls |
---|
13 | + for furl in furls: |
---|
14 | + i = furls.index(furl) |
---|
15 | + if connection_status[i]: |
---|
16 | + s.append( (furl, "Yes") ) |
---|
17 | + else: |
---|
18 | + s.append( (furl, "No") ) |
---|
19 | + s.sort() |
---|
20 | + return s |
---|
21 | + |
---|
22 | + def render_introducers_row(self, ctx, s): |
---|
23 | + (furl, connected) = s |
---|
24 | + #connected = |
---|
25 | + ctx.fillSlots("introducer_furl", "%s" % (furl)) |
---|
26 | + ctx.fillSlots("connected", "%s" % (connected)) |
---|
27 | + return ctx.tag |
---|