Skip to content

Commit a9d4cf4

Browse files
authored
Improving the Local Baserow integration support for our one-way and two-data synced tables. (baserow#4417)
1 parent 6f409a7 commit a9d4cf4

File tree

17 files changed

+224
-42
lines changed

17 files changed

+224
-42
lines changed

backend/src/baserow/contrib/integrations/api/local_baserow/serializers.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ class LocalBaserowTableSerializer(serializers.ModelSerializer):
1616
source="is_data_synced_table",
1717
help_text="Whether this table is a data synced table or not.",
1818
)
19+
is_two_way_data_sync = serializers.BooleanField(
20+
source="is_two_way_data_synced_table",
21+
help_text="Whether this table is a two-way data synced table or not.",
22+
)
1923

2024
class Meta:
2125
model = Table
22-
fields = ("id", "database_id", "name", "is_data_sync")
26+
fields = ("id", "database_id", "name", "is_data_sync", "is_two_way_data_sync")
2327

2428

2529
class LocalBaserowDatabaseSerializer(ApplicationSerializer):

backend/tests/baserow/contrib/integrations/local_baserow/test_integration_types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ def test_get_integrations_serializer(
215215
"name": table.name,
216216
"database_id": table.database_id,
217217
"is_data_sync": table.is_data_synced_table,
218+
"is_two_way_data_sync": table.is_two_way_data_synced_table,
218219
}
219220
],
220221
"views": [
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "refactor",
3+
"message": "Improved one-way and two-way data sync support in Local Baserow actions.",
4+
"issue_origin": "github",
5+
"issue_number": null,
6+
"domain": "integration",
7+
"bullet_points": [],
8+
"created_at": "2025-12-09"
9+
}

web-frontend/modules/automation/components/workflow/sidePanels/NodeSidePanel.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
small
2828
:loading="nodeLoading"
2929
:service="node.service"
30+
:service-type="nodeType.serviceType"
3031
:application="automation"
3132
enable-integration-picker
3233
:default-values="node.service"

web-frontend/modules/builder/components/dataSource/DataSourceForm.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
ref="subForm"
6565
:application="builder"
6666
:service="dataSource"
67+
:service-type="serviceType"
6768
:default-values="defaultValues"
6869
:context-data="integration.context_data"
6970
@values-changed="emitChange($event)"

web-frontend/modules/builder/components/workflowAction/WorkflowActionWithService.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
:is="serviceType.formComponent"
44
:application="builder"
55
:service="defaultValues.service"
6+
:service-type="serviceType"
67
:loading="workflowActionLoading"
78
:default-values="defaultValues.service"
89
@values-changed="values.service = { ...workflowAction.service, ...$event }"

web-frontend/modules/integrations/localBaserow/components/services/LocalBaserowAggregateRowsForm.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<div class="col col-12">
55
<LocalBaserowServiceForm
66
:application="application"
7+
:service-type="serviceType"
78
:default-values="defaultValues"
89
:enable-integration-picker="enableIntegrationPicker"
910
@values-changed="values = { ...values, ...$event }"

web-frontend/modules/integrations/localBaserow/components/services/LocalBaserowGetRowForm.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<div class="col col-12">
66
<LocalBaserowServiceForm
77
:application="application"
8+
:service-type="serviceType"
89
:default-values="defaultValues"
910
:enable-integration-picker="enableIntegrationPicker"
1011
@values-changed="values = { ...values, ...$event }"

web-frontend/modules/integrations/localBaserow/components/services/LocalBaserowListRowsForm.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<div class="col col-12">
55
<LocalBaserowServiceForm
66
:application="application"
7+
:service-type="serviceType"
78
:default-values="defaultValues"
89
:enable-integration-picker="enableIntegrationPicker"
910
@values-changed="values = { ...values, ...$event }"

web-frontend/modules/integrations/localBaserow/components/services/LocalBaserowServiceForm.vue

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
<LocalBaserowTableSelector
1818
v-if="selectedIntegration"
1919
v-model="fakeTableId"
20-
:view-id.sync="values.view_id"
2120
:databases="databases"
21+
:service-type="serviceType"
22+
:view-id.sync="values.view_id"
2223
:display-view-dropdown="enableViewPicker"
23-
:disallow-data-synced-tables="disallowDataSyncedTables"
2424
/>
2525
<FormGroup
2626
v-if="enableRowId && values.integration_id"
@@ -64,6 +64,10 @@ export default {
6464
type: Object,
6565
required: true,
6666
},
67+
serviceType: {
68+
type: Object,
69+
required: true,
70+
},
6771
enableRowId: {
6872
type: Boolean,
6973
required: false,
@@ -89,15 +93,6 @@ export default {
8993
required: false,
9094
default: true,
9195
},
92-
/**
93-
* Whether to disallow the selection of data synced tables. Data sources
94-
* can select them, but a create-row workflow action cannot.
95-
*/
96-
disallowDataSyncedTables: {
97-
type: Boolean,
98-
required: false,
99-
default: false,
100-
},
10196
},
10297
data() {
10398
const values = { table_id: null, integration_id: null }

0 commit comments

Comments
 (0)