mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-01 12:02:07 +08:00
update: Updated GetWorkflowExecution request to also get information for the workflow template, since we query for it anyway.
This commit is contained in:
@@ -551,6 +551,8 @@ func (c *Client) GetWorkflowExecution(namespace, uid string) (workflow *Workflow
|
|||||||
workflow = &WorkflowExecution{}
|
workflow = &WorkflowExecution{}
|
||||||
|
|
||||||
query, args, err := sb.Select(getWorkflowExecutionColumns("we", "")...).
|
query, args, err := sb.Select(getWorkflowExecutionColumns("we", "")...).
|
||||||
|
Columns(getWorkflowTemplateColumns("wt", "workflow_template")...).
|
||||||
|
Columns(`wtv.manifest "workflow_template.manifest"`).
|
||||||
From("workflow_executions we").
|
From("workflow_executions we").
|
||||||
Join("workflow_template_versions wtv ON wtv.id = we.workflow_template_version_id").
|
Join("workflow_template_versions wtv ON wtv.id = we.workflow_template_version_id").
|
||||||
Join("workflow_templates wt ON wt.id = wtv.workflow_template_id").
|
Join("workflow_templates wt ON wt.id = wtv.workflow_template_id").
|
||||||
@@ -600,7 +602,6 @@ func (c *Client) GetWorkflowExecution(namespace, uid string) (workflow *Workflow
|
|||||||
return nil, util.NewUserError(codes.NotFound, "Cannot get Workflow Template.")
|
return nil, util.NewUserError(codes.NotFound, "Cannot get Workflow Template.")
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Do we need to parse parameters into workflow.Parameters?
|
|
||||||
manifest, err := json.Marshal(wf)
|
manifest, err := json.Marshal(wf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.WithFields(log.Fields{
|
log.WithFields(log.Fields{
|
||||||
|
Reference in New Issue
Block a user