feat(web): add logs and telemetry page with filtering and auto-refresh (#480)
Some checks failed
ci/woodpecker/push/web Pipeline failed
Some checks failed
ci/woodpecker/push/web Pipeline failed
Co-authored-by: Jason Woltje <jason@diversecanvas.com> Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #480.
This commit is contained in:
@@ -98,3 +98,66 @@ export async function fetchRunnerJobs(filters?: RunnerJobFilters): Promise<Runne
|
||||
export async function fetchRunnerJob(id: string, workspaceId?: string): Promise<RunnerJob> {
|
||||
return apiGet<RunnerJob>(`/api/runner-jobs/${id}`, workspaceId);
|
||||
}
|
||||
|
||||
// ─── Job Steps ────────────────────────────────────────────────────────
|
||||
|
||||
/**
|
||||
* Job step phase enum (matches backend JobStepPhase)
|
||||
*/
|
||||
export enum JobStepPhase {
|
||||
SETUP = "SETUP",
|
||||
EXECUTION = "EXECUTION",
|
||||
VALIDATION = "VALIDATION",
|
||||
CLEANUP = "CLEANUP",
|
||||
}
|
||||
|
||||
/**
|
||||
* Job step type enum (matches backend JobStepType)
|
||||
*/
|
||||
export enum JobStepType {
|
||||
COMMAND = "COMMAND",
|
||||
AI_ACTION = "AI_ACTION",
|
||||
GATE = "GATE",
|
||||
ARTIFACT = "ARTIFACT",
|
||||
}
|
||||
|
||||
/**
|
||||
* Job step status enum (matches backend JobStepStatus)
|
||||
*/
|
||||
export enum JobStepStatus {
|
||||
PENDING = "PENDING",
|
||||
RUNNING = "RUNNING",
|
||||
COMPLETED = "COMPLETED",
|
||||
FAILED = "FAILED",
|
||||
SKIPPED = "SKIPPED",
|
||||
}
|
||||
|
||||
/**
|
||||
* Job step response interface (matches Prisma JobStep model)
|
||||
*/
|
||||
export interface JobStep {
|
||||
id: string;
|
||||
jobId: string;
|
||||
ordinal: number;
|
||||
phase: JobStepPhase;
|
||||
name: string;
|
||||
type: JobStepType;
|
||||
status: JobStepStatus;
|
||||
output: string | null;
|
||||
tokensInput: number | null;
|
||||
tokensOutput: number | null;
|
||||
startedAt: string | null;
|
||||
completedAt: string | null;
|
||||
durationMs: number | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch job steps for a specific runner job
|
||||
*/
|
||||
export async function fetchJobSteps(jobId: string, workspaceId?: string): Promise<JobStep[]> {
|
||||
const response = await apiGet<ApiResponse<JobStep[]>>(
|
||||
`/api/runner-jobs/${jobId}/steps`,
|
||||
workspaceId
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user