import React, { useState } from 'react'; import { Activity, RefreshCw, Terminal, ShieldCheck, AlertCircle, Database, Link2, X, Plus, Loader2, CheckCircle2, MoreVertical } from 'lucide-react'; import { Connection } from '../types/index.ts'; const MOCK_CONNS: Connection[] = [ { id: 'CON-101', vendorCustomerId: 'CUST-A992', entity: 'JPM_USA', status: 'CONNECTED', lastSyncedAt: '2024-03-31T12:00:00Z' }, { id: 'CON-102', vendorCustomerId: 'CUST-D102', entity: 'DB_EURO', status: 'CONNECTED', lastSyncedAt: '2024-03-31T11:55:00Z' }, { id: 'CON-103', vendorCustomerId: 'CUST-L551', entity: 'LUMINA_INTERNAL', status: 'ERROR', lastSyncedAt: '2024-03-30T22:00:00Z' }, ]; const Connectivity: React.FC = () => { const [conns, setConns] = useState(MOCK_CONNS); const [isModalOpen, setIsModalOpen] = useState(false); const [provisioning, setProvisioning] = useState(false); const [newVendor, setNewVendor] = useState({ entity: 'STRIPE_GLOBAL', id: 'CUST-X' }); const handleProvision = () => { setProvisioning(true); setTimeout(() => { const newConn: Connection = { id: `CON-${Math.floor(200 + Math.random() * 800)}`, vendorCustomerId: newVendor.id, entity: newVendor.entity, status: 'CONNECTED', lastSyncedAt: new Date().toISOString() }; setConns([newConn, ...conns]); setProvisioning(false); setIsModalOpen(false); }, 2000); }; return (

System Fabric

Machine-to-Machine Integration Node Monitoring

{conns.map(conn => (
{conn.status === 'CONNECTED' ? : }

Status

{conn.status}

{conn.entity}

Vendor ID: {conn.vendorCustomerId}

Handshake ID {conn.id}
Last Sync: {new Date(conn.lastSyncedAt).toLocaleTimeString()}
))}
{isModalOpen && (

Vendor Handshake

Fabric Extension Module

setNewVendor({...newVendor, entity: e.target.value})} className="w-full bg-black border border-zinc-800 rounded-2xl py-4 px-6 text-white text-xs outline-none focus:border-blue-500 transition-all font-bold uppercase tracking-widest" placeholder="e.g. STRIPE_US" />
setNewVendor({...newVendor, id: e.target.value})} className="w-full bg-black border border-zinc-800 rounded-2xl py-4 px-6 text-white text-xs outline-none focus:border-blue-500 transition-all font-mono" placeholder="CUST-..." />

Establishing a secure tunnel via RSA-OAEP. Metadata persistence will be shredded post-handshake.

)}
); }; export default Connectivity;