Use SlotsSequenceElement correctly

This commit is contained in:
Sajith Sasidharan 2020-07-15 13:24:20 -04:00
parent 1ed722494c
commit ddfe20c8ab
2 changed files with 10 additions and 6 deletions

View File

@ -502,9 +502,9 @@ class DeepCheckResultsRendererElement(Element, ResultsBase, ReloadMixin):
summary_text = ": " + summary
summary_text += " [SI: %s]" % cr.get_storage_index_string()
problems.append({
# TODO: result of _join_pathstring() seems to be
# weird. Might as well use "path" as the key here?
self._join_pathstring(path): self._html(summary_text)
# Not sure self._join_pathstring(path) is the
# right thing to use here.
"problem": self._html(path) + self._html(summary_text),
})
return SlotsSequenceElement(tag, problems)
@ -529,7 +529,7 @@ class DeepCheckResultsRendererElement(Element, ResultsBase, ReloadMixin):
nickname = server.get_nickname()
if nickname:
name.append(" (%s)" % self._html(nickname))
problems.append(name)
problems.append({"problem": name})
return SlotsSequenceElement(tag, problems)

View File

@ -25,7 +25,9 @@
<h2>Files/Directories That Had Problems:</h2>
<ul t:render="problems">
<li t:render="item" />
<li t:render="item">
<t:slot name="problem" />
</li>
<li t:render="empty">None</li>
</ul>
</div>
@ -34,7 +36,9 @@
<div t:render="servers_with_corrupt_shares_p">
<h2>Servers on which corrupt shares were found</h2>
<ul t:render="servers_with_corrupt_shares">
<li t:render="item"/>
<li t:render="item">
<t:slot name="problem" />
</li>
<li t:render="empty">None</li>
</ul>
</div>