1
0
Fork 0
mirror of synced 2024-07-09 00:06:05 +12:00
This commit is contained in:
Martin McKeaveney 2021-01-18 15:40:26 +00:00
parent 133d93fbee
commit 4143718d70
4 changed files with 16 additions and 9 deletions

View file

@ -91,11 +91,12 @@
data = json || [] data = json || []
if (data.length === 0) { if (data.length === 0) {
notifier.info("Query results empty. Please execute a query with results to create your schema.") notifier.info(
"Query results empty. Please execute a query with results to create your schema."
)
return return
} }
notifier.success("Query executed successfully.") notifier.success("Query executed successfully.")
@ -170,7 +171,12 @@
<Spacer medium /> <Spacer medium />
<div class="viewer-controls"> <div class="viewer-controls">
<Button wide thin blue disabled={data.length === 0} on:click={saveQuery}> <Button
wide
thin
blue
disabled={data.length === 0}
on:click={saveQuery}>
Save Save
</Button> </Button>
<Button wide thin primary on:click={previewQuery}>Run</Button> <Button wide thin primary on:click={previewQuery}>Run</Button>

View file

@ -15,7 +15,7 @@
components: $store.components, components: $store.components,
screen: $currentAsset, screen: $currentAsset,
tables: $backendUiStore.tables, tables: $backendUiStore.tables,
queries: $backendUiStore.queries queries: $backendUiStore.queries,
}).map(property => ({ }).map(property => ({
...property, ...property,
category: property.type === "instance" ? "Component" : "Table", category: property.type === "instance" ? "Component" : "Table",

View file

@ -13,9 +13,10 @@
let options = [] let options = []
$: table = componentInstance.datasource?.type === "table" $: table =
? tables.find(m => m._id === componentInstance.datasource.tableId) componentInstance.datasource?.type === "table"
: queries.find(query => query._id === componentInstance.datasource._id) ? tables.find(m => m._id === componentInstance.datasource.tableId)
: queries.find(query => query._id === componentInstance.datasource._id)
$: type = componentInstance.datasource.type $: type = componentInstance.datasource.type

View file

@ -45,7 +45,7 @@
components: $store.components, components: $store.components,
screen: $currentAsset, screen: $currentAsset,
tables: $backendUiStore.tables, tables: $backendUiStore.tables,
queries: $backendUiStore.queries queries: $backendUiStore.queries,
}) })
$: queryBindableProperties = bindableProperties.map(property => ({ $: queryBindableProperties = bindableProperties.map(property => ({