]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
web: remove some uses of s.get_serverid(), not all
authorBrian Warner <warner@lothar.com>
Sun, 27 Feb 2011 02:11:59 +0000 (19:11 -0700)
committerBrian Warner <warner@lothar.com>
Sun, 27 Feb 2011 02:11:59 +0000 (19:11 -0700)
src/allmydata/web/check_results.py
src/allmydata/web/root.py

index 44d050623073dba2b7d8631a457bf30812327478..79857667a9a41a0c3fcc3a2d7c70f78664541c8e 100644 (file)
@@ -139,19 +139,19 @@ class ResultsBase:
 
         # this table is sorted by permuted order
         sb = c.get_storage_broker()
-        permuted_peer_ids = [s.get_serverid()
-                             for s
-                             in sb.get_servers_for_psi(cr.get_storage_index())]
+        permuted_servers = [s
+                            for s
+                            in sb.get_servers_for_psi(cr.get_storage_index())]
 
         num_shares_left = sum([len(shares) for shares in servers.values()])
         servermap = []
-        for serverid in permuted_peer_ids:
-            nickname = sb.get_nickname_for_serverid(serverid)
-            shareids = servers.get(serverid, [])
+        for s in permuted_servers:
+            nickname = s.get_nickname()
+            shareids = servers.get(s.get_serverid(), [])
             shareids.reverse()
             shareids_s = [ T.tt[shareid, " "] for shareid in sorted(shareids) ]
             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],
                                   ])
             num_shares_left -= len(shareids)
index 2f1f6d4fbf7d3a4ef63da12a312be168b8517a47..fc17dc3a8791de23b6feff7bd7124187c0f2f9db 100644 (file)
@@ -256,7 +256,7 @@ class Root(rend.Page):
     def render_service_row(self, ctx, server):
         nodeid = server.get_serverid()
 
-        ctx.fillSlots("peerid", idlib.nodeid_b2a(nodeid))
+        ctx.fillSlots("peerid", server.longname())
         ctx.fillSlots("nickname", server.get_nickname())
         rhost = server.get_remote_host()
         if rhost: