Add validation to config screen
This commit is contained in:
parent
2bfeb85013
commit
46761749bf
|
@ -23,7 +23,8 @@
|
||||||
|
|
||||||
let importQueriesModal
|
let importQueriesModal
|
||||||
|
|
||||||
let changed
|
let changed,
|
||||||
|
isValid = true
|
||||||
let integration, baseDatasource, datasource
|
let integration, baseDatasource, datasource
|
||||||
let queryList
|
let queryList
|
||||||
const querySchema = {
|
const querySchema = {
|
||||||
|
@ -101,12 +102,15 @@
|
||||||
<Divider />
|
<Divider />
|
||||||
<div class="config-header">
|
<div class="config-header">
|
||||||
<Heading size="S">Configuration</Heading>
|
<Heading size="S">Configuration</Heading>
|
||||||
<Button disabled={!changed} cta on:click={saveDatasource}>Save</Button>
|
<Button disabled={!changed || !isValid} cta on:click={saveDatasource}
|
||||||
|
>Save</Button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<IntegrationConfigForm
|
<IntegrationConfigForm
|
||||||
on:change={hasChanged}
|
on:change={hasChanged}
|
||||||
schema={integration.datasource}
|
schema={integration.datasource}
|
||||||
bind:datasource
|
bind:datasource
|
||||||
|
on:valid={e => (isValid = e.detail)}
|
||||||
/>
|
/>
|
||||||
{#if datasource.plus}
|
{#if datasource.plus}
|
||||||
<PlusConfigForm bind:datasource save={saveDatasource} />
|
<PlusConfigForm bind:datasource save={saveDatasource} />
|
||||||
|
|
Loading…
Reference in New Issue