mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-07 19:04:21 +00:00
Get rid of the reliance on rref
It provides information more correctly obtained from get_connection_status().
This commit is contained in:
parent
1f16a173f0
commit
e32f581d07
@ -184,7 +184,7 @@ class FakeDisplayableServer(StubServer):
|
||||
self.last_loss_time = last_loss_time
|
||||
self.last_rx_time = last_rx_time
|
||||
self.last_connect_time = last_connect_time
|
||||
self.rref = None
|
||||
|
||||
def on_status_changed(self, cb): # TODO: try to remove me
|
||||
cb(self)
|
||||
def is_connected(self): # TODO: remove me
|
||||
@ -756,14 +756,14 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
|
||||
{u"nodeid": u'other_nodeid',
|
||||
u'available_space': 123456,
|
||||
u'connection_status': u'summary',
|
||||
u'last_received_data': None,
|
||||
u'last_received_data': 30,
|
||||
u'nickname': u'other_nickname \u263b',
|
||||
u'version': u'1.0',
|
||||
},
|
||||
{u"nodeid": u'disconnected_nodeid',
|
||||
u'available_space': 123456,
|
||||
u'connection_status': u'summary',
|
||||
u'last_received_data': None,
|
||||
u'last_received_data': 35,
|
||||
u'nickname': u'disconnected_nickname \u263b',
|
||||
u'version': u'1.0',
|
||||
},
|
||||
|
@ -221,22 +221,19 @@ class Root(MultiFormatPage):
|
||||
|
||||
|
||||
def _describe_server(self, server):
|
||||
status = server.get_connection_status()
|
||||
description = {
|
||||
u"nodeid": server.get_serverid(),
|
||||
u"connection_status": server.get_connection_status().summary,
|
||||
u"connection_status": status.summary,
|
||||
u"available_space": server.get_available_space(),
|
||||
u"nickname": server.get_nickname(),
|
||||
u"version": None,
|
||||
u"last_received_data": None,
|
||||
u"last_received_data": status.last_received_time,
|
||||
}
|
||||
version = server.get_version()
|
||||
if version is not None:
|
||||
description[u"version"] = version["application-version"]
|
||||
|
||||
rref = server.rref
|
||||
if rref is not None:
|
||||
description[u"last_received_data"] = rref.getDataLastReceivedAt()
|
||||
|
||||
return description
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user