[tahoe-dev] What generates the content of the WUI page?
Brian Warner
warner at lothar.com
Wed Feb 9 11:35:30 PST 2011
On 2/9/11 10:01 AM, Jody Harris wrote:
> I would like to change the order of the "known storage servers" on the
> WUI on my nodes. Rather than having them sorted by the PeerID, I would
> like to have them sorted by the Nickname. Can someone point me to the
> actual file were the code for that is?
Sure. The HTML template is in src/allmydata/web/welcome.xhtml, where the
<table> on line 59 uses n:data="services" to reference
Root.data_services() in src/allmydata/web.py (around line 252). You'll
want to sort the response of sb.get_all_descriptors() before returning
it from data_services(). Look in render_service_row() to see how to
extract data from each descriptor, you probably want something like:
return sorted(sb.get_all_descriptors(), key=lambda d: d.get_nickname())
cheers,
-Brian
More information about the tahoe-dev
mailing list