|
| 1 | +import React from "react"; |
| 2 | +import { Diagram, DiagramBuilder, Position } from "./common/index.js"; |
| 3 | + |
| 4 | +export default function ManagedDedicatedMultiRegionArchitecture() { |
| 5 | + const props = React.useMemo(() => { |
| 6 | + const y = 50; |
| 7 | + const x = 0; |
| 8 | + |
| 9 | + const space = 100; |
| 10 | + |
| 11 | + const builder = new DiagramBuilder([ |
| 12 | + { |
| 13 | + position: { x, y }, |
| 14 | + label: "Source Control", |
| 15 | + type: "custom", |
| 16 | + }, |
| 17 | + { |
| 18 | + position: { x: x + space * 2, y }, |
| 19 | + label: "Control Plane", |
| 20 | + variant: "zuplo", |
| 21 | + }, |
| 22 | + { |
| 23 | + label: "Zuplo API Gateway (Production)", |
| 24 | + variant: "zuplo", |
| 25 | + position: { x: x + space * 4, y: y - 60 }, |
| 26 | + width: 160, |
| 27 | + }, |
| 28 | + { |
| 29 | + label: "Zuplo API Gateway (Non-Production)", |
| 30 | + variant: "zuplo", |
| 31 | + position: { x: x + space * 4, y: y + 40 }, |
| 32 | + width: 160, |
| 33 | + }, |
| 34 | + ]); |
| 35 | + |
| 36 | + const duration = 4; |
| 37 | + builder.connect( |
| 38 | + { label: "Source Control", position: Position.Right }, |
| 39 | + { label: "Control Plane", position: Position.Left }, |
| 40 | + { animate: true, icon: "square-code", duration }, |
| 41 | + ); |
| 42 | + builder.connect( |
| 43 | + { label: "Control Plane", position: Position.Right }, |
| 44 | + { label: "Zuplo API Gateway (Production)", position: Position.Left }, |
| 45 | + { animate: true, icon: "square-code", duration }, |
| 46 | + ); |
| 47 | + builder.connect( |
| 48 | + { label: "Control Plane", position: Position.Right }, |
| 49 | + { label: "Zuplo API Gateway (Non-Production)", position: Position.Left }, |
| 50 | + { animate: true, icon: "square-code", duration }, |
| 51 | + ); |
| 52 | + |
| 53 | + return builder.getProps(); |
| 54 | + }, []); |
| 55 | + |
| 56 | + return <Diagram {...props} className="h-56" />; |
| 57 | +} |
0 commit comments