only allow read queries in datasources

This commit is contained in:
Martin McKeaveney 2021-01-26 15:23:23 +00:00
parent f956750870
commit aa28bb5e94
5 changed files with 10 additions and 894 deletions

View File

@ -34,7 +34,7 @@
})) }))
return [...acc, ...viewsArr] return [...acc, ...viewsArr]
}, []) }, [])
$: queries = $backendUiStore.queries.map(query => ({ $: queries = $backendUiStore.queries.filter(query => query.queryVerb === "read").map(query => ({
label: query.name, label: query.name,
name: query.name, name: query.name,
tableId: query._id, tableId: query._id,

View File

@ -164,7 +164,7 @@
<div class="viewer-controls"> <div class="viewer-controls">
<Button <Button
blue blue
disabled={data.length === 0} disabled={data.length === 0 || !query.name}
on:click={saveQuery}> on:click={saveQuery}>
Save Query Save Query
</Button> </Button>

View File

@ -51,7 +51,6 @@
<div class="query-list-item" on:click={() => onClickQuery(query)}> <div class="query-list-item" on:click={() => onClickQuery(query)}>
<p class="query-name">{query.name}</p> <p class="query-name">{query.name}</p>
<p>{query.queryVerb}</p> <p>{query.queryVerb}</p>
<p>4000 records</p>
<p></p> <p></p>
</div> </div>
{/each} {/each}
@ -115,7 +114,7 @@
background: var(--background); background: var(--background);
border: var(--border-grey); border: var(--border-grey);
display: grid; display: grid;
grid-template-columns: 2fr 0.75fr 0.75fr 1fr 20px; grid-template-columns: 2fr 0.75fr 20px;
align-items: center; align-items: center;
padding: var(--spacing-m) var(--layout-xs); padding: var(--spacing-m) var(--layout-xs);
gap: var(--layout-xs); gap: var(--layout-xs);

View File

@ -16,8 +16,6 @@
$: appId = $store.appId $: appId = $store.appId
$: console.log($hostingStore)
async function deployApp() { async function deployApp() {
const DEPLOY_URL = `/api/deploy` const DEPLOY_URL = `/api/deploy`

File diff suppressed because it is too large Load Diff