From 691b055ea6021b671bca699146fc7442207bde0a Mon Sep 17 00:00:00 2001 From: Chris Manghane Date: Wed, 2 Oct 2013 15:55:44 -0700 Subject: [PATCH] go.tools/dashboard: Make sure links to commits and logs are dashboard specific. R=adg CC=golang-dev https://golang.org/cl/14297043 --- dashboard/app/app.yaml | 2 +- dashboard/app/build/ui.go | 5 ++++- dashboard/app/build/ui.html | 10 +++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/dashboard/app/app.yaml b/dashboard/app/app.yaml index 3fc87bd9..389aa901 100644 --- a/dashboard/app/app.yaml +++ b/dashboard/app/app.yaml @@ -11,7 +11,7 @@ api_version: go1 handlers: - url: /static static_dir: static -- url: /log/.+ +- url: /(|gccgo/)log/.+ script: _go_app - url: /(|gccgo/)(|commit|packages|result|tag|todo) script: _go_app diff --git a/dashboard/app/build/ui.go b/dashboard/app/build/ui.go index b47f0ed4..65762e60 100644 --- a/dashboard/app/build/ui.go +++ b/dashboard/app/build/ui.go @@ -306,8 +306,11 @@ func shortUser(user string) string { var repoRe = regexp.MustCompile(`^code\.google\.com/p/([a-z0-9\-]+)(\.[a-z0-9\-]+)?$`) // repoURL returns the URL of a change at a Google Code repository or subrepo. -func repoURL(hash, packagePath string) (string, error) { +func repoURL(dashboard, hash, packagePath string) (string, error) { if packagePath == "" { + if dashboard == "Gccgo" { + return "https://code.google.com/p/gofrontend/source/detail?r=" + hash, nil + } return "https://code.google.com/p/go/source/detail?r=" + hash, nil } m := repoRe.FindStringSubmatch(packagePath) diff --git a/dashboard/app/build/ui.html b/dashboard/app/build/ui.html index dc274982..f9476398 100644 --- a/dashboard/app/build/ui.html +++ b/dashboard/app/build/ui.html @@ -107,14 +107,14 @@ {{range $c := $.Commits}} - {{shortHash .Hash}} + {{shortHash .Hash}} {{range $.Builders}} {{with $c.Result . ""}} {{if .OK}} ok {{else}} - fail + fail {{end}} {{else}}   @@ -145,7 +145,7 @@ {{if .Packages}}

Sub-repositories at tip - ({{shortHash .Tag.Hash}}) + ({{shortHash .Tag.Hash}})

@@ -185,7 +185,7 @@ {{range $.Builders}}
{{.Package.Name}} {{$h := $pkg.Commit.Hash}} - {{shortHash $h}} + {{shortHash $h}} @@ -193,7 +193,7 @@ {{if .OK}} ok {{else}} - fail + fail {{end}} {{else}}