builds now, not sure if the new handler works or not
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Jeffrey Paul 2020-04-04 18:32:25 -07:00
parent 783086bb0d
commit 98861bc6f3

View File

@ -10,6 +10,7 @@ import (
u "git.eeqj.de/sneak/goutil" u "git.eeqj.de/sneak/goutil"
"github.com/flosch/pongo2" "github.com/flosch/pongo2"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/google/uuid"
"github.com/labstack/echo" "github.com/labstack/echo"
) )
@ -94,10 +95,12 @@ func (a *Server) instanceHandler(c echo.Context) error {
return c.String(http.StatusNotFound, "404 not found") return c.String(http.StatusNotFound, "404 not found")
} }
tc := pongo2.Context{}
i := a.feta.manager.ListInstances() { instances := a.feta.manager.ListInstances()
tc := pongo2.Context{ for _, item := range instances {
"instance": i, if item.UUID == u {
tc["instance"] = item
}
} }
return c.Render(http.StatusOK, "instance.html", tc) return c.Render(http.StatusOK, "instance.html", tc)