web/storage.py: display total-seen on the last-complete-cycle line. For #940.

This commit is contained in:
Brian Warner 2010-02-07 16:20:10 -08:00
parent 880f824103
commit 4040b1000b
2 changed files with 7 additions and 2 deletions

View File

@ -1742,8 +1742,10 @@ class LeaseCrawler(unittest.TestCase, pollmixin.PollMixin, WebRenderingMixin):
def _check_html(html):
s = remove_tags(html)
self.failUnlessIn("recovered: 0 shares, 0 buckets "
"(0 mutable / 0 immutable), 0 B (0 B / 0 B) "
"but expiration was not enabled", s)
"(0 mutable / 0 immutable), 0 B (0 B / 0 B) ", s)
self.failUnlessIn("and saw a total of 4 shares, 4 buckets "
"(2 mutable / 2 immutable),", s)
self.failUnlessIn("but expiration was not enabled", s)
d.addCallback(_check_html)
d.addCallback(lambda ign: self.render_json(webstatus))
def _check_json(json):

View File

@ -245,6 +245,9 @@ class StorageStatus(rend.Page):
def add(*pieces):
p[T.li[pieces]]
saw = self.format_recovered(last["space-recovered"], "examined")
add("and saw a total of ", saw)
if not last["expiration-enabled"]:
rec = self.format_recovered(last["space-recovered"], "configured")
add("but expiration was not enabled. If it had been, "