Merge branch 'master' into fix/formblock-ux-updates
This commit is contained in:
commit
a1a7ab227d
|
@ -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/clouseau/clouseau.ini
|
||||||
sed -i "s#DATA_DIR#/home#g" /opt/couchdb/etc/local.ini
|
sed -i "s#DATA_DIR#/home#g" /opt/couchdb/etc/local.ini
|
||||||
elif [[ "${TARGETBUILD}" = "single" ]]; then
|
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/clouseau/clouseau.ini
|
||||||
sed -i "s#DATA_DIR#/data#g" /opt/couchdb/etc/local.ini
|
sed -i "s#DATA_DIR#/data#g" /opt/couchdb/etc/local.ini
|
||||||
elif [[ -n $KUBERNETES_SERVICE_HOST ]]; then
|
elif [[ -n $KUBERNETES_SERVICE_HOST ]]; then
|
||||||
# In Kubernetes the directory /opt/couchdb/data has a persistent volume
|
# In Kubernetes the directory /opt/couchdb/data has a persistent volume
|
||||||
# mount for storing database data.
|
# 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/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
|
sed -i "s/^-name .*$//g" /opt/couchdb/etc/vm.args
|
||||||
else
|
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/clouseau/clouseau.ini
|
||||||
sed -i "s#DATA_DIR#/data#g" /opt/couchdb/etc/local.ini
|
sed -i "s#DATA_DIR#/data#g" /opt/couchdb/etc/local.ini
|
||||||
fi
|
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 &
|
/opt/clouseau/bin/clouseau > /dev/stdout 2>&1 &
|
||||||
|
|
||||||
|
# Start CouchDB.
|
||||||
/docker-entrypoint.sh /opt/couchdb/bin/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
|
while [[ $(curl -s -w "%{http_code}\n" http://localhost:5984/_up -o /dev/null) -ne 200 ]]; do
|
||||||
echo 'Waiting for CouchDB to start...';
|
echo 'Waiting for CouchDB to start...';
|
||||||
sleep 5;
|
sleep 5;
|
||||||
done
|
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/_users
|
||||||
curl -X PUT http://${COUCHDB_USER}:${COUCHDB_PASSWORD}@localhost:5984/_replicator
|
curl -X PUT http://${COUCHDB_USER}:${COUCHDB_PASSWORD}@localhost:5984/_replicator
|
||||||
sleep infinity
|
sleep infinity
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "2.13.18",
|
"version": "2.13.19",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
</span>
|
</span>
|
||||||
{:else if schema.type === "link"}
|
{:else if schema.type === "link"}
|
||||||
<LinkedRowSelector
|
<LinkedRowSelector
|
||||||
bind:linkedRows={value[field]}
|
linkedRows={value[field]}
|
||||||
{schema}
|
{schema}
|
||||||
on:change={e => onChange(e, field)}
|
on:change={e => onChange(e, field)}
|
||||||
useLabel={false}
|
useLabel={false}
|
||||||
|
|
|
@ -70,7 +70,12 @@
|
||||||
options={meta.constraints.inclusion}
|
options={meta.constraints.inclusion}
|
||||||
/>
|
/>
|
||||||
{:else if type === "link"}
|
{:else if type === "link"}
|
||||||
<LinkedRowSelector {error} bind:linkedRows={value} schema={meta} />
|
<LinkedRowSelector
|
||||||
|
{error}
|
||||||
|
linkedRows={value}
|
||||||
|
schema={meta}
|
||||||
|
on:change={e => (value = e.detail)}
|
||||||
|
/>
|
||||||
{:else if type === "longform"}
|
{:else if type === "longform"}
|
||||||
{#if meta.useRichText}
|
{#if meta.useRichText}
|
||||||
<RichTextField {error} {label} height="150px" bind:value />
|
<RichTextField {error} {label} height="150px" bind:value />
|
||||||
|
|
|
@ -56,12 +56,12 @@
|
||||||
/>
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
<Multiselect
|
<Multiselect
|
||||||
bind:value={linkedIds}
|
value={linkedIds}
|
||||||
{label}
|
{label}
|
||||||
options={rows}
|
options={rows}
|
||||||
getOptionLabel={getPrettyName}
|
getOptionLabel={getPrettyName}
|
||||||
getOptionValue={row => row._id}
|
getOptionValue={row => row._id}
|
||||||
sort
|
sort
|
||||||
on:change={() => dispatch("change", linkedIds)}
|
on:change
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -205,7 +205,7 @@
|
||||||
messages: [
|
messages: [
|
||||||
{
|
{
|
||||||
message:
|
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,
|
type: BANNER_TYPES.NEUTRAL,
|
||||||
extraButtonText: "Learn More",
|
extraButtonText: "Learn More",
|
||||||
extraButtonAction: () =>
|
extraButtonAction: () =>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { CoreSelect, CoreMultiselect } from "@budibase/bbui"
|
import { CoreSelect, CoreMultiselect } from "@budibase/bbui"
|
||||||
import { fetchData } from "@budibase/frontend-core"
|
import { fetchData, Utils } from "@budibase/frontend-core"
|
||||||
import { getContext } from "svelte"
|
import { getContext } from "svelte"
|
||||||
import Field from "./Field.svelte"
|
import Field from "./Field.svelte"
|
||||||
import { FieldTypes } from "../../../constants"
|
import { FieldTypes } from "../../../constants"
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$: fetchRows(searchTerm, primaryDisplay, defaultValue)
|
$: debouncedFetchRows(searchTerm, primaryDisplay, defaultValue)
|
||||||
|
|
||||||
const fetchRows = async (searchTerm, primaryDisplay, defaultVal) => {
|
const fetchRows = async (searchTerm, primaryDisplay, defaultVal) => {
|
||||||
const allRowsFetched =
|
const allRowsFetched =
|
||||||
|
@ -124,10 +124,22 @@
|
||||||
query: { equal: { _id: defaultVal } },
|
query: { equal: { _id: defaultVal } },
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ensure we match all filters, rather than any
|
||||||
|
const baseFilter = (filter || []).filter(x => x.operator !== "allOr")
|
||||||
await fetch.update({
|
await fetch.update({
|
||||||
query: { string: { [primaryDisplay]: searchTerm } },
|
filter: [
|
||||||
|
...baseFilter,
|
||||||
|
{
|
||||||
|
// Use a big numeric prefix to avoid clashing with an existing filter
|
||||||
|
field: `999:${primaryDisplay}`,
|
||||||
|
operator: "string",
|
||||||
|
value: searchTerm,
|
||||||
|
},
|
||||||
|
],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const debouncedFetchRows = Utils.debounce(fetchRows, 250)
|
||||||
|
|
||||||
const flatten = values => {
|
const flatten = values => {
|
||||||
if (!values) {
|
if (!values) {
|
||||||
|
|
Loading…
Reference in New Issue