Stringify numbers in DeepCheckResultsRenderer

This commit is contained in:
Sajith Sasidharan 2020-06-04 19:14:34 -04:00
parent 7237fef630
commit 0d1269264a

View File

@ -477,29 +477,31 @@ class DeepCheckResultsRendererElement(Element, ResultsBase, ReloadMixin):
super(DeepCheckResultsRendererElement, self).__init__() super(DeepCheckResultsRendererElement, self).__init__()
self.monitor = monitor self.monitor = monitor
# TODO: Add a helper to query monitor.get_status.get_counters()
@renderer @renderer
def root_storage_index(self, req, tag): def root_storage_index(self, req, tag):
return self.monitor.get_status().get_root_storage_index_string() return self.monitor.get_status().get_root_storage_index_string()
@renderer @renderer
def objects_checked(self, req, tag): 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 @renderer
def objects_healthy(self, req, tag): 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 @renderer
def objects_unhealthy(self, req, tag): 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 @renderer
def objects_unrecoverable(self, req, tag): 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 @renderer
def count_corrupt_shares(self, req, tag): 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 @renderer
def problems_p(self, req, tag): def problems_p(self, req, tag):