From eb04c89182884b260b3322106dd8829696bab391 Mon Sep 17 00:00:00 2001 From: Keith Ellis Date: Tue, 31 Oct 2023 16:34:02 -0400 Subject: [PATCH 001/248] Add check to fix startup if CLUSTER_MODE is enable --- packages/server/src/environment.ts | 1 + packages/server/src/startup.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/server/src/environment.ts b/packages/server/src/environment.ts index a1701535ce..b0a35eedf5 100644 --- a/packages/server/src/environment.ts +++ b/packages/server/src/environment.ts @@ -32,6 +32,7 @@ const environment = { REDIS_PASSWORD: process.env.REDIS_PASSWORD, REDIS_CLUSTERED: process.env.REDIS_CLUSTERED, HTTP_MIGRATIONS: process.env.HTTP_MIGRATIONS, + CLUSTER_MODE: process.env.CLUSTER_MODE, API_REQ_LIMIT_PER_SEC: process.env.API_REQ_LIMIT_PER_SEC, GOOGLE_CLIENT_ID: process.env.GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET: process.env.GOOGLE_CLIENT_SECRET, diff --git a/packages/server/src/startup.ts b/packages/server/src/startup.ts index b4a287d2d4..fd07c5f530 100644 --- a/packages/server/src/startup.ts +++ b/packages/server/src/startup.ts @@ -58,7 +58,7 @@ export async function startup(app?: any, server?: any) { return } STARTUP_RAN = true - if (server) { + if (server && env.CLUSTER_MODE?.toLowerCase() !== "true") { console.log(`Budibase running on ${JSON.stringify(server.address())}`) env._set("PORT", server.address().port) } From 5f585a426dceb922e548b9f5cff43cb0d85b7288 Mon Sep 17 00:00:00 2001 From: kellis5137 Date: Thu, 2 Nov 2023 11:29:30 -0400 Subject: [PATCH 002/248] Update startup.ts to use simpler flag check --- packages/server/src/startup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/startup.ts b/packages/server/src/startup.ts index fd07c5f530..82cb3502ef 100644 --- a/packages/server/src/startup.ts +++ b/packages/server/src/startup.ts @@ -58,7 +58,7 @@ export async function startup(app?: any, server?: any) { return } STARTUP_RAN = true - if (server && env.CLUSTER_MODE?.toLowerCase() !== "true") { + if (server && !env.CLUSTER_MODE) { console.log(`Budibase running on ${JSON.stringify(server.address())}`) env._set("PORT", server.address().port) } From bcf431a476bffe9691824f1561aed5843bff4c04 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 8 Nov 2023 14:43:28 +0000 Subject: [PATCH 003/248] Fix a few svelte bugs with the LinkedRowSelector component to fix adding/editing relationships via a model from the data UI --- .../automation/SetupPanel/RowSelectorTypes.svelte | 2 +- .../components/backend/DataTable/RowFieldControl.svelte | 7 ++++++- .../builder/src/components/common/LinkedRowSelector.svelte | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/components/automation/SetupPanel/RowSelectorTypes.svelte b/packages/builder/src/components/automation/SetupPanel/RowSelectorTypes.svelte index 373d174541..f6cce6182c 100644 --- a/packages/builder/src/components/automation/SetupPanel/RowSelectorTypes.svelte +++ b/packages/builder/src/components/automation/SetupPanel/RowSelectorTypes.svelte @@ -64,7 +64,7 @@ {:else if schema.type === "link"} onChange(e, field)} /> diff --git a/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte b/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte index 61b706e28e..1ec32cb3fd 100644 --- a/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte +++ b/packages/builder/src/components/backend/DataTable/RowFieldControl.svelte @@ -70,7 +70,12 @@ options={meta.constraints.inclusion} /> {:else if type === "link"} - + (value = e.detail)} + /> {:else if type === "longform"} {#if meta.useRichText} diff --git a/packages/builder/src/components/common/LinkedRowSelector.svelte b/packages/builder/src/components/common/LinkedRowSelector.svelte index d357a0a54d..c45b7be195 100644 --- a/packages/builder/src/components/common/LinkedRowSelector.svelte +++ b/packages/builder/src/components/common/LinkedRowSelector.svelte @@ -56,12 +56,12 @@ /> {:else} row._id} sort - on:change={() => dispatch("change", linkedIds)} + on:change /> {/if} From ab350057b62cc6d0d7e12a6f3bab72ea00b10f58 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 9 Nov 2023 12:23:41 +0100 Subject: [PATCH 004/248] Add seachbox to sources (not functional) --- .../src/components/common/SearchBox.svelte | 162 ++++++++++++++++++ .../app/[application]/data/_layout.svelte | 10 +- 2 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 packages/builder/src/components/common/SearchBox.svelte diff --git a/packages/builder/src/components/common/SearchBox.svelte b/packages/builder/src/components/common/SearchBox.svelte new file mode 100644 index 0000000000..d37bcab2a0 --- /dev/null +++ b/packages/builder/src/components/common/SearchBox.svelte @@ -0,0 +1,162 @@ + + + + +
+ +
+ {title} +
+
+ +
+
+ + diff --git a/packages/builder/src/pages/builder/app/[application]/data/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/data/_layout.svelte index d89f09fc08..80f3f22497 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/_layout.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/_layout.svelte @@ -4,6 +4,7 @@ import Panel from "components/design/Panel.svelte" import { isActive, redirect, goto, params } from "@roxi/routify" import { datasources } from "stores/backend" + import SearchBox from "components/common/SearchBox.svelte" $: { // If we ever don't have any data other than the users table, prompt the @@ -18,7 +19,10 @@
{#if !$isActive("./new")} - + + + + @@ -51,4 +55,8 @@ flex: 1 1 auto; z-index: 1; } + + .panel-title-content { + display: contents; + } From 04f67f3199a3511fac67b291fa63218bdd008dab Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 9 Nov 2023 12:53:47 +0100 Subject: [PATCH 005/248] Add close functionallity --- .../src/components/common/SearchBox.svelte | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/components/common/SearchBox.svelte b/packages/builder/src/components/common/SearchBox.svelte index d37bcab2a0..079ac7e37b 100644 --- a/packages/builder/src/components/common/SearchBox.svelte +++ b/packages/builder/src/components/common/SearchBox.svelte @@ -1,7 +1,6 @@ @@ -39,15 +47,16 @@ {placeholder} /> -
- -
{title}
+ +
+ +
From 24bef1ee9df868ed21bdc5c04ef295646281e7e3 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 9 Nov 2023 15:38:08 +0100 Subject: [PATCH 012/248] Rename --- .../components/common/{SearchBox.svelte => NavHeader.svelte} | 0 .../src/pages/builder/app/[application]/data/_layout.svelte | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename packages/builder/src/components/common/{SearchBox.svelte => NavHeader.svelte} (100%) diff --git a/packages/builder/src/components/common/SearchBox.svelte b/packages/builder/src/components/common/NavHeader.svelte similarity index 100% rename from packages/builder/src/components/common/SearchBox.svelte rename to packages/builder/src/components/common/NavHeader.svelte diff --git a/packages/builder/src/pages/builder/app/[application]/data/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/data/_layout.svelte index 7d05b68ec8..268cce2930 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/_layout.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/_layout.svelte @@ -4,7 +4,7 @@ import Panel from "components/design/Panel.svelte" import { isActive, redirect, goto, params } from "@roxi/routify" import { datasources } from "stores/backend" - import SearchBox from "components/common/SearchBox.svelte" + import NavHeader from "components/common/NavHeader.svelte" let searchValue @@ -23,7 +23,7 @@ {#if !$isActive("./new")} - Date: Thu, 9 Nov 2023 15:44:34 +0100 Subject: [PATCH 013/248] Handle enters --- .../src/components/common/NavHeader.svelte | 15 +++++++++++++-- packages/builder/src/helpers/keyUtils.js | 7 +++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 packages/builder/src/helpers/keyUtils.js diff --git a/packages/builder/src/components/common/NavHeader.svelte b/packages/builder/src/components/common/NavHeader.svelte index 3131f06ea6..5e401cf3c8 100644 --- a/packages/builder/src/components/common/NavHeader.svelte +++ b/packages/builder/src/components/common/NavHeader.svelte @@ -1,6 +1,7 @@ diff --git a/packages/builder/src/pages/builder/app/[application]/data/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/data/_layout.svelte index 268cce2930..90f9fb6be2 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/_layout.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/_layout.svelte @@ -27,10 +27,10 @@ title="Sources" placeholder="Search for sources" bind:value={searchValue} + onAdd={() => $goto("./new")} /> - From b908287223d150d0e93f9cf0ea35678078a99da9 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 9 Nov 2023 16:09:45 +0100 Subject: [PATCH 017/248] Animate chevron --- packages/builder/src/components/common/NavItem.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/builder/src/components/common/NavItem.svelte b/packages/builder/src/components/common/NavItem.svelte index 2c8a862535..1c9267ca18 100644 --- a/packages/builder/src/components/common/NavItem.svelte +++ b/packages/builder/src/components/common/NavItem.svelte @@ -189,6 +189,7 @@ flex: 0 0 20px; pointer-events: all; order: 0; + transition: transform 100ms linear; } .icon.arrow.absolute { position: absolute; From 72c415e72c61c18e01e76cbc53b92fbbf1e92a16 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 9 Nov 2023 16:31:10 +0100 Subject: [PATCH 018/248] Filter tables --- .../backend/DatasourceNavigator/DatasourceNavigator.svelte | 2 +- .../components/backend/TableNavigator/TableNavigator.svelte | 6 ++++++ .../src/pages/builder/app/[application]/data/_layout.svelte | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte index 5f914f545a..86cea3b3b9 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte @@ -206,7 +206,7 @@ {#if datasource.open} - + {#each $queries.list.filter(query => query.datasourceId === datasource._id && (!searchTerm || query.name ?.toLowerCase() ?.indexOf(searchTerm.toLowerCase()) > -1)) as query} diff --git a/packages/builder/src/components/backend/TableNavigator/TableNavigator.svelte b/packages/builder/src/components/backend/TableNavigator/TableNavigator.svelte index 712d74889c..3f0538ceb3 100644 --- a/packages/builder/src/components/backend/TableNavigator/TableNavigator.svelte +++ b/packages/builder/src/components/backend/TableNavigator/TableNavigator.svelte @@ -7,6 +7,7 @@ import { goto, isActive } from "@roxi/routify" import { userSelectedResourceMap } from "builderStore" + export let searchTerm export let sourceId export let selectTable @@ -14,6 +15,11 @@ .filter( table => table.sourceId === sourceId && table._id !== TableNames.USERS ) + .filter( + table => + !searchTerm || + table.name.toLowerCase()?.indexOf(searchTerm.toLowerCase()) > -1 + ) .sort(alphabetical) const alphabetical = (a, b) => { diff --git a/packages/builder/src/pages/builder/app/[application]/data/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/data/_layout.svelte index 90f9fb6be2..3fbf18eac5 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/_layout.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/_layout.svelte @@ -1,5 +1,5 @@