diff options
author | Florian Klink <flokli@flokli.de> | 2019-11-25T17·22+0100 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2019-11-25T17·26+0100 |
commit | b0f08a99ee95e742c891fb7eaba7b104f79d3891 (patch) | |
tree | 98d15f70ede395ef7beb03ac0abcc3f2ce4d7510 | |
parent | b65f56c6e2469ef23ea8bdd8534048fa382c9670 (diff) |
frontend: expose the currentlyRunning value
-rw-r--r-- | frontend/frontend.go | 4 | ||||
-rw-r--r-- | public/submit-queue.tmpl.html | 14 |
2 files changed, 13 insertions, 5 deletions
diff --git a/frontend/frontend.go b/frontend/frontend.go index 9c866aafe4da..ff7ace835bb8 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 33e8ef1bb64e..d53614bc7106 100644 --- a/public/submit-queue.tmpl.html +++ b/public/submit-queue.tmpl.html @@ -42,11 +42,17 @@ </tr> <tr> <th scope="row">HEAD:</th> - <td>{{ .HEAD }}</td> + <td><code>{{ .HEAD }}</code></td> </tr> <tr> - <th scope="row">Last Update:</th> - <td>TODO</td> + <th scope="row">Currently running:</th> + <td> + {{ if .currentlyRunning }} + started at {{ .currentlyRunning.Format "Jan 02, 2006 15:04:05 UTC" }} + {{ else }} + <span class="text-secondary">Not currently running</span> + {{ end }} + </td> </tr> </tbody> </table> @@ -86,7 +92,7 @@ </tbody> </table> - <h2 id="region-log">Log goes here</h2> + <h2 id="region-log">History</h2> </div> </body> </html> |