llvmbot monitor: Link to in progress builds
If we're going to put "Yes" in the column, save the step
of going to the builder and clicking on the latest build.
Change-Id: I0e5a0024a2d73279a0590f4a290aaea73cd7d943
diff --git a/monitor/bot-status.py b/monitor/bot-status.py
index f19ce39..16b63c1 100755
--- a/monitor/bot-status.py
+++ b/monitor/bot-status.py
@@ -95,7 +95,9 @@
"time_since": timedelta(seconds=time_since),
"duration": timedelta(seconds=duration),
"fail": build["state_string"] != "build successful",
- "next_in_progress": next_build is not None,
+ "next_in_progress": None
+ if next_build is None
+ else "{}/builds/{}".format(agent_url, next_build["number"]),
}
if status["fail"]:
@@ -290,8 +292,11 @@
next_in_progress_cell = row.AddCell()
if "next_in_progress" in status:
+ next_build = status["next_in_progress"]
next_in_progress_cell.Content(
- "Yes" if status["next_in_progress"] else "No"
+ "No"
+ if next_build is None
+ else "<a href='{}'>Yes</a>".format(next_build)
)
first_fail_cell = row.AddCell()