mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-05 13:46:51 +08:00
feat: Updated cron to return the active parameters
This commit is contained in:
@@ -202,6 +202,15 @@ func (c *Client) ListCronWorkflows(namespace string) (cronWorkflows []*CronWorkf
|
||||
})
|
||||
|
||||
for _, cwf := range cwfs {
|
||||
var parameters []WorkflowExecutionParameter
|
||||
|
||||
for _, param := range cwf.Spec.WorkflowSpec.Arguments.Parameters {
|
||||
parameters = append(parameters, WorkflowExecutionParameter{
|
||||
Name: param.Name,
|
||||
Value: param.Value,
|
||||
})
|
||||
}
|
||||
|
||||
cronWorkflows = append(cronWorkflows, &CronWorkflow{
|
||||
CreatedAt: cwf.CreationTimestamp.UTC(),
|
||||
UID: string(cwf.ObjectMeta.UID),
|
||||
@@ -213,7 +222,9 @@ func (c *Client) ListCronWorkflows(namespace string) (cronWorkflows []*CronWorkf
|
||||
StartingDeadlineSeconds: cwf.Spec.StartingDeadlineSeconds,
|
||||
SuccessfulJobsHistoryLimit: cwf.Spec.SuccessfulJobsHistoryLimit,
|
||||
FailedJobsHistoryLimit: cwf.Spec.FailedJobsHistoryLimit,
|
||||
WorkflowExecution: nil,
|
||||
WorkflowExecution: &WorkflowExecution{
|
||||
Parameters: parameters,
|
||||
},
|
||||
})
|
||||
}
|
||||
return
|
||||
|
Reference in New Issue
Block a user