From 0d1269264a6044afe2ece2d5ec80ce5b12ce28ac Mon Sep 17 00:00:00 2001 From: Sajith Sasidharan Date: Thu, 4 Jun 2020 19:14:34 -0400 Subject: [PATCH] Stringify numbers in DeepCheckResultsRenderer --- src/allmydata/web/check_results.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/allmydata/web/check_results.py b/src/allmydata/web/check_results.py index 4339e5e30..757326bf7 100644 --- a/src/allmydata/web/check_results.py +++ b/src/allmydata/web/check_results.py @@ -477,29 +477,31 @@ class DeepCheckResultsRendererElement(Element, ResultsBase, ReloadMixin): super(DeepCheckResultsRendererElement, self).__init__() self.monitor = monitor + # TODO: Add a helper to query monitor.get_status.get_counters() + @renderer def root_storage_index(self, req, tag): return self.monitor.get_status().get_root_storage_index_string() @renderer def objects_checked(self, req, tag): - return self.monitor.get_status().get_counters()["count-objects-checked"] + return str(self.monitor.get_status().get_counters()["count-objects-checked"]) @renderer def objects_healthy(self, req, tag): - return self.monitor.get_status().get_counters()["count-objects-healthy"] + return str(self.monitor.get_status().get_counters()["count-objects-healthy"]) @renderer def objects_unhealthy(self, req, tag): - return self.monitor.get_status().get_counters()["count-objects-unhealthy"] + return str(self.monitor.get_status().get_counters()["count-objects-unhealthy"]) @renderer def objects_unrecoverable(self, req, tag): - return self.monitor.get_status().get_counters()["count-objects-unrecoverable"] + return str(self.monitor.get_status().get_counters()["count-objects-unrecoverable"]) @renderer def count_corrupt_shares(self, req, tag): - return self.monitor.get_status().get_counters()["count-corrupt-shares"] + return str(self.monitor.get_status().get_counters()["count-corrupt-shares"]) @renderer def problems_p(self, req, tag):