mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-25 23:51:07 +00:00
Use SlotsSequenceElement to render post-repair problems
This commit is contained in:
parent
f168dcd19c
commit
e0c686bb92
@ -777,16 +777,20 @@ class DeepCheckAndRepairResultsRendererElement(Element, ResultsBase, ReloadMixin
|
|||||||
return tag
|
return tag
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
# TODO: use SlotsSequenceElement
|
|
||||||
@renderer
|
@renderer
|
||||||
def post_repair_problems(self, req, tag):
|
def post_repair_problems(self, req, tag):
|
||||||
all_objects = self.monitor.get_status().get_all_results()
|
all_objects = self.monitor.get_status().get_all_results()
|
||||||
|
problems = []
|
||||||
|
|
||||||
for path in sorted(all_objects.keys()):
|
for path in sorted(all_objects.keys()):
|
||||||
r = all_objects[path]
|
r = all_objects[path]
|
||||||
assert ICheckAndRepairResults.providedBy(r)
|
assert ICheckAndRepairResults.providedBy(r)
|
||||||
cr = r.get_post_repair_results()
|
cr = r.get_post_repair_results()
|
||||||
if not cr.is_healthy():
|
if not cr.is_healthy():
|
||||||
yield path, cr
|
problem = self._join_pathstring(path), ": ", self._html(cr.get_summary())
|
||||||
|
problems.append(problem)
|
||||||
|
|
||||||
|
return SlotsSequenceElement(tag, problems)
|
||||||
|
|
||||||
@renderer
|
@renderer
|
||||||
def servers_with_corrupt_shares_p(self, req, tag):
|
def servers_with_corrupt_shares_p(self, req, tag):
|
||||||
|
@ -44,8 +44,8 @@
|
|||||||
<div t:render="post_repair_problems_p">
|
<div t:render="post_repair_problems_p">
|
||||||
<h2>Files/Directories That Still Have Problems:</h2>
|
<h2>Files/Directories That Still Have Problems:</h2>
|
||||||
<ul t:render="post_repair_problems">
|
<ul t:render="post_repair_problems">
|
||||||
<li t:pattern="item" t:render="problem"/>
|
<li t:render="item"/>
|
||||||
<li t:pattern="empty">None</li>
|
<li t:render="empty">None</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user