From b0f08a99ee95e742c891fb7eaba7b104f79d3891 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 25 Nov 2019 18:22:55 +0100 Subject: [PATCH] frontend: expose the currentlyRunning value --- frontend/frontend.go | 4 +++- public/submit-queue.tmpl.html | 14 ++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/frontend/frontend.go b/frontend/frontend.go index 9c866aafe..ff7ace835 100644 --- a/frontend/frontend.go +++ b/frontend/frontend.go @@ -45,7 +45,7 @@ func MakeFrontend(runner *submitqueue.Runner) http.Handler { }) router.GET("/", func(c *gin.Context) { - submitQueue, _, _ := runner.GetState() + submitQueue, currentlyRunning, results := runner.GetState() funcMap := template.FuncMap{ "isAutoSubmittable": func(serie *submitqueue.Serie) bool { @@ -63,6 +63,8 @@ func MakeFrontend(runner *submitqueue.Runner) http.Handler { "projectName": submitQueue.ProjectName, "branchName": submitQueue.BranchName, "HEAD": submitQueue.HEAD, + "currentlyRunning": currentlyRunning, + "results": results, }) }) return router diff --git a/public/submit-queue.tmpl.html b/public/submit-queue.tmpl.html index 33e8ef1bb..d53614bc7 100644 --- a/public/submit-queue.tmpl.html +++ b/public/submit-queue.tmpl.html @@ -42,11 +42,17 @@ HEAD: - {{ .HEAD }} + {{ .HEAD }} - Last Update: - TODO + Currently running: + + {{ if .currentlyRunning }} + started at {{ .currentlyRunning.Format "Jan 02, 2006 15:04:05 UTC" }} + {{ else }} + Not currently running + {{ end }} + @@ -86,7 +92,7 @@ -

Log goes here

+

History