mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-11-02 19:04:00 +08:00
Fixed issue where dates were not being set on workflow executions
This commit is contained in:
@@ -453,6 +453,9 @@ func (c *Client) WatchWorkflowExecution(namespace, name string) (<-chan *Workflo
|
||||
continue
|
||||
}
|
||||
workflowWatcher <- &WorkflowExecution{
|
||||
CreatedAt: workflow.CreationTimestamp.UTC(),
|
||||
StartedAt: workflow.Status.StartedAt.UTC(),
|
||||
FinishedAt: workflow.Status.FinishedAt.UTC(),
|
||||
UID: string(workflow.UID),
|
||||
Name: workflow.Name,
|
||||
Manifest: string(manifest),
|
||||
|
||||
@@ -26,11 +26,16 @@ func apiWorkflowExecution(wf *v1.WorkflowExecution) (workflow *api.WorkflowExecu
|
||||
Name: wf.Name,
|
||||
Uid: wf.UID,
|
||||
Phase: string(wf.Phase),
|
||||
StartedAt: wf.CreatedAt.Format(time.RFC3339),
|
||||
FinishedAt: wf.FinishedAt.Format(time.RFC3339),
|
||||
Manifest: wf.Manifest,
|
||||
}
|
||||
|
||||
if !wf.StartedAt.IsZero() {
|
||||
workflow.StartedAt = wf.StartedAt.Format(time.RFC3339)
|
||||
}
|
||||
if !wf.FinishedAt.IsZero() {
|
||||
workflow.FinishedAt = wf.FinishedAt.Format(time.RFC3339)
|
||||
}
|
||||
|
||||
if wf.WorkflowTemplate != nil {
|
||||
workflow.WorkflowTemplate = &api.WorkflowTemplate{
|
||||
Uid: wf.WorkflowTemplate.UID,
|
||||
|
||||
Reference in New Issue
Block a user