Link dashboard title to a url version of itself

When using a stable project dashboard URL, the url
obfuscates the content of the dashboard which can make
it hard to debug a dashboard or copy and modify it.  In
the special case of stable dashboards, make the title a
link to an unstable url version of the dashboard with the
url reflecting the actual dashboard contents the way a
custom dashboard does.

Change-Id: I7916bdd8767b5f0854e4b0e1a05ff8eb3bfc3a16
This commit is contained in:
Martin Fick
2012-11-21 15:25:49 -07:00
parent a2fc148f55
commit 3decc025e9
4 changed files with 25 additions and 3 deletions

View File

@@ -69,6 +69,10 @@ public class PageLinks {
return toChangeQuery(op("owner", fullname) + " " + status(status), TOP);
}
public static String toCustomDashboard(final String params) {
return "/dashboard/?" + params;
}
public static String toProjectDashboards(Project.NameKey proj) {
return ADMIN_PROJECTS + proj.get() + ",dashboards";
}