diff --git a/manager/workflow_manager.go b/manager/workflow_manager.go index 9e58f0d..b9e9a10 100644 --- a/manager/workflow_manager.go +++ b/manager/workflow_manager.go @@ -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, diff --git a/server/workflow_server.go b/server/workflow_server.go index 820a869..7863424 100644 --- a/server/workflow_server.go +++ b/server/workflow_server.go @@ -29,11 +29,12 @@ func apiWorkflow(wf *model.Workflow) (workflow *api.Workflow) { if wf.WorkflowTemplate != nil { workflow.WorkflowTemplate = &api.WorkflowTemplate{ - Uid: wf.WorkflowTemplate.UID, - Name: wf.WorkflowTemplate.Name, - Version: wf.WorkflowTemplate.Version, - Manifest: wf.WorkflowTemplate.Manifest, - IsLatest: wf.WorkflowTemplate.IsLatest, + Uid: wf.WorkflowTemplate.UID, + CreatedAt: wf.WorkflowTemplate.CreatedAt.UTC().Format(time.RFC3339), + Name: wf.WorkflowTemplate.Name, + Version: wf.WorkflowTemplate.Version, + Manifest: wf.WorkflowTemplate.Manifest, + IsLatest: wf.WorkflowTemplate.IsLatest, } }