mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-24 23:26:43 +00:00
Use SlotsSequenceElement to render deep check results problems
This commit is contained in:
parent
bbd6bde478
commit
c41bca24f5
@ -511,26 +511,24 @@ class DeepCheckResultsRendererElement(Element, ResultsBase, ReloadMixin):
|
||||
return tag
|
||||
return ""
|
||||
|
||||
# TODO: use SlotsSequenceElement to render this.
|
||||
@renderer
|
||||
def problems(self, req, tag):
|
||||
all_objects = self.monitor.get_status().get_all_results()
|
||||
problems = []
|
||||
|
||||
for path in sorted(all_objects.keys()):
|
||||
cr = all_objects[path]
|
||||
assert ICheckResults.providedBy(cr)
|
||||
if not cr.is_healthy():
|
||||
yield path, cr
|
||||
summary_text = ""
|
||||
summary = cr.get_summary()
|
||||
if summary:
|
||||
summary_text = ": " + summary
|
||||
summary_text += " [SI: %s]" % cr.get_storage_index_string()
|
||||
problem = self._join_pathstring(path), ":", self._html(summary_text)
|
||||
problems.append(problem)
|
||||
|
||||
@renderer
|
||||
def render_problem(self, req, tag):
|
||||
# TODO: deal with this.
|
||||
path, cr = data
|
||||
summary_text = ""
|
||||
summary = cr.get_summary()
|
||||
if summary:
|
||||
summary_text = ": " + summary
|
||||
summary_text += " [SI: %s]" % cr.get_storage_index_string()
|
||||
return tag(self._join_pathstring(path), self._html(summary_text))
|
||||
return SlotsSequenceElement(tag, problems)
|
||||
|
||||
@renderer
|
||||
def servers_with_corrupt_shares_p(self, req, tag):
|
||||
|
Loading…
Reference in New Issue
Block a user