From 4040b1000b7b5976143c23b8e40e033d7b7732ee Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Sun, 7 Feb 2010 16:20:10 -0800 Subject: [PATCH] web/storage.py: display total-seen on the last-complete-cycle line. For #940. --- src/allmydata/test/test_storage.py | 6 ++++-- src/allmydata/web/storage.py | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) 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, " -- 2.45.2