PageSourceSearch

https://otentecnologia.com.br/assets/SyncLog-D4OKGf8w.js

js otentecnologia.com.br collected 2026-09-30 05:29:14 UTC 3,459 bytes, 1 lines download raw bytes

1import{r as e,j as s}from"./framer-DNXtdBgj.js";import{A as t}from"./AdminLayout-DLcnHFvP.js";import{e as r}from"./index-XTUkK5WH.js";import{C as a,c as o}from"./card-Bfb46Kgw.js";import{B as c}from"./badge-5FdbKFYY.js";import{S as i,a as d,b as l,c as n,d as m}from"./select-DQMgvcBO.js";import"./users-round-C_OE1rsU.js";import"./file-text-IPr1Bv1X.js";import"./rocket-Ckmnaf0E.js";import"./wrench-k69Xhg9M.js";import"./factory-g-lDNgT_.js";import"./target-CQCdL--z.js";import"./package-BE07Fgma.js";import"./puzzle-ms8g5hLX.js";import"./building-2-Cf048s_3.js";import"./users-BomTj5bm.js";import"./chart-column-x2tYRpNA.js";import"./supabase-CVkO6afG.js";import"./index-jVOyRz7F.js";import"./chevron-up-Z5mg4Tbw.js";const x="__all__";function j(){const[j,p]=e.useState([]),[h,u]=e.useState(!0),[f,g]=e.useState(x);e.useEffect(()=>{(async()=>{const{data:e}=await r.from("lead_sync_log").select("id,created_at,operation,status,error_message,duration_ms,diagnostic_lead_id,source_key").order("created_at",{ascending:!1}).limit(200);p(e||[]),u(!1)})()},[]);const N=e.useMemo(()=>Array.from(new Set(j.map(e=>e.source_key).filter(Boolean))),[j]),_=e.useMemo(()=>f===x?j:j.filter(e=>e.source_key===f),[j,f]);return s.jsx(t,{children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-end justify-between gap-4 flex-wrap",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"font-display text-3xl font-bold",children:"Log de Sincronização Zoho"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"Auditoria das últimas 200 chamadas para Zoho CRM/Meeting/MA."})]}),N.length>0&&s.jsx("div",{className:"w-56",children:s.jsxs(i,{value:f,onValueChange:g,children:[s.jsx(d,{children:s.jsx(l,{placeholder:"Origem"})}),s.jsxs(n,{children:[s.jsx(m,{value:x,children:"Todas as origens"}),N.map(e=>s.jsx(m,{value:e,children:e},e))]})]})})]}),s.jsx(a,{children:s.jsx(o,{className:"p-0 overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"bg-muted/50 text-left",children:s.jsxs("tr",{children:[s.jsx("th",{className:"p-3",children:"Data"}),s.jsx("th",{className:"p-3",children:"Origem"}),s.jsx("th",{className:"p-3",children:"Operação"}),s.jsx("th",{className:"p-3",children:"Status"}),s.jsx("th",{className:"p-3",children:"Duração"}),s.jsx("th",{className:"p-3",children:"Erro"})]})}),s.jsx("tbody",{children:h?s.jsx("tr",{children:s.jsx("td",{colSpan:6,className:"p-6 text-center text-muted-foreground",children:"Carregando…"})}):0===_.length?s.jsx("tr",{children:s.jsx("td",{colSpan:6,className:"p-6 text-center text-muted-foreground",children:"Nenhuma sincronização"})}):_.map(e=>s.jsxs("tr",{className:"border-t",children:[s.jsx("td",{className:"p-3 text-muted-foreground whitespace-nowrap",children:new Date(e.created_at).toLocaleString("pt-BR")}),s.jsx("td",{className:"p-3",children:s.jsx("span",{className:"font-mono text-[11px] text-muted-foreground",children:e.source_key||"—"})}),s.jsx("td",{className:"p-3 font-mono text-xs",children:e.operation}),s.jsx("td",{className:"p-3",children:s.jsx(c,"success"===e.status?{children:"OK"}:{variant:"destructive",children:"Erro"})}),s.jsx("td",{className:"p-3 text-muted-foreground",children:e.duration_ms?`${e.duration_ms}ms`:"—"}),s.jsx("td",{className:"p-3 text-destructive text-xs max-w-md truncate",title:e.error_message||"",children:e.error_message||"—"})]},e.id))})]})})})]})})}export{j as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.