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:
@@ -285,8 +285,8 @@ func (jm *JobManager) Get(id int64) (db.StorageJob, error) {
|
||||
return jm.db.GetStorageJob(id)
|
||||
}
|
||||
|
||||
func (jm *JobManager) List(limit int) ([]db.StorageJob, error) {
|
||||
return jm.db.ListStorageJobs(limit)
|
||||
func (jm *JobManager) List(limit, offset int) ([]db.StorageJob, error) {
|
||||
return jm.db.ListStorageJobs(limit, offset)
|
||||
}
|
||||
|
||||
func (jm *JobManager) Cancel(id int64) error {
|
||||
|
||||
Reference in New Issue
Block a user