From 52a20ba400d467dc0d53ce984fcdb007afd9aea1 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 22 Mar 2019 18:38:28 +0100 Subject: dashboard/app: properly handle build failures Separate kernel and syzkaller build failures. Fix logic to understand when a build is fixed: look if kernel/syzkaller commit changes to understand if it's a new good build or re-upload of an old build. Fixes #1014 --- pkg/html/html.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pkg/html/html.go') diff --git a/pkg/html/html.go b/pkg/html/html.go index c023437bb..9a43b0dba 100644 --- a/pkg/html/html.go +++ b/pkg/html/html.go @@ -40,6 +40,7 @@ var Funcs = template.FuncMap{ "link": link, "optlink": optlink, "formatTime": FormatTime, + "formatDate": FormatDate, "formatKernelTime": formatKernelTime, "formatClock": formatClock, "formatDuration": formatDuration, @@ -74,6 +75,13 @@ func FormatTime(t time.Time) string { return t.Format("2006/01/02 15:04") } +func FormatDate(t time.Time) string { + if t.IsZero() { + return "" + } + return t.Format("2006/01/02") +} + func formatKernelTime(t time.Time) string { if t.IsZero() { return "" -- cgit mrf-deployment