feat(frontend): Fix graph height in the flow status viewer

This commit is contained in:
Faton Ramadani
2024-08-12 17:53:18 +02:00
parent 073c806252
commit 87a1043312
2 changed files with 5 additions and 5 deletions
@@ -586,6 +586,7 @@
let stepDetail: FlowModule | string | undefined = undefined
let storedListJobs: Record<number, Job> = {}
let wrapperHeight: number = 0
</script>
{#if notAnonynmous}
@@ -894,7 +895,7 @@
{#if render}
{#if job.raw_flow && !isListJob}
<div class="{selected != 'graph' ? 'hidden' : ''} grow mt-4">
<div class="grid grid-cols-3 border h-full">
<div class="grid grid-cols-3 border h-full" bind:clientHeight={wrapperHeight}>
<div class="col-span-2 bg-surface-secondary">
<div class="flex flex-col">
{#each Object.values($retryStatus) as count}
@@ -915,6 +916,7 @@
<FlowGraphV2
download
minHeight={wrapperHeight}
success={jobId != undefined && isSuccess(job?.['success'])}
flowModuleStates={$localModuleStates}
on:select={(e) => {
@@ -173,6 +173,7 @@
const edges = writable<Edge[]>([])
let height = 0
function updateStores() {
$nodes = layoutNodes(graph?.nodes)
$edges = graph.edges
@@ -223,10 +224,7 @@
$selectedId !== 'Result'
</script>
<div
style={`height: ${height}px; max-height: ${maxHeight ? maxHeight + 'px' : 'none'};`}
bind:clientWidth={width}
>
<div style={`height: ${height}px; `} bind:clientWidth={width} class="w-full overflow-hidden">
<SvelteFlow
{nodes}
{edges}