From: Brian Warner Date: Mon, 8 Feb 2010 00:20:10 +0000 (-0800) Subject: web/storage.py: display total-seen on the last-complete-cycle line. For #940. X-Git-Url: https://git.rkrishnan.org/install.html?a=commitdiff_plain;h=4040b1000b7b5976143c23b8e40e033d7b7732ee;p=tahoe-lafs%2Ftahoe-lafs.git web/storage.py: display total-seen on the last-complete-cycle line. For #940. --- diff --git a/src/allmydata/test/test_storage.py b/src/allmydata/test/test_storage.py index a1a9f7ab..8807e217 100644 --- a/src/allmydata/test/test_storage.py +++ b/src/allmydata/test/test_storage.py @@ -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): diff --git a/src/allmydata/web/storage.py b/src/allmydata/web/storage.py index 1943d00f..f224c289 100644 --- a/src/allmydata/web/storage.py +++ b/src/allmydata/web/storage.py @@ -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, "