feat(frontend): Add a split panel in the test tab (#619)

This commit is contained in:
Faton Ramadani
2022-09-23 12:11:05 +02:00
committed by GitHub
parent f8b62f6e9f
commit a7fcf18f20
2 changed files with 28 additions and 20 deletions
+27 -17
View File
@@ -2,6 +2,7 @@
import type { Schema } from '$lib/common'
import type { Flow } from '$lib/gen'
import { sendUserToast, truncateRev } from '$lib/utils'
import { HSplitPane } from 'svelte-split-pane'
import { mapJobResultsToFlowState } from './flows/flowStateUtils'
import { flowStore } from './flows/flowStore'
@@ -49,20 +50,29 @@
}
</script>
<RunForm
runnable={extractStep($flowStore)}
runAction={(_, args) => runPreview(args)}
schedulable={false}
buttonText="Test just this step"
detailed={false}
args={stepArgs}
/>
{#if jobId}
<div class="w-full flex justify-center">
<FlowStatusViewer
{jobId}
on:jobsLoaded={(e) => mapJobResultsToFlowState(e.detail, 'justthis', i, j)}
/>
</div>
{/if}
<HSplitPane leftPaneSize="50%" rightPaneSize="50%" minLeftPaneSize="20%" minRightPaneSize="20%">
<left slot="left" class="relative">
<div class="overflow-auto h-full p-4">
<RunForm
runnable={extractStep($flowStore)}
runAction={(_, args) => runPreview(args)}
schedulable={false}
buttonText="Test just this step"
detailed={false}
args={stepArgs}
/>
</div>
</left>
<right slot="right">
<div class="overflow-auto h-full p-4">
{#if jobId}
<FlowStatusViewer
{jobId}
on:jobsLoaded={(e) => mapJobResultsToFlowState(e.detail, 'justthis', i, j)}
/>
{:else}
<span class="text-sm">No results yet</span>
{/if}
</div>
</right>
</HSplitPane>
@@ -156,9 +156,7 @@
</PropPickerWrapper>
</TabContent>
<TabContent value="test" class="flex flex-col flex-1 h-full">
<div class="p-4 overflow-y-auto">
<FlowPreview indexes={$selectedId} schema={flowModuleState.schema} />
</div>
<FlowPreview indexes={$selectedId} schema={flowModuleState.schema} />
</TabContent>
<TabContent value="advanced" class="flex flex-col flex-1 h-full">