From 7798916a9ab12d2270b2eb13f34766f8310d3b1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Fri, 12 Jan 2024 13:38:43 +0100 Subject: [PATCH] lpweb: Fix dev mode --- provider/lpweb/hapi/web/cluster_task_history.gohtml | 6 +++++- provider/lpweb/srv.go | 5 +---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/provider/lpweb/hapi/web/cluster_task_history.gohtml b/provider/lpweb/hapi/web/cluster_task_history.gohtml index 8f04ef5c5..c9b36ce3a 100644 --- a/provider/lpweb/hapi/web/cluster_task_history.gohtml +++ b/provider/lpweb/hapi/web/cluster_task_history.gohtml @@ -8,7 +8,11 @@ {{.Start}} {{.End}} {{if .Result}}success{{else}}error{{end}} - {{.Err}} + +
+ {{.Err}} +
+ {{end}} {{end}} diff --git a/provider/lpweb/srv.go b/provider/lpweb/srv.go index f6bcfcf85..fcb167309 100644 --- a/provider/lpweb/srv.go +++ b/provider/lpweb/srv.go @@ -39,12 +39,9 @@ func GetSrv(ctx context.Context, deps *deps.Deps) (*http.Server, error) { } api.Routes(mx.PathPrefix("/api").Subrouter(), deps) - basePath := basePath - var static fs.FS = static if webDev { - basePath = "cmd/lotus-provider/web/static" - static = os.DirFS(basePath) + static = os.DirFS("./cmd/lotus-provider/web") } mx.NotFoundHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {