Optimize AI dashboard job payload
This commit is contained in:
@@ -13,7 +13,7 @@ type dashboardResponse struct {
|
||||
Stats *model.Stats `json:"stats"`
|
||||
Providers providersStatusResponse `json:"providers"`
|
||||
Infra infraStatusResponse `json:"infra"`
|
||||
Jobs []*model.Job `json:"jobs"`
|
||||
Jobs []*model.JobSummary `json:"jobs"`
|
||||
}
|
||||
|
||||
type dashboardSummary struct {
|
||||
@@ -35,7 +35,7 @@ func (s *Server) handleDashboard(w http.ResponseWriter, r *http.Request) {
|
||||
writeError(w, http.StatusInternalServerError, err.Error())
|
||||
return
|
||||
}
|
||||
jobs, err := s.store.ListJobs(ctx, model.JobFilter{
|
||||
jobs, err := s.store.ListJobSummaries(ctx, model.JobFilter{
|
||||
Statuses: []string{model.StatusFailed, model.StatusRunning},
|
||||
Limit: 40,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user