MCPcopy Index your code
hub / github.com/HelloZeroNet/ZeroNet / formatTableRow

Method formatTableRow

plugins/Stats/StatsPlugin.py:17–30  ·  view source on GitHub ↗
(self, row, class_name="")

Source from the content-addressed store, hash-verified

15class UiRequestPlugin(object):
16
17 def formatTableRow(self, row, class_name=""):
18 back = []
19 for format, val in row:
20 if val is None:
21 formatted = "n/a"
22 elif format == "since":
23 if val:
24 formatted = "%.0f" % (time.time() - val)
25 else:
26 formatted = "n/a"
27 else:
28 formatted = format % val
29 back.append("<td>%s</td>" % formatted)
30 return "<tr class='%s'>%s</tr>" % (class_name, "".join(back))
31
32 def getObjSize(self, obj, hpy=None):
33 if hpy:

Callers 1

actionStatsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected