list flow steps only on the tab 'all'

This commit is contained in:
Ruben Fiszel
2022-08-23 15:18:44 +02:00
parent e7b9bace35
commit b8b1cc83ae
5 changed files with 19 additions and 5 deletions
+10
View File
@@ -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
+4
View File
@@ -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(
+2 -2
View File
@@ -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 =
+1 -2
View File
@@ -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)
+2 -1
View File
@@ -87,7 +87,8 @@
scriptPathExact: path === '' ? undefined : path,
jobKinds,
success,
isSkipped
isSkipped,
isFlowStep: jobKindsCat != 'all' ? false : undefined
})
}