feat(ui): download a task attempt's log, and stop blaming a setting for it
The attempt-log panel offered no way to get a log out of the dashboard, and its failure copy asserted that task logging was not enabled for the run. The first is the feature: the panel now links to the download route for the attempt it is showing, so the browser owns the filename the server sets and streams the body to disk rather than the client holding a whole log in memory. The second is the honesty fix. "No log recorded for this attempt" is a fact about the attempt; "this dashboard cannot read task logs" is a fact about the deployment, and only the second is worth sending an operator to a setting for. The panel renders them differently off the response's found/disabled markers. Rebuilds ui/dist, which is a committed asset.
This commit is contained in:
1 parent
cf7cc9d891
commit
3cb3cf7e62
8 files changed
+137
-23
No files matched your search
@@ -112,6 +112,11 @@ export const api = {
|
||||
configReset: (key) => request("/api/config/reset", { method: "POST", body: { key } }),
|
||||
logs: (params) => request("/api/logs" + qs(params)),
|
||||
taskLogs: (id, params) => request(`/api/tasks/${id}/logs` + qs(params)),
|
||||
// A download is a navigation, not a fetch: the browser must own the
|
||||
// Content-Disposition filename and stream the body to disk rather than hold
|
||||
// a whole log in memory. The URL builder is the client-side contract, and
|
||||
// base/log-row's sibling module keeps it beside the panel that uses it.
|
||||
taskLogDownloadURL: (id, attempt) => `/api/tasks/${id}/logs/download` + (attempt == null ? "" : `?attempt=${attempt}`),
|
||||
captures: (limit) => request("/api/captures" + qs({ limit })),
|
||||
mappings: () => request("/api/mappings"),
|
||||
mappingCreate: (mapping) => request("/api/mappings", { method: "POST", body: mapping }),
|
||||
|
||||
Reference in new issue
Block a user