mirror of
				https://github.com/ClusterCockpit/cc-backend
				synced 2025-10-31 07:55:06 +01:00 
			
		
		
		
	no paging in REST-API by default
This commit is contained in:
		| @@ -99,7 +99,7 @@ type TagJobApiRequest []*struct { | ||||
| // Return a list of jobs | ||||
| func (api *RestApi) getJobs(rw http.ResponseWriter, r *http.Request) { | ||||
| 	filter := &model.JobFilter{} | ||||
| 	page := &model.PageRequest{ItemsPerPage: 50, Page: 1} | ||||
| 	page := &model.PageRequest{ItemsPerPage: -1, Page: 1} | ||||
| 	order := &model.OrderByInput{Field: "startTime", Order: model.SortDirectionEnumDesc} | ||||
| 	for key, vals := range r.URL.Query() { | ||||
| 		switch key { | ||||
|   | ||||
| @@ -35,7 +35,7 @@ func (r *JobRepository) QueryJobs( | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	if page != nil { | ||||
| 	if page != nil && page.ItemsPerPage != -1 { | ||||
| 		limit := uint64(page.ItemsPerPage) | ||||
| 		query = query.Offset((uint64(page.Page) - 1) * limit).Limit(limit) | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user