aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/html
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-02-14 10:35:03 +0100
committerDmitry Vyukov <dvyukov@google.com>2019-02-17 15:08:45 +0100
commit3e98cc30803fb5e41504dd08b1325cb074a8a3f2 (patch)
tree5f0a7a4702bedbb9706c158e09e4be1875894625 /pkg/html
parentf42dee6d5e501a061cdbb807672361369bf28492 (diff)
dashboard/app: poll commits info
This implements 2 features: - syz-ci polls a set of additional repos to discover fixing commits sooner (e.g. it can now discover a fixing commit in netfilter tree before it reaches any of the tested trees). - syz-ci uploads info about commits to dashboard. For example, a user marks a bug as fixed by commit "foo: bar". syz-ci will find this commit in the main namespace repo and upload commmit hash/date/author to dashboard. This in turn allows to show links to fixing commits. Fixes #691 Fixes #610
Diffstat (limited to 'pkg/html')
-rw-r--r--pkg/html/generated.go13
-rw-r--r--pkg/html/html.go9
2 files changed, 20 insertions, 2 deletions
diff --git a/pkg/html/generated.go b/pkg/html/generated.go
index 644cbddd9..732ed507a 100644
--- a/pkg/html/generated.go
+++ b/pkg/html/generated.go
@@ -80,6 +80,11 @@ table td, table th {
max-width: 350pt;
}
+.list_table .commit_list {
+ width: 500pt;
+ max-width: 500pt;
+}
+
.list_table .tag {
font-family: monospace;
font-size: 8pt;
@@ -104,8 +109,8 @@ table td, table th {
}
.list_table .kernel {
- width: 60pt;
- max-width: 60pt;
+ width: 80pt;
+ max-width: 80pt;
}
.list_table .maintainers {
@@ -154,6 +159,10 @@ textarea {
width:100%;
font-family: monospace;
}
+
+.mono {
+ font-family: monospace;
+}
`
const js = `
// Copyright 2018 syzkaller project authors. All rights reserved.
diff --git a/pkg/html/html.go b/pkg/html/html.go
index c7f85da88..e985ae977 100644
--- a/pkg/html/html.go
+++ b/pkg/html/html.go
@@ -32,6 +32,7 @@ func CreateGlob(glob string) *template.Template {
}
var funcs = template.FuncMap{
+ "link": link,
"formatTime": FormatTime,
"formatClock": formatClock,
"formatDuration": formatDuration,
@@ -41,6 +42,14 @@ var funcs = template.FuncMap{
"formatShortHash": formatShortHash,
}
+func link(url, text string) template.HTML {
+ text = template.HTMLEscapeString(text)
+ if url != "" {
+ text = fmt.Sprintf(`<a href="%v">%v</a>`, url, text)
+ }
+ return template.HTML(text)
+}
+
func FormatTime(t time.Time) string {
if t.IsZero() {
return ""