mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-10 16:05:58 +00:00
list flow steps only on the tab 'all'
This commit is contained in:
@@ -2361,6 +2361,11 @@ paths:
|
||||
in: query
|
||||
schema:
|
||||
type: boolean
|
||||
- name: is_flow_step
|
||||
description: is the job a flow step
|
||||
in: query
|
||||
schema:
|
||||
type: boolean
|
||||
responses:
|
||||
"200":
|
||||
description: All available completed jobs
|
||||
@@ -2392,6 +2397,11 @@ paths:
|
||||
in: query
|
||||
schema:
|
||||
type: boolean
|
||||
- name: is_flow_step
|
||||
description: is the job a flow step
|
||||
in: query
|
||||
schema:
|
||||
type: boolean
|
||||
- name: success
|
||||
description: filter on successful jobs
|
||||
in: query
|
||||
|
||||
@@ -579,6 +579,7 @@ pub struct ListCompletedQuery {
|
||||
pub order_desc: Option<bool>,
|
||||
pub job_kinds: Option<String>,
|
||||
pub is_skipped: Option<bool>,
|
||||
pub is_flow_step: Option<bool>,
|
||||
}
|
||||
fn list_completed_jobs_query(
|
||||
w_id: &str,
|
||||
@@ -621,6 +622,9 @@ fn list_completed_jobs_query(
|
||||
}
|
||||
if let Some(sk) = &lq.is_skipped {
|
||||
sqlb.and_where_eq("is_skipped", sk);
|
||||
}
|
||||
if let Some(fs) = &lq.is_flow_step {
|
||||
sqlb.and_where_eq("is_flow_step", fs);
|
||||
}
|
||||
if let Some(jk) = &lq.job_kinds {
|
||||
sqlb.and_where_in(
|
||||
|
||||
@@ -767,8 +767,8 @@ async fn login_callback(
|
||||
"oauth.signup",
|
||||
ActionKind::Create,
|
||||
"global",
|
||||
Some("github"),
|
||||
None,
|
||||
Some(&email),
|
||||
Some([("method", &client_name[..])].into()),
|
||||
)
|
||||
.await?;
|
||||
let demo_exists =
|
||||
|
||||
@@ -525,8 +525,7 @@ async fn get_script_by_path(
|
||||
|
||||
let script_o = sqlx::query_as::<_, Script>(
|
||||
"SELECT * FROM script WHERE path = $1 AND (workspace_id = $2 OR workspace_id = 'starter') \
|
||||
AND
|
||||
created_at = (SELECT max(created_at) FROM script WHERE path = $1 AND archived = false AND \
|
||||
AND created_at = (SELECT max(created_at) FROM script WHERE path = $1 AND \
|
||||
(workspace_id = $2 OR workspace_id = 'starter'))",
|
||||
)
|
||||
.bind(path)
|
||||
|
||||
@@ -87,7 +87,8 @@
|
||||
scriptPathExact: path === '' ? undefined : path,
|
||||
jobKinds,
|
||||
success,
|
||||
isSkipped
|
||||
isSkipped,
|
||||
isFlowStep: jobKindsCat != 'all' ? false : undefined
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user