Changeset ade7f61 in trunk
- Timestamp:
- 2020-05-01T21:07:08Z (5 years ago)
- Branches:
- master
- Children:
- 7b4d81f
- Parents:
- df188c7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/allmydata/web/root.py ¶
rdf188c7 rade7f61 384 384 return self._client.introducer_connection_statuses() 385 385 386 def _render_connection_status(self, tag, cs):387 connected = "yes" if cs.connected else "no"388 tag.fillSlots(service_connection_status=connected)389 tag.fillSlots(service_connection_status_alt=390 self._connectedalts[connected])391 392 since = cs.last_connection_time393 tag.fillSlots(service_connection_status_rel_time=394 render_time_delta(since, self._now_fn())395 if since is not None396 else "N/A")397 tag.fillSlots(service_connection_status_abs_time=398 render_time_attr(since)399 if since is not None400 else "N/A")401 402 last_received_data_time = cs.last_received_time403 tag.fillSlots(last_received_data_abs_time=404 render_time_attr(last_received_data_time)405 if last_received_data_time is not None406 else "N/A")407 tag.fillSlots(last_received_data_rel_time=408 render_time_delta(last_received_data_time,409 self._now_fn())410 if last_received_data_time is not None411 else "N/A")412 413 others = cs.non_connected_statuses414 if cs.connected:415 tag.fillSlots(summary=cs.summary)416 if others:417 details = "\n".join(["* %s: %s\n" % (which, others[which])418 for which in sorted(others)])419 tag.fillSlots(details="Other hints:\n" + details)420 else:421 tag.fillSlots(details="(no other hints)")422 else:423 details = tags.ul()424 for which in sorted(others):425 details(tags.li("%s: %s" % (which, others[which])))426 tag.fillSlots(summary=[cs.summary, details])427 tag.fillSlots(details="")428 429 386 @renderer 430 387 def helper_furl_prefix(self, req, tag):
Note: See TracChangeset
for help on using the changeset viewer.