diff --git a/hosting/couchdb/runner.sh b/hosting/couchdb/runner.sh index 2e4d26122f..b576c886c2 100644 --- a/hosting/couchdb/runner.sh +++ b/hosting/couchdb/runner.sh @@ -26,27 +26,48 @@ if [[ "${TARGETBUILD}" = "aas" ]]; then sed -i "s#DATA_DIR#/home#g" /opt/clouseau/clouseau.ini sed -i "s#DATA_DIR#/home#g" /opt/couchdb/etc/local.ini elif [[ "${TARGETBUILD}" = "single" ]]; then + # In the single image build, the Dockerfile specifies /data as a volume + # mount, so we use that for all persistent data. sed -i "s#DATA_DIR#/data#g" /opt/clouseau/clouseau.ini sed -i "s#DATA_DIR#/data#g" /opt/couchdb/etc/local.ini elif [[ -n $KUBERNETES_SERVICE_HOST ]]; then # In Kubernetes the directory /opt/couchdb/data has a persistent volume # mount for storing database data. sed -i "s#DATA_DIR#/opt/couchdb/data#g" /opt/clouseau/clouseau.ini - sed -i "s#DATA_DIR#/opt/couchdb/data#g" /opt/couchdb/etc/local.ini + + # We remove the database_dir and view_index_dir settings from the local.ini + # in Kubernetes because it will default to /opt/couchdb/data which is what + # our Helm chart was using prior to us switching to using our own CouchDB + # image. + sed -i "s#^database_dir.*\$##g" /opt/couchdb/etc/local.ini + sed -i "s#^view_index_dir.*\$##g" /opt/couchdb/etc/local.ini + + # We remove the -name setting from the vm.args file in Kubernetes because + # it will default to the pod FQDN, which is what's required for clustering + # to work. sed -i "s/^-name .*$//g" /opt/couchdb/etc/vm.args else + # For all other builds, we use /data for persistent data. sed -i "s#DATA_DIR#/data#g" /opt/clouseau/clouseau.ini sed -i "s#DATA_DIR#/data#g" /opt/couchdb/etc/local.ini fi +# Start Clouseau. Budibase won't function correctly without Clouseau running, it +# powers the search API endpoints which are used to do all sorts, including +# populating app grids. /opt/clouseau/bin/clouseau > /dev/stdout 2>&1 & + +# Start CouchDB. /docker-entrypoint.sh /opt/couchdb/bin/couchdb & +# Wati for CouchDB to start up. while [[ $(curl -s -w "%{http_code}\n" http://localhost:5984/_up -o /dev/null) -ne 200 ]]; do echo 'Waiting for CouchDB to start...'; sleep 5; done +# CouchDB needs the `_users` and `_replicator` databases to exist before it will +# function correctly, so we create them here. curl -X PUT http://${COUCHDB_USER}:${COUCHDB_PASSWORD}@localhost:5984/_users curl -X PUT http://${COUCHDB_USER}:${COUCHDB_PASSWORD}@localhost:5984/_replicator sleep infinity \ No newline at end of file diff --git a/lerna.json b/lerna.json index 38872a31b1..e54b76c5e9 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.13.18", + "version": "2.13.19", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/bbui/src/Form/Core/Switch.svelte b/packages/bbui/src/Form/Core/Switch.svelte index ffbef6b27d..deffc19167 100644 --- a/packages/bbui/src/Form/Core/Switch.svelte +++ b/packages/bbui/src/Form/Core/Switch.svelte @@ -18,6 +18,7 @@ checked={value} {disabled} on:change={onChange} + on:click {id} type="checkbox" class="spectrum-Switch-input" diff --git a/packages/bbui/src/Form/Toggle.svelte b/packages/bbui/src/Form/Toggle.svelte index d452aa8f80..1fbad949ca 100644 --- a/packages/bbui/src/Form/Toggle.svelte +++ b/packages/bbui/src/Form/Toggle.svelte @@ -19,5 +19,5 @@ - + diff --git a/packages/builder/src/components/design/settings/controls/ButtonConfiguration/ButtonSetting.svelte b/packages/builder/src/components/design/settings/controls/ButtonConfiguration/ButtonSetting.svelte index 56b5deace4..77c4458d01 100644 --- a/packages/builder/src/components/design/settings/controls/ButtonConfiguration/ButtonSetting.svelte +++ b/packages/builder/src/components/design/settings/controls/ButtonConfiguration/ButtonSetting.svelte @@ -55,7 +55,10 @@ size="S" name="Close" hoverable - on:click={() => removeButton(item._id)} + on:click={e => { + e.stopPropagation() + removeButton(item._id) + }} /> diff --git a/packages/builder/src/components/design/settings/controls/DraggableList/DraggableList.svelte b/packages/builder/src/components/design/settings/controls/DraggableList/DraggableList.svelte index 69d3c382cd..cce11e4b17 100644 --- a/packages/builder/src/components/design/settings/controls/DraggableList/DraggableList.svelte +++ b/packages/builder/src/components/design/settings/controls/DraggableList/DraggableList.svelte @@ -32,11 +32,14 @@ } const dispatch = createEventDispatcher() - const flipDurationMs = 150 let anchors = {} let draggableItems = [] + // Used for controlling cursor behaviour in order to limit drag behaviour + // to the drag handle + let inactive = true + const buildDraggable = items => { return items .map(item => { @@ -64,6 +67,7 @@ } const handleFinalize = e => { + inactive = true updateRowOrder(e) dispatch("change", serialiseUpdate()) } @@ -77,24 +81,36 @@ class="list-wrap" use:dndzone={{ items: draggableItems, - flipDurationMs, dropTargetStyle: { outline: "none" }, - dragDisabled: !draggable, + dragDisabled: !draggable || inactive, }} on:finalize={handleFinalize} on:consider={updateRowOrder} > - {#each draggableItems as draggable (draggable.id)} + {#each draggableItems as draggableItem (draggableItem.id)}
  • { + get(store).actions.select(draggableItem.id) + }} on:mousedown={() => { get(store).actions.select() }} - bind:this={anchors[draggable.id]} - class:highlighted={draggable.id === $store.selected} + bind:this={anchors[draggableItem.id]} + class:highlighted={draggableItem.id === $store.selected} >
    {#if showHandle} -
    +
    { + inactive = false + }} + on:mouseup={() => { + inactive = true + }} + >
    {/if} @@ -102,8 +118,8 @@
    @@ -143,6 +159,7 @@ --spectrum-table-row-background-color-hover, var(--spectrum-alias-highlight-hover) ); + cursor: pointer; } .list-wrap > li:first-child { border-top-left-radius: 4px; @@ -165,6 +182,9 @@ display: flex; height: var(--spectrum-global-dimension-size-150); } + .handle:hover { + cursor: grab; + } .handle :global(svg) { fill: var(--spectrum-global-color-gray-500); margin-right: var(--spacing-m); diff --git a/packages/builder/src/components/design/settings/controls/FieldConfiguration/FieldConfiguration.svelte b/packages/builder/src/components/design/settings/controls/FieldConfiguration/FieldConfiguration.svelte index dfc4ddddc1..7f1ac1cf25 100644 --- a/packages/builder/src/components/design/settings/controls/FieldConfiguration/FieldConfiguration.svelte +++ b/packages/builder/src/components/design/settings/controls/FieldConfiguration/FieldConfiguration.svelte @@ -156,7 +156,7 @@
    - + Fields { let update = fieldList.map(field => ({ @@ -186,6 +186,9 @@
    diff --git a/packages/builder/src/components/design/settings/controls/FieldConfiguration/FieldSetting.svelte b/packages/builder/src/components/design/settings/controls/FieldConfiguration/FieldSetting.svelte index 1d9ce733b8..8c40c455c8 100644 --- a/packages/builder/src/components/design/settings/controls/FieldConfiguration/FieldSetting.svelte +++ b/packages/builder/src/components/design/settings/controls/FieldConfiguration/FieldSetting.svelte @@ -58,7 +58,15 @@
    {readableText}
    - + { + e.stopPropagation() + }} + text="" + value={item.active} + thin + />
    diff --git a/packages/builder/src/pages/builder/portal/apps/index.svelte b/packages/builder/src/pages/builder/portal/apps/index.svelte index fac5c502b3..cf2c61b11d 100644 --- a/packages/builder/src/pages/builder/portal/apps/index.svelte +++ b/packages/builder/src/pages/builder/portal/apps/index.svelte @@ -205,7 +205,7 @@ messages: [ { message: - "We've updated our pricing - read the blog post to learn more.", + "We've updated our pricing - see our website to learn more.", type: BANNER_TYPES.NEUTRAL, extraButtonText: "Learn More", extraButtonAction: () => diff --git a/packages/client/manifest.json b/packages/client/manifest.json index c7a207fc28..fdb0ad9db1 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -6056,18 +6056,6 @@ "options": ["Create", "Update", "View"], "defaultValue": "Create" }, - { - "type": "text", - "label": "Title", - "key": "title", - "nested": true - }, - { - "type": "text", - "label": "Description", - "key": "description", - "nested": true - }, { "section": true, "dependsOn": { @@ -6075,7 +6063,7 @@ "value": "Create", "invert": true }, - "name": "Row details", + "name": "Row ID", "info": "How to pass a row ID using bindings", "settings": [ { @@ -6095,8 +6083,20 @@ }, { "section": true, - "name": "Fields", + "name": "Details", "settings": [ + { + "type": "text", + "label": "Title", + "key": "title", + "nested": true + }, + { + "type": "text", + "label": "Description", + "key": "description", + "nested": true + }, { "type": "fieldConfiguration", "key": "fields",