do not make query execution a requirement
This commit is contained in:
parent
499583ff22
commit
eeaca8fc82
|
@ -48,6 +48,8 @@
|
||||||
$: integrationInfo = $integrations[datasourceType]
|
$: integrationInfo = $integrations[datasourceType]
|
||||||
$: queryConfig = integrationInfo?.query
|
$: queryConfig = integrationInfo?.query
|
||||||
$: shouldShowQueryConfig = queryConfig && query.queryVerb
|
$: shouldShowQueryConfig = queryConfig && query.queryVerb
|
||||||
|
$: readQuery = query.queryVerb === "read" || query.readable
|
||||||
|
$: queryInvalid = !query.name || (readQuery && data.length === 0)
|
||||||
|
|
||||||
function newField() {
|
function newField() {
|
||||||
fields = [...fields, {}]
|
fields = [...fields, {}]
|
||||||
|
@ -152,7 +154,7 @@
|
||||||
<ButtonGroup>
|
<ButtonGroup>
|
||||||
<Button
|
<Button
|
||||||
cta
|
cta
|
||||||
disabled={data.length === 0 || !query.name}
|
disabled={queryInvalid}
|
||||||
on:click={saveQuery}
|
on:click={saveQuery}
|
||||||
>
|
>
|
||||||
Save Query
|
Save Query
|
||||||
|
|
|
@ -60,7 +60,7 @@ exports.save = async function (ctx) {
|
||||||
ctx.message = `Query ${query.name} saved successfully.`
|
ctx.message = `Query ${query.name} saved successfully.`
|
||||||
}
|
}
|
||||||
|
|
||||||
async function enrichQueryFields(fields, parameters) {
|
async function enrichQueryFields(fields, parameters = {}) {
|
||||||
const enrichedQuery = {}
|
const enrichedQuery = {}
|
||||||
|
|
||||||
// enrich the fields with dynamic parameters
|
// enrich the fields with dynamic parameters
|
||||||
|
|
Loading…
Reference in New Issue