only allow read queries in datasources

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

View File

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

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff