mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-19 11:16:24 +00:00
Add introducers renderer
This commit is contained in:
parent
7ba4b945a4
commit
44f16e77cf
@ -389,8 +389,15 @@ class RootElement(Element):
|
||||
return tag(str(len(self._client.introducer_connection_statuses())))
|
||||
|
||||
# In case we configure multiple introducers
|
||||
def data_introducers(self, ctx, data):
|
||||
return self.client.introducer_connection_statuses()
|
||||
@renderer
|
||||
def introducers(self, req, tag):
|
||||
ix = self._get_introducers()
|
||||
if not ix:
|
||||
return tag("No introducers")
|
||||
return tag
|
||||
|
||||
def _get_introducers(self):
|
||||
return self._client.introducer_connection_statuses()
|
||||
|
||||
def _render_connection_status(self, tag, cs):
|
||||
connected = "yes" if cs.connected else "no"
|
||||
|
Loading…
Reference in New Issue
Block a user