Skip to content

Commit b07aa18

Browse files
committed
chore: correct order within page result
1 parent 5c45e1f commit b07aa18

File tree

10 files changed

+382
-0
lines changed

10 files changed

+382
-0
lines changed

pkg/query-service/app/inframetrics/clusters.go

+2
Original file line numberDiff line numberDiff line change
@@ -338,5 +338,7 @@ func (p *ClustersRepo) GetClusterList(ctx context.Context, req model.ClusterList
338338
resp.Total = len(allClusterGroups)
339339
resp.Records = records
340340

341+
resp.SortBy(req.OrderBy)
342+
341343
return resp, nil
342344
}

pkg/query-service/app/inframetrics/daemonsets.go

+2
Original file line numberDiff line numberDiff line change
@@ -440,5 +440,7 @@ func (d *DaemonSetsRepo) GetDaemonSetList(ctx context.Context, req model.DaemonS
440440
resp.Total = len(allDaemonSetGroups)
441441
resp.Records = records
442442

443+
resp.SortBy(req.OrderBy)
444+
443445
return resp, nil
444446
}

pkg/query-service/app/inframetrics/deployments.go

+2
Original file line numberDiff line numberDiff line change
@@ -440,5 +440,7 @@ func (d *DeploymentsRepo) GetDeploymentList(ctx context.Context, req model.Deplo
440440
resp.Total = len(allDeploymentGroups)
441441
resp.Records = records
442442

443+
resp.SortBy(req.OrderBy)
444+
443445
return resp, nil
444446
}

pkg/query-service/app/inframetrics/jobs.go

+2
Original file line numberDiff line numberDiff line change
@@ -494,5 +494,7 @@ func (d *JobsRepo) GetJobList(ctx context.Context, req model.JobListRequest) (mo
494494
resp.Total = len(allJobGroups)
495495
resp.Records = records
496496

497+
resp.SortBy(req.OrderBy)
498+
497499
return resp, nil
498500
}

pkg/query-service/app/inframetrics/namespaces.go

+2
Original file line numberDiff line numberDiff line change
@@ -341,5 +341,7 @@ func (p *NamespacesRepo) GetNamespaceList(ctx context.Context, req model.Namespa
341341
resp.Total = len(allNamespaceGroups)
342342
resp.Records = records
343343

344+
resp.SortBy(req.OrderBy)
345+
344346
return resp, nil
345347
}

pkg/query-service/app/inframetrics/nodes.go

+1
Original file line numberDiff line numberDiff line change
@@ -354,5 +354,6 @@ func (p *NodesRepo) GetNodeList(ctx context.Context, req model.NodeListRequest)
354354
resp.Total = len(allNodeGroups)
355355
resp.Records = records
356356

357+
resp.SortBy(req.OrderBy)
357358
return resp, nil
358359
}

pkg/query-service/app/inframetrics/pods.go

+2
Original file line numberDiff line numberDiff line change
@@ -404,5 +404,7 @@ func (p *PodsRepo) GetPodList(ctx context.Context, req model.PodListRequest) (mo
404404
resp.Total = len(allPodGroups)
405405
resp.Records = records
406406

407+
resp.SortBy(req.OrderBy)
408+
407409
return resp, nil
408410
}

pkg/query-service/app/inframetrics/pvcs.go

+2
Original file line numberDiff line numberDiff line change
@@ -374,5 +374,7 @@ func (p *PvcsRepo) GetPvcList(ctx context.Context, req model.VolumeListRequest)
374374
resp.Total = len(allVolumeGroups)
375375
resp.Records = records
376376

377+
resp.SortBy(req.OrderBy)
378+
377379
return resp, nil
378380
}

pkg/query-service/app/inframetrics/statefulsets.go

+2
Original file line numberDiff line numberDiff line change
@@ -440,5 +440,7 @@ func (d *StatefulSetsRepo) GetStatefulSetList(ctx context.Context, req model.Sta
440440
resp.Total = len(allStatefulSetGroups)
441441
resp.Records = records
442442

443+
resp.SortBy(req.OrderBy)
444+
443445
return resp, nil
444446
}

0 commit comments

Comments
 (0)