|
1 | | -import Table from 'components/to-be-cleaned/Table' |
2 | 1 | import { motion } from 'framer-motion' |
3 | | -import { BASE_PATH } from 'lib/constants' |
4 | 2 | import { ArrowUpRight, Circle, Database, MoreVertical, Plus, Search } from 'lucide-react' |
5 | 3 | import { useTheme } from 'next-themes' |
6 | 4 | import Link from 'next/link' |
7 | 5 | import { useMemo } from 'react' |
8 | 6 | import ReactFlow, { Background, Handle, Position, ReactFlowProvider } from 'reactflow' |
9 | 7 | import 'reactflow/dist/style.css' |
10 | | -import { Button, Input } from 'ui' |
| 8 | + |
| 9 | +import { ScaffoldContainer, ScaffoldSection } from 'components/layouts/Scaffold' |
| 10 | +import Table from 'components/to-be-cleaned/Table' |
| 11 | +import { BASE_PATH } from 'lib/constants' |
| 12 | +import { Button, Input_Shadcn_ } from 'ui' |
11 | 13 | import { NODE_WIDTH } from '../../Settings/Infrastructure/InfrastructureConfiguration/InstanceConfiguration.constants' |
12 | 14 |
|
13 | 15 | const STATIC_NODES = [ |
@@ -62,6 +64,14 @@ const STATIC_EDGES = [ |
62 | 64 | { id: 'e1-4', source: '1', target: '4', type: 'smoothstep', animated: true }, |
63 | 65 | ] |
64 | 66 |
|
| 67 | +export const ReplicationComingSoon = () => { |
| 68 | + return ( |
| 69 | + <ReactFlowProvider> |
| 70 | + <ReplicationStaticMockup /> |
| 71 | + </ReactFlowProvider> |
| 72 | + ) |
| 73 | +} |
| 74 | + |
65 | 75 | const ReplicationStaticMockup = () => { |
66 | 76 | const nodes = useMemo(() => STATIC_NODES, []) |
67 | 77 | const edges = useMemo(() => STATIC_EDGES, []) |
@@ -108,16 +118,6 @@ const ReplicationStaticMockup = () => { |
108 | 118 | ) |
109 | 119 | } |
110 | 120 |
|
111 | | -const ReplicationComingSoon = () => { |
112 | | - return ( |
113 | | - <ReactFlowProvider> |
114 | | - <ReplicationStaticMockup /> |
115 | | - </ReactFlowProvider> |
116 | | - ) |
117 | | -} |
118 | | - |
119 | | -export default ReplicationComingSoon |
120 | | - |
121 | 121 | const PrimaryNode = ({ |
122 | 122 | data, |
123 | 123 | }: { |
@@ -251,58 +251,68 @@ const StaticDestinations = () => { |
251 | 251 |
|
252 | 252 | return ( |
253 | 253 | <> |
254 | | - <div className="flex flex-col bg-surface-100 px-6 pt-6 border-t relative h-full"> |
255 | | - <div className="bg-surface-300 w-full h-full absolute top-0 left-0 opacity-30"></div> |
256 | | - <div className="flex items-center justify-between"> |
257 | | - <Input |
258 | | - size="small" |
259 | | - className="w-52 bg-transparent" |
260 | | - iconContainerClassName="pl-2" |
261 | | - icon={<Search size={14} className="text-foreground-lighter" />} |
262 | | - placeholder="Search..." |
263 | | - /> |
264 | | - <Button |
265 | | - icon={<Plus size={16} />} |
266 | | - type="primary" |
267 | | - className="flex items-center" |
268 | | - onClick={() => {}} |
269 | | - > |
270 | | - New destination |
271 | | - </Button> |
272 | | - </div> |
273 | | - <Table |
274 | | - head={[ |
275 | | - <Table.th key="name">Name</Table.th>, |
276 | | - <Table.th key="publication">Publication</Table.th>, |
277 | | - <Table.th key="lag">Lag</Table.th>, |
278 | | - <Table.th key="status">Status</Table.th>, |
279 | | - <Table.th key="actions"></Table.th>, |
280 | | - ]} |
281 | | - className="mt-4" |
282 | | - body={mockRows.map((row, i) => ( |
283 | | - <Table.tr key={i}> |
284 | | - <Table.td>{row.name}</Table.td> |
285 | | - <Table.td> |
286 | | - <span className="flex items-center gap-2"> |
287 | | - <span className="font-bold">All</span> |
288 | | - <span className="text-sm text-foreground-lighter">{row.tables} tables</span> |
289 | | - </span> |
290 | | - </Table.td> |
291 | | - <Table.td>{row.lag}</Table.td> |
292 | | - <Table.td> |
293 | | - <span className="flex items-center gap-3"> |
294 | | - <Circle size={10} className="bg-brand-500 stroke-none rounded-full" /> |
295 | | - {row.status} |
296 | | - </span> |
297 | | - </Table.td> |
298 | | - <Table.td className="text-right"> |
299 | | - <button className="p-1"> |
300 | | - <MoreVertical size={18} /> |
301 | | - </button> |
302 | | - </Table.td> |
303 | | - </Table.tr> |
304 | | - ))} |
305 | | - /> |
| 254 | + <div className="flex flex-col bg-surface-100 px-6 py-6 border-t relative "> |
| 255 | + <div className="z-10 bg-surface-300 w-full h-full absolute top-0 left-0 opacity-30" /> |
| 256 | + |
| 257 | + <ScaffoldContainer> |
| 258 | + <ScaffoldSection className="!py-0"> |
| 259 | + <div className="col-span-12"> |
| 260 | + <div className="flex items-center justify-between"> |
| 261 | + <div className="relative w-52"> |
| 262 | + <Search |
| 263 | + size={14} |
| 264 | + className="absolute left-3 top-1/2 transform -translate-y-1/2 text-foreground-lighter" |
| 265 | + /> |
| 266 | + <Input_Shadcn_ |
| 267 | + className="pl-9 bg-transparent h-8 pointer-events-none" |
| 268 | + placeholder="Search..." |
| 269 | + /> |
| 270 | + </div> |
| 271 | + <Button |
| 272 | + disabled |
| 273 | + type="primary" |
| 274 | + icon={<Plus size={16} />} |
| 275 | + className="flex items-center pointer-events-none" |
| 276 | + > |
| 277 | + New destination |
| 278 | + </Button> |
| 279 | + </div> |
| 280 | + <Table |
| 281 | + head={[ |
| 282 | + <Table.th key="name">Name</Table.th>, |
| 283 | + <Table.th key="publication">Publication</Table.th>, |
| 284 | + <Table.th key="lag">Lag</Table.th>, |
| 285 | + <Table.th key="status">Status</Table.th>, |
| 286 | + <Table.th key="actions"></Table.th>, |
| 287 | + ]} |
| 288 | + className="mt-4" |
| 289 | + body={mockRows.map((row, i) => ( |
| 290 | + <Table.tr key={i}> |
| 291 | + <Table.td>{row.name}</Table.td> |
| 292 | + <Table.td> |
| 293 | + <span className="flex items-center gap-2"> |
| 294 | + <span className="font-bold">All</span> |
| 295 | + <span className="text-sm text-foreground-lighter">{row.tables} tables</span> |
| 296 | + </span> |
| 297 | + </Table.td> |
| 298 | + <Table.td>{row.lag}</Table.td> |
| 299 | + <Table.td> |
| 300 | + <span className="flex items-center gap-3"> |
| 301 | + <Circle size={10} className="bg-brand-500 stroke-none rounded-full" /> |
| 302 | + {row.status} |
| 303 | + </span> |
| 304 | + </Table.td> |
| 305 | + <Table.td className="text-right"> |
| 306 | + <button className="p-1"> |
| 307 | + <MoreVertical size={18} /> |
| 308 | + </button> |
| 309 | + </Table.td> |
| 310 | + </Table.tr> |
| 311 | + ))} |
| 312 | + /> |
| 313 | + </div> |
| 314 | + </ScaffoldSection> |
| 315 | + </ScaffoldContainer> |
306 | 316 | </div> |
307 | 317 | </> |
308 | 318 | ) |
|
0 commit comments