mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-04 13:22:41 +08:00
fix: Cron update params and field types
This commit is contained in:
@@ -56,7 +56,6 @@ func (c *CronWorkflowServer) CreateCronWorkflow(ctx context.Context, req *api.Cr
|
||||
},
|
||||
}
|
||||
for _, param := range req.CronWorkflow.WorkflowExecution.Parameters {
|
||||
|
||||
options := make([]*v1.ParameterOption, 0)
|
||||
for _, option := range param.Options {
|
||||
options = append(options, &v1.ParameterOption{
|
||||
@@ -103,9 +102,22 @@ func (c *CronWorkflowServer) UpdateCronWorkflow(ctx context.Context, req *api.Up
|
||||
},
|
||||
}
|
||||
for _, param := range req.CronWorkflow.WorkflowExecution.Parameters {
|
||||
options := make([]*v1.ParameterOption, 0)
|
||||
for _, option := range param.Options {
|
||||
options = append(options, &v1.ParameterOption{
|
||||
Name: option.Name,
|
||||
Value: option.Value,
|
||||
})
|
||||
}
|
||||
|
||||
workflow.Parameters = append(workflow.Parameters, v1.Parameter{
|
||||
Name: param.Name,
|
||||
Value: ptr.String(param.Value),
|
||||
Name: param.Name,
|
||||
Value: ptr.String(param.Value),
|
||||
Type: param.Type,
|
||||
DisplayName: ¶m.DisplayName,
|
||||
Hint: ¶m.Hint,
|
||||
Options: options,
|
||||
Required: param.Required,
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user