From ef2db561040e392af71a51727bb7eff23d7b9b93 Mon Sep 17 00:00:00 2001
From: Brian Warner <warner@lothar.com>
Date: Tue, 12 Jun 2012 14:37:27 -0700
Subject: [PATCH] introweb: the Subscribed Clients list shows tubids, not
 serverids

Improve the column headers to make it clear that this list shows Tub
IDs. (we can't show pubkey-based serverids because clients don't give
those to us: only servers provide pubkeys). This should be the only
place in the whole webapi that shows TubIDs for modern (V2-introducer)
nodes.
---
 src/allmydata/web/introducer.xhtml | 6 +++---
 src/allmydata/web/introweb.py      | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/allmydata/web/introducer.xhtml b/src/allmydata/web/introducer.xhtml
index 06709864..6738a290 100644
--- a/src/allmydata/web/introducer.xhtml
+++ b/src/allmydata/web/introducer.xhtml
@@ -55,7 +55,7 @@
   <tr n:pattern="header">
     <th class="nickname-and-peerid">
       <div class="service-nickname">Nickname</div>
-      <div class="nodeid data-chars">PeerID</div></th>
+      <div class="nodeid data-chars">Tub ID</div></th>
     <th>Advertised IPs</th>
     <th>Connected From</th>
     <th>Since</th>
@@ -65,14 +65,14 @@
   <tr n:pattern="item" n:render="subscriber_row">
     <td class="nickname-and-peerid">
       <div class="nickname"><n:slot name="nickname"/></div>
-      <div class="nodeid data-chars"><n:slot name="peerid"/></div></td>
+      <div class="nodeid data-chars"><n:slot name="tubid"/></div></td>
     <td><n:slot name="advertised"/></td>
     <td><n:slot name="connected"/></td>
     <td class="service-since"><n:slot name="since"/></td>
     <td class="service-version"><n:slot name="version"/></td>
     <td class="service-service-name"><n:slot name="service_name"/></td>
   </tr>
-  <tr n:pattern="empty"><td>no peers!</td></tr>
+  <tr n:pattern="empty"><td>no subscribers!</td></tr>
 </table>
 </div>
 
diff --git a/src/allmydata/web/introweb.py b/src/allmydata/web/introweb.py
index 0fc45633..843fd0e0 100644
--- a/src/allmydata/web/introweb.py
+++ b/src/allmydata/web/introweb.py
@@ -115,7 +115,7 @@ class IntroducerRoot(rend.Page):
 
     def render_subscriber_row(self, ctx, s):
         ctx.fillSlots("nickname", s.nickname)
-        ctx.fillSlots("peerid", s.tubid)
+        ctx.fillSlots("tubid", s.tubid)
         ctx.fillSlots("advertised", " ".join(s.advertised_addresses))
         ctx.fillSlots("connected", s.remote_address)
         since_s = time.strftime("%H:%M:%S %d-%b-%Y", time.localtime(s.when))
-- 
2.45.2