mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-06 06:06:50 +08:00
Updated cron workflow and workflow execution select queries.
- Exclude "is_archived" rows.
This commit is contained in:
@@ -570,8 +570,9 @@ func (c *Client) cronWorkflowSelectBuilderNamespaceName(namespace string, uid st
|
|||||||
Join("workflow_template_versions wtv ON wtv.id = cw.workflow_template_version_id").
|
Join("workflow_template_versions wtv ON wtv.id = cw.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").
|
||||||
Where(sq.Eq{
|
Where(sq.Eq{
|
||||||
"cw.namespace": namespace,
|
"cw.namespace": namespace,
|
||||||
"cw.name": uid,
|
"cw.name": uid,
|
||||||
|
"cw.is_archived": false,
|
||||||
})
|
})
|
||||||
|
|
||||||
return sb
|
return sb
|
||||||
@@ -583,8 +584,9 @@ func (c *Client) cronWorkflowSelectBuilderNoColumns(namespace string, workflowTe
|
|||||||
Join("workflow_template_versions wtv ON wtv.id = cw.workflow_template_version_id").
|
Join("workflow_template_versions wtv ON wtv.id = cw.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").
|
||||||
Where(sq.Eq{
|
Where(sq.Eq{
|
||||||
"wt.namespace": namespace,
|
"wt.namespace": namespace,
|
||||||
"wt.uid": workflowTemplateUid,
|
"wt.uid": workflowTemplateUid,
|
||||||
|
"cw.is_archived": false,
|
||||||
})
|
})
|
||||||
|
|
||||||
return sb
|
return sb
|
||||||
@@ -669,8 +671,9 @@ func (c *Client) SelectCronWorkflowWithWorkflowTemplateVersion(namespace, uid st
|
|||||||
Join("workflow_template_versions wtv ON wtv.id = cw.workflow_template_version_id").
|
Join("workflow_template_versions wtv ON wtv.id = cw.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").
|
||||||
Where(sq.Eq{
|
Where(sq.Eq{
|
||||||
"wt.namespace": namespace,
|
"wt.namespace": namespace,
|
||||||
"cw.name": uid,
|
"cw.name": uid,
|
||||||
|
"cw.is_archived": false,
|
||||||
}).
|
}).
|
||||||
ToSql()
|
ToSql()
|
||||||
|
|
||||||
|
@@ -538,8 +538,9 @@ func (c *Client) GetWorkflowExecution(namespace, uid string) (workflow *Workflow
|
|||||||
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").
|
||||||
Where(sq.Eq{
|
Where(sq.Eq{
|
||||||
"wt.namespace": namespace,
|
"wt.namespace": namespace,
|
||||||
"we.name": uid,
|
"we.name": uid,
|
||||||
|
"we.is_archived": false,
|
||||||
}).
|
}).
|
||||||
ToSql()
|
ToSql()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -1444,8 +1445,9 @@ func (c *Client) getWorkflowExecutionAndTemplate(namespace string, uid string) (
|
|||||||
Join("workflow_template_versions wtv ON we.workflow_template_version_id = wtv.id").
|
Join("workflow_template_versions wtv ON we.workflow_template_version_id = wtv.id").
|
||||||
Join("workflow_templates wt ON wtv.workflow_template_id = wt.id").
|
Join("workflow_templates wt ON wtv.workflow_template_id = wt.id").
|
||||||
Where(sq.Eq{
|
Where(sq.Eq{
|
||||||
"wt.namespace": namespace,
|
"wt.namespace": namespace,
|
||||||
"we.name": uid,
|
"we.name": uid,
|
||||||
|
"we.is_archived": false,
|
||||||
}).
|
}).
|
||||||
ToSql()
|
ToSql()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user