feat: cron job run history panel and job model display (#319)

- Jobs page: cron run history panel with job selection and filtering
- Jobs page: model shown as read-only on job cards
- Job form modal: properly typed payloads
- i18n: added runHistory, model keys to all 8 locales
This commit is contained in:
Desmond Zhang
2026-04-30 10:17:25 +10:00
committed by GitHub
parent 6e5f15fd66
commit 2e87cb910c
19 changed files with 510 additions and 39 deletions
@@ -0,0 +1,27 @@
import { request } from '../client'
export interface RunEntry {
jobId: string
fileName: string
runTime: string
size: number
}
export interface RunDetail {
jobId: string
fileName: string
runTime: string
content: string
}
export async function listCronRuns(jobId?: string): Promise<RunEntry[]> {
const params = new URLSearchParams()
if (jobId) params.set('jobId', jobId)
const qs = params.toString()
const res = await request<{ runs: RunEntry[] }>(`/api/cron-history${qs ? `?${qs}` : ''}`)
return res.runs
}
export async function readCronRun(jobId: string, fileName: string): Promise<RunDetail> {
return request<RunDetail>(`/api/cron-history/${encodeURIComponent(jobId)}/${encodeURIComponent(fileName)}`)
}
+2
View File
@@ -52,6 +52,8 @@ export interface UpdateJobRequest {
skill?: string
repeat?: number
enabled?: boolean
model?: string
provider?: string
}
function unwrap(res: { job: Job }): Job {