Fix execute query action not working

This commit is contained in:
Andrew Kingston 2021-05-26 08:49:54 +01:00
parent 52899e23a2
commit 943c3a1bf2
1 changed files with 18 additions and 16 deletions

View File

@ -24,18 +24,18 @@
} }
</script> </script>
<Layout noGap noPadding> <Layout>
<Label>Datasource</Label>
<Select <Select
label="Datasource"
bind:value={parameters.datasourceId} bind:value={parameters.datasourceId}
option={$datasources.list} options={$datasources.list}
getOptionLabel={source => source.name} getOptionLabel={source => source.name}
getOptionValue={source => source._id} getOptionValue={source => source._id}
/> />
{#if parameters.datasourceId} {#if parameters.datasourceId}
<Label>Query</Label>
<Select <Select
label="Query"
bind:value={parameters.queryId} bind:value={parameters.queryId}
options={$queries.list.filter( options={$queries.list.filter(
query => query.datasourceId === datasource._id query => query.datasourceId === datasource._id
@ -46,6 +46,7 @@
{/if} {/if}
{#if query?.parameters?.length > 0} {#if query?.parameters?.length > 0}
<div>
<ParameterBuilder <ParameterBuilder
bind:customParams={parameters.queryParams} bind:customParams={parameters.queryParams}
parameters={query.parameters} parameters={query.parameters}
@ -58,5 +59,6 @@
editable={false} editable={false}
{datasource} {datasource}
/> />
</div>
{/if} {/if}
</Layout> </Layout>