mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-27 05:49:04 +01:00
Fix typo in Jobstats resolver
This commit is contained in:
parent
3b8bcf7b32
commit
13d99a6ae0
@ -256,22 +256,21 @@ func (r *queryResolver) JobsStatistics(ctx context.Context, filter []*model.JobF
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
stats = make([]*model.JobsStatistics, 0, 1)
|
stats = make([]*model.JobsStatistics, 0, 1)
|
||||||
stats = append(stats,
|
stats = append(stats, &model.JobsStatistics{})
|
||||||
&model.JobsStatistics{})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if groupBy != nil {
|
if groupBy != nil {
|
||||||
if requireField(ctx, "shortJobs") {
|
if requireField(ctx, "shortJobs") {
|
||||||
stats, err = r.Repo.AddJobCountGrouped(ctx, filter, groupBy, stats, "short")
|
stats, err = r.Repo.AddJobCountGrouped(ctx, filter, groupBy, stats, "short")
|
||||||
}
|
}
|
||||||
if requireField(ctx, "RunningJobs") {
|
if requireField(ctx, "runningJobs") {
|
||||||
stats, err = r.Repo.AddJobCountGrouped(ctx, filter, groupBy, stats, "running")
|
stats, err = r.Repo.AddJobCountGrouped(ctx, filter, groupBy, stats, "running")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if requireField(ctx, "shortJobs") {
|
if requireField(ctx, "shortJobs") {
|
||||||
stats, err = r.Repo.AddJobCount(ctx, filter, stats, "short")
|
stats, err = r.Repo.AddJobCount(ctx, filter, stats, "short")
|
||||||
}
|
}
|
||||||
if requireField(ctx, "RunningJobs") {
|
if requireField(ctx, "runningJobs") {
|
||||||
stats, err = r.Repo.AddJobCount(ctx, filter, stats, "running")
|
stats, err = r.Repo.AddJobCount(ctx, filter, stats, "running")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user