import simplejson
from allmydata import get_package_versions_string
from allmydata.util import idlib
-from allmydata.web.common import getxmlfile, get_arg
+from allmydata.web.common import getxmlfile, get_arg, TIME_FORMAT
+
class IntroducerRoot(rend.Page):
return simplejson.dumps(res, indent=1) + "\n"
# FIXME: This code is duplicated in root.py and introweb.py.
+ def data_rendered_at(self, ctx, data):
+ return time.strftime(TIME_FORMAT, time.localtime())
def data_version(self, ctx, data):
return get_package_versions_string()
def data_import_path(self, ctx, data):
def render_subscriber_row(self, ctx, s):
ctx.fillSlots("nickname", s.nickname)
- ctx.fillSlots("peerid", s.tubid)
- ctx.fillSlots("advertised", " ".join(s.advertised_addresses))
+ ctx.fillSlots("tubid", s.tubid)
ctx.fillSlots("connected", s.remote_address)
since_s = time.strftime("%H:%M:%S %d-%b-%Y", time.localtime(s.when))
ctx.fillSlots("since", since_s)