From 7f934327b7f3fc426bbfac92fc27f874dbfa31f5 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 8 Jun 2021 11:42:39 +0100 Subject: [PATCH 1/5] making new screen modal choose the currently filtered role --- hosting/docker-compose.yaml | 4 +- .../NavigationPanel/NewScreenModal.svelte | 4 +- packages/server/yarn.lock | 1318 +---------------- packages/worker/yarn.lock | 97 +- 4 files changed, 23 insertions(+), 1400 deletions(-) diff --git a/hosting/docker-compose.yaml b/hosting/docker-compose.yaml index b03b433cef..7fb78c3ef3 100644 --- a/hosting/docker-compose.yaml +++ b/hosting/docker-compose.yaml @@ -6,6 +6,7 @@ services: app-service: restart: always image: budibase/apps + container_name: bbapps ports: - "${APP_PORT}:4002" environment: @@ -32,6 +33,7 @@ services: worker-service: restart: always image: budibase/worker + container_name: bbworker ports: - "${WORKER_PORT}:4003" environment: @@ -118,7 +120,7 @@ services: image: containrrr/watchtower volumes: - /var/run/docker.sock:/var/run/docker.sock - command: --debug --http-api-update budibase/apps budibase/worker + command: --debug --http-api-update bbapps bbworker environment: - WATCHTOWER_HTTP_API=true - WATCHTOWER_HTTP_API_TOKEN=budibase diff --git a/packages/builder/src/components/design/NavigationPanel/NewScreenModal.svelte b/packages/builder/src/components/design/NavigationPanel/NewScreenModal.svelte index ee8e6f5b7e..124ea888f4 100644 --- a/packages/builder/src/components/design/NavigationPanel/NewScreenModal.svelte +++ b/packages/builder/src/components/design/NavigationPanel/NewScreenModal.svelte @@ -1,5 +1,5 @@ @@ -45,7 +47,9 @@ fieldApi.setValue(e.detail)} + on:change={e => { + fieldApi.setValue(e.detail) + }} {processFiles} {handleFileTooLarge} /> diff --git a/packages/standard-components/src/forms/Form.svelte b/packages/standard-components/src/forms/Form.svelte index afa4aeeeb4..d73af72a47 100644 --- a/packages/standard-components/src/forms/Form.svelte +++ b/packages/standard-components/src/forms/Form.svelte @@ -80,7 +80,7 @@ } // Provide both form API and state to children - setContext("form", { formApi, formState }) + setContext("form", { formApi, formState, dataSource }) // Action context to pass to children $: actions = [{ type: ActionTypes.ValidateForm, callback: formApi.validate }] From eeaca8fc821e583aeb741f2de729e884c5eafe07 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 8 Jun 2021 14:26:06 +0100 Subject: [PATCH 3/5] do not make query execution a requirement --- .../builder/src/components/integration/QueryViewer.svelte | 6 ++++-- packages/server/src/api/controllers/query.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/integration/QueryViewer.svelte b/packages/builder/src/components/integration/QueryViewer.svelte index ea2b5a94a4..78c5a7fa9a 100644 --- a/packages/builder/src/components/integration/QueryViewer.svelte +++ b/packages/builder/src/components/integration/QueryViewer.svelte @@ -33,7 +33,7 @@ { label: "Datetime", value: "DATETIME" }, ] - $: datasource = $datasources.list.find(ds => ds._id === query.datasourceId) + $: datasource = $datasources.list.find(ds => ds._id === query.datasourceId) $: query.schema = fields.reduce( (acc, next) => ({ ...acc, @@ -48,6 +48,8 @@ $: integrationInfo = $integrations[datasourceType] $: queryConfig = integrationInfo?.query $: shouldShowQueryConfig = queryConfig && query.queryVerb + $: readQuery = query.queryVerb === "read" || query.readable + $: queryInvalid = !query.name || (readQuery && data.length === 0) function newField() { fields = [...fields, {}] @@ -152,7 +154,7 @@ diff --git a/packages/standard-components/src/forms/BooleanField.svelte b/packages/standard-components/src/forms/BooleanField.svelte index 2d12a89228..17a3c563bc 100644 --- a/packages/standard-components/src/forms/BooleanField.svelte +++ b/packages/standard-components/src/forms/BooleanField.svelte @@ -9,8 +9,6 @@ let fieldState let fieldApi - - // $: if (fieldApi && $fieldState.value === null) fieldApi.setValue(false)