feat(web): live SSE log tail and log retention setting
Server Deploy / deploy (push) Successful in 1m35s

This commit is contained in:
2026-07-20 15:18:36 +01:00
parent 63dadf6239
commit 39348c9491
3 changed files with 112 additions and 23 deletions
+19 -3
View File
@@ -95,6 +95,7 @@ export interface Settings {
alerts: AlertSettings;
email: EmailSettings;
secrets: SecretsSettings;
workflow_log_retention_days?: number | null;
}
export interface SecretGroupSummary {
@@ -171,8 +172,7 @@ export interface StepRun {
status: string;
attempts: number;
exit_code: number;
stdout: string;
stderr: string;
log_offset: number;
output_env: Record<string, string>;
started_at?: string;
finished_at?: string;
@@ -290,7 +290,11 @@ export const api = {
return request<Settings>("/settings");
},
saveSettings(settings: { alerts: AlertSettings; email: EmailSettings }): Promise<{ saved: boolean }> {
saveSettings(settings: {
alerts: AlertSettings;
email: EmailSettings;
workflow_log_retention_days?: number | null;
}): Promise<{ saved: boolean }> {
return request<{ saved: boolean }>("/settings", {
method: "PUT",
body: JSON.stringify(settings),
@@ -460,4 +464,16 @@ export const api = {
cancelRun(runId: string): Promise<void> {
return request<void>(`/runs/${runId}/cancel`, { method: "POST" });
},
async getServerRunLog(runId: string, serverId: string): Promise<string> {
const res = await fetch(`/api/runs/${runId}/servers/${serverId}/logs`, {
credentials: "include",
});
if (!res.ok) throw new Error("no logs");
return res.text();
},
serverRunLogStreamUrl(runId: string, serverId: string): string {
return `/api/runs/${runId}/servers/${serverId}/logs/stream`;
},
};