fix DataSourceSelect Query Panel
This commit is contained in:
parent
6158a547ea
commit
7a05536319
|
@ -5,8 +5,10 @@
|
||||||
Popover,
|
Popover,
|
||||||
Divider,
|
Divider,
|
||||||
Select,
|
Select,
|
||||||
|
Layout,
|
||||||
Heading,
|
Heading,
|
||||||
Drawer,
|
Drawer,
|
||||||
|
DrawerContent,
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
import { createEventDispatcher } from "svelte"
|
import { createEventDispatcher } from "svelte"
|
||||||
import { store, currentAsset } from "builderStore"
|
import { store, currentAsset } from "builderStore"
|
||||||
|
@ -103,38 +105,38 @@
|
||||||
{#if value?.type === "query"}
|
{#if value?.type === "query"}
|
||||||
<i class="ri-settings-5-line" on:click={drawer.show} />
|
<i class="ri-settings-5-line" on:click={drawer.show} />
|
||||||
<Drawer title={"Query Parameters"} bind:this={drawer}>
|
<Drawer title={"Query Parameters"} bind:this={drawer}>
|
||||||
<div slot="buttons">
|
<Button
|
||||||
<Button
|
slot="buttons"
|
||||||
blue
|
cta
|
||||||
thin
|
on:click={() => {
|
||||||
on:click={() => {
|
notifications.success("Query parameters saved.")
|
||||||
notifications.success("Query parameters saved.")
|
handleSelected(value)
|
||||||
handleSelected(value)
|
drawer.hide()
|
||||||
drawer.hide()
|
}}
|
||||||
}}
|
>
|
||||||
>
|
Save
|
||||||
Save
|
</Button>
|
||||||
</Button>
|
<DrawerContent slot="body">
|
||||||
</div>
|
<Layout>
|
||||||
<div class="drawer-contents" slot="body">
|
{#if value.parameters.length > 0}
|
||||||
{#if value.parameters.length > 0}
|
<ParameterBuilder
|
||||||
<ParameterBuilder
|
bind:customParams={value.queryParams}
|
||||||
bind:customParams={value.queryParams}
|
parameters={queries.find((query) => query._id === value._id)
|
||||||
parameters={queries.find((query) => query._id === value._id)
|
.parameters}
|
||||||
.parameters}
|
bindings={queryBindableProperties}
|
||||||
bindings={queryBindableProperties}
|
/>
|
||||||
|
{/if}
|
||||||
|
<IntegrationQueryEditor
|
||||||
|
height={200}
|
||||||
|
query={value}
|
||||||
|
schema={fetchQueryDefinition(value)}
|
||||||
|
datasource={$datasources.list.find(
|
||||||
|
(ds) => ds._id === value.datasourceId
|
||||||
|
)}
|
||||||
|
editable={false}
|
||||||
/>
|
/>
|
||||||
{/if}
|
</Layout>
|
||||||
<IntegrationQueryEditor
|
</DrawerContent>
|
||||||
height={200}
|
|
||||||
query={value}
|
|
||||||
schema={fetchQueryDefinition(value)}
|
|
||||||
datasource={$datasources.list.find(
|
|
||||||
(ds) => ds._id === value.datasourceId
|
|
||||||
)}
|
|
||||||
editable={false}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</Drawer>
|
</Drawer>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue