Merge branch 'master' into cheeks-fixes

This commit is contained in:
Andrew Kingston 2024-06-11 17:20:55 +02:00 committed by GitHub
commit 5f8a70d0dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 9 deletions

View File

@ -29,7 +29,7 @@
on:click={() => onSelect(data)} on:click={() => onSelect(data)}
> >
<span class="spectrum-Menu-itemLabel"> <span class="spectrum-Menu-itemLabel">
{data.label} {data.datasource?.name ? `${data.datasource.name} - ` : ""}{data.label}
</span> </span>
<svg <svg
class="spectrum-Icon spectrum-UIIcon-Checkmark100 spectrum-Menu-checkmark spectrum-Menu-itemIcon" class="spectrum-Icon spectrum-UIIcon-Checkmark100 spectrum-Menu-checkmark spectrum-Menu-itemIcon"

View File

@ -55,6 +55,7 @@
label: m.name, label: m.name,
tableId: m._id, tableId: m._id,
type: "table", type: "table",
datasource: $datasources.list.find(ds => ds._id === m.sourceId || m.datasourceId),
})) }))
$: viewsV1 = $viewsStore.list.map(view => ({ $: viewsV1 = $viewsStore.list.map(view => ({
...view, ...view,

View File

@ -25,7 +25,7 @@ export async function getAppMigrationVersion(appId: string): Promise<string> {
let metadata: AppMigrationDoc | undefined = await cache.get(cacheKey) let metadata: AppMigrationDoc | undefined = await cache.get(cacheKey)
// We don't want to cache in dev or QA, in order to be able to tweak it // We don't want to cache in dev or QA in order to be able to tweak it
if (metadata && !env.isDev() && !env.isQA()) { if (metadata && !env.isDev() && !env.isQA()) {
return metadata.version return metadata.version
} }

View File

@ -20,7 +20,7 @@ import * as pro from "@budibase/pro"
import * as api from "../api" import * as api from "../api"
import sdk from "../sdk" import sdk from "../sdk"
import { initialise as initialiseWebsockets } from "../websockets" import { initialise as initialiseWebsockets } from "../websockets"
import { automationsEnabled, printFeatures } from "../features" import { apiEnabled, automationsEnabled, printFeatures } from "../features"
import * as jsRunner from "../jsRunner" import * as jsRunner from "../jsRunner"
import Koa from "koa" import Koa from "koa"
import { Server } from "http" import { Server } from "http"
@ -70,13 +70,12 @@ export async function startup(
return return
} }
printFeatures() printFeatures()
if (env.BUDIBASE_ENVIRONMENT) {
console.log(`service running environment: "${env.BUDIBASE_ENVIRONMENT}"`)
}
STARTUP_RAN = true STARTUP_RAN = true
if (app && server && !env.CLUSTER_MODE) { if (app && server && !env.CLUSTER_MODE) {
let startupLog = `Budibase running on ${JSON.stringify(server.address())}` console.log(`Budibase running on ${JSON.stringify(server.address())}`)
if (env.BUDIBASE_ENVIRONMENT) {
startupLog = `${startupLog} - environment: "${env.BUDIBASE_ENVIRONMENT}"`
}
console.log(startupLog)
const address = server.address() as AddressInfo const address = server.address() as AddressInfo
env._set("PORT", address.port) env._set("PORT", address.port)
} }
@ -121,9 +120,11 @@ export async function startup(
queuePromises.push(events.processors.init(pro.sdk.auditLogs.write)) queuePromises.push(events.processors.init(pro.sdk.auditLogs.write))
// app migrations and automations on other service // app migrations and automations on other service
if (automationsEnabled()) { if (automationsEnabled()) {
queuePromises.push(appMigrations.init())
queuePromises.push(automations.init()) queuePromises.push(automations.init())
} }
if (apiEnabled()) {
queuePromises.push(appMigrations.init())
}
queuePromises.push(initPro()) queuePromises.push(initPro())
if (app) { if (app) {
// bring routes online as final step once everything ready // bring routes online as final step once everything ready