mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-01 18:56:41 +00:00
web: remove some uses of s.get_serverid(), not all
This commit is contained in:
parent
3834192455
commit
73a54f83d1
@ -139,19 +139,19 @@ class ResultsBase:
|
|||||||
|
|
||||||
# this table is sorted by permuted order
|
# this table is sorted by permuted order
|
||||||
sb = c.get_storage_broker()
|
sb = c.get_storage_broker()
|
||||||
permuted_peer_ids = [s.get_serverid()
|
permuted_servers = [s
|
||||||
for s
|
for s
|
||||||
in sb.get_servers_for_psi(cr.get_storage_index())]
|
in sb.get_servers_for_psi(cr.get_storage_index())]
|
||||||
|
|
||||||
num_shares_left = sum([len(shares) for shares in servers.values()])
|
num_shares_left = sum([len(shares) for shares in servers.values()])
|
||||||
servermap = []
|
servermap = []
|
||||||
for serverid in permuted_peer_ids:
|
for s in permuted_servers:
|
||||||
nickname = sb.get_nickname_for_serverid(serverid)
|
nickname = s.get_nickname()
|
||||||
shareids = servers.get(serverid, [])
|
shareids = servers.get(s.get_serverid(), [])
|
||||||
shareids.reverse()
|
shareids.reverse()
|
||||||
shareids_s = [ T.tt[shareid, " "] for shareid in sorted(shareids) ]
|
shareids_s = [ T.tt[shareid, " "] for shareid in sorted(shareids) ]
|
||||||
servermap.append(T.tr[T.td[T.div(class_="nickname")[nickname],
|
servermap.append(T.tr[T.td[T.div(class_="nickname")[nickname],
|
||||||
T.div(class_="nodeid")[T.tt[base32.b2a(serverid)]]],
|
T.div(class_="nodeid")[T.tt[s.name()]]],
|
||||||
T.td[shareids_s],
|
T.td[shareids_s],
|
||||||
])
|
])
|
||||||
num_shares_left -= len(shareids)
|
num_shares_left -= len(shareids)
|
||||||
|
@ -256,7 +256,7 @@ class Root(rend.Page):
|
|||||||
def render_service_row(self, ctx, server):
|
def render_service_row(self, ctx, server):
|
||||||
nodeid = server.get_serverid()
|
nodeid = server.get_serverid()
|
||||||
|
|
||||||
ctx.fillSlots("peerid", idlib.nodeid_b2a(nodeid))
|
ctx.fillSlots("peerid", server.longname())
|
||||||
ctx.fillSlots("nickname", server.get_nickname())
|
ctx.fillSlots("nickname", server.get_nickname())
|
||||||
rhost = server.get_remote_host()
|
rhost = server.get_remote_host()
|
||||||
if rhost:
|
if rhost:
|
||||||
|
Loading…
Reference in New Issue
Block a user