Fix merge conflict

This commit is contained in:
Andrew Kingston 2021-04-01 10:33:51 +01:00
parent b3b7c54901
commit b725c04b32
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,22 +42,11 @@
<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>
<Select thin secondary bind:value={parameters.queryId}>
<option value="" />
{#each $backendUiStore.queries.filter(query => query.datasourceId === datasource._id) as query}
<option value={query._id}>{query.name}</option>
{/each}
</Select>
{/if}
<Spacer medium />
{#if query?.parameters?.length > 0}
<ParameterBuilder <ParameterBuilder
bind:customParams={parameters.queryParams} bind:customParams={parameters.queryParams}
parameters={query.parameters} parameters={query.parameters}
@ -69,12 +56,4 @@
{query} {query}
schema={fetchQueryDefinition(query)} schema={fetchQueryDefinition(query)}
editable={false} /> editable={false} />
{/if} {/if}
</div>
<style>
.root {
max-width: 800px;
margin: 0 auto;
}
</style>