Change allocatedNodes; Update frontend

This commit is contained in:
Lou Knauer
2022-03-24 16:08:47 +01:00
parent 0b83917294
commit f3c2a6cc24
5 changed files with 36 additions and 14 deletions

View File

@@ -275,7 +275,7 @@ type QueryResolver interface {
Clusters(ctx context.Context) ([]*model.Cluster, error)
Tags(ctx context.Context) ([]*schema.Tag, error)
User(ctx context.Context, username string) (*model.User, error)
AllocatedNodes(ctx context.Context, cluster string) ([]string, error)
AllocatedNodes(ctx context.Context, cluster string) ([]*model.Count, error)
Job(ctx context.Context, id string) (*schema.Job, error)
JobMetrics(ctx context.Context, id string, metrics []string, scopes []schema.MetricScope) ([]*model.JobMetricWithName, error)
JobsFootprints(ctx context.Context, filter []*model.JobFilter, metrics []string) (*model.Footprints, error)
@@ -1504,7 +1504,7 @@ type Query {
tags: [Tag!]! # List of all tags
user(username: String!): User
allocatedNodes(cluster: String!): [String!]!
allocatedNodes(cluster: String!): [Count!]!
job(id: ID!): Job
jobMetrics(id: ID!, metrics: [String!], scopes: [MetricScope!]): [JobMetricWithName!]!
@@ -5090,9 +5090,9 @@ func (ec *executionContext) _Query_allocatedNodes(ctx context.Context, field gra
}
return graphql.Null
}
res := resTmp.([]string)
res := resTmp.([]*model.Count)
fc.Result = res
return ec.marshalNString2ᚕstring(ctx, field.Selections, res)
return ec.marshalNCount2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑbackendᚋgraphᚋmodelᚐCount(ctx, field.Selections, res)
}
func (ec *executionContext) _Query_job(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {