Skip to content

Commit 2bed97b

Browse files
authored
nits: show error and documentation link, add better name (#5141)
1 parent 119d7ba commit 2bed97b

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

backend/windmill-api/src/postgres_triggers/trigger.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ impl PostgresSimpleClient {
7676
.port(database.port)
7777
.user(&database.user)
7878
.replication_mode(rust_postgres::config::ReplicationMode::Logical);
79-
79+
8080
if !database.password.is_empty() {
8181
config.password(&database.password);
8282
}
@@ -389,7 +389,8 @@ async fn listen_to_transactions(
389389
}
390390
}
391391
Err(err) => {
392-
tracing::error!("Postgres trigger error while trying to start_logical_replication_streaming: {}", err.to_string())
392+
tracing::error!("Postgres trigger error while trying to start logical replication streaming: {}", &err);
393+
disable_with_error(&postgres_trigger, &db, err.to_string()).await
393394
}
394395
}
395396
}

frontend/src/lib/components/triggers/postgres/PostgresTriggerEditorInner.svelte

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@
443443
bind:selected={transaction_to_track}
444444
/>
445445
</Section>
446-
<Section label="Publication">
446+
<Section label="Table Tracking">
447447
<p class="text-xs mb-3 text-tertiary">
448448
Select the tables to track. You can choose to track
449449
<strong>all tables in your database</strong>,
@@ -456,6 +456,7 @@
456456
<Tab value="basic"
457457
><div class="flex flex-row gap-1"
458458
>Basic<Tooltip
459+
documentationLink="https://www.windmill.dev/docs/core_concepts/postgres_triggers#define-what-to-track"
459460
><p
460461
>Choose the <strong>relations</strong> to track without worrying about the
461462
underlying mechanics of creating a
@@ -469,6 +470,7 @@
469470
<Tab value="advanced"
470471
><div class="flex flex-row gap-1"
471472
>Advanced<Tooltip
473+
documentationLink="https://www.windmill.dev/docs/core_concepts/postgres_triggers#advanced"
472474
><p
473475
>Select a specific <strong>publication</strong> from your database to
474476
track, and manage it by <strong>creating</strong>,
@@ -488,10 +490,11 @@
488490
<RelationPicker bind:selectedTable bind:relations />
489491
</TabContent>
490492
<TabContent value="advanced">
491-
<div class="flex flex-col gap-4"
493+
<div class="flex flex-col gap-6"
492494
><Section
493-
label="Slot name"
495+
label="Replication slot management"
494496
tooltip="Choose and manage the slots for your trigger. You can create or delete slots. Both non-active slots and the currently used slot by the trigger (if any) will be retrieved from your database for management."
497+
documentationLink="https://www.windmill.dev/docs/core_concepts/postgres_triggers#managing-postgres-replication-slots"
495498
>
496499
<div class="flex flex-col gap-3">
497500
<ToggleButtonGroup
@@ -529,8 +532,9 @@
529532
</Section>
530533

531534
<Section
532-
label="Publication"
535+
label="Publication management"
533536
tooltip="Select and manage the publications for tracking data. You can create, update, or delete publications. Only existing publications in your database will be available for selection, giving you full control over what data is tracked."
537+
documentationLink="https://www.windmill.dev/docs/core_concepts/postgres_triggers#managing-postgres-publications"
534538
>
535539
<div class="flex flex-col gap-3">
536540
<ToggleButtonGroup

frontend/src/lib/components/triggers/postgres/RelationPicker.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
<label class="flex flex-col w-full">
5050
<div class="text-secondary text-sm mb-2 flex flex-row gap-1"
5151
><p>Columns</p><Tooltip
52+
documentationLink="https://www.windmill.dev/docs/core_concepts/postgres_triggers#selecting-specific-columns"
5253
><p>
5354
Enter the names of the <strong>columns</strong> you want to track.
5455
<br />If no columns are specified, all columns in the table will be
@@ -81,7 +82,9 @@
8182
</label>
8283
<label class="flex flex-col w-full">
8384
<div class="text-secondary text-sm mb-2 flex flex-row gap-1"
84-
><p>Where Clause</p><Tooltip>
85+
><p>Where Clause</p><Tooltip
86+
documentationLink="https://www.windmill.dev/docs/core_concepts/postgres_triggers#filtering-rows-with-where-condition"
87+
>
8588
<p class="text-sm">
8689
Use this field to define a row filter for the selected table. The <strong
8790
>WHERE</strong

0 commit comments

Comments
 (0)