feat(storage): paginate operations history with prev/next controls
Backend:
- ListStorageJobs(limit, offset) adds OFFSET for pagination
- CountStorageJobs() returns total row count for UI
- handler returns { jobs, total, limit, offset }
- JobManager.List(limit, offset) updated signature
Frontend:
- loadJobs(offset) with default 0
- Pagination UI: 'Mostrando X-Y de Z' + Anterior/Siguiente buttons
- After job start/end, reloads from offset 0
- listStorageJobs(limit, offset) API updated
Tests: fix List/ListStorageJobs calls to include offset=0
This commit is contained in:
@@ -54,7 +54,7 @@ func TestJobManagerListEmpty(t *testing.T) {
|
||||
defer d.Close()
|
||||
|
||||
jm := NewJobManager(d, false)
|
||||
jobs, err := jm.List(10)
|
||||
jobs, err := jm.List(10, 0)
|
||||
if err != nil {
|
||||
t.Fatalf("List: %v", err)
|
||||
}
|
||||
@@ -85,7 +85,7 @@ func TestJobManagerResetOrphans(t *testing.T) {
|
||||
t.Fatalf("ResetOrphans: %v", err)
|
||||
}
|
||||
|
||||
jobs, _ := jm.List(10)
|
||||
jobs, _ := jm.List(10, 0)
|
||||
runningCount := 0
|
||||
queuedCount := 0
|
||||
for _, j := range jobs {
|
||||
|
||||
Reference in New Issue
Block a user