Add run history tab to GlobalSchedules page

Extract RunDetailPanel, create RunHistoryCards component, add runs tab with filtering
This commit is contained in:
Chris Scott committed 2026-03-25 15:49:37 -04:00
1 parent 20838f0b88
commit cc1256d6ec
7 files changed
+887 -511

No files matched your search

+27
View File
@@ -13,6 +13,21 @@ export interface ScheduleJobWithRepo extends ScheduleJob {
repoUrl: string
}
export interface ScheduleRunWithContext extends ScheduleRun {
jobName: string
repoName: string
repoPath: string
}
export interface ListAllRunsParams {
limit?: number
offset?: number
status?: string
repoId?: number
jobId?: number
triggerSource?: string
}
export interface ScheduleCount {
total: number
enabled: number
@@ -22,6 +37,18 @@ export async function listAllSchedules(): Promise<{ jobs: ScheduleJobWithRepo[]
return fetchWrapper(`${API_BASE_URL}/api/schedules/all`)
}
export async function listAllScheduleRuns(params: ListAllRunsParams = {}): Promise<{ runs: ScheduleRunWithContext[] }> {
const searchParams = new URLSearchParams()
if (params.limit !== undefined) searchParams.set('limit', String(params.limit))
if (params.offset !== undefined) searchParams.set('offset', String(params.offset))
if (params.status) searchParams.set('status', params.status)
if (params.repoId !== undefined) searchParams.set('repoId', String(params.repoId))
if (params.jobId !== undefined) searchParams.set('jobId', String(params.jobId))
if (params.triggerSource) searchParams.set('triggerSource', params.triggerSource)
const qs = searchParams.toString()
return fetchWrapper(`${API_BASE_URL}/api/schedules/all/runs${qs ? `?${qs}` : ''}`)
}
export async function listRepoSchedules(repoId: number): Promise<{ jobs: ScheduleJob[] }> {
return fetchWrapper(`${API_BASE_URL}/api/repos/${repoId}/schedules`)
}