Merge pull request #12913 from Budibase/fix/pc-fixes

Fixes for automation bindings and chain automation settings
This commit is contained in:
Peter Clement 2024-02-01 10:26:46 +00:00 committed by GitHub
commit 1a7faa5f5b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 24 additions and 25 deletions

@ -1 +1 @@
Subproject commit 485ec16a9eed48c548a5f1239772139f3319f028
Subproject commit 52f51dcfb96d3fe58c8cc7a905e7d733f7cd84c2

View File

@ -158,6 +158,7 @@ export const getFrontendStore = () => {
...INITIAL_FRONTEND_STATE.features,
...application.features,
},
automations: application.automations || {},
icon: application.icon || {},
initialised: true,
}))

View File

@ -157,6 +157,7 @@
let bindings = []
let loopBlockCount = 0
const addBinding = (name, value, icon, idx, isLoopBlock, bindingName) => {
if (!name) return
const runtimeBinding = determineRuntimeBinding(name, idx, isLoopBlock)
const categoryName = determineCategoryName(idx, isLoopBlock, bindingName)
@ -291,7 +292,6 @@
loopBlockCount++
continue
}
Object.entries(schema).forEach(([name, value]) =>
addBinding(name, value, icon, idx, isLoopBlock, bindingName)
)

View File

@ -36,15 +36,12 @@
let status = null
let timeRange = null
let loaded = false
$: app = $apps.find(app => app.devId === $store.appId?.includes(app.appId))
$: app = $apps.find(app => $store.appId?.includes(app.appId))
$: licensePlan = $auth.user?.license?.plan
$: page = $pageInfo.page
$: fetchLogs(automationId, status, page, timeRange)
$: isCloud = $admin.cloud
$: chainAutomations = app?.automations?.chainAutomations ?? !isCloud
const timeOptions = [
{ value: "90-d", label: "Past 90 days" },
{ value: "30-d", label: "Past 30 days" },

View File

@ -211,7 +211,6 @@ const deleteRowHandler = async action => {
const triggerAutomationHandler = async action => {
const { fields, notificationOverride, timeout } = action.parameters
if (fields) {
try {
const result = await API.triggerAutomation({
automationId: action.parameters.automationId,
@ -235,7 +234,6 @@ const triggerAutomationHandler = async action => {
return false
}
}
}
const navigationHandler = action => {
const { url, peek, externalNewTab } = action.parameters
routeStore.actions.navigate(url, peek, externalNewTab)

View File

@ -445,6 +445,9 @@ export async function update(ctx: UserCtx) {
name: app.name,
url: app.url,
icon: app.icon,
automations: {
chainAutomations: app.automations?.chainAutomations,
},
})
}