Fix merge conflict

This commit is contained in:
Andrew Kingston 2021-04-01 10:33:51 +01:00
parent 46745a757a
commit 677c3e0e86
1 changed files with 15 additions and 36 deletions

View File

@ -18,14 +18,12 @@
) )
function fetchQueryDefinition(query) { function fetchQueryDefinition(query) {
const source = $datasources.list.find( const source = $datasources.list.find(ds => ds._id === query.datasourceId)
ds => ds._id === query.datasourceId .source
).source
return $integrations[source].query[query.queryVerb] return $integrations[source].query[query.queryVerb]
} }
</script> </script>
<Label small>Datasource</Label> <Label small>Datasource</Label>
<Select thin secondary bind:value={parameters.datasourceId}> <Select thin secondary bind:value={parameters.datasourceId}>
<option value="" /> <option value="" />
@ -44,37 +42,18 @@
<option value={query._id}>{query.name}</option> <option value={query._id}>{query.name}</option>
{/each} {/each}
</Select> </Select>
{/if}
<Spacer medium /> <Spacer medium />
{#if parameters.datasourceId} {#if query?.parameters?.length > 0}
<Label small>Query</Label> <ParameterBuilder
<Select thin secondary bind:value={parameters.queryId}> bind:customParams={parameters.queryParams}
<option value="" /> parameters={query.parameters}
{#each $backendUiStore.queries.filter(query => query.datasourceId === datasource._id) as query} bindings={bindableProperties} />
<option value={query._id}>{query.name}</option> <IntegrationQueryEditor
{/each} height={200}
</Select> {query}
{/if} schema={fetchQueryDefinition(query)}
editable={false} />
<Spacer medium /> {/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} />
{/if}
</div>
<style>
.root {
max-width: 800px;
margin: 0 auto;
}
</style>