Merge branch 'develop' of github.com:Budibase/budibase into design-collab
This commit is contained in:
commit
3e025049d6
|
@ -175,6 +175,7 @@ jobs:
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
fetch-depth: 0
|
||||||
token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }}
|
token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }}
|
||||||
|
|
||||||
- name: Check pro commit
|
- name: Check pro commit
|
||||||
|
@ -183,10 +184,10 @@ jobs:
|
||||||
cd packages/pro
|
cd packages/pro
|
||||||
pro_commit=$(git rev-parse HEAD)
|
pro_commit=$(git rev-parse HEAD)
|
||||||
|
|
||||||
branch=${{ github.base_ref || github.ref_name }}
|
branch="${{ github.base_ref || github.ref_name }}"
|
||||||
echo "Running on branch `$branch` (base_ref=${{ github.base_ref }}, ref_name=${{ github.head_ref }})"
|
echo "Running on branch `$branch` (base_ref=${{ github.base_ref }}, ref_name=${{ github.head_ref }})"
|
||||||
|
|
||||||
if [[ "$branch" == "master" ]]; then
|
if [[ $branch == "master" ]]; then
|
||||||
base_commit=$(git rev-parse origin/master)
|
base_commit=$(git rev-parse origin/master)
|
||||||
else
|
else
|
||||||
base_commit=$(git rev-parse origin/develop)
|
base_commit=$(git rev-parse origin/develop)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "2.7.37-alpha.10",
|
"version": "2.7.37-alpha.14",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
export function checkErrorCode(error: any, code: number) {
|
||||||
|
const stringCode = code.toString()
|
||||||
|
if (typeof error === "object") {
|
||||||
|
return error.status === code || error.message?.includes(stringCode)
|
||||||
|
} else if (typeof error === "number") {
|
||||||
|
return error === code
|
||||||
|
} else if (typeof error === "string") {
|
||||||
|
return error.includes(stringCode)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function isDocumentConflictError(error: any) {
|
||||||
|
return checkErrorCode(error, 409)
|
||||||
|
}
|
|
@ -9,3 +9,4 @@ export * from "../constants/db"
|
||||||
export { getGlobalDBName, baseGlobalDBName } from "../context"
|
export { getGlobalDBName, baseGlobalDBName } from "../context"
|
||||||
export * from "./lucene"
|
export * from "./lucene"
|
||||||
export * as searchIndexes from "./searchIndexes"
|
export * as searchIndexes from "./searchIndexes"
|
||||||
|
export * from "./errors"
|
||||||
|
|
|
@ -21,6 +21,6 @@ export function logAlertWithInfo(
|
||||||
logAlert(message, error)
|
logAlert(message, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function logWarn(message: string) {
|
export function logWarn(message: string, e?: any) {
|
||||||
console.warn(`bb-warn: ${message}`)
|
console.warn(`bb-warn: ${message}`, e)
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,11 @@ export const createTableSelectionStore = (integration, datasource) => {
|
||||||
|
|
||||||
datasources.getTableNames(datasource).then(tableNames => {
|
datasources.getTableNames(datasource).then(tableNames => {
|
||||||
tableNamesStore.set(tableNames)
|
tableNamesStore.set(tableNames)
|
||||||
selectedTableNamesStore.set(tableNames.filter(t => datasource.entities[t]))
|
|
||||||
|
selectedTableNamesStore.set(
|
||||||
|
tableNames.filter(tableName => datasource.entities[tableName])
|
||||||
|
)
|
||||||
|
|
||||||
loadingStore.set(false)
|
loadingStore.set(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,10 @@
|
||||||
name: "Sidebar with Main",
|
name: "Sidebar with Main",
|
||||||
icon: "ColumnTwoC",
|
icon: "ColumnTwoC",
|
||||||
},
|
},
|
||||||
|
oneColumn: {
|
||||||
|
name: "One column",
|
||||||
|
icon: "LoupeView",
|
||||||
|
},
|
||||||
twoColumns: {
|
twoColumns: {
|
||||||
name: "Two columns",
|
name: "Two columns",
|
||||||
icon: "ColumnTwoA",
|
icon: "ColumnTwoA",
|
||||||
|
|
|
@ -144,8 +144,7 @@ export function createDatasourcesStore() {
|
||||||
|
|
||||||
const response = await API.createDatasource({
|
const response = await API.createDatasource({
|
||||||
datasource,
|
datasource,
|
||||||
fetchSchema:
|
fetchSchema: integration.plus,
|
||||||
integration.plus && integration.name !== IntegrationTypes.GOOGLE_SHEETS,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
return updateDatasource(response)
|
return updateDatasource(response)
|
||||||
|
|
|
@ -2350,6 +2350,16 @@
|
||||||
"value": "above"
|
"value": "above"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "section",
|
||||||
|
"label": "Type",
|
||||||
|
"key": "type",
|
||||||
|
"defaultValue": "oneColumn",
|
||||||
|
"dependsOn": {
|
||||||
|
"setting": "labelPosition",
|
||||||
|
"value": "above"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
let layoutMap = {
|
let layoutMap = {
|
||||||
mainSidebar: 2,
|
mainSidebar: 2,
|
||||||
sidebarMain: 2,
|
sidebarMain: 2,
|
||||||
|
oneColumn: 1,
|
||||||
twoColumns: 2,
|
twoColumns: 2,
|
||||||
threeColumns: 3,
|
threeColumns: 3,
|
||||||
}
|
}
|
||||||
|
@ -54,6 +55,9 @@
|
||||||
.sidebarMain {
|
.sidebarMain {
|
||||||
grid-template-columns: 1fr 3fr;
|
grid-template-columns: 1fr 3fr;
|
||||||
}
|
}
|
||||||
|
.oneColumn {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
.twoColumns {
|
.twoColumns {
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<script>
|
<script>
|
||||||
import { getContext, setContext } from "svelte"
|
import { getContext, setContext } from "svelte"
|
||||||
|
import Section from "../Section.svelte"
|
||||||
|
|
||||||
export let labelPosition = "above"
|
export let labelPosition = "above"
|
||||||
|
export let type = "oneColumn"
|
||||||
|
|
||||||
const { styleable } = getContext("sdk")
|
const { styleable } = getContext("sdk")
|
||||||
const component = getContext("component")
|
const component = getContext("component")
|
||||||
|
@ -13,7 +15,13 @@
|
||||||
class="spectrum-Form"
|
class="spectrum-Form"
|
||||||
class:spectrum-Form--labelsAbove={labelPosition === "above"}
|
class:spectrum-Form--labelsAbove={labelPosition === "above"}
|
||||||
>
|
>
|
||||||
<slot />
|
{#if labelPosition === "above" && type !== "oneColumn"}
|
||||||
|
<Section {type}>
|
||||||
|
<slot />
|
||||||
|
</Section>
|
||||||
|
{:else}
|
||||||
|
<slot />
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 544c7e067de69832469cde673e59501480d6d98a
|
Subproject commit 1a5207d91fb9e0835562c708dd9c421973026543
|
|
@ -1,12 +1,5 @@
|
||||||
import env from "../../../environment"
|
import env from "../../../environment"
|
||||||
import {
|
import { db as dbCore, context, logging, roles } from "@budibase/backend-core"
|
||||||
db as dbCore,
|
|
||||||
context,
|
|
||||||
docUpdates,
|
|
||||||
constants,
|
|
||||||
logging,
|
|
||||||
roles,
|
|
||||||
} from "@budibase/backend-core"
|
|
||||||
import { User, ContextUser, UserGroup } from "@budibase/types"
|
import { User, ContextUser, UserGroup } from "@budibase/types"
|
||||||
import { sdk as proSdk } from "@budibase/pro"
|
import { sdk as proSdk } from "@budibase/pro"
|
||||||
import sdk from "../../"
|
import sdk from "../../"
|
||||||
|
@ -107,9 +100,11 @@ export async function syncUsersToAllApps(userIds: string[]) {
|
||||||
}
|
}
|
||||||
const resp = await Promise.allSettled(promises)
|
const resp = await Promise.allSettled(promises)
|
||||||
const failed = resp.filter(promise => promise.status === "rejected")
|
const failed = resp.filter(promise => promise.status === "rejected")
|
||||||
if (failed.length > 0) {
|
const reasons = failed
|
||||||
const reasons = failed.map(fail => (fail as PromiseRejectedResult).reason)
|
.map(fail => (fail as PromiseRejectedResult).reason)
|
||||||
logging.logAlert("Failed to sync users to apps", reasons)
|
.filter(reason => !dbCore.isDocumentConflictError(reason))
|
||||||
|
if (reasons.length > 0) {
|
||||||
|
logging.logWarn("Failed to sync users to apps", reasons)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue