Merge pull request #12913 from Budibase/fix/pc-fixes
Fixes for automation bindings and chain automation settings
This commit is contained in:
commit
1a7faa5f5b
|
@ -1 +1 @@
|
||||||
Subproject commit 485ec16a9eed48c548a5f1239772139f3319f028
|
Subproject commit 52f51dcfb96d3fe58c8cc7a905e7d733f7cd84c2
|
|
@ -158,6 +158,7 @@ export const getFrontendStore = () => {
|
||||||
...INITIAL_FRONTEND_STATE.features,
|
...INITIAL_FRONTEND_STATE.features,
|
||||||
...application.features,
|
...application.features,
|
||||||
},
|
},
|
||||||
|
automations: application.automations || {},
|
||||||
icon: application.icon || {},
|
icon: application.icon || {},
|
||||||
initialised: true,
|
initialised: true,
|
||||||
}))
|
}))
|
||||||
|
|
|
@ -157,6 +157,7 @@
|
||||||
let bindings = []
|
let bindings = []
|
||||||
let loopBlockCount = 0
|
let loopBlockCount = 0
|
||||||
const addBinding = (name, value, icon, idx, isLoopBlock, bindingName) => {
|
const addBinding = (name, value, icon, idx, isLoopBlock, bindingName) => {
|
||||||
|
if (!name) return
|
||||||
const runtimeBinding = determineRuntimeBinding(name, idx, isLoopBlock)
|
const runtimeBinding = determineRuntimeBinding(name, idx, isLoopBlock)
|
||||||
const categoryName = determineCategoryName(idx, isLoopBlock, bindingName)
|
const categoryName = determineCategoryName(idx, isLoopBlock, bindingName)
|
||||||
|
|
||||||
|
@ -291,7 +292,6 @@
|
||||||
loopBlockCount++
|
loopBlockCount++
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.entries(schema).forEach(([name, value]) =>
|
Object.entries(schema).forEach(([name, value]) =>
|
||||||
addBinding(name, value, icon, idx, isLoopBlock, bindingName)
|
addBinding(name, value, icon, idx, isLoopBlock, bindingName)
|
||||||
)
|
)
|
||||||
|
|
|
@ -36,15 +36,12 @@
|
||||||
let status = null
|
let status = null
|
||||||
let timeRange = null
|
let timeRange = null
|
||||||
let loaded = false
|
let loaded = false
|
||||||
|
$: app = $apps.find(app => $store.appId?.includes(app.appId))
|
||||||
$: app = $apps.find(app => app.devId === $store.appId?.includes(app.appId))
|
|
||||||
$: licensePlan = $auth.user?.license?.plan
|
$: licensePlan = $auth.user?.license?.plan
|
||||||
$: page = $pageInfo.page
|
$: page = $pageInfo.page
|
||||||
$: fetchLogs(automationId, status, page, timeRange)
|
$: fetchLogs(automationId, status, page, timeRange)
|
||||||
$: isCloud = $admin.cloud
|
$: isCloud = $admin.cloud
|
||||||
|
|
||||||
$: chainAutomations = app?.automations?.chainAutomations ?? !isCloud
|
$: chainAutomations = app?.automations?.chainAutomations ?? !isCloud
|
||||||
|
|
||||||
const timeOptions = [
|
const timeOptions = [
|
||||||
{ value: "90-d", label: "Past 90 days" },
|
{ value: "90-d", label: "Past 90 days" },
|
||||||
{ value: "30-d", label: "Past 30 days" },
|
{ value: "30-d", label: "Past 30 days" },
|
||||||
|
|
|
@ -211,7 +211,6 @@ const deleteRowHandler = async action => {
|
||||||
|
|
||||||
const triggerAutomationHandler = async action => {
|
const triggerAutomationHandler = async action => {
|
||||||
const { fields, notificationOverride, timeout } = action.parameters
|
const { fields, notificationOverride, timeout } = action.parameters
|
||||||
if (fields) {
|
|
||||||
try {
|
try {
|
||||||
const result = await API.triggerAutomation({
|
const result = await API.triggerAutomation({
|
||||||
automationId: action.parameters.automationId,
|
automationId: action.parameters.automationId,
|
||||||
|
@ -235,7 +234,6 @@ const triggerAutomationHandler = async action => {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
const navigationHandler = action => {
|
const navigationHandler = action => {
|
||||||
const { url, peek, externalNewTab } = action.parameters
|
const { url, peek, externalNewTab } = action.parameters
|
||||||
routeStore.actions.navigate(url, peek, externalNewTab)
|
routeStore.actions.navigate(url, peek, externalNewTab)
|
||||||
|
|
|
@ -445,6 +445,9 @@ export async function update(ctx: UserCtx) {
|
||||||
name: app.name,
|
name: app.name,
|
||||||
url: app.url,
|
url: app.url,
|
||||||
icon: app.icon,
|
icon: app.icon,
|
||||||
|
automations: {
|
||||||
|
chainAutomations: app.automations?.chainAutomations,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue