perf: link benchmark titles
For golang/go#48803.
Change-Id: I678a2dc5e668179d0fbaf4401aa810ad930c7933
Reviewed-on: https://go-review.googlesource.com/c/build/+/413421
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
diff --git a/perf/app/dashboard/index.html b/perf/app/dashboard/index.html
index 0dee6b7..7f1c324 100644
--- a/perf/app/dashboard/index.html
+++ b/perf/app/dashboard/index.html
@@ -66,9 +66,13 @@
if (bench.Name != prevName) {
prevName = bench.Name;
+ let link = document.createElement("a");
+ link.href = "?benchmark=" + bench.Name;
+ link.innerHTML = bench.Name;
+
let title = document.createElement("h2");
title.classList.add("Dashboard-title");
- title.innerHTML = bench.Name;
+ title.appendChild(link);
dashboard.appendChild(title);
grid = document.createElement("grid");
diff --git a/perf/app/dashboard/static/style.css b/perf/app/dashboard/static/style.css
index 935823d..14d9d9b 100644
--- a/perf/app/dashboard/static/style.css
+++ b/perf/app/dashboard/static/style.css
@@ -31,15 +31,9 @@
h1 > a,
h2 > a {
- display: none;
text-decoration: none;
}
-h1:hover > a,
-h2:hover > a {
- display: inline;
-}
-
h1 > a:hover,
h2 > a:hover {
text-decoration: underline;
@@ -60,9 +54,6 @@
margin-right: 20px;
padding-top: 5px;
}
-header h1 a {
- display: initial;
-}
nav {
display: inline-block;
}