diff --git a/pkg/dashboard/frontend/src/components/architecture/Architecture.tsx b/pkg/dashboard/frontend/src/components/architecture/Architecture.tsx index 501f5d7b..c5dcdaad 100644 --- a/pkg/dashboard/frontend/src/components/architecture/Architecture.tsx +++ b/pkg/dashboard/frontend/src/components/architecture/Architecture.tsx @@ -76,10 +76,10 @@ const edgeTypes = { const LOCAL_STORAGE_KEY = 'nitric-local-dash-arch-options' interface ArchOptions { - horizonal: boolean + isHorizontal: boolean } -const defaultOptions: ArchOptions = { horizonal: false } +const defaultOptions: ArchOptions = { isHorizontal: false } const getOptions = (): ArchOptions => { try { @@ -96,7 +96,7 @@ const setOptions = (options: ArchOptions) => { } function ReactFlowLayout() { - const [horizonal, setHorizonal] = useState(getOptions().horizonal) + const [isHorizontal, setIsHorizontal] = useState(getOptions().isHorizontal) const { fitView } = useReactFlow() const { data } = useWebSocket() const [nodes, setNodes, onNodesChange] = useNodesState([]) @@ -112,12 +112,16 @@ function ReactFlowLayout() { const { nodes, edges } = generateArchitectureData(data) - const layouted = getLayoutedElements(nodes, edges, horizonal ? 'LR' : 'TB') + const layouted = getLayoutedElements( + nodes, + edges, + isHorizontal ? 'LR' : 'TB', + ) setNodes([...layouted.nodes]) setEdges([...layouted.edges]) - setOptions({ horizonal }) + setOptions({ isHorizontal }) window.requestAnimationFrame(() => { setTimeout( @@ -130,7 +134,7 @@ function ReactFlowLayout() { 100, // ensure the diagram is 100% ready before re-fitting ) }) - }, [data, horizonal]) + }, [data, isHorizontal]) return ( Horizontal @@ -176,6 +180,19 @@ function ReactFlowLayout() { )} + + + + Connector Types + + + + Triggers + + Dependencies + + +