1
0
Fork 0
mirror of synced 2024-09-15 00:38:01 +12:00

Merge pull request #8192 from Budibase/feature/turn-on-gsheets

turn on gsheets
This commit is contained in:
Martin McKeaveney 2022-10-10 11:02:40 +01:00 committed by GitHub
commit 7fdfdf6072
4 changed files with 27 additions and 33 deletions

View file

@ -216,6 +216,9 @@ export = class RedisWrapper {
async bulkGet(keys: string[]) { async bulkGet(keys: string[]) {
const db = this._db const db = this._db
if (keys.length === 0) {
return {}
}
const prefixedKeys = keys.map(key => addDbPrefix(db, key)) const prefixedKeys = keys.map(key => addDbPrefix(db, key))
let response = await this.getClient().mget(prefixedKeys) let response = await this.getClient().mget(prefixedKeys)
if (Array.isArray(response)) { if (Array.isArray(response)) {

View file

@ -209,17 +209,18 @@
{:else} {:else}
<Body size="S"><i>No tables found.</i></Body> <Body size="S"><i>No tables found.</i></Body>
{/if} {/if}
<Divider /> {#if integration.relationships !== false}
<div class="query-header"> <Divider />
<div class="query-header">
<Heading size="S">Relationships</Heading> <Heading size="S">Relationships</Heading>
<Button primary on:click={() => openRelationshipModal()}> <Button primary on:click={() => openRelationshipModal()}>
Define relationship Define relationship
</Button> </Button>
</div> </div>
<Body> <Body>
Tell budibase how your tables are related to get even more smart features. Tell budibase how your tables are related to get even more smart features.
</Body> </Body>
{#if relationshipInfo && relationshipInfo.length > 0} {#if relationshipInfo && relationshipInfo.length > 0}
<Table <Table
on:click={({ detail }) => openRelationshipModal(detail.from, detail.to)} on:click={({ detail }) => openRelationshipModal(detail.from, detail.to)}
schema={relationshipSchema} schema={relationshipSchema}
@ -228,8 +229,9 @@
allowEditRows={false} allowEditRows={false}
allowSelectRows={false} allowSelectRows={false}
/> />
{:else} {:else}
<Body size="S"><i>No relationships configured.</i></Body> <Body size="S"><i>No relationships configured.</i></Body>
{/if}
{/if} {/if}
<style> <style>

View file

@ -1,17 +1,9 @@
const { getDefinitions } = require("../../integrations") const { getDefinitions } = require("../../integrations")
const { SourceName } = require("@budibase/types")
const googlesheets = require("../../integrations/googlesheets")
const { featureFlags } = require("@budibase/backend-core")
exports.fetch = async function (ctx) { exports.fetch = async function (ctx) {
ctx.status = 200 ctx.status = 200
const defs = await getDefinitions() const defs = await getDefinitions()
// for google sheets integration google verification
if (featureFlags.isEnabled(featureFlags.TenantFeatureFlag.GOOGLE_SHEETS)) {
defs[SourceName.GOOGLE_SHEETS] = googlesheets.schema
}
ctx.body = defs ctx.body = defs
} }

View file

@ -33,6 +33,7 @@ const DEFINITIONS: { [key: string]: Integration } = {
[SourceName.ARANGODB]: arangodb.schema, [SourceName.ARANGODB]: arangodb.schema,
[SourceName.REST]: rest.schema, [SourceName.REST]: rest.schema,
[SourceName.FIRESTORE]: firebase.schema, [SourceName.FIRESTORE]: firebase.schema,
[SourceName.GOOGLE_SHEETS]: googlesheets.schema,
[SourceName.REDIS]: redis.schema, [SourceName.REDIS]: redis.schema,
[SourceName.SNOWFLAKE]: snowflake.schema, [SourceName.SNOWFLAKE]: snowflake.schema,
} }
@ -66,10 +67,6 @@ if (
INTEGRATIONS[SourceName.ORACLE] = oracle.integration INTEGRATIONS[SourceName.ORACLE] = oracle.integration
} }
if (environment.SELF_HOSTED) {
DEFINITIONS[SourceName.GOOGLE_SHEETS] = googlesheets.schema
}
module.exports = { module.exports = {
getDefinitions: async () => { getDefinitions: async () => {
const pluginSchemas: { [key: string]: Integration } = {} const pluginSchemas: { [key: string]: Integration } = {}