diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index 92efcfab57..f5e681bc49 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -33920,6 +33920,19 @@ components: type: object description: Schema snapshot at fork time additionalProperties: true + shared_datatables: + type: object + description: >- + Data tables of other workspaces that this one uses. Read-only here: + they are configured, and their permissions administered, in the + workspace named by `from`. + additionalProperties: + type: object + required: [from] + properties: + from: + type: string + description: The workspace this data table belongs to DatatableMigration: type: object required: [datatable, timestamp, name, code_up] diff --git a/frontend/src/lib/components/workspaceSettings/DataTableSettings.svelte b/frontend/src/lib/components/workspaceSettings/DataTableSettings.svelte index 435b1723ef..26b7026750 100644 --- a/frontend/src/lib/components/workspaceSettings/DataTableSettings.svelte +++ b/frontend/src/lib/components/workspaceSettings/DataTableSettings.svelte @@ -13,12 +13,16 @@ resource_path?: string | undefined } }[] + /// Data tables of other workspaces that this one uses. Not this form's to + /// edit — they are configured, and their permissions administered, where + /// they live — so they are listed and left out of what it saves. + sharedDataTables: { name: string; from: string }[] } export function convertDataTableSettingsFromBackend( settings: GetSettingsResponse['datatable'] ): DataTableSettingsType { - const s: DataTableSettingsType = { dataTables: [] } + const s: DataTableSettingsType = { dataTables: [], sharedDataTables: [] } if (settings?.datatables) { for (const [name, rest] of Object.entries(settings.datatables)) { s.dataTables.push({ @@ -28,6 +32,9 @@ }) } } + for (const [name, entry] of Object.entries(settings?.shared_datatables ?? {})) { + s.sharedDataTables.push({ name, from: entry.from }) + } return s } export function convertDataTableSettingsToBackend( @@ -316,7 +323,7 @@
- {#if tempSettings.dataTables.length == 0} + {#if tempSettings.dataTables.length == 0 && tempSettings.sharedDataTables.length == 0}