From 08aaab2ca8bc5a3e53ab60123899ea4fa1df6888 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 13 Apr 2023 18:32:08 +0200 Subject: [PATCH] improve saved inputs --- backend/windmill-api/src/inputs.rs | 4 +- .../src/lib/components/SavedInputs.svelte | 58 ++++++++++--------- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/backend/windmill-api/src/inputs.rs b/backend/windmill-api/src/inputs.rs index 80e8741c7c..03903fb9a1 100644 --- a/backend/windmill-api/src/inputs.rs +++ b/backend/windmill-api/src/inputs.rs @@ -112,9 +112,9 @@ async fn get_input_history( let mut tx = user_db.begin(&authed).await?; let sql = &format!( - "select distinct on (args) * from completed_job \ + "select * from (select distinct on (args) * from completed_job \ where {} = $1 and job_kind = $2 and workspace_id = $3 \ - order by args, started_at desc limit $4 offset $5", + order by args, started_at desc limit $4 offset $5) t ORDER BY started_at desc", r.runnable_type.column_name() ); diff --git a/frontend/src/lib/components/SavedInputs.svelte b/frontend/src/lib/components/SavedInputs.svelte index 5a9ad55400..70437edb4f 100644 --- a/frontend/src/lib/components/SavedInputs.svelte +++ b/frontend/src/lib/components/SavedInputs.svelte @@ -142,7 +142,7 @@
-
+
Saved Inputs -
+
Previous Inputs
@@ -291,35 +291,37 @@
- -
- Preview + +
+
+
Preview
-
- {#if Object.keys(selectedInput?.args || {}).length > 0} -
- -
- {:else} -
- Select an Input to preview scripts arguments -
- {/if} +
+ {#if Object.keys(selectedInput?.args || {}).length > 0} +
+ +
+ {:else} +
+ Select an Input to preview scripts arguments +
+ {/if} +
-
-
- +
+ +