From db7e822dda56d32135eca6d3e3211a50cf93d31a Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Thu, 16 Jun 2022 22:09:39 +0200 Subject: feat: Add one more state Add a new state to the worker so it can better report what is happening. Also added a status report in the index page. --- controller/controller.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'controller') diff --git a/controller/controller.go b/controller/controller.go index 3e029f0..7cbee6a 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -49,3 +49,8 @@ func (e *Env) DeleteEntry(c *gin.Context) { e.Entries.Delete(id) c.HTML(http.StatusOK, "entry", entry) } + +func (e *Env) GetJobs(c *gin.Context) { + jobs := e.Worker.GetJobs() + c.JSON(http.StatusOK, jobs) +} -- cgit v1.2.3