|
|
|
@ -133,14 +133,15 @@ |
|
|
|
<section class="config"> |
|
|
|
<Heading medium lh>Query {integrationInfo?.friendlyName}</Heading> |
|
|
|
<hr /> |
|
|
|
<Spacer extraLarge /> |
|
|
|
<Heading small lh>Config</Heading> |
|
|
|
<Body small grey>Provide a name for your query and select its function.</Body> |
|
|
|
<Spacer medium /> |
|
|
|
<Spacer large /> |
|
|
|
<div class="config-field"> |
|
|
|
<Label small>Query Name</Label> |
|
|
|
<Input thin outline bind:value={query.name} /> |
|
|
|
</div> |
|
|
|
<Spacer medium /> |
|
|
|
<Spacer extraLarge /> |
|
|
|
{#if queryConfig} |
|
|
|
<div class="config-field"> |
|
|
|
<Label small>Function</Label> |
|
|
|
@ -152,7 +153,10 @@ |
|
|
|
{/each} |
|
|
|
</Select> |
|
|
|
</div> |
|
|
|
<Spacer extraLarge /> |
|
|
|
<hr /> |
|
|
|
<Spacer extraLarge /> |
|
|
|
<Spacer small /> |
|
|
|
<ParameterBuilder bind:parameters={query.parameters} bindable={false} /> |
|
|
|
<hr /> |
|
|
|
{/if} |
|
|
|
@ -160,20 +164,24 @@ |
|
|
|
|
|
|
|
{#if shouldShowQueryConfig} |
|
|
|
<section> |
|
|
|
<Spacer extraLarge /> |
|
|
|
<Spacer small /> |
|
|
|
<div class="config"> |
|
|
|
<Heading small lh>Fields</Heading> |
|
|
|
<Body small grey>Fill in the fields specific to this query.</Body> |
|
|
|
<Spacer medium /> |
|
|
|
<Spacer extraLarge /> |
|
|
|
<IntegrationQueryEditor |
|
|
|
{datasource} |
|
|
|
{query} |
|
|
|
schema={queryConfig[query.queryVerb]} |
|
|
|
bind:parameters /> |
|
|
|
|
|
|
|
<Spacer extraLarge /> |
|
|
|
<hr /> |
|
|
|
|
|
|
|
<Spacer extraLarge /> |
|
|
|
<Spacer medium /> |
|
|
|
<div class="viewer-controls"> |
|
|
|
<Heading small lh>Query Results</Heading> |
|
|
|
<Heading small lh>Results</Heading> |
|
|
|
<div class="button-container"> |
|
|
|
<Button |
|
|
|
secondary |
|
|
|
@ -191,7 +199,8 @@ |
|
|
|
schema. |
|
|
|
</Body> |
|
|
|
|
|
|
|
<Spacer large /> |
|
|
|
<Spacer extraLarge /> |
|
|
|
<Spacer medium /> |
|
|
|
|
|
|
|
<section class="viewer"> |
|
|
|
{#if data} |
|
|
|
@ -199,19 +208,7 @@ |
|
|
|
{#if tab === 'JSON'} |
|
|
|
<pre class="preview"> |
|
|
|
{#if !data[0]} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Please run your query to fetch some data. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{:else} |
|
|
|
{JSON.stringify(data[0], undefined, 2)} |
|
|
|
{/if} |
|
|
|
@ -248,6 +245,8 @@ |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
{/if} |
|
|
|
<Spacer extraLarge /> |
|
|
|
<Spacer extraLarge /> |
|
|
|
|
|
|
|
<style> |
|
|
|
.config-field { |
|
|
|
@ -269,7 +268,7 @@ |
|
|
|
|
|
|
|
hr { |
|
|
|
margin-top: var(--layout-m); |
|
|
|
margin-bottom: var(--layout-m); |
|
|
|
border: 1px solid var(--grey-2); |
|
|
|
} |
|
|
|
|
|
|
|
.config { |
|
|
|
@ -281,12 +280,20 @@ |
|
|
|
cursor: pointer; |
|
|
|
} |
|
|
|
|
|
|
|
.viewer { |
|
|
|
min-height: 200px; |
|
|
|
} |
|
|
|
|
|
|
|
.preview { |
|
|
|
width: 800px; |
|
|
|
height: 100%; |
|
|
|
min-height: 120px; |
|
|
|
overflow-y: auto; |
|
|
|
overflow-wrap: break-word; |
|
|
|
white-space: pre-wrap; |
|
|
|
background-color: var(--grey-1); |
|
|
|
padding: var(--spacing-m); |
|
|
|
border-radius: 8px; |
|
|
|
color: var(--grey-6); |
|
|
|
} |
|
|
|
|
|
|
|
.viewer-controls { |
|
|
|
|