diff --git a/assets/components/LogViewer/LogActionsToolbar.vue b/assets/components/LogViewer/LogActionsToolbar.vue index 005aba83..63e29c5f 100644 --- a/assets/components/LogViewer/LogActionsToolbar.vue +++ b/assets/components/LogViewer/LogActionsToolbar.vue @@ -20,7 +20,7 @@ - +
diff --git a/package.json b/package.json index be2bcf40..c13044fa 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "scripts": { "watch:frontend": "vite --open http://localhost:3100/", "watch:backend": "LIVE_FS=true DEV=true DOZZLE_ADDR=localhost:3100 reflex -c .reflex", - "dev": "concurrently \"npm:watch:*\"", + "dev": "concurrently --kill-others \"npm:watch:*\"", "build": "vite build", "preview": "LIVE_FS=true DOZZLE_ADDR=localhost:3100 reflex -c .reflex", "release": "bumpp", diff --git a/web/logs.go b/web/logs.go index 6dd62b54..a4a7c711 100644 --- a/web/logs.go +++ b/web/logs.go @@ -21,7 +21,7 @@ import ( ) func (h *handler) downloadLogs(w http.ResponseWriter, r *http.Request) { - id := r.URL.Query().Get("id") + id := chi.URLParam(r, "id") container, err := h.clientFromRequest(r).FindContainer(id) if err != nil { http.Error(w, err.Error(), http.StatusBadRequest) diff --git a/web/routes.go b/web/routes.go index c22e94a3..ad89ee4f 100644 --- a/web/routes.go +++ b/web/routes.go @@ -63,7 +63,7 @@ func createRouter(h *handler) *chi.Mux { r.Group(func(r chi.Router) { r.Use(authorizationRequired) r.Get("/api/logs/stream/{host}/{id}", h.streamLogs) - r.Get("/api/logs/download/{host}/{id}", h.downloadLogs) //TODO + r.Get("/api/logs/download/{host}/{id}", h.downloadLogs) r.Get("/api/logs/{host}/{id}", h.fetchLogsBetweenDates) r.Get("/api/events/stream", h.streamEvents) r.Get("/logout", h.clearSession)