mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-20 17:52:50 +00:00
Render introducer description
This commit is contained in:
parent
c86d4341c8
commit
a4f86181f9
@ -369,14 +369,15 @@ class RootElement(Element):
|
||||
|
||||
return ctx.tag[ul]
|
||||
|
||||
def data_introducer_description(self, ctx, data):
|
||||
connected_count = self.data_connected_introducers( ctx, data )
|
||||
@renderer
|
||||
def introducer_description(self, req, tag):
|
||||
connected_count = self._connected_introducers()
|
||||
if connected_count == 0:
|
||||
return "No introducers connected"
|
||||
return tag("No introducers connected")
|
||||
elif connected_count == 1:
|
||||
return "1 introducer connected"
|
||||
return tag("1 introducer connected")
|
||||
else:
|
||||
return "%s introducers connected" % (connected_count,)
|
||||
return tag("%s introducers connected" % (connected_count,))
|
||||
|
||||
def data_total_introducers(self, ctx, data):
|
||||
return len(self.client.introducer_connection_statuses())
|
||||
|
Loading…
x
Reference in New Issue
Block a user