mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-05 13:46:51 +08:00
Adding function to accept workflow statistics.
- Currently, code outputs the request for debugging purposes.
This commit is contained in:
@@ -3,6 +3,7 @@ package server
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/onepanelio/core/pkg/util"
|
||||
"google.golang.org/grpc/codes"
|
||||
"math"
|
||||
@@ -112,6 +113,11 @@ func (s *WorkflowServer) CreateWorkflowExecution(ctx context.Context, req *api.C
|
||||
return apiWorkflowExecution(wf), nil
|
||||
}
|
||||
|
||||
func (s *WorkflowServer) AddWorkflowExecutionStatistics(ctx context.Context, request *api.AddWorkflowExecutionStatisticRequest) (*empty.Empty, error) {
|
||||
fmt.Printf("%v\n", request)
|
||||
return &empty.Empty{}, nil
|
||||
}
|
||||
|
||||
func (s *WorkflowServer) GetWorkflowExecution(ctx context.Context, req *api.GetWorkflowExecutionRequest) (*api.WorkflowExecution, error) {
|
||||
client := ctx.Value("kubeClient").(*v1.Client)
|
||||
allowed, err := auth.IsAuthorized(client, req.Namespace, "get", "argoproj.io", "workflows", req.Name)
|
||||
|
Reference in New Issue
Block a user