show all query types in form component
This commit is contained in:
parent
03512da423
commit
d0b7cf71e3
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
export let value = {}
|
export let value = {}
|
||||||
export let otherSources
|
export let otherSources
|
||||||
|
export let showAllQueries
|
||||||
|
|
||||||
$: tables = $backendUiStore.tables.map(m => ({
|
$: tables = $backendUiStore.tables.map(m => ({
|
||||||
label: m.name,
|
label: m.name,
|
||||||
|
@ -36,8 +37,8 @@
|
||||||
return [...acc, ...viewsArr]
|
return [...acc, ...viewsArr]
|
||||||
}, [])
|
}, [])
|
||||||
$: queries = $backendUiStore.queries
|
$: queries = $backendUiStore.queries
|
||||||
.filter(query => query.queryVerb === "read" || query.readable)
|
.filter(query => showAllQueries || (query.queryVerb === "read" || query.readable))
|
||||||
.map(query => ({
|
.map(query => ({
|
||||||
label: query.name,
|
label: query.name,
|
||||||
name: query.name,
|
name: query.name,
|
||||||
tableId: query._id,
|
tableId: query._id,
|
||||||
|
|
|
@ -4,4 +4,4 @@
|
||||||
const otherSources = [{ name: "Custom", label: "Custom" }]
|
const otherSources = [{ name: "Custom", label: "Custom" }]
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<DatasourceSelect on:change {...$$props} {otherSources} />
|
<DatasourceSelect on:change {...$$props} showAllQueries={true} {otherSources} />
|
||||||
|
|
|
@ -66,8 +66,8 @@
|
||||||
"non-existing-app-name",
|
"non-existing-app-name",
|
||||||
"App with same name already exists. Please try another app name.",
|
"App with same name already exists. Please try another app name.",
|
||||||
value =>
|
value =>
|
||||||
!existingAppNames.some(appName =>
|
!existingAppNames.some(
|
||||||
new RegExp(appName, "ig").test(value)
|
appName => appName.toLowerCase() === value.toLowerCase()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue