mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-26 23:10:21 +08:00
Updated exitHandler function to accept a namespace, since that
information is needed to be passed in to the statistics endpoint.
This commit is contained in:
@@ -356,7 +356,7 @@ func (c *Client) updateCronWorkflow(namespace string, name string, wf *wfv1.Work
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
exitHandlerStepName, exitHandlerStepTemplate, exitHandlerStepWhen, err, exitHandlerTemplate := GetExitHandlerWorkflowStatistics()
|
exitHandlerStepName, exitHandlerStepTemplate, exitHandlerStepWhen, err, exitHandlerTemplate := GetExitHandlerWorkflowStatistics(namespace)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -444,7 +444,7 @@ func (c *Client) createCronWorkflow(namespace string, wf *wfv1.Workflow, cwf *wf
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
exitHandlerStepName, exitHandlerStepTemplate, exitHandlerStepWhen, err, exitHandlerTemplate := GetExitHandlerWorkflowStatistics()
|
exitHandlerStepName, exitHandlerStepTemplate, exitHandlerStepWhen, err, exitHandlerTemplate := GetExitHandlerWorkflowStatistics(namespace)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ func (c *Client) createWorkflow(namespace string, wf *wfv1.Workflow, opts *Workf
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
exitHandlerStepName, exitHandlerStepTemplate, exitHandlerStepWhen, err, exitHandlerTemplate := GetExitHandlerWorkflowStatistics()
|
exitHandlerStepName, exitHandlerStepTemplate, exitHandlerStepWhen, err, exitHandlerTemplate := GetExitHandlerWorkflowStatistics(namespace)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -1052,7 +1052,7 @@ func (c *Client) SetWorkflowTemplateLabels(namespace, name, prefix string, keyVa
|
|||||||
Will build a template that makes a CURL request to the onepanel-core API,
|
Will build a template that makes a CURL request to the onepanel-core API,
|
||||||
with statistics about the workflow that was just executed.
|
with statistics about the workflow that was just executed.
|
||||||
*/
|
*/
|
||||||
func GetExitHandlerWorkflowStatistics() (workflowStepName, workflowStepTemplate, workflowStepWhen string, err error, wfv1Template wfv1.Template) {
|
func GetExitHandlerWorkflowStatistics(namespace string) (workflowStepName, workflowStepTemplate, workflowStepWhen string, err error, wfv1Template wfv1.Template) {
|
||||||
workflowStepName = "workflow-statistics"
|
workflowStepName = "workflow-statistics"
|
||||||
workflowStepTemplate = "workflow-statistics-template"
|
workflowStepTemplate = "workflow-statistics-template"
|
||||||
host := env.GetEnv("ONEPANEL_CORE_HOST", "")
|
host := env.GetEnv("ONEPANEL_CORE_HOST", "")
|
||||||
|
|||||||
Reference in New Issue
Block a user