diff --git a/backend/openapi.yaml b/backend/openapi.yaml index 0891ba70ed..2f628f45bd 100644 --- a/backend/openapi.yaml +++ b/backend/openapi.yaml @@ -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 diff --git a/backend/src/jobs.rs b/backend/src/jobs.rs index f264fad356..adef78b547 100644 --- a/backend/src/jobs.rs +++ b/backend/src/jobs.rs @@ -579,6 +579,7 @@ pub struct ListCompletedQuery { pub order_desc: Option, pub job_kinds: Option, pub is_skipped: Option, + pub is_flow_step: Option, } 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( diff --git a/backend/src/oauth2.rs b/backend/src/oauth2.rs index 6a808c5495..efa6c0c46a 100644 --- a/backend/src/oauth2.rs +++ b/backend/src/oauth2.rs @@ -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 = diff --git a/backend/src/scripts.rs b/backend/src/scripts.rs index c095ccdac8..6e0029a7f9 100644 --- a/backend/src/scripts.rs +++ b/backend/src/scripts.rs @@ -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) diff --git a/frontend/src/routes/runs/[...path].svelte b/frontend/src/routes/runs/[...path].svelte index df7ae9d547..135ab4e77d 100644 --- a/frontend/src/routes/runs/[...path].svelte +++ b/frontend/src/routes/runs/[...path].svelte @@ -87,7 +87,8 @@ scriptPathExact: path === '' ? undefined : path, jobKinds, success, - isSkipped + isSkipped, + isFlowStep: jobKindsCat != 'all' ? false : undefined }) }