mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-18 19:44:31 +08:00
Added createdAt field to be set when created in workflow_manager
This commit is contained in:
@@ -45,6 +45,7 @@ func (r *ResourceManager) CreateWorkflow(namespace string, workflow *model.Workf
|
||||
}
|
||||
|
||||
workflow.Name = createdWorkflows[0].Name
|
||||
workflow.CreatedAt = createdWorkflows[0].CreationTimestamp.UTC()
|
||||
workflow.UID = string(createdWorkflows[0].ObjectMeta.UID)
|
||||
workflow.WorkflowTemplate = workflowTemplate
|
||||
// Manifests could get big, don't return them in this case.
|
||||
@@ -80,6 +81,7 @@ func (r *ResourceManager) GetWorkflow(namespace, name string) (workflow *model.W
|
||||
}
|
||||
workflow = &model.Workflow{
|
||||
UID: string(wf.UID),
|
||||
CreatedAt: workflowTemplate.CreatedAt,
|
||||
Name: wf.Name,
|
||||
Status: string(status),
|
||||
WorkflowTemplate: workflowTemplate,
|
||||
|
@@ -30,6 +30,7 @@ func apiWorkflow(wf *model.Workflow) (workflow *api.Workflow) {
|
||||
if wf.WorkflowTemplate != nil {
|
||||
workflow.WorkflowTemplate = &api.WorkflowTemplate{
|
||||
Uid: wf.WorkflowTemplate.UID,
|
||||
CreatedAt: wf.WorkflowTemplate.CreatedAt.UTC().Format(time.RFC3339),
|
||||
Name: wf.WorkflowTemplate.Name,
|
||||
Version: wf.WorkflowTemplate.Version,
|
||||
Manifest: wf.WorkflowTemplate.Manifest,
|
||||
|
Reference in New Issue
Block a user