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