diff --git a/frontend/src/app.css b/frontend/src/app.css
index 79e2985935..3d0cb2d6e9 100644
--- a/frontend/src/app.css
+++ b/frontend/src/app.css
@@ -23,6 +23,10 @@
display: none !important;
}
+ .nowrap pre code.hljs {
+ whitespace: normal !important;
+ }
+
svelte-virtual-list-row {
overflow: visible !important;
}
@@ -31,8 +35,6 @@
border-top-width: 1px !important;
border-bottom-width: 0px !important;
}
-
-
}
@layer components {
@@ -42,4 +44,3 @@
cursor: pointer !important;
}
}
-
diff --git a/frontend/src/lib/components/FlowGraphViewer.svelte b/frontend/src/lib/components/FlowGraphViewer.svelte
index 5bec6a92aa..a317769afc 100644
--- a/frontend/src/lib/components/FlowGraphViewer.svelte
+++ b/frontend/src/lib/components/FlowGraphViewer.svelte
@@ -5,6 +5,11 @@
import IconedPath from './IconedPath.svelte'
import { scriptPathToHref } from '../utils'
import type { FlowModule, FlowValue } from '$lib/gen'
+ import { Drawer, DrawerContent } from './common'
+ import { Highlight } from 'svelte-highlight'
+ import ObjectViewer from './propertyPicker/ObjectViewer.svelte'
+ import typescript from 'svelte-highlight/languages/typescript'
+ import { cleanExpr } from './flows/utils'
export let flow: {
summary: string
description?: string
@@ -13,8 +18,60 @@
}
export let overflowAuto = false
let stepDetail: FlowModule | undefined = undefined
+ let codeViewer: Drawer
+
+
+ {#if stepDetail}
+ {#if stepDetail.value.type == 'script'}
+
+
+
Step Inputs
+
+
+ {#if stepDetail.value.path.startsWith('hub/')}
+
+
Code
+
+
+ {/if}
+ {:else if stepDetail.value.type == 'rawscript'}
+
+
Step Inputs
+
+
+
+ Code
+
+
+
+ {/if}
+ {/if}
+
+
-
Code
-
+
Code
+
+
+
+
{:else if stepDetail.value.type == 'script'}
diff --git a/frontend/src/lib/components/HighlightCode.svelte b/frontend/src/lib/components/HighlightCode.svelte
index f39ec77e67..0ab75b9882 100644
--- a/frontend/src/lib/components/HighlightCode.svelte
+++ b/frontend/src/lib/components/HighlightCode.svelte
@@ -26,4 +26,4 @@
$: lang = getLang(language)
-
+
diff --git a/frontend/src/lib/components/graph/FlowGraph.svelte b/frontend/src/lib/components/graph/FlowGraph.svelte
index ea716f23dd..1d4c016d52 100644
--- a/frontend/src/lib/components/graph/FlowGraph.svelte
+++ b/frontend/src/lib/components/graph/FlowGraph.svelte
@@ -32,7 +32,7 @@
let selectedNode: string | undefined = undefined
- const idGenerator = createIdGenerator()
+ let idGenerator: Generator
let nestedNodes: NestedNodes
let nodes: Node[] = []
let edges: Edge[] = []
@@ -43,6 +43,7 @@
$: {
width && height && minHeight && selectedNode && flowModuleStates
if (modules) {
+ idGenerator = createIdGenerator()
createGraph(modules, failureModule)
} else {
nodes = edges = []
@@ -181,6 +182,7 @@
}
const wrapperWidth = lang ? 'w-[calc(100%-70px)]' : 'w-[calc(100%-50px)]'
const graphId = idGenerator.next().value
+ let nodeId = onClickDetail.id ?? numberToChars(graphId - 1)
return {
id: graphId,
position: { x: -1, y: -1 },
@@ -199,22 +201,22 @@
${
- flowModuleStates?.[onClickDetail.id]?.scheduled_for ?? ''
+ flowModuleStates?.[nodeId]?.scheduled_for ?? ''
}
`
},
host,
width: NODE.width,
height: NODE.height,
- borderColor: selectedNode == onClickDetail.id ? 'black' : '#999',
- bgColor:
- selectedNode == onClickDetail.id
- ? '#f5f5f5'
- : getStateColor(flowModuleStates?.[onClickDetail.id]?.type),
+ borderColor: selectedNode == nodeId ? 'black' : '#999',
+ bgColor: selectedNode == nodeId ? '#f5f5f5' : getStateColor(flowModuleStates?.[nodeId]?.type),
parentIds,
clickCallback: (node) => {
if (!notSelectable) {
- selectedNode = onClickDetail.id
+ selectedNode = nodeId
+ }
+ if (onClickDetail.id == undefined) {
+ onClickDetail.id = numberToChars(graphId - 1)
}
dispatch('click', onClickDetail)
},
diff --git a/frontend/src/routes/index.svelte b/frontend/src/routes/index.svelte
index 225a8b7891..575076d1dd 100644
--- a/frontend/src/routes/index.svelte
+++ b/frontend/src/routes/index.svelte
@@ -77,7 +77,7 @@
-
+