frontend: expose the currentlyRunning value
This commit is contained in:
parent
b65f56c6e2
commit
b0f08a99ee
2 changed files with 13 additions and 5 deletions
|
@ -45,7 +45,7 @@ func MakeFrontend(runner *submitqueue.Runner) http.Handler {
|
||||||
})
|
})
|
||||||
|
|
||||||
router.GET("/", func(c *gin.Context) {
|
router.GET("/", func(c *gin.Context) {
|
||||||
submitQueue, _, _ := runner.GetState()
|
submitQueue, currentlyRunning, results := runner.GetState()
|
||||||
|
|
||||||
funcMap := template.FuncMap{
|
funcMap := template.FuncMap{
|
||||||
"isAutoSubmittable": func(serie *submitqueue.Serie) bool {
|
"isAutoSubmittable": func(serie *submitqueue.Serie) bool {
|
||||||
|
@ -63,6 +63,8 @@ func MakeFrontend(runner *submitqueue.Runner) http.Handler {
|
||||||
"projectName": submitQueue.ProjectName,
|
"projectName": submitQueue.ProjectName,
|
||||||
"branchName": submitQueue.BranchName,
|
"branchName": submitQueue.BranchName,
|
||||||
"HEAD": submitQueue.HEAD,
|
"HEAD": submitQueue.HEAD,
|
||||||
|
"currentlyRunning": currentlyRunning,
|
||||||
|
"results": results,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
return router
|
return router
|
||||||
|
|
|
@ -42,11 +42,17 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">HEAD:</th>
|
<th scope="row">HEAD:</th>
|
||||||
<td>{{ .HEAD }}</td>
|
<td><code>{{ .HEAD }}</code></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Last Update:</th>
|
<th scope="row">Currently running:</th>
|
||||||
<td>TODO</td>
|
<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>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -86,7 +92,7 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2 id="region-log">Log goes here</h2>
|
<h2 id="region-log">History</h2>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue