Web UI redesigned for datacenter fleets
Sidebar navigation (Overview, Machines, Jobs, Tags, Profiles, OS images); machine list with state/tag chips, search, sort, paging and multi-select bulk actions (power, deploy, assign, tag, re-commission, release, boot device); machine detail with tabs (overview, hardware, network, BMC, jobs, events, raw) and dialog-driven actions; fleet-wide /api/v1/events and /api/v1/jobs; ?token= sign-in; GPU count in summaries counts real accelerators only; OS catalog ignores dot-directories. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
0f798d8797
commit
0333c1e486
8 files changed
+619
-396
No files matched your search
@@ -131,6 +131,24 @@ func (s *Store) Jobs(ctx context.Context, machineID string, limit int) ([]*Job,
|
||||
return out, rows.Err()
|
||||
}
|
||||
|
||||
// RecentJobs lists jobs across all machines, newest first (active ones first when activeFirst).
|
||||
func (s *Store) RecentJobs(ctx context.Context, limit int) ([]*Job, error) {
|
||||
rows, err := s.pool.Query(ctx, `SELECT `+jobCols+` FROM jobs ORDER BY (state IN ('pending','running')) DESC, created DESC LIMIT $1`, limit)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer rows.Close()
|
||||
out := []*Job{}
|
||||
for rows.Next() {
|
||||
j, err := scanJob(rows)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
out = append(out, j)
|
||||
}
|
||||
return out, rows.Err()
|
||||
}
|
||||
|
||||
func (s *Store) JobProgress(ctx context.Context, id string, progress []byte) error {
|
||||
_, err := s.pool.Exec(ctx, `UPDATE jobs SET state='running', started=coalesce(started, now()), progress=$2 WHERE id=$1 AND state IN ('pending','running')`, id, progress)
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user