Fixing issue with custom datasource section appearing when none exist.

This commit is contained in:
mike12345567 2022-08-18 12:58:43 +01:00
parent a32b3705dc
commit d063d4fa67
1 changed files with 16 additions and 11 deletions

View File

@ -28,6 +28,9 @@
let importModal let importModal
$: showImportButton = false $: showImportButton = false
$: customIntegrations = Object.entries(integrations).filter(
entry => entry[1].custom
)
checkShowImport() checkShowImport()
@ -163,17 +166,19 @@
/> />
{/each} {/each}
</div> </div>
<Body size="S">Custom data source</Body> {#if customIntegrations.length > 0}
<div class="item-list"> <Body size="S">Custom data source</Body>
{#each Object.entries(integrations).filter(entry => entry[1].custom) as [integrationType, schema]} <div class="item-list">
<DatasourceCard {#each customIntegrations as [integrationType, schema]}
on:selected={evt => selectIntegration(evt.detail)} <DatasourceCard
{schema} on:selected={evt => selectIntegration(evt.detail)}
bind:integrationType {schema}
{integration} bind:integrationType
/> {integration}
{/each} />
</div> {/each}
</div>
{/if}
</Layout> </Layout>
</ModalContent> </ModalContent>
</Modal> </Modal>