From 98861bc6f3561f62525a946405d50e065d8d3922 Mon Sep 17 00:00:00 2001 From: sneak Date: Sat, 4 Apr 2020 18:32:25 -0700 Subject: [PATCH] builds now, not sure if the new handler works or not --- process/handlers.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/process/handlers.go b/process/handlers.go index ffeb8b5..48acf0f 100644 --- a/process/handlers.go +++ b/process/handlers.go @@ -10,6 +10,7 @@ import ( u "git.eeqj.de/sneak/goutil" "github.com/flosch/pongo2" "github.com/gin-gonic/gin" + "github.com/google/uuid" "github.com/labstack/echo" ) @@ -94,10 +95,12 @@ func (a *Server) instanceHandler(c echo.Context) error { return c.String(http.StatusNotFound, "404 not found") } - - i := a.feta.manager.ListInstances() { - tc := pongo2.Context{ - "instance": i, + tc := pongo2.Context{} + instances := a.feta.manager.ListInstances() + for _, item := range instances { + if item.UUID == u { + tc["instance"] = item + } } return c.Render(http.StatusOK, "instance.html", tc)