Commit 94cd2b42 authored by ale's avatar ale
Browse files

Fix probe error details page

parent a4dae1a9
Pipeline #5807 passed with stages
in 1 minute and 54 seconds
......@@ -60,7 +60,7 @@ def probe_detail(probe_name):
def probe_error(probe_ts, probe_name):
result = app.results.get_error(probe_name, probe_ts)
result = app.results.get_error(probe_name, int(probe_ts))
if not result:
return render_template(
......@@ -58,7 +58,7 @@ class Probe(object):
if has_prometheus:
1 if result['status'] == 'ok' else 0)
results.add(, end_timestamp, result)
results.add(, int(end_timestamp), result)
def parameterize(probe, attr, values):
......@@ -21,3 +21,13 @@ class AppTest(unittest.TestCase):
self.assertEquals(200, resp.status_code)
self.assertTrue(b'ok' in
self.assertTrue(b'err' in
def test_detail(self):
resp = self.c.get('/detail/ok')
self.assertEquals(200, resp.status_code)
def test_errdetail(self):
# Find the 'err' probe result timestamp to build the URL.
err_ts =['err']['timestamp']
resp = self.c.get('/errdetail/%d/err' % err_ts)
self.assertEquals(200, resp.status_code)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment