Merge branch 'master' of github.com:budibase/budibase into budibase-ai-3
This commit is contained in:
commit
fd960012c8
|
@ -1 +0,0 @@
|
|||
scripts/resources/minio filter=lfs diff=lfs merge=lfs -text
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
||||
"version": "3.8.4",
|
||||
"version": "3.8.5",
|
||||
"npmClient": "yarn",
|
||||
"concurrency": 20,
|
||||
"command": {
|
||||
|
|
|
@ -184,6 +184,8 @@
|
|||
},
|
||||
[SchemaFieldTypes.QUERY_PARAMS]: {
|
||||
comp: QueryParamSelector,
|
||||
fullWidth: true,
|
||||
title: "Query*",
|
||||
},
|
||||
[SchemaFieldTypes.CODE]: {
|
||||
comp: ExecuteScript,
|
||||
|
@ -281,7 +283,9 @@
|
|||
}
|
||||
const type = getFieldType(field, block)
|
||||
const config = type ? SchemaTypes[type] : null
|
||||
const title = getFieldLabel(key, field, requiredProperties?.includes(key))
|
||||
const title =
|
||||
config?.title ||
|
||||
getFieldLabel(key, field, requiredProperties?.includes(key))
|
||||
const value = getInputValue(inputData, key)
|
||||
const meta = getInputValue(inputData, "meta")
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<script>
|
||||
import { createEventDispatcher } from "svelte"
|
||||
import { queries } from "@/stores/builder"
|
||||
import { Select, Label } from "@budibase/bbui"
|
||||
import { Select } from "@budibase/bbui"
|
||||
import DrawerBindableInput from "../../common/bindings/DrawerBindableInput.svelte"
|
||||
import AutomationBindingPanel from "../../common/bindings/ServerBindingPanel.svelte"
|
||||
import PropField from "./PropField.svelte"
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
|
@ -28,7 +29,6 @@
|
|||
</script>
|
||||
|
||||
<div class="schema-field">
|
||||
<Label>Query</Label>
|
||||
<div class="field-width">
|
||||
<Select
|
||||
on:change={onChangeQuery}
|
||||
|
@ -42,9 +42,7 @@
|
|||
|
||||
{#if parameters.length}
|
||||
{#each parameters as field}
|
||||
<div class="schema-field">
|
||||
<Label>{field.name}</Label>
|
||||
<div class="field-width">
|
||||
<PropField label={field.name} fullWidth>
|
||||
<DrawerBindableInput
|
||||
panel={AutomationBindingPanel}
|
||||
extraThin
|
||||
|
@ -54,14 +52,13 @@
|
|||
{bindings}
|
||||
updateOnChange={false}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</PropField>
|
||||
{/each}
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.field-width {
|
||||
width: 320px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.schema-field {
|
||||
|
|
|
@ -149,6 +149,7 @@ export const customTypeToSchema: Record<string, SchemaFieldTypes> = {
|
|||
SchemaFieldTypes.AUTOMATION_FIELDS,
|
||||
[AutomationCustomIOType.WEBHOOK_URL]: SchemaFieldTypes.WEBHOOK_URL,
|
||||
[AutomationCustomIOType.QUERY_LIMIT]: SchemaFieldTypes.QUERY_LIMIT,
|
||||
[AutomationCustomIOType.QUERY_PARAMS]: SchemaFieldTypes.QUERY_PARAMS,
|
||||
["fields"]: SchemaFieldTypes.FIELDS,
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as email from "../../../utilities/email"
|
||||
import env from "../../../environment"
|
||||
import { googleCallbackUrl, oidcCallbackUrl } from "./auth"
|
||||
import * as auth from "./auth"
|
||||
import {
|
||||
cache,
|
||||
configs,
|
||||
|
@ -420,19 +420,57 @@ export async function publicSettings(
|
|||
) {
|
||||
try {
|
||||
// settings
|
||||
const configDoc = await configs.getSettingsConfigDoc()
|
||||
const [configDoc, googleConfig] = await Promise.all([
|
||||
configs.getSettingsConfigDoc(),
|
||||
configs.getGoogleConfig(),
|
||||
])
|
||||
const config = configDoc.config
|
||||
|
||||
const branding = await pro.branding.getBrandingConfig(config)
|
||||
const brandingPromise = pro.branding.getBrandingConfig(config)
|
||||
|
||||
const getLogoUrl = () => {
|
||||
// enrich the logo url - empty url means deleted
|
||||
if (config.logoUrl && config.logoUrl !== "") {
|
||||
config.logoUrl = await objectStore.getGlobalFileUrl(
|
||||
return objectStore.getGlobalFileUrl(
|
||||
"settings",
|
||||
"logoUrl",
|
||||
config.logoUrlEtag
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// google
|
||||
const googleDatasourcePromise = configs.getGoogleDatasourceConfig()
|
||||
const preActivated = googleConfig && googleConfig.activated == null
|
||||
const google = preActivated || !!googleConfig?.activated
|
||||
const googleCallbackUrlPromise = auth.googleCallbackUrl(googleConfig)
|
||||
|
||||
// oidc
|
||||
const oidcConfigPromise = configs.getOIDCConfig()
|
||||
const oidcCallbackUrlPromise = auth.oidcCallbackUrl()
|
||||
|
||||
// sso enforced
|
||||
const isSSOEnforcedPromise = pro.features.isSSOEnforced({ config })
|
||||
|
||||
// performance all async work at same time, there is no need for all of these
|
||||
// operations to occur in sync, slowing the endpoint down significantly
|
||||
const [
|
||||
branding,
|
||||
googleDatasource,
|
||||
googleCallbackUrl,
|
||||
oidcConfig,
|
||||
oidcCallbackUrl,
|
||||
isSSOEnforced,
|
||||
logoUrl,
|
||||
] = await Promise.all([
|
||||
brandingPromise,
|
||||
googleDatasourcePromise,
|
||||
googleCallbackUrlPromise,
|
||||
oidcConfigPromise,
|
||||
oidcCallbackUrlPromise,
|
||||
isSSOEnforcedPromise,
|
||||
getLogoUrl(),
|
||||
])
|
||||
|
||||
// enrich the favicon url - empty url means deleted
|
||||
const faviconUrl =
|
||||
|
@ -444,21 +482,11 @@ export async function publicSettings(
|
|||
)
|
||||
: undefined
|
||||
|
||||
// google
|
||||
const googleConfig = await configs.getGoogleConfig()
|
||||
const googleDatasourceConfigured =
|
||||
!!(await configs.getGoogleDatasourceConfig())
|
||||
const preActivated = googleConfig && googleConfig.activated == null
|
||||
const google = preActivated || !!googleConfig?.activated
|
||||
const _googleCallbackUrl = await googleCallbackUrl(googleConfig)
|
||||
|
||||
// oidc
|
||||
const oidcConfig = await configs.getOIDCConfig()
|
||||
const oidc = oidcConfig?.activated || false
|
||||
const _oidcCallbackUrl = await oidcCallbackUrl()
|
||||
|
||||
// sso enforced
|
||||
const isSSOEnforced = await pro.features.isSSOEnforced({ config })
|
||||
const googleDatasourceConfigured = !!googleDatasource
|
||||
if (logoUrl) {
|
||||
config.logoUrl = logoUrl
|
||||
}
|
||||
|
||||
ctx.body = {
|
||||
type: ConfigType.SETTINGS,
|
||||
|
@ -472,8 +500,8 @@ export async function publicSettings(
|
|||
googleDatasourceConfigured,
|
||||
oidc,
|
||||
isSSOEnforced,
|
||||
oidcCallbackUrl: _oidcCallbackUrl,
|
||||
googleCallbackUrl: _googleCallbackUrl,
|
||||
oidcCallbackUrl,
|
||||
googleCallbackUrl,
|
||||
},
|
||||
}
|
||||
} catch (err: any) {
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:63db3aa3c2299ebaf13b46c64523a589bd5bf272f9e971d17f1eaa55f6f1fd79
|
||||
size 118595584
|
Loading…
Reference in New Issue