fix: decouple polarPlot data query, add new dedicated gql endpoint

- includes go package upgrades
- includes gqlgen error workaround
This commit is contained in:
Christoph Kluge
2025-02-27 14:51:31 +01:00
parent b731395689
commit 61bc095d01
16 changed files with 1737 additions and 1179 deletions

View File

@@ -2,7 +2,7 @@ package graph
// This file will be automatically regenerated based on the schema, any resolver implementations
// will be copied through when generating and any unknown code will be moved to the end.
// Code generated by github.com/99designs/gqlgen version v0.17.57
// Code generated by github.com/99designs/gqlgen version v0.17.66
import (
"context"
@@ -301,6 +301,32 @@ func (r *queryResolver) JobMetrics(ctx context.Context, id string, metrics []str
return res, err
}
// JobMetricStats is the resolver for the jobMetricStats field.
func (r *queryResolver) JobMetricStats(ctx context.Context, id string, metrics []string) ([]*model.JobMetricStatWithName, error) {
job, err := r.Query().Job(ctx, id)
if err != nil {
log.Warn("Error while querying job for metrics")
return nil, err
}
data, err := metricDataDispatcher.LoadStatData(job, metrics, ctx)
if err != nil {
log.Warn("Error while loading job stat data")
return nil, err
}
res := []*model.JobMetricStatWithName{}
for name, md := range data {
res = append(res, &model.JobMetricStatWithName{
Name: name,
Stats: &md,
})
}
return res, err
}
// JobsFootprints is the resolver for the jobsFootprints field.
func (r *queryResolver) JobsFootprints(ctx context.Context, filter []*model.JobFilter, metrics []string) (*model.Footprints, error) {
// NOTE: Legacy Naming! This resolver is for normalized histograms in analysis view only - *Not* related to DB "footprint" column!