Fix and release a docker build

This commit is contained in:
Christopher LaPointe
2023-06-03 21:38:44 -04:00
parent 6c8e52d24e
commit 895f7ff440
4 changed files with 29 additions and 10 deletions

View File

@@ -19,8 +19,6 @@ type SplashModel struct {
Hostname string
}
var splashTemplate = template.Must(template.ParseFS(httpAssets, path.Join("assets", config.Model.Splash)))
type StatusPageModel struct {
Active []*service.ContainerState
Qualifying []containers.Wrapper
@@ -28,4 +26,14 @@ type StatusPageModel struct {
RuntimeMetrics string
}
var statusPageTemplate = template.Must(template.ParseFS(httpAssets, "assets/status.html"))
type assetTemplates struct {
splash *template.Template
status *template.Template
}
func LoadTemplates() *assetTemplates {
return &assetTemplates{
splash: template.Must(template.ParseFS(httpAssets, path.Join("assets", config.Model.Splash))),
status: template.Must(template.ParseFS(httpAssets, "assets/status.html")),
}
}