mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-26 05:19:05 +01:00
no paging in REST-API by default
This commit is contained in:
parent
6ccf354035
commit
ef089a7f2b
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user