Refactor schema

* Remove redundant scope
* Change Series Id type to string
* Adopt golang structs to schema
This commit is contained in:
Jan Eitzinger
2023-03-22 19:21:11 +01:00
parent def35a551a
commit 1f8c6064e2
15 changed files with 247 additions and 342 deletions

View File

@@ -173,11 +173,7 @@ func (r *queryResolver) JobMetrics(ctx context.Context, id string, metrics []str
res := []*model.JobMetricWithName{}
for name, md := range data {
for scope, metric := range md {
if metric.Scope != schema.MetricScope(scope) {
panic("WTF?")
}
for _, metric := range md {
res = append(res, &model.JobMetricWithName{
Name: name,
Metric: metric,