Function
getStatusColor
(status: BackgroundJob["status"])
Source from the content-addressed store, hash-verified
| 16 | type ViewMode = "list" | "detail"; |
| 17 | |
| 18 | function getStatusColor(status: BackgroundJob["status"]): string { |
| 19 | if (status === "running" || status === "pending") return "yellow"; |
| 20 | if (status === "completed") return "green"; |
| 21 | return "red"; |
| 22 | } |
| 23 | |
| 24 | function formatDuration(job: BackgroundJob): string { |
| 25 | const endTime = job.endTime ? job.endTime.getTime() : Date.now(); |
Tested by
no test coverage detected