From 78ab88e7210ca33ea1fcc9e48d5e0447aea31c46 Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Sat, 18 Oct 2014 14:39:02 +0400 Subject: [PATCH] dashboard: fix perf graph view 1. Add missing comma to empty records after addition of Ann column. 2. Fix off-by-one in commit range calculation. Release tags refer to the last commit of the release, so there is no need to subtract 1 from them. TBR=adg R=adg, bradfitz CC=golang-codereviews https://golang.org/cl/157120043 --- dashboard/app/build/perf_graph.go | 4 ++-- dashboard/app/build/perf_graph.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dashboard/app/build/perf_graph.go b/dashboard/app/build/perf_graph.go index ed45ab1845f..81eb5e1621d 100644 --- a/dashboard/app/build/perf_graph.go +++ b/dashboard/app/build/perf_graph.go @@ -71,7 +71,7 @@ func perfGraphHandler(w http.ResponseWriter, r *http.Request) { logErr(w, r, err) return } - startCommitNum = comFrom.Num - 1 + startCommitNum = comFrom.Num retry: if commitTo == "tip" { @@ -87,7 +87,7 @@ func perfGraphHandler(w http.ResponseWriter, r *http.Request) { logErr(w, r, err) return } - endCommitNum = comTo.Num + endCommitNum = comTo.Num + 1 } if endCommitNum <= startCommitNum { // User probably selected from:go1.3 to:go1.2. Fix go1.2 to tip. diff --git a/dashboard/app/build/perf_graph.html b/dashboard/app/build/perf_graph.html index 24efaca9984..da1c0d000d0 100644 --- a/dashboard/app/build/perf_graph.html +++ b/dashboard/app/build/perf_graph.html @@ -29,7 +29,7 @@ {{if .Val}} {{.Val}}, {{.Certainty}}, '{{.Hint}}', '{{.Ann}}', {{else}} - ,,, + ,,,, {{end}} {{end}} ],