update metrics api

This commit is contained in:
rushtehrani
2020-02-12 20:28:09 -08:00
parent 2085b18ce6
commit 8b4b109389
8 changed files with 236 additions and 12 deletions

View File

@@ -151,7 +151,16 @@ func (s *WorkflowServer) GetWorkflowMetrics(ctx context.Context, req *api.GetWor
return nil, userError.GRPCError()
}
return &api.GetWorkflowMetricsResponse{Metrics: *metrics}, nil
apiMetrics := []*api.Metric{}
for _, m := range metrics {
apiMetrics = append(apiMetrics, &api.Metric{
Name: m.Name,
Value: m.Value,
Format: m.Format,
})
}
return &api.GetWorkflowMetricsResponse{Metrics: apiMetrics}, nil
}
func (s *WorkflowServer) ListWorkflows(ctx context.Context, req *api.ListWorkflowsRequest) (*api.ListWorkflowsResponse, error) {