Browse Source
Merge pull request #1563 from Budibase/fix/query-action
Fix execute query action not working
pull/1565/head
Andrew Kingston
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
18 additions and
16 deletions
-
packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/ExecuteQuery.svelte
|
|
|
@ -24,18 +24,18 @@ |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<Layout noGap noPadding> |
|
|
|
<Label>Datasource</Label> |
|
|
|
<Layout> |
|
|
|
<Select |
|
|
|
label="Datasource" |
|
|
|
bind:value={parameters.datasourceId} |
|
|
|
option={$datasources.list} |
|
|
|
options={$datasources.list} |
|
|
|
getOptionLabel={source => source.name} |
|
|
|
getOptionValue={source => source._id} |
|
|
|
/> |
|
|
|
|
|
|
|
{#if parameters.datasourceId} |
|
|
|
<Label>Query</Label> |
|
|
|
<Select |
|
|
|
label="Query" |
|
|
|
bind:value={parameters.queryId} |
|
|
|
options={$queries.list.filter( |
|
|
|
query => query.datasourceId === datasource._id |
|
|
|
@ -46,17 +46,19 @@ |
|
|
|
{/if} |
|
|
|
|
|
|
|
{#if query?.parameters?.length > 0} |
|
|
|
<ParameterBuilder |
|
|
|
bind:customParams={parameters.queryParams} |
|
|
|
parameters={query.parameters} |
|
|
|
bindings={bindableProperties} |
|
|
|
/> |
|
|
|
<IntegrationQueryEditor |
|
|
|
height={200} |
|
|
|
{query} |
|
|
|
schema={fetchQueryDefinition(query)} |
|
|
|
editable={false} |
|
|
|
{datasource} |
|
|
|
/> |
|
|
|
<div> |
|
|
|
<ParameterBuilder |
|
|
|
bind:customParams={parameters.queryParams} |
|
|
|
parameters={query.parameters} |
|
|
|
bindings={bindableProperties} |
|
|
|
/> |
|
|
|
<IntegrationQueryEditor |
|
|
|
height={200} |
|
|
|
{query} |
|
|
|
schema={fetchQueryDefinition(query)} |
|
|
|
editable={false} |
|
|
|
{datasource} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
{/if} |
|
|
|
</Layout> |
|
|
|
|