|
@@ -1,4 +1,4 @@
|
|
|
-import type { RunGraph, RunSummary } from "@/lib/types";
|
|
|
|
|
|
|
+import type { ExecutionView, RunSummary, TaskDetail } from "@/lib/types";
|
|
|
|
|
|
|
|
const API_BASE = process.env.NEXT_PUBLIC_API_BASE ?? "http://127.0.0.1:8788";
|
|
const API_BASE = process.env.NEXT_PUBLIC_API_BASE ?? "http://127.0.0.1:8788";
|
|
|
|
|
|
|
@@ -12,6 +12,10 @@ export function fetchRuns(signal?: AbortSignal) {
|
|
|
return getJson<RunSummary[]>("/api/runs", signal);
|
|
return getJson<RunSummary[]>("/api/runs", signal);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export function fetchGraph(scriptBuildId: number, signal?: AbortSignal) {
|
|
|
|
|
- return getJson<RunGraph>(`/api/runs/${scriptBuildId}/graph`, signal);
|
|
|
|
|
|
|
+export function fetchExecution(scriptBuildId: number, signal?: AbortSignal) {
|
|
|
|
|
+ return getJson<ExecutionView>(`/api/runs/${scriptBuildId}/execution`, signal);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+export function fetchTaskDetail(scriptBuildId: number, taskId: string, signal?: AbortSignal) {
|
|
|
|
|
+ return getJson<TaskDetail>(`/api/runs/${scriptBuildId}/tasks/${taskId}`, signal);
|
|
|
}
|
|
}
|