filtering datasources for execute query actions
This commit is contained in:
parent
a0288f0c2e
commit
0b8e0309f6
|
@ -3,6 +3,7 @@
|
|||
import { datasources, integrations, queries } from "stores/backend"
|
||||
import BindingBuilder from "components/integration/QueryBindingBuilder.svelte"
|
||||
import IntegrationQueryEditor from "components/integration/index.svelte"
|
||||
import { IntegrationTypes } from "constants/backend"
|
||||
|
||||
export let parameters
|
||||
export let bindings = []
|
||||
|
@ -11,6 +12,12 @@
|
|||
$: datasource = $datasources.list.find(
|
||||
ds => ds._id === parameters.datasourceId
|
||||
)
|
||||
// Executequery action just works on PostgreSQL and MongoDB datasources
|
||||
$: executeQueryDatasources = $datasources.list.filter(
|
||||
x =>
|
||||
x.source === IntegrationTypes.POSTGRES ||
|
||||
x.source === IntegrationTypes.MONGODB
|
||||
)
|
||||
|
||||
function fetchQueryDefinition(query) {
|
||||
const source = $datasources.list.find(
|
||||
|
@ -24,7 +31,7 @@
|
|||
<Select
|
||||
label="Datasource"
|
||||
bind:value={parameters.datasourceId}
|
||||
options={$datasources.list}
|
||||
options={executeQueryDatasources}
|
||||
getOptionLabel={source => source.name}
|
||||
getOptionValue={source => source._id}
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue