'use client'; import { useState, useEffect, useCallback } from 'react'; import Link from 'next/link'; import { Button } from '@/components/ui/button'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from '@/components/ui/table'; import { StatusBadge } from '@/components/ui/status-badge'; import { ArrowLeft, Activity, History, BookOpen, Loader2, RefreshCw, ExternalLink, CheckCircle2, XCircle, Clock, AlertTriangle, Building2, Monitor, Users, Key, FileText, Globe, Shield, Package, } from 'lucide-react'; function fmtDate(d: string | null) { if (!d) return 'Never'; return new Date(d).toLocaleString(undefined, { month: 'short', day: 'numeric', year: 'numeric', hour: '2-digit', minute: '2-digit', }); } function fmtDuration(ms: number | null) { if (!ms) return '—'; if (ms < 60000) return `${Math.round(ms / 1000)}s`; return `${Math.floor(ms / 60000)}m ${Math.round((ms % 60000) / 1000)}s`; } function StatCard({ label, value, sub, icon: Icon, cls, }: { label: string; value: string | number; sub?: string; icon?: React.ElementType; cls?: string; }) { return (
Last sync: {fmtDate(latest?.completed_at ?? null)} {latest?.duration_ms && ` · ${fmtDuration(latest.duration_ms)}`}
Synced Records
Last Sync Breakdown
{latest.status &&
Synced Entities
Authentication
API key via x-api-key header · Base URL: https://api.itglue.com
Response format: JSON:API (application/vnd.api+json)
Database Tables
All data is stored in tables prefixed itg_ in the Pulse PostgreSQL database. Each table includes a synced_at timestamp and uses ON CONFLICT DO UPDATE for idempotent upserts.
filter[flexible-asset-type-id])Organizations, configurations, contacts, passwords, flexible assets