diff --git a/hosting/bootstrap.sh b/hosting/bootstrap.sh new file mode 100755 index 0000000000..4e15481e64 --- /dev/null +++ b/hosting/bootstrap.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +GITHUB_BASE_URL=https://raw.githubusercontent.com/Budibase/budibase/master/hosting + +if ! [ -x "$(command -v wget)" ]; then + echo 'Error: wget is not installed. Please install it for your operating system.' >&2 + exit 1 +fi + +fetch_config_files() { + wget $GITHUB_BASE_URL/docker-compose.yaml + wget $GITHUB_BASE_URL/envoy.yaml + wget $GITHUB_BASE_URL/hosting.properties + wget $GITHUB_BASE_URL/start.sh +} + +fetch_config_files + +# Start budibase +docker-compose --env-file hosting.properties up -d diff --git a/hosting/docker-compose.yaml b/hosting/docker-compose.yaml index 5b7c266c1e..4d338cb221 100644 --- a/hosting/docker-compose.yaml +++ b/hosting/docker-compose.yaml @@ -2,6 +2,7 @@ version: "3" services: app-service: + restart: always image: budibase/budibase-apps ports: - "${APP_PORT}:4002" @@ -18,6 +19,7 @@ services: - worker-service worker-service: + restart: always image: budibase/budibase-worker ports: - "${WORKER_PORT}:4003" @@ -36,6 +38,7 @@ services: - couch-init minio-service: + restart: always image: minio/minio volumes: - minio_data:/data @@ -53,6 +56,7 @@ services: retries: 3 proxy-service: + restart: always image: envoyproxy/envoy:v1.16-latest volumes: - ./envoy.yaml:/etc/envoy/envoy.yaml @@ -66,6 +70,7 @@ services: - couchdb-service couchdb-service: + restart: always image: apache/couchdb:3.0 environment: - COUCHDB_PASSWORD=${COUCH_DB_PASSWORD} diff --git a/packages/builder/package.json b/packages/builder/package.json index a98da6e8d1..41b98750e9 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -63,7 +63,7 @@ } }, "dependencies": { - "@budibase/bbui": "^1.54.0", + "@budibase/bbui": "^1.54.1", "@budibase/client": "^0.5.3", "@budibase/colorpicker": "^1.0.1", "@budibase/string-templates": "^0.5.3", diff --git a/packages/builder/src/components/backend/DataTable/TableHeader/TableHeader.svelte b/packages/builder/src/components/backend/DataTable/TableHeader/TableHeader.svelte index 9588b34dd7..f6ef036f40 100644 --- a/packages/builder/src/components/backend/DataTable/TableHeader/TableHeader.svelte +++ b/packages/builder/src/components/backend/DataTable/TableHeader/TableHeader.svelte @@ -103,6 +103,15 @@ opacity: 1; } + .column-header-name { + white-space: normal !important; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + overflow: hidden; + } + .sort-icon { position: relative; top: 2px; diff --git a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte index aa8954cb8d..2369f99e74 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte @@ -43,8 +43,8 @@
+ height="18" + width="18" />
@@ -61,3 +61,10 @@ {/each} {/if} + + diff --git a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte index 79bb951c01..f92224e39a 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte @@ -7,10 +7,9 @@
{#each Object.keys(integration) as configKey} - + {/each} diff --git a/packages/builder/src/components/backend/DatasourceNavigator/popovers/EditQueryParamsPopover.svelte b/packages/builder/src/components/backend/DatasourceNavigator/popovers/EditQueryParamsPopover.svelte new file mode 100644 index 0000000000..bc34d4d80c --- /dev/null +++ b/packages/builder/src/components/backend/DatasourceNavigator/popovers/EditQueryParamsPopover.svelte @@ -0,0 +1,42 @@ + + +
+ + + Add Parameters + + +
+ +
+
+
+ + \ No newline at end of file diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/EventPropertyControl.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/EventPropertyControl.svelte index 96c0eca23f..241864839a 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/EventPropertyControl.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/EventPropertyControl.svelte @@ -57,7 +57,7 @@ } - + diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/PropertyGroup.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/PropertyGroup.svelte index d97ee7d18d..9d0bb4a40d 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/PropertyGroup.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/PropertyGroup.svelte @@ -9,12 +9,17 @@ export let onStyleChanged = () => {} export let open = false + $: style = componentInstance["_styles"][styleCategory] || {} + $: changed = properties.some(prop => hasPropChanged(style, prop)) + const hasPropChanged = (style, prop) => { return style[prop.key] != null && style[prop.key] !== "" } - $: style = componentInstance["_styles"][styleCategory] || {} - $: changed = properties.some(prop => hasPropChanged(style, prop)) + const getControlProps = props => { + const { label, key, control, ...otherProps } = props || {} + return otherProps || {} + } @@ -28,7 +33,7 @@ key={prop.key} value={style[prop.key]} onChange={value => onStyleChanged(styleCategory, prop.key, value)} - props={{ options: prop.options, placeholder: prop.placeholder }} /> + props={getControlProps(prop)} /> {/each} {/if} diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/TableViewSelect.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/TableViewSelect.svelte index bf88c8e9eb..4e5201a180 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/TableViewSelect.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/TableViewSelect.svelte @@ -78,9 +78,7 @@ const source = $backendUiStore.datasources.find( ds => ds._id === query.datasourceId ).source - return $backendUiStore.integrations[source].query[query.queryVerb][ - query.queryType - ] + return $backendUiStore.integrations[source].query[query.queryVerb] } diff --git a/packages/builder/src/components/integration/QueryEditor.svelte b/packages/builder/src/components/integration/QueryEditor.svelte index 22cddb5606..2b5965613e 100644 --- a/packages/builder/src/components/integration/QueryEditor.svelte +++ b/packages/builder/src/components/integration/QueryEditor.svelte @@ -155,8 +155,9 @@ } :global(.CodeMirror) { - height: auto !important; - border-radius: var(--border-radius-m); - font-family: var(--font-sans) !important; + height: 500px !important; + border-radius: var(--border-radius-s); + font-family: monospace !important; + line-height: 1.3; } diff --git a/packages/builder/src/components/integration/QueryFieldsBuilder.svelte b/packages/builder/src/components/integration/QueryFieldsBuilder.svelte index 83a03c72d1..d5f4b3bd8b 100644 --- a/packages/builder/src/components/integration/QueryFieldsBuilder.svelte +++ b/packages/builder/src/components/integration/QueryFieldsBuilder.svelte @@ -24,18 +24,18 @@
+
{#each schemaKeys as field} - -
-
{/each} +
- {#if schema.customisable} - import { Button, Label, Input, Heading } from "@budibase/bbui" + import { Button, Input, Heading, Spacer } from "@budibase/bbui" import BindableInput from "components/common/BindableInput.svelte" import { readableToRuntimeBinding, @@ -31,19 +31,22 @@
Parameters +
- - - {#if bindable} - - {:else} -
- {/if} {#each parameters as parameter, idx} - - + + {#if bindable} onBindingChange(parameter.name, evt.detail)} @@ -57,9 +60,7 @@ {/each}
{#if !bindable} - + {/if}
diff --git a/packages/builder/src/components/integration/QueryViewer.svelte b/packages/builder/src/components/integration/QueryViewer.svelte index 5ac3e550c1..da5f4e1a40 100644 --- a/packages/builder/src/components/integration/QueryViewer.svelte +++ b/packages/builder/src/components/integration/QueryViewer.svelte @@ -16,6 +16,7 @@ import { FIELDS } from "constants/backend" import IntegrationQueryEditor from "components/integration/index.svelte" import ExternalDataSourceTable from "components/backend/DataTable/ExternalDataSourceTable.svelte" + import EditQueryParamsPopover from "components/backend/DatasourceNavigator/popovers/EditQueryParamsPopover.svelte" import { backendUiStore } from "builderStore" const PREVIEW_HEADINGS = [ @@ -40,6 +41,7 @@ let tab = "JSON" let parameters let data = [] + let popover $: datasource = $backendUiStore.datasources.find( ds => ds._id === query.datasourceId @@ -61,7 +63,7 @@ $: config = $backendUiStore.integrations[datasourceType]?.query $: docsLink = $backendUiStore.integrations[datasourceType]?.docs - $: shouldShowQueryConfig = config && query.queryVerb && query.queryType + $: shouldShowQueryConfig = config && query.queryVerb function newField() { fields = [...fields, {}] @@ -129,62 +131,44 @@
- {query.name} +
+ +
{#if config} -
- {#each Object.keys(config) as queryVerb} -
{ - query.queryVerb = queryVerb - }}> - {queryVerb} -
- {/each} -
- {#if query.queryVerb} - + {#each Object.keys(config) as queryVerb} + {/each} - {/if} - - + + + {/if}
- - + {#if shouldShowQueryConfig}
- - - - - - + +
- +
@@ -196,10 +180,11 @@ {:else if tab === 'SCHEMA'} {#each fields as field, idx} +
- - +