nestlens 0.14.0 → 0.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/api/dashboard-server.js +60 -6
  2. package/dist/dashboard/public/assets/{BatchDetailView-BGIncdDY.js → BatchDetailView-DQf7rhdt.js} +1 -1
  3. package/dist/dashboard/public/assets/{BatchesPage-ugxH2v0z.js → BatchesPage-W8k8XEu3.js} +1 -1
  4. package/dist/dashboard/public/assets/{CacheDetailView-DszaZXmk.js → CacheDetailView-D1W5C-eK.js} +1 -1
  5. package/dist/dashboard/public/assets/{CachePage-tk4-Mzj-.js → CachePage-CwEDXyxJ.js} +1 -1
  6. package/dist/dashboard/public/assets/{CommandDetailView-oe6WXq6m.js → CommandDetailView-DKQLM96e.js} +1 -1
  7. package/dist/dashboard/public/assets/{CommandsPage-BT5pa5B8.js → CommandsPage-B4XMyz_K.js} +1 -1
  8. package/dist/dashboard/public/assets/{CopyButton-djrkphpR.js → CopyButton-DfPqcshv.js} +1 -1
  9. package/dist/dashboard/public/assets/{DashboardPage-D0ukXtDo.js → DashboardPage-Ce497zS8.js} +1 -1
  10. package/dist/dashboard/public/assets/{DataTable-CDqXyed8.js → DataTable-Cz2phOFe.js} +1 -1
  11. package/dist/dashboard/public/assets/{DetailRow-CWJp1tTe.js → DetailRow-DKG3Vf9j.js} +1 -1
  12. package/dist/dashboard/public/assets/{DumpDetailView-BMkCXdx-.js → DumpDetailView-BU9RRxWv.js} +1 -1
  13. package/dist/dashboard/public/assets/{DumpsPage-C0_N90Tx.js → DumpsPage-ldSDznQa.js} +1 -1
  14. package/dist/dashboard/public/assets/{EntryDetailPage-Dw2pcYO2.js → EntryDetailPage-BdBZLbAf.js} +3 -3
  15. package/dist/dashboard/public/assets/{EntrySearchInput-BGWM929F.js → EntrySearchInput-BF9N_f7y.js} +1 -1
  16. package/dist/dashboard/public/assets/{EventDetailView-CqLCbVkJ.js → EventDetailView-CmV2uByp.js} +1 -1
  17. package/dist/dashboard/public/assets/{EventsPage-CRGB2aCi.js → EventsPage-TlQQA-mn.js} +1 -1
  18. package/dist/dashboard/public/assets/{ExceptionDetailView-Dq8Di5sK.js → ExceptionDetailView-B5aRNZz5.js} +1 -1
  19. package/dist/dashboard/public/assets/{ExceptionsPage-CA8ilfoK.js → ExceptionsPage-DqiQXiJK.js} +1 -1
  20. package/dist/dashboard/public/assets/{GateDetailView-DYDLxDRn.js → GateDetailView-BPd0sJpT.js} +1 -1
  21. package/dist/dashboard/public/assets/{GatesPage-Do-qOR5X.js → GatesPage-D4s1Ogo-.js} +1 -1
  22. package/dist/dashboard/public/assets/{GraphQLDetailView-BFwIn1GM.js → GraphQLDetailView-Dd_pgjdZ.js} +1 -1
  23. package/dist/dashboard/public/assets/{GraphQLPage-CNWITXJX.js → GraphQLPage-AOD9WXa5.js} +1 -1
  24. package/dist/dashboard/public/assets/{HttpClientDetailView-BgYy7Ucb.js → HttpClientDetailView-CR7RujPI.js} +1 -1
  25. package/dist/dashboard/public/assets/{HttpClientPage-BJd_ibF6.js → HttpClientPage-CUNDLZdF.js} +1 -1
  26. package/dist/dashboard/public/assets/{JobDetailView-B3psHOxq.js → JobDetailView-C3U9nJFo.js} +1 -1
  27. package/dist/dashboard/public/assets/{JobsPage-DAdrYeU-.js → JobsPage-DX0A5Til.js} +1 -1
  28. package/dist/dashboard/public/assets/{LogDetailView-BealPvcV.js → LogDetailView-V_x94h-I.js} +1 -1
  29. package/dist/dashboard/public/assets/{LogsPage-CCwjLuWQ.js → LogsPage-Cvrcv7tq.js} +1 -1
  30. package/dist/dashboard/public/assets/{MailDetailView-CM54VOlh.js → MailDetailView-CYCQI9Z8.js} +1 -1
  31. package/dist/dashboard/public/assets/{MailPage-CdiZI_hh.js → MailPage-BZbVLHHN.js} +1 -1
  32. package/dist/dashboard/public/assets/{ModelDetailView-B8KVVw2M.js → ModelDetailView-CUEA5nRD.js} +1 -1
  33. package/dist/dashboard/public/assets/{ModelsPage-0-jYL1-U.js → ModelsPage-CKUeCZLn.js} +1 -1
  34. package/dist/dashboard/public/assets/{NotificationDetailView-0VYorYuc.js → NotificationDetailView-CT4EIDa3.js} +1 -1
  35. package/dist/dashboard/public/assets/{NotificationsPage-szMmustZ.js → NotificationsPage-CVnjoHST.js} +1 -1
  36. package/dist/dashboard/public/assets/{PageHeader-9OQepDeQ.js → PageHeader-DR_M5h7z.js} +1 -1
  37. package/dist/dashboard/public/assets/{QueriesPage-BJfywln6.js → QueriesPage-DR3EHxfO.js} +1 -1
  38. package/dist/dashboard/public/assets/{QueryDetailView-BRe55CUs.js → QueryDetailView-dWmmR_nP.js} +1 -1
  39. package/dist/dashboard/public/assets/{RedisDetailView-BZ8zYVsk.js → RedisDetailView-PALK5x6N.js} +1 -1
  40. package/dist/dashboard/public/assets/{RedisPage-CHxk1zKp.js → RedisPage-D-9y0o0o.js} +1 -1
  41. package/dist/dashboard/public/assets/{RequestDetailView-BT568MaZ.js → RequestDetailView-DiS1WZ4m.js} +1 -1
  42. package/dist/dashboard/public/assets/{RequestsPage-BPeHtBRn.js → RequestsPage-CCSIr_jW.js} +1 -1
  43. package/dist/dashboard/public/assets/{ScheduleDetailView-OG--Lyzr.js → ScheduleDetailView-G86hV8Ed.js} +1 -1
  44. package/dist/dashboard/public/assets/{SchedulePage-uM09HkqS.js → SchedulePage-CQVmVvYe.js} +1 -1
  45. package/dist/dashboard/public/assets/{UserCard-CfcScmF8.js → UserCard-Bp6Bf3OI.js} +1 -1
  46. package/dist/dashboard/public/assets/{ViewDetailView-CcWB9bLw.js → ViewDetailView-D-dBm6G6.js} +1 -1
  47. package/dist/dashboard/public/assets/{ViewsPage-L56Rz7jz.js → ViewsPage-ErK5Vmy0.js} +1 -1
  48. package/dist/dashboard/public/assets/{calendar-B4UUBe_A.js → calendar-BfDDUQSW.js} +1 -1
  49. package/dist/dashboard/public/assets/{circle-alert-s9ODnOC3.js → circle-alert-DJ_9D_4c.js} +1 -1
  50. package/dist/dashboard/public/assets/{circle-check-big-C4ws6-wY.js → circle-check-big-CiGeQW9J.js} +1 -1
  51. package/dist/dashboard/public/assets/{circle-x-D14U2UWr.js → circle-x-B-V5s-zK.js} +1 -1
  52. package/dist/dashboard/public/assets/{eye-CIA_cZlW.js → eye-LljylR_O.js} +1 -1
  53. package/dist/dashboard/public/assets/{index-dkeMTrq0.js → index-HxcGVcSo.js} +2 -2
  54. package/dist/dashboard/public/assets/{search-C0XvQMrJ.js → search-VPXcw9Ki.js} +1 -1
  55. package/dist/dashboard/public/assets/{send-CTeWfM1I.js → send-CdCk9jQ5.js} +1 -1
  56. package/dist/dashboard/public/assets/{timer-BVP3d7zc.js → timer-I7o5QV6X.js} +1 -1
  57. package/dist/dashboard/public/assets/{types-CuCQ6L2Z.js → types-BMBEhoQ2.js} +1 -1
  58. package/dist/dashboard/public/assets/{users-UyMivszP.js → users-CFzKwpf2.js} +1 -1
  59. package/dist/dashboard/public/assets/{zap-CAbVWiHg.js → zap-DMB3w7zm.js} +1 -1
  60. package/dist/dashboard/public/index.html +1 -1
  61. package/dist/watchers/graphql/adapters/apollo.adapter.js +19 -1
  62. package/dist/watchers/graphql/graphql.watcher.d.ts +7 -0
  63. package/dist/watchers/graphql/graphql.watcher.js +34 -0
  64. package/dist/watchers/http-client.watcher.js +14 -1
  65. package/package.json +7 -1
@@ -1 +1 @@
1
- import{j as e,C as x,D as o}from"./index-dkeMTrq0.js";import{b as m}from"./vendor-DBTT3jXp.js";import{u as p,C as g,T as h}from"./EntryDetailPage-Dw2pcYO2.js";import{C as l}from"./CopyButton-djrkphpR.js";import{C as y}from"./types-CuCQ6L2Z.js";import{Z as j}from"./zap-CAbVWiHg.js";import{U as N}from"./users-UyMivszP.js";import"./date-Dwgqy666.js";import"./search-C0XvQMrJ.js";function B({entry:d}){const{payload:a}=d,s=p(),[i,n]=m.useState("listeners"),c=[{id:"listeners",label:"Listeners",badge:a.listeners.length,content:e.jsx("div",{className:"p-4",children:a.listeners.length===0?e.jsx("div",{className:"text-center py-8 text-gray-500 dark:text-gray-400",children:"No listeners for this event"}):e.jsx("div",{className:"space-y-2",children:a.listeners.map((t,r)=>e.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"w-8 h-8 flex items-center justify-center bg-green-100 dark:bg-green-900/30 text-green-600 dark:text-green-400 rounded-full text-sm font-medium",children:r+1}),e.jsx("span",{className:"font-mono text-sm text-gray-900 dark:text-white",children:t})]}),e.jsx(l,{text:t})]},r))})})},{id:"payload",label:"Payload",content:a.payload?e.jsx(g,{data:a.payload,toolbarState:s.state,searchBar:s.SearchBar,maxHeight:400}):e.jsx("div",{className:"p-4 text-center py-8 text-gray-500 dark:text-gray-400",children:"No payload data"})}];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"p-2 bg-green-100 dark:bg-green-900/30 rounded-lg",children:e.jsx(j,{className:"h-5 w-5 text-green-600 dark:text-green-400"})}),e.jsxs("div",{children:[e.jsx(y,{listType:"events",filterType:"names",filterValue:a.name,className:"font-mono",children:a.name}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:"Event Details"})]})]}),e.jsx(l,{text:a.name,label:"Copy event name"})]})}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 divide-x divide-gray-200 dark:divide-gray-700",children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(N,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Listeners"})]}),e.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:a.listeners.length})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(x,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:[a.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),a.payload&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(o,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Payload Size"})]}),e.jsxs("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:[Object.keys(a.payload).length,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:" keys"})]})]})]})]}),e.jsx(h,{tabs:c,defaultTab:"listeners",hashKey:"event",headerRight:i==="payload"&&a.payload?e.jsx(s.Toolbar,{data:a.payload}):void 0,onTabChange:n})]})}export{B as default};
1
+ import{j as e,C as x,D as o}from"./index-HxcGVcSo.js";import{b as m}from"./vendor-DBTT3jXp.js";import{u as p,C as g,T as h}from"./EntryDetailPage-BdBZLbAf.js";import{C as l}from"./CopyButton-DfPqcshv.js";import{C as y}from"./types-BMBEhoQ2.js";import{Z as j}from"./zap-DMB3w7zm.js";import{U as N}from"./users-CFzKwpf2.js";import"./date-Dwgqy666.js";import"./search-VPXcw9Ki.js";function B({entry:d}){const{payload:a}=d,s=p(),[i,n]=m.useState("listeners"),c=[{id:"listeners",label:"Listeners",badge:a.listeners.length,content:e.jsx("div",{className:"p-4",children:a.listeners.length===0?e.jsx("div",{className:"text-center py-8 text-gray-500 dark:text-gray-400",children:"No listeners for this event"}):e.jsx("div",{className:"space-y-2",children:a.listeners.map((t,r)=>e.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"w-8 h-8 flex items-center justify-center bg-green-100 dark:bg-green-900/30 text-green-600 dark:text-green-400 rounded-full text-sm font-medium",children:r+1}),e.jsx("span",{className:"font-mono text-sm text-gray-900 dark:text-white",children:t})]}),e.jsx(l,{text:t})]},r))})})},{id:"payload",label:"Payload",content:a.payload?e.jsx(g,{data:a.payload,toolbarState:s.state,searchBar:s.SearchBar,maxHeight:400}):e.jsx("div",{className:"p-4 text-center py-8 text-gray-500 dark:text-gray-400",children:"No payload data"})}];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"p-2 bg-green-100 dark:bg-green-900/30 rounded-lg",children:e.jsx(j,{className:"h-5 w-5 text-green-600 dark:text-green-400"})}),e.jsxs("div",{children:[e.jsx(y,{listType:"events",filterType:"names",filterValue:a.name,className:"font-mono",children:a.name}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:"Event Details"})]})]}),e.jsx(l,{text:a.name,label:"Copy event name"})]})}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 divide-x divide-gray-200 dark:divide-gray-700",children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(N,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Listeners"})]}),e.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:a.listeners.length})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(x,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:[a.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),a.payload&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(o,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Payload Size"})]}),e.jsxs("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:[Object.keys(a.payload).length,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:" keys"})]})]})]})]}),e.jsx(h,{tabs:c,defaultTab:"listeners",hashKey:"event",headerRight:i==="payload"&&a.payload?e.jsx(s.Toolbar,{data:a.payload}):void 0,onTabChange:n})]})}export{B as default};
@@ -1 +1 @@
1
- import{j as t,R as o}from"./index-dkeMTrq0.js";import{e as F,b as D}from"./vendor-DBTT3jXp.js";import{f as M,p as T}from"./date-Dwgqy666.js";import{u as A,a as P,P as L,R as B,N as H,L as I}from"./PageHeader-9OQepDeQ.js";import{u as S,d as W,C as $}from"./types-CuCQ6L2Z.js";import{T as l,D as q,b as z}from"./DataTable-CDqXyed8.js";import"./timer-BVP3d7zc.js";function X(){const d=F(),{addFilter:n,clearAll:c,serverFilters:m,headerFilters:u}=S("events"),{rangeFilters:h,windowMinutes:g}=A(),{entries:x,loading:p,refreshing:a,error:f,refresh:i,newEntriesCount:y,hasMore:v,loadMore:j,loadNew:C,autoRefreshEnabled:w,live:E,setAutoRefresh:N,meta:r,isHighlighted:b}=P({type:"event",limit:50,filters:{...m,...h},windowMinutes:g}),s=x.filter(e=>W(e)),k=D.useMemo(()=>[{key:"event",header:"Event",minWidth:"200px",render:e=>t.jsx($,{onClick:R=>{R.stopPropagation(),n("names",e.payload.name)},className:"font-mono",children:e.payload.name})},{key:"listeners",header:"Listeners",width:"120px",align:"center",render:e=>t.jsxs(l,{secondary:!0,children:[e.payload.listeners.length," listener",e.payload.listeners.length!==1?"s":""]})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(q,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(l,{secondary:!0,className:"text-xs",children:M(T(e.createdAt),{addSuffix:!0})})}],[n]);return p&&s.length===0?t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):t.jsxs("div",{children:[t.jsx(L,{title:"Events",icon:o,iconColor:"text-emerald-600 dark:text-emerald-400",count:s.length,totalCount:r==null?void 0:r.total,clearable:{type:"event",label:"events",onCleared:i},refreshing:a,autoRefreshEnabled:w,live:E,onAutoRefreshToggle:N,filters:u,filterControls:t.jsx(B,{route:"events"}),onClearAllFilters:c}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(H,{count:y,onClick:C,loading:a}),t.jsx(z,{columns:k,data:s,keyExtractor:e=>e.id,onRowClick:e=>d(`/events/${e.id}`),rowClassName:e=>b(e.id)?"highlight-new":"",emptyMessage:"No events recorded yet",error:f,onRetry:i,emptyIcon:t.jsx(o,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(I,{hasMore:v,onClick:j,loading:a})]})]})}export{X as default};
1
+ import{j as t,R as o}from"./index-HxcGVcSo.js";import{e as F,b as D}from"./vendor-DBTT3jXp.js";import{f as M,p as T}from"./date-Dwgqy666.js";import{u as A,a as P,P as L,R as B,N as H,L as I}from"./PageHeader-DR_M5h7z.js";import{u as S,d as W,C as $}from"./types-BMBEhoQ2.js";import{T as l,D as q,b as z}from"./DataTable-Cz2phOFe.js";import"./timer-I7o5QV6X.js";function X(){const d=F(),{addFilter:n,clearAll:c,serverFilters:m,headerFilters:u}=S("events"),{rangeFilters:h,windowMinutes:g}=A(),{entries:x,loading:p,refreshing:a,error:f,refresh:i,newEntriesCount:y,hasMore:v,loadMore:j,loadNew:C,autoRefreshEnabled:w,live:E,setAutoRefresh:N,meta:r,isHighlighted:b}=P({type:"event",limit:50,filters:{...m,...h},windowMinutes:g}),s=x.filter(e=>W(e)),k=D.useMemo(()=>[{key:"event",header:"Event",minWidth:"200px",render:e=>t.jsx($,{onClick:R=>{R.stopPropagation(),n("names",e.payload.name)},className:"font-mono",children:e.payload.name})},{key:"listeners",header:"Listeners",width:"120px",align:"center",render:e=>t.jsxs(l,{secondary:!0,children:[e.payload.listeners.length," listener",e.payload.listeners.length!==1?"s":""]})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(q,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(l,{secondary:!0,className:"text-xs",children:M(T(e.createdAt),{addSuffix:!0})})}],[n]);return p&&s.length===0?t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):t.jsxs("div",{children:[t.jsx(L,{title:"Events",icon:o,iconColor:"text-emerald-600 dark:text-emerald-400",count:s.length,totalCount:r==null?void 0:r.total,clearable:{type:"event",label:"events",onCleared:i},refreshing:a,autoRefreshEnabled:w,live:E,onAutoRefreshToggle:N,filters:u,filterControls:t.jsx(B,{route:"events"}),onClearAllFilters:c}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(H,{count:y,onClick:C,loading:a}),t.jsx(z,{columns:k,data:s,keyExtractor:e=>e.id,onRowClick:e=>d(`/events/${e.id}`),rowClassName:e=>b(e.id)?"highlight-new":"",emptyMessage:"No events recorded yet",error:f,onRetry:i,emptyIcon:t.jsx(o,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(I,{hasMore:v,onClick:j,loading:a})]})]})}export{X as default};
@@ -1,4 +1,4 @@
1
- import{c as k,j as e,x as v,z as j}from"./index-dkeMTrq0.js";import{p as f,f as w}from"./date-Dwgqy666.js";import{D as c,f as T}from"./DetailRow-CWJp1tTe.js";import{C as y}from"./types-CuCQ6L2Z.js";import{a as C,b as q,u as S,C as F,T as I}from"./EntryDetailPage-Dw2pcYO2.js";import{b as g}from"./vendor-DBTT3jXp.js";import"./search-C0XvQMrJ.js";/**
1
+ import{c as k,j as e,x as v,z as j}from"./index-HxcGVcSo.js";import{p as f,f as w}from"./date-Dwgqy666.js";import{D as c,f as T}from"./DetailRow-DKG3Vf9j.js";import{C as y}from"./types-BMBEhoQ2.js";import{a as C,b as q,u as S,C as F,T as I}from"./EntryDetailPage-BdBZLbAf.js";import{b as g}from"./vendor-DBTT3jXp.js";import"./search-VPXcw9Ki.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as z,u as H,q as G,s as U,E as J,z as f,j as t,l as K,T as y}from"./index-dkeMTrq0.js";import{e as O,b as o}from"./vendor-DBTT3jXp.js";import{f as Q,p as V}from"./date-Dwgqy666.js";import{u as X,a as Y,P as Z,F as _,R as ee,N as te,L as se}from"./PageHeader-9OQepDeQ.js";import{u as ae,b as re,C as h}from"./types-CuCQ6L2Z.js";import{E as oe}from"./EntrySearchInput-BGWM929F.js";import{T as l,b as le}from"./DataTable-CDqXyed8.js";import{C as ie}from"./circle-check-big-C4ws6-wY.js";import"./timer-BVP3d7zc.js";import"./search-C0XvQMrJ.js";/**
1
+ import{c as z,u as H,q as G,s as U,E as J,z as f,j as t,l as K,T as y}from"./index-HxcGVcSo.js";import{e as O,b as o}from"./vendor-DBTT3jXp.js";import{f as Q,p as V}from"./date-Dwgqy666.js";import{u as X,a as Y,P as Z,F as _,R as ee,N as te,L as se}from"./PageHeader-DR_M5h7z.js";import{u as ae,b as re,C as h}from"./types-BMBEhoQ2.js";import{E as oe}from"./EntrySearchInput-BF9N_f7y.js";import{T as l,b as le}from"./DataTable-Cz2phOFe.js";import{C as ie}from"./circle-check-big-CiGeQW9J.js";import"./timer-I7o5QV6X.js";import"./search-VPXcw9Ki.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as m,j as e,S as i,C as g}from"./index-dkeMTrq0.js";import{p as d,f as h}from"./date-Dwgqy666.js";import{D as s,f as j}from"./DetailRow-CWJp1tTe.js";import{C as x}from"./types-CuCQ6L2Z.js";import{u as p,C as b,T as u}from"./EntryDetailPage-Dw2pcYO2.js";import{C as y}from"./CopyButton-djrkphpR.js";import{C as N}from"./circle-check-big-C4ws6-wY.js";import{C as f}from"./circle-x-D14U2UWr.js";import"./vendor-DBTT3jXp.js";import"./search-C0XvQMrJ.js";/**
1
+ import{c as m,j as e,S as i,C as g}from"./index-HxcGVcSo.js";import{p as d,f as h}from"./date-Dwgqy666.js";import{D as s,f as j}from"./DetailRow-DKG3Vf9j.js";import{C as x}from"./types-BMBEhoQ2.js";import{u as p,C as b,T as u}from"./EntryDetailPage-BdBZLbAf.js";import{C as y}from"./CopyButton-DfPqcshv.js";import{C as N}from"./circle-check-big-CiGeQW9J.js";import{C as f}from"./circle-x-B-V5s-zK.js";import"./vendor-DBTT3jXp.js";import"./search-VPXcw9Ki.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{j as t,S as d}from"./index-dkeMTrq0.js";import{e as M,b as P}from"./vendor-DBTT3jXp.js";import{f as T,p as S}from"./date-Dwgqy666.js";import{u as W,a as G,P as B,R as D,N as I,L}from"./PageHeader-9OQepDeQ.js";import{u as H,p as U,C as c}from"./types-CuCQ6L2Z.js";import{T as a,b as J}from"./DataTable-CDqXyed8.js";import"./timer-BVP3d7zc.js";function X(){const u=M(),{addFilter:s,clearAll:h,serverFilters:p,headerFilters:x}=H("gates"),{rangeFilters:g,windowMinutes:m}=W(),{entries:y,loading:f,refreshing:o,error:j,refresh:n,newEntriesCount:b,hasMore:w,loadMore:C,loadNew:k,autoRefreshEnabled:N,live:E,setAutoRefresh:R,meta:i,isHighlighted:v}=G({type:"gate",limit:50,filters:{...p,...g},windowMinutes:m}),l=y.filter(e=>U(e)),F=P.useMemo(()=>[{key:"gate",header:"Gate",minWidth:"200px",render:e=>t.jsx(c,{onClick:r=>{r.stopPropagation(),s("names",e.payload.gate)},children:e.payload.gate})},{key:"action",header:"Action",width:"150px",render:e=>e.payload.action?t.jsx(a,{truncate:!0,maxWidth:"150px",children:e.payload.action}):t.jsx(a,{secondary:!0,children:"-"})},{key:"subject",header:"Subject",minWidth:"150px",render:e=>e.payload.subject?t.jsx(a,{mono:!0,truncate:!0,maxWidth:"200px",children:typeof e.payload.subject=="string"?e.payload.subject:JSON.stringify(e.payload.subject)}):t.jsx(a,{secondary:!0,children:"-"})},{key:"result",header:"Result",width:"100px",render:e=>{const r=e.payload.allowed?"allowed":"denied";return t.jsx(c,{onClick:A=>{A.stopPropagation(),s("results",r)},children:r.toUpperCase()})}},{key:"user",header:"User",width:"150px",render:e=>e.payload.userId?t.jsx(a,{truncate:!0,maxWidth:"150px",children:e.payload.userId}):t.jsx(a,{secondary:!0,children:"-"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(a,{secondary:!0,className:"text-xs",children:T(S(e.createdAt),{addSuffix:!0})})}],[s]);return f&&l.length===0?t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):t.jsxs("div",{children:[t.jsx(B,{title:"Gates",icon:d,iconColor:"text-amber-600 dark:text-amber-400",count:l.length,totalCount:i==null?void 0:i.total,clearable:{type:"gate",label:"gates",onCleared:n},refreshing:o,autoRefreshEnabled:N,live:E,onAutoRefreshToggle:R,filters:x,filterControls:t.jsx(D,{route:"gates"}),onClearAllFilters:h}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(I,{count:b,onClick:k,loading:o}),t.jsx(J,{columns:F,data:l,keyExtractor:e=>e.id,onRowClick:e=>u(`/gates/${e.id}`),rowClassName:e=>v(e.id)?"highlight-new":"",emptyMessage:"No gate checks recorded yet",error:j,onRetry:n,emptyIcon:t.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(L,{hasMore:w,onClick:C,loading:o})]})]})}export{X as default};
1
+ import{j as t,S as d}from"./index-HxcGVcSo.js";import{e as M,b as P}from"./vendor-DBTT3jXp.js";import{f as T,p as S}from"./date-Dwgqy666.js";import{u as W,a as G,P as B,R as D,N as I,L}from"./PageHeader-DR_M5h7z.js";import{u as H,p as U,C as c}from"./types-BMBEhoQ2.js";import{T as a,b as J}from"./DataTable-Cz2phOFe.js";import"./timer-I7o5QV6X.js";function X(){const u=M(),{addFilter:s,clearAll:h,serverFilters:p,headerFilters:x}=H("gates"),{rangeFilters:g,windowMinutes:m}=W(),{entries:y,loading:f,refreshing:o,error:j,refresh:n,newEntriesCount:b,hasMore:w,loadMore:C,loadNew:k,autoRefreshEnabled:N,live:E,setAutoRefresh:R,meta:i,isHighlighted:v}=G({type:"gate",limit:50,filters:{...p,...g},windowMinutes:m}),l=y.filter(e=>U(e)),F=P.useMemo(()=>[{key:"gate",header:"Gate",minWidth:"200px",render:e=>t.jsx(c,{onClick:r=>{r.stopPropagation(),s("names",e.payload.gate)},children:e.payload.gate})},{key:"action",header:"Action",width:"150px",render:e=>e.payload.action?t.jsx(a,{truncate:!0,maxWidth:"150px",children:e.payload.action}):t.jsx(a,{secondary:!0,children:"-"})},{key:"subject",header:"Subject",minWidth:"150px",render:e=>e.payload.subject?t.jsx(a,{mono:!0,truncate:!0,maxWidth:"200px",children:typeof e.payload.subject=="string"?e.payload.subject:JSON.stringify(e.payload.subject)}):t.jsx(a,{secondary:!0,children:"-"})},{key:"result",header:"Result",width:"100px",render:e=>{const r=e.payload.allowed?"allowed":"denied";return t.jsx(c,{onClick:A=>{A.stopPropagation(),s("results",r)},children:r.toUpperCase()})}},{key:"user",header:"User",width:"150px",render:e=>e.payload.userId?t.jsx(a,{truncate:!0,maxWidth:"150px",children:e.payload.userId}):t.jsx(a,{secondary:!0,children:"-"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(a,{secondary:!0,className:"text-xs",children:T(S(e.createdAt),{addSuffix:!0})})}],[s]);return f&&l.length===0?t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):t.jsxs("div",{children:[t.jsx(B,{title:"Gates",icon:d,iconColor:"text-amber-600 dark:text-amber-400",count:l.length,totalCount:i==null?void 0:i.total,clearable:{type:"gate",label:"gates",onCleared:n},refreshing:o,autoRefreshEnabled:N,live:E,onAutoRefreshToggle:R,filters:x,filterControls:t.jsx(D,{route:"gates"}),onClearAllFilters:h}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(I,{count:b,onClick:k,loading:o}),t.jsx(J,{columns:F,data:l,keyExtractor:e=>e.id,onRowClick:e=>u(`/gates/${e.id}`),rowClassName:e=>v(e.id)?"highlight-new":"",emptyMessage:"No gate checks recorded yet",error:j,onRetry:n,emptyIcon:t.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(L,{hasMore:w,onClick:C,loading:o})]})]})}export{X as default};
@@ -1,4 +1,4 @@
1
- import{c as z,z as q,j as e,X as H,x as P,i as U,L as B,C as _,T as W}from"./index-dkeMTrq0.js";import{b as j,e as J}from"./vendor-DBTT3jXp.js";import{p as R,f as X}from"./date-Dwgqy666.js";import{D as g,f as Z}from"./DetailRow-CWJp1tTe.js";import{C as $,B as K}from"./types-CuCQ6L2Z.js";import{G as Y,N as ee}from"./DataTable-CDqXyed8.js";import{M as ae,c as se,a as te,b as re,u as D,C as L,T as M}from"./EntryDetailPage-Dw2pcYO2.js";import{U as le}from"./UserCard-CfcScmF8.js";import{S as Q}from"./search-C0XvQMrJ.js";import{Z as ne}from"./zap-CAbVWiHg.js";import{S as ie}from"./send-CTeWfM1I.js";/**
1
+ import{c as z,z as q,j as e,X as H,x as P,i as U,L as B,C as _,T as W}from"./index-HxcGVcSo.js";import{b as j,e as J}from"./vendor-DBTT3jXp.js";import{p as R,f as X}from"./date-Dwgqy666.js";import{D as g,f as Z}from"./DetailRow-DKG3Vf9j.js";import{C as $,B as K}from"./types-BMBEhoQ2.js";import{G as Y,N as ee}from"./DataTable-Cz2phOFe.js";import{M as ae,c as se,a as te,b as re,u as D,C as L,T as M}from"./EntryDetailPage-BdBZLbAf.js";import{U as le}from"./UserCard-Bp6Bf3OI.js";import{S as Q}from"./search-VPXcw9Ki.js";import{Z as ne}from"./zap-DMB3w7zm.js";import{S as ie}from"./send-CdCk9jQ5.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as Q,j as a}from"./index-dkeMTrq0.js";import{e as U,f as W,b as d}from"./vendor-DBTT3jXp.js";import{f as I,p as O}from"./date-Dwgqy666.js";import{E as z}from"./EntrySearchInput-BGWM929F.js";import{u as V,a as $,P as J,R as K,N as X,L as Y}from"./PageHeader-9OQepDeQ.js";import{u as Z,s as _,C as y}from"./types-CuCQ6L2Z.js";import{T as c,G as ee,N as ae,D as re,a as te,b as se}from"./DataTable-CDqXyed8.js";import"./search-C0XvQMrJ.js";import"./timer-BVP3d7zc.js";/**
1
+ import{c as Q,j as a}from"./index-HxcGVcSo.js";import{e as U,f as W,b as d}from"./vendor-DBTT3jXp.js";import{f as I,p as O}from"./date-Dwgqy666.js";import{E as z}from"./EntrySearchInput-BF9N_f7y.js";import{u as V,a as $,P as J,R as K,N as X,L as Y}from"./PageHeader-DR_M5h7z.js";import{u as Z,s as _,C as y}from"./types-BMBEhoQ2.js";import{T as c,G as ee,N as ae,D as re,a as te,b as se}from"./DataTable-Cz2phOFe.js";import"./search-VPXcw9Ki.js";import"./timer-I7o5QV6X.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{j as e}from"./index-dkeMTrq0.js";import{b as T}from"./vendor-DBTT3jXp.js";import{p as b,f as E}from"./date-Dwgqy666.js";import{D as s,f as N}from"./DetailRow-CWJp1tTe.js";import{C as i,B}from"./types-CuCQ6L2Z.js";import{u as j,T as f,C as l}from"./EntryDetailPage-Dw2pcYO2.js";import"./search-C0XvQMrJ.js";const H=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],D=["2XX","3XX","4XX","5XX","SUCCESS","ERROR","CLIENT-ERROR","REDIRECT"];function q(t){return t<1e3?`${t} ms`:`${(t/1e3).toFixed(2)} s`}function O({entry:t}){const{payload:a,createdAt:c}=t,h=a.statusCode??0,m=(t.tags??[]).filter(p=>{var u;const x=p.toUpperCase();return!H.includes(x)&&!D.includes(x)&&p.toLowerCase()!==((u=a.hostname)==null?void 0:u.toLowerCase())}),r=j(),o=j(),[y,R]=T.useState("payload"),[S,C]=T.useState("response"),n={payload:a.requestBody||{},headers:a.requestHeaders??{}},d={response:a.responseBody||{},headers:a.responseHeaders??{}},g=[{id:"payload",label:"Request Body",content:e.jsx(l,{data:n.payload,toolbarState:r.state,searchBar:r.SearchBar,maxHeight:400})},{id:"headers",label:"Request Headers",content:e.jsx(l,{data:n.headers,toolbarState:r.state,searchBar:r.SearchBar,maxHeight:400})}],v=[{id:"response",label:"Response Body",content:e.jsx(l,{data:d.response,toolbarState:o.state,searchBar:o.SearchBar,maxHeight:400})},{id:"headers",label:"Response Headers",content:e.jsx(l,{data:d.headers,toolbarState:o.state,searchBar:o.SearchBar,maxHeight:400})}];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"HTTP Client Request Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(s,{label:"Time",value:e.jsxs("span",{children:[N(b(c),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",E(b(c),{addSuffix:!0}),")"]})]})}),e.jsx(s,{label:"Method",value:e.jsx(i,{listType:"http-client",filterType:"methods",filterValue:a.method,className:"font-mono font-medium",children:a.method})}),e.jsx(s,{label:"URL",value:e.jsx("span",{className:"font-mono text-sm break-all",children:a.url})}),a.hostname&&e.jsx(s,{label:"Hostname",value:e.jsx(i,{listType:"http-client",filterType:"hostnames",filterValue:a.hostname,className:"font-mono",children:a.hostname})}),a.path&&e.jsx(s,{label:"Path",value:e.jsx("span",{className:"font-mono text-sm",children:a.path})}),e.jsx(s,{label:"Status Code",value:e.jsx(i,{listType:"http-client",filterType:"statuses",filterValue:a.statusCode?String(a.statusCode):"ERR",children:h>0?h:"ERR"})}),e.jsx(s,{label:"Duration",value:e.jsx("span",{className:a.duration>1e3?"text-yellow-600 dark:text-yellow-400 font-medium":"",children:q(a.duration)})}),a.error&&e.jsx(s,{label:"Error",value:e.jsx("span",{className:"text-red-600 dark:text-red-400 font-medium",children:a.error})}),m.length>0&&e.jsx(s,{label:"Tags",value:e.jsx(B,{items:m,listType:"http-client",maxItems:99})})]})})]}),e.jsx(f,{tabs:g,defaultTab:"payload",hashKey:"req",headerRight:e.jsx(r.Toolbar,{data:n[y]}),onTabChange:R}),e.jsx(f,{tabs:v,defaultTab:"response",hashKey:"res",headerRight:e.jsx(o.Toolbar,{data:d[S]}),onTabChange:C})]})}export{O as default};
1
+ import{j as e}from"./index-HxcGVcSo.js";import{b as T}from"./vendor-DBTT3jXp.js";import{p as b,f as E}from"./date-Dwgqy666.js";import{D as s,f as N}from"./DetailRow-DKG3Vf9j.js";import{C as i,B}from"./types-BMBEhoQ2.js";import{u as j,T as f,C as l}from"./EntryDetailPage-BdBZLbAf.js";import"./search-VPXcw9Ki.js";const H=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],D=["2XX","3XX","4XX","5XX","SUCCESS","ERROR","CLIENT-ERROR","REDIRECT"];function q(t){return t<1e3?`${t} ms`:`${(t/1e3).toFixed(2)} s`}function O({entry:t}){const{payload:a,createdAt:c}=t,h=a.statusCode??0,m=(t.tags??[]).filter(p=>{var u;const x=p.toUpperCase();return!H.includes(x)&&!D.includes(x)&&p.toLowerCase()!==((u=a.hostname)==null?void 0:u.toLowerCase())}),r=j(),o=j(),[y,R]=T.useState("payload"),[S,C]=T.useState("response"),n={payload:a.requestBody||{},headers:a.requestHeaders??{}},d={response:a.responseBody||{},headers:a.responseHeaders??{}},g=[{id:"payload",label:"Request Body",content:e.jsx(l,{data:n.payload,toolbarState:r.state,searchBar:r.SearchBar,maxHeight:400})},{id:"headers",label:"Request Headers",content:e.jsx(l,{data:n.headers,toolbarState:r.state,searchBar:r.SearchBar,maxHeight:400})}],v=[{id:"response",label:"Response Body",content:e.jsx(l,{data:d.response,toolbarState:o.state,searchBar:o.SearchBar,maxHeight:400})},{id:"headers",label:"Response Headers",content:e.jsx(l,{data:d.headers,toolbarState:o.state,searchBar:o.SearchBar,maxHeight:400})}];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"HTTP Client Request Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(s,{label:"Time",value:e.jsxs("span",{children:[N(b(c),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",E(b(c),{addSuffix:!0}),")"]})]})}),e.jsx(s,{label:"Method",value:e.jsx(i,{listType:"http-client",filterType:"methods",filterValue:a.method,className:"font-mono font-medium",children:a.method})}),e.jsx(s,{label:"URL",value:e.jsx("span",{className:"font-mono text-sm break-all",children:a.url})}),a.hostname&&e.jsx(s,{label:"Hostname",value:e.jsx(i,{listType:"http-client",filterType:"hostnames",filterValue:a.hostname,className:"font-mono",children:a.hostname})}),a.path&&e.jsx(s,{label:"Path",value:e.jsx("span",{className:"font-mono text-sm",children:a.path})}),e.jsx(s,{label:"Status Code",value:e.jsx(i,{listType:"http-client",filterType:"statuses",filterValue:a.statusCode?String(a.statusCode):"ERR",children:h>0?h:"ERR"})}),e.jsx(s,{label:"Duration",value:e.jsx("span",{className:a.duration>1e3?"text-yellow-600 dark:text-yellow-400 font-medium":"",children:q(a.duration)})}),a.error&&e.jsx(s,{label:"Error",value:e.jsx("span",{className:"text-red-600 dark:text-red-400 font-medium",children:a.error})}),m.length>0&&e.jsx(s,{label:"Tags",value:e.jsx(B,{items:m,listType:"http-client",maxItems:99})})]})})]}),e.jsx(f,{tabs:g,defaultTab:"payload",hashKey:"req",headerRight:e.jsx(r.Toolbar,{data:n[y]}),onTabChange:R}),e.jsx(f,{tabs:v,defaultTab:"response",hashKey:"res",headerRight:e.jsx(o.Toolbar,{data:d[S]}),onTabChange:C})]})}export{O as default};
@@ -1 +1 @@
1
- import{j as t,e as h}from"./index-dkeMTrq0.js";import{e as F,b as H}from"./vendor-DBTT3jXp.js";import{f as M,p as D}from"./date-Dwgqy666.js";import{u as A,a as B,P as L,R as S,N as W,L as q}from"./PageHeader-9OQepDeQ.js";import{u as G,j as I,C as l}from"./types-CuCQ6L2Z.js";import{T as d,D as $,b as z}from"./DataTable-CDqXyed8.js";import"./timer-BVP3d7zc.js";function Y(){const u=F(),{addFilter:r,clearAll:p,serverFilters:m,headerFilters:x}=G("http-client"),{rangeFilters:g,windowMinutes:y}=A(),{entries:f,loading:C,refreshing:s,error:j,refresh:c,newEntriesCount:k,hasMore:w,loadMore:N,loadNew:b,autoRefreshEnabled:R,live:E,setAutoRefresh:P,meta:o,isHighlighted:T}=B({type:"http-client",limit:50,filters:{...m,...g},windowMinutes:y}),n=f.filter(e=>I(e)),v=H.useMemo(()=>[{key:"method",header:"Method",width:"90px",render:e=>t.jsx(l,{onClick:a=>{a.stopPropagation(),r("methods",e.payload.method)},className:"font-mono",children:e.payload.method})},{key:"status",header:"Status",width:"80px",render:e=>{const a=e.payload.statusCode??0;return t.jsx(l,{onClick:i=>{i.stopPropagation(),r("statuses",a>0?String(a):"ERR")},children:a>0?a:"ERR"})}},{key:"hostname",header:"Host",width:"180px",render:e=>{const a=e.payload.hostname;return a?t.jsx(l,{onClick:i=>{i.stopPropagation(),r("hostnames",a)},className:"font-mono",children:a}):t.jsx(d,{secondary:!0,children:"-"})}},{key:"path",header:"Path",minWidth:"200px",render:e=>t.jsx(d,{mono:!0,truncate:!0,maxWidth:"300px",children:e.payload.path||e.payload.url})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx($,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(d,{secondary:!0,className:"text-xs",children:M(D(e.createdAt),{addSuffix:!0})})}],[r]);return C&&n.length===0?t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):t.jsxs("div",{children:[t.jsx(L,{title:"HTTP Client",icon:h,iconColor:"text-cyan-600 dark:text-cyan-400",count:n.length,totalCount:o==null?void 0:o.total,clearable:{type:"http-client",label:"http client",onCleared:c},refreshing:s,autoRefreshEnabled:R,live:E,onAutoRefreshToggle:P,filters:x,filterControls:t.jsx(S,{route:"http-client"}),onClearAllFilters:p}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(W,{count:k,onClick:b,loading:s}),t.jsx(z,{columns:v,data:n,keyExtractor:e=>e.id,onRowClick:e=>u(`/http-client/${e.id}`),rowClassName:e=>T(e.id)?"highlight-new":"",emptyMessage:"No outgoing HTTP requests recorded yet",error:j,onRetry:c,emptyIcon:t.jsx(h,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(q,{hasMore:w,onClick:N,loading:s})]})]})}export{Y as default};
1
+ import{j as t,e as h}from"./index-HxcGVcSo.js";import{e as F,b as H}from"./vendor-DBTT3jXp.js";import{f as M,p as D}from"./date-Dwgqy666.js";import{u as A,a as B,P as L,R as S,N as W,L as q}from"./PageHeader-DR_M5h7z.js";import{u as G,j as I,C as l}from"./types-BMBEhoQ2.js";import{T as d,D as $,b as z}from"./DataTable-Cz2phOFe.js";import"./timer-I7o5QV6X.js";function Y(){const u=F(),{addFilter:r,clearAll:p,serverFilters:m,headerFilters:x}=G("http-client"),{rangeFilters:g,windowMinutes:y}=A(),{entries:f,loading:C,refreshing:s,error:j,refresh:c,newEntriesCount:k,hasMore:w,loadMore:N,loadNew:b,autoRefreshEnabled:R,live:E,setAutoRefresh:P,meta:o,isHighlighted:T}=B({type:"http-client",limit:50,filters:{...m,...g},windowMinutes:y}),n=f.filter(e=>I(e)),v=H.useMemo(()=>[{key:"method",header:"Method",width:"90px",render:e=>t.jsx(l,{onClick:a=>{a.stopPropagation(),r("methods",e.payload.method)},className:"font-mono",children:e.payload.method})},{key:"status",header:"Status",width:"80px",render:e=>{const a=e.payload.statusCode??0;return t.jsx(l,{onClick:i=>{i.stopPropagation(),r("statuses",a>0?String(a):"ERR")},children:a>0?a:"ERR"})}},{key:"hostname",header:"Host",width:"180px",render:e=>{const a=e.payload.hostname;return a?t.jsx(l,{onClick:i=>{i.stopPropagation(),r("hostnames",a)},className:"font-mono",children:a}):t.jsx(d,{secondary:!0,children:"-"})}},{key:"path",header:"Path",minWidth:"200px",render:e=>t.jsx(d,{mono:!0,truncate:!0,maxWidth:"300px",children:e.payload.path||e.payload.url})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx($,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(d,{secondary:!0,className:"text-xs",children:M(D(e.createdAt),{addSuffix:!0})})}],[r]);return C&&n.length===0?t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):t.jsxs("div",{children:[t.jsx(L,{title:"HTTP Client",icon:h,iconColor:"text-cyan-600 dark:text-cyan-400",count:n.length,totalCount:o==null?void 0:o.total,clearable:{type:"http-client",label:"http client",onCleared:c},refreshing:s,autoRefreshEnabled:R,live:E,onAutoRefreshToggle:P,filters:x,filterControls:t.jsx(S,{route:"http-client"}),onClearAllFilters:p}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(W,{count:k,onClick:b,loading:s}),t.jsx(z,{columns:v,data:n,keyExtractor:e=>e.id,onRowClick:e=>u(`/http-client/${e.id}`),rowClassName:e=>T(e.id)?"highlight-new":"",emptyMessage:"No outgoing HTTP requests recorded yet",error:j,onRetry:c,emptyIcon:t.jsx(h,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(q,{hasMore:w,onClick:N,loading:s})]})]})}export{Y as default};
@@ -1,4 +1,4 @@
1
- import{c as k,C as h,l as j,j as e,B as n}from"./index-dkeMTrq0.js";import{b as w}from"./vendor-DBTT3jXp.js";import{p as m,f as C}from"./date-Dwgqy666.js";import{D as s,f as T}from"./DetailRow-CWJp1tTe.js";import{C as i}from"./types-CuCQ6L2Z.js";import{u as b,C as p,T as D}from"./EntryDetailPage-Dw2pcYO2.js";import{C as S}from"./CopyButton-djrkphpR.js";import{C as y}from"./circle-alert-s9ODnOC3.js";import{C as B}from"./circle-check-big-C4ws6-wY.js";import"./search-C0XvQMrJ.js";/**
1
+ import{c as k,C as h,l as j,j as e,B as n}from"./index-HxcGVcSo.js";import{b as w}from"./vendor-DBTT3jXp.js";import{p as m,f as C}from"./date-Dwgqy666.js";import{D as s,f as T}from"./DetailRow-DKG3Vf9j.js";import{C as i}from"./types-BMBEhoQ2.js";import{u as b,C as p,T as D}from"./EntryDetailPage-BdBZLbAf.js";import{C as S}from"./CopyButton-DfPqcshv.js";import{C as y}from"./circle-alert-DJ_9D_4c.js";import{C as B}from"./circle-check-big-CiGeQW9J.js";import"./search-VPXcw9Ki.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{j as t,B as n}from"./index-dkeMTrq0.js";import{e as R,b as v}from"./vendor-DBTT3jXp.js";import{f as F,p as A}from"./date-Dwgqy666.js";import{u as D,a as M,P as B,R as J,N as P,L as q}from"./PageHeader-9OQepDeQ.js";import{u as L,e as H,C as o}from"./types-CuCQ6L2Z.js";import{T as i,D as S,b as I}from"./DataTable-CDqXyed8.js";import"./timer-BVP3d7zc.js";function U(){const d=R(),{clearAll:u,serverFilters:c,headerFilters:h}=L("jobs"),{rangeFilters:m,windowMinutes:p}=D(),{entries:x,loading:y,refreshing:s,error:j,refresh:l,newEntriesCount:f,hasMore:g,loadMore:b,loadNew:w,autoRefreshEnabled:C,live:k,setAutoRefresh:N,meta:r,isHighlighted:T}=M({type:"job",limit:50,filters:{...c,...m},windowMinutes:p}),a=x.filter(e=>H(e)),E=v.useMemo(()=>[{key:"job",header:"Job",minWidth:"200px",render:e=>t.jsx(o,{listType:"jobs",filterType:"names",className:"font-mono",children:e.payload.name})},{key:"queue",header:"Queue",width:"120px",render:e=>t.jsx(o,{listType:"jobs",filterType:"queues",children:e.payload.queue})},{key:"status",header:"Status",width:"100px",render:e=>t.jsx(o,{listType:"jobs",filterType:"statuses",children:e.payload.status})},{key:"attempts",header:"Attempts",width:"80px",align:"center",render:e=>t.jsx(i,{secondary:!0,children:e.payload.attempts})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>e.payload.duration?t.jsx(S,{ms:e.payload.duration}):t.jsx(i,{secondary:!0,children:"—"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(i,{secondary:!0,className:"text-xs",children:F(A(e.createdAt),{addSuffix:!0})})}],[]);return y&&a.length===0?t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):t.jsxs("div",{children:[t.jsx(B,{title:"Jobs",icon:n,iconColor:"text-yellow-600 dark:text-yellow-400",count:a.length,totalCount:r==null?void 0:r.total,clearable:{type:"job",label:"jobs",onCleared:l},refreshing:s,autoRefreshEnabled:C,live:k,onAutoRefreshToggle:N,filters:h,filterControls:t.jsx(J,{route:"jobs"}),onClearAllFilters:u}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(P,{count:f,onClick:w,loading:s}),t.jsx(I,{columns:E,data:a,keyExtractor:e=>e.id,onRowClick:e=>d(`/jobs/${e.id}`),rowClassName:e=>T(e.id)?"highlight-new":"",emptyMessage:"No jobs recorded yet",error:j,onRetry:l,emptyIcon:t.jsx(n,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(q,{hasMore:g,onClick:b,loading:s})]})]})}export{U as default};
1
+ import{j as t,B as n}from"./index-HxcGVcSo.js";import{e as R,b as v}from"./vendor-DBTT3jXp.js";import{f as F,p as A}from"./date-Dwgqy666.js";import{u as D,a as M,P as B,R as J,N as P,L as q}from"./PageHeader-DR_M5h7z.js";import{u as L,e as H,C as o}from"./types-BMBEhoQ2.js";import{T as i,D as S,b as I}from"./DataTable-Cz2phOFe.js";import"./timer-I7o5QV6X.js";function U(){const d=R(),{clearAll:u,serverFilters:c,headerFilters:h}=L("jobs"),{rangeFilters:m,windowMinutes:p}=D(),{entries:x,loading:y,refreshing:s,error:j,refresh:l,newEntriesCount:f,hasMore:g,loadMore:b,loadNew:w,autoRefreshEnabled:C,live:k,setAutoRefresh:N,meta:r,isHighlighted:T}=M({type:"job",limit:50,filters:{...c,...m},windowMinutes:p}),a=x.filter(e=>H(e)),E=v.useMemo(()=>[{key:"job",header:"Job",minWidth:"200px",render:e=>t.jsx(o,{listType:"jobs",filterType:"names",className:"font-mono",children:e.payload.name})},{key:"queue",header:"Queue",width:"120px",render:e=>t.jsx(o,{listType:"jobs",filterType:"queues",children:e.payload.queue})},{key:"status",header:"Status",width:"100px",render:e=>t.jsx(o,{listType:"jobs",filterType:"statuses",children:e.payload.status})},{key:"attempts",header:"Attempts",width:"80px",align:"center",render:e=>t.jsx(i,{secondary:!0,children:e.payload.attempts})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>e.payload.duration?t.jsx(S,{ms:e.payload.duration}):t.jsx(i,{secondary:!0,children:"—"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(i,{secondary:!0,className:"text-xs",children:F(A(e.createdAt),{addSuffix:!0})})}],[]);return y&&a.length===0?t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):t.jsxs("div",{children:[t.jsx(B,{title:"Jobs",icon:n,iconColor:"text-yellow-600 dark:text-yellow-400",count:a.length,totalCount:r==null?void 0:r.total,clearable:{type:"job",label:"jobs",onCleared:l},refreshing:s,autoRefreshEnabled:C,live:k,onAutoRefreshToggle:N,filters:h,filterControls:t.jsx(J,{route:"jobs"}),onClearAllFilters:u}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(P,{count:f,onClick:w,loading:s}),t.jsx(I,{columns:E,data:a,keyExtractor:e=>e.id,onRowClick:e=>d(`/jobs/${e.id}`),rowClassName:e=>T(e.id)?"highlight-new":"",emptyMessage:"No jobs recorded yet",error:j,onRetry:l,emptyIcon:t.jsx(n,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(q,{hasMore:g,onClick:b,loading:s})]})]})}export{U as default};
@@ -1 +1 @@
1
- import{j as a}from"./index-dkeMTrq0.js";import{p as d,f as x}from"./date-Dwgqy666.js";import{D as s,f as m}from"./DetailRow-CWJp1tTe.js";import{C as o}from"./types-CuCQ6L2Z.js";import{u as b,C as h,T as g}from"./EntryDetailPage-Dw2pcYO2.js";import"./vendor-DBTT3jXp.js";import"./search-C0XvQMrJ.js";const i={verbose:{variant:"default",label:"VERBOSE"},debug:{variant:"info",label:"DEBUG"},log:{variant:"success",label:"LOG"},warn:{variant:"warning",label:"WARNING"},error:{variant:"error",label:"ERROR"}};function w({entry:c}){const{payload:e,createdAt:r}=c,n=i[e.level]||i.log,t=b(),l=e.metadata&&Object.keys(e.metadata).length>0?[{id:"metadata",label:"Metadata",content:a.jsx(h,{data:e.metadata,toolbarState:t.state,searchBar:t.SearchBar,maxHeight:400})}]:[];return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"card",children:[a.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:a.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Log Details"})}),a.jsx("div",{className:"p-4",children:a.jsxs("dl",{className:"divide-y-0",children:[a.jsx(s,{label:"Time",value:a.jsxs("span",{children:[m(d(r),"MMMM do yyyy, h:mm:ss a")," ",a.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",x(d(r),{addSuffix:!0}),")"]})]})}),a.jsx(s,{label:"Level",value:a.jsx(o,{listType:"logs",filterType:"levels",filterValue:e.level,children:n.label})}),e.context&&a.jsx(s,{label:"Context",value:a.jsx(o,{listType:"logs",filterType:"contexts",filterValue:e.context,className:"font-mono",children:e.context})})]})})]}),a.jsxs("div",{className:"card",children:[a.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:a.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Message"})}),a.jsx("div",{className:"p-4",children:a.jsx("p",{className:`text-sm ${e.level==="error"?"text-red-600 dark:text-red-400":e.level==="warn"?"text-yellow-600 dark:text-yellow-400":"text-gray-900 dark:text-white"}`,children:e.message})})]}),l.length>0&&a.jsx(g,{tabs:l,defaultTab:"metadata",headerRight:a.jsx(t.Toolbar,{data:e.metadata})}),e.stack&&a.jsxs("div",{className:"card",children:[a.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:a.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Stack Trace"})}),a.jsx("div",{className:"p-4 bg-gray-900 dark:bg-gray-950 overflow-x-auto",children:a.jsx("pre",{className:"text-sm text-red-400 font-mono whitespace-pre-wrap",children:e.stack})})]})]})}export{w as default};
1
+ import{j as a}from"./index-HxcGVcSo.js";import{p as d,f as x}from"./date-Dwgqy666.js";import{D as s,f as m}from"./DetailRow-DKG3Vf9j.js";import{C as o}from"./types-BMBEhoQ2.js";import{u as b,C as h,T as g}from"./EntryDetailPage-BdBZLbAf.js";import"./vendor-DBTT3jXp.js";import"./search-VPXcw9Ki.js";const i={verbose:{variant:"default",label:"VERBOSE"},debug:{variant:"info",label:"DEBUG"},log:{variant:"success",label:"LOG"},warn:{variant:"warning",label:"WARNING"},error:{variant:"error",label:"ERROR"}};function w({entry:c}){const{payload:e,createdAt:r}=c,n=i[e.level]||i.log,t=b(),l=e.metadata&&Object.keys(e.metadata).length>0?[{id:"metadata",label:"Metadata",content:a.jsx(h,{data:e.metadata,toolbarState:t.state,searchBar:t.SearchBar,maxHeight:400})}]:[];return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"card",children:[a.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:a.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Log Details"})}),a.jsx("div",{className:"p-4",children:a.jsxs("dl",{className:"divide-y-0",children:[a.jsx(s,{label:"Time",value:a.jsxs("span",{children:[m(d(r),"MMMM do yyyy, h:mm:ss a")," ",a.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",x(d(r),{addSuffix:!0}),")"]})]})}),a.jsx(s,{label:"Level",value:a.jsx(o,{listType:"logs",filterType:"levels",filterValue:e.level,children:n.label})}),e.context&&a.jsx(s,{label:"Context",value:a.jsx(o,{listType:"logs",filterType:"contexts",filterValue:e.context,className:"font-mono",children:e.context})})]})})]}),a.jsxs("div",{className:"card",children:[a.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:a.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Message"})}),a.jsx("div",{className:"p-4",children:a.jsx("p",{className:`text-sm ${e.level==="error"?"text-red-600 dark:text-red-400":e.level==="warn"?"text-yellow-600 dark:text-yellow-400":"text-gray-900 dark:text-white"}`,children:e.message})})]}),l.length>0&&a.jsx(g,{tabs:l,defaultTab:"metadata",headerRight:a.jsx(t.Toolbar,{data:e.metadata})}),e.stack&&a.jsxs("div",{className:"card",children:[a.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:a.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Stack Trace"})}),a.jsx("div",{className:"p-4 bg-gray-900 dark:bg-gray-950 overflow-x-auto",children:a.jsx("pre",{className:"text-sm text-red-400 font-mono whitespace-pre-wrap",children:e.stack})})]})]})}export{w as default};
@@ -1 +1 @@
1
- import{j as t,F as i}from"./index-dkeMTrq0.js";import{e as T,b as F}from"./vendor-DBTT3jXp.js";import{f as R,p as L}from"./date-Dwgqy666.js";import{u as M,a as A,P,R as B,N as D,L as S}from"./PageHeader-9OQepDeQ.js";import{u as H,c as I,C as n}from"./types-CuCQ6L2Z.js";import{E as W}from"./EntrySearchInput-BGWM929F.js";import{T as o,b as $}from"./DataTable-CDqXyed8.js";import"./timer-BVP3d7zc.js";import"./search-C0XvQMrJ.js";function X(){const d=T(),{clearAll:c,serverFilters:g,headerFilters:m}=H("logs"),{rangeFilters:x,windowMinutes:h}=M(),{entries:p,loading:u,refreshing:s,error:f,refresh:l,newEntriesCount:y,hasMore:j,loadMore:C,loadNew:b,autoRefreshEnabled:w,live:v,setAutoRefresh:N,meta:r,isHighlighted:E}=A({type:"log",limit:50,filters:{...g,...x},windowMinutes:h}),a=p.filter(e=>I(e)),k=F.useMemo(()=>[{key:"level",header:"Level",width:"100px",render:e=>t.jsx(n,{listType:"logs",filterType:"levels",children:e.payload.level})},{key:"message",header:"Message",minWidth:"300px",render:e=>t.jsx(o,{truncate:!0,maxWidth:"500px",children:e.payload.message.length>100?e.payload.message.substring(0,100)+"...":e.payload.message})},{key:"context",header:"Context",width:"150px",render:e=>e.payload.context?t.jsx(n,{listType:"logs",filterType:"contexts",className:"font-mono",children:e.payload.context}):t.jsx(o,{secondary:!0,children:"—"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(o,{secondary:!0,className:"text-xs",children:R(L(e.createdAt),{addSuffix:!0})})}],[]);return u&&a.length===0?t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):t.jsxs("div",{children:[t.jsx(P,{title:"Logs",icon:i,iconColor:"text-green-600 dark:text-green-400",count:a.length,totalCount:r==null?void 0:r.total,clearable:{type:"log",label:"logs",onCleared:l},refreshing:s,autoRefreshEnabled:w,live:v,onAutoRefreshToggle:N,filters:m,filterControls:t.jsx(B,{route:"logs"}),onClearAllFilters:c}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(W,{placeholder:"Search by message, level, context, tag, or content..."}),t.jsx(D,{count:y,onClick:b,loading:s}),t.jsx($,{columns:k,data:a,keyExtractor:e=>e.id,onRowClick:e=>d(`/logs/${e.id}`),rowClassName:e=>E(e.id)?"highlight-new":"",emptyMessage:"No logs recorded yet",error:f,onRetry:l,emptyIcon:t.jsx(i,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(S,{hasMore:j,onClick:C,loading:s})]})]})}export{X as default};
1
+ import{j as t,F as i}from"./index-HxcGVcSo.js";import{e as T,b as F}from"./vendor-DBTT3jXp.js";import{f as R,p as L}from"./date-Dwgqy666.js";import{u as M,a as A,P,R as B,N as D,L as S}from"./PageHeader-DR_M5h7z.js";import{u as H,c as I,C as n}from"./types-BMBEhoQ2.js";import{E as W}from"./EntrySearchInput-BF9N_f7y.js";import{T as o,b as $}from"./DataTable-Cz2phOFe.js";import"./timer-I7o5QV6X.js";import"./search-VPXcw9Ki.js";function X(){const d=T(),{clearAll:c,serverFilters:g,headerFilters:m}=H("logs"),{rangeFilters:x,windowMinutes:h}=M(),{entries:p,loading:u,refreshing:s,error:f,refresh:l,newEntriesCount:y,hasMore:j,loadMore:C,loadNew:b,autoRefreshEnabled:w,live:v,setAutoRefresh:N,meta:r,isHighlighted:E}=A({type:"log",limit:50,filters:{...g,...x},windowMinutes:h}),a=p.filter(e=>I(e)),k=F.useMemo(()=>[{key:"level",header:"Level",width:"100px",render:e=>t.jsx(n,{listType:"logs",filterType:"levels",children:e.payload.level})},{key:"message",header:"Message",minWidth:"300px",render:e=>t.jsx(o,{truncate:!0,maxWidth:"500px",children:e.payload.message.length>100?e.payload.message.substring(0,100)+"...":e.payload.message})},{key:"context",header:"Context",width:"150px",render:e=>e.payload.context?t.jsx(n,{listType:"logs",filterType:"contexts",className:"font-mono",children:e.payload.context}):t.jsx(o,{secondary:!0,children:"—"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(o,{secondary:!0,className:"text-xs",children:R(L(e.createdAt),{addSuffix:!0})})}],[]);return u&&a.length===0?t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):t.jsxs("div",{children:[t.jsx(P,{title:"Logs",icon:i,iconColor:"text-green-600 dark:text-green-400",count:a.length,totalCount:r==null?void 0:r.total,clearable:{type:"log",label:"logs",onCleared:l},refreshing:s,autoRefreshEnabled:w,live:v,onAutoRefreshToggle:N,filters:m,filterControls:t.jsx(B,{route:"logs"}),onClearAllFilters:c}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(W,{placeholder:"Search by message, level, context, tag, or content..."}),t.jsx(D,{count:y,onClick:b,loading:s}),t.jsx($,{columns:k,data:a,keyExtractor:e=>e.id,onRowClick:e=>d(`/logs/${e.id}`),rowClassName:e=>E(e.id)?"highlight-new":"",emptyMessage:"No logs recorded yet",error:f,onRetry:l,emptyIcon:t.jsx(i,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(S,{hasMore:j,onClick:C,loading:s})]})]})}export{X as default};
@@ -1,4 +1,4 @@
1
- import{c as Un,j as i,M as Gt,C as Fn}from"./index-dkeMTrq0.js";import{C as zn,B as Hn}from"./types-CuCQ6L2Z.js";import{p as ft,f as Gn}from"./date-Dwgqy666.js";import{D as B,f as Bn}from"./DetailRow-CWJp1tTe.js";import{T as Wn}from"./EntryDetailPage-Dw2pcYO2.js";import{C as be}from"./CopyButton-djrkphpR.js";import{C as $n}from"./circle-x-D14U2UWr.js";import{C as Yn}from"./circle-check-big-C4ws6-wY.js";import{U as Xn}from"./users-UyMivszP.js";import{C as Vn}from"./circle-alert-s9ODnOC3.js";import"./vendor-DBTT3jXp.js";import"./search-C0XvQMrJ.js";/**
1
+ import{c as Un,j as i,M as Gt,C as Fn}from"./index-HxcGVcSo.js";import{C as zn,B as Hn}from"./types-BMBEhoQ2.js";import{p as ft,f as Gn}from"./date-Dwgqy666.js";import{D as B,f as Bn}from"./DetailRow-DKG3Vf9j.js";import{T as Wn}from"./EntryDetailPage-BdBZLbAf.js";import{C as be}from"./CopyButton-DfPqcshv.js";import{C as $n}from"./circle-x-B-V5s-zK.js";import{C as Yn}from"./circle-check-big-CiGeQW9J.js";import{U as Xn}from"./users-CFzKwpf2.js";import{C as Vn}from"./circle-alert-DJ_9D_4c.js";import"./vendor-DBTT3jXp.js";import"./search-VPXcw9Ki.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{j as t,M as c}from"./index-dkeMTrq0.js";import{e as D,b as m}from"./vendor-DBTT3jXp.js";import{f as L,p as P}from"./date-Dwgqy666.js";import{u as S,a as W,P as B,R as $,N as H,L as q}from"./PageHeader-9OQepDeQ.js";import{u as I,g as z,C as G}from"./types-CuCQ6L2Z.js";import{T as n,D as J,a as K,b as O}from"./DataTable-CDqXyed8.js";import"./timer-BVP3d7zc.js";const Q=["sent","failed","pending","queued","error"];function te(){const g=D(),{addFilter:o,clearAll:h,serverFilters:p,headerFilters:x}=I("mail"),{rangeFilters:f,windowMinutes:y}=S(),{entries:j,loading:b,refreshing:r,error:C,refresh:d,newEntriesCount:k,hasMore:w,loadMore:T,loadNew:N,autoRefreshEnabled:M,live:E,setAutoRefresh:R,meta:s,isHighlighted:v}=W({type:"mail",limit:50,filters:{...p,...f},windowMinutes:y}),i=j.filter(e=>z(e)),u=m.useCallback(e=>{const a=Array.isArray(e)?e:[e];return a.length===1?a[0]:`${a[0]} +${a.length-1}`},[]),F=m.useMemo(()=>[{key:"status",header:"Status",width:"80px",render:e=>t.jsx(G,{listType:"mail",filterType:"statuses",children:e.payload.status})},{key:"subject",header:"Subject",minWidth:"250px",render:e=>t.jsx(n,{truncate:!0,maxWidth:"350px",children:e.payload.subject.length>60?e.payload.subject.substring(0,60)+"...":e.payload.subject})},{key:"to",header:"To",width:"200px",render:e=>t.jsx(n,{mono:!0,secondary:!0,truncate:!0,maxWidth:"180px",children:u(e.payload.to)})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(J,{ms:e.payload.duration||0})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>{const a=(e.tags??[]).filter(l=>!Q.includes(l.toLowerCase()));return t.jsx(K,{tags:a,max:3,onTagClick:(l,A)=>{A.stopPropagation(),o("tags",l)}})}},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(n,{secondary:!0,className:"text-xs",children:L(P(e.createdAt),{addSuffix:!0})})}],[o,u]);return b&&i.length===0?t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):t.jsxs("div",{children:[t.jsx(B,{title:"Mail",icon:c,iconColor:"text-pink-600 dark:text-pink-400",count:i.length,totalCount:s==null?void 0:s.total,clearable:{type:"mail",label:"mail",onCleared:d},refreshing:r,autoRefreshEnabled:M,live:E,onAutoRefreshToggle:R,filters:x,filterControls:t.jsx($,{route:"mail"}),onClearAllFilters:h}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(H,{count:k,onClick:N,loading:r}),t.jsx(O,{columns:F,data:i,keyExtractor:e=>e.id,onRowClick:e=>g(`/mail/${e.id}`),rowClassName:e=>v(e.id)?"highlight-new":"",emptyMessage:"No emails recorded yet",error:C,onRetry:d,emptyIcon:t.jsx(c,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(q,{hasMore:w,onClick:T,loading:r})]})]})}export{te as default};
1
+ import{j as t,M as c}from"./index-HxcGVcSo.js";import{e as D,b as m}from"./vendor-DBTT3jXp.js";import{f as L,p as P}from"./date-Dwgqy666.js";import{u as S,a as W,P as B,R as $,N as H,L as q}from"./PageHeader-DR_M5h7z.js";import{u as I,g as z,C as G}from"./types-BMBEhoQ2.js";import{T as n,D as J,a as K,b as O}from"./DataTable-Cz2phOFe.js";import"./timer-I7o5QV6X.js";const Q=["sent","failed","pending","queued","error"];function te(){const g=D(),{addFilter:o,clearAll:h,serverFilters:p,headerFilters:x}=I("mail"),{rangeFilters:f,windowMinutes:y}=S(),{entries:j,loading:b,refreshing:r,error:C,refresh:d,newEntriesCount:k,hasMore:w,loadMore:T,loadNew:N,autoRefreshEnabled:M,live:E,setAutoRefresh:R,meta:s,isHighlighted:v}=W({type:"mail",limit:50,filters:{...p,...f},windowMinutes:y}),i=j.filter(e=>z(e)),u=m.useCallback(e=>{const a=Array.isArray(e)?e:[e];return a.length===1?a[0]:`${a[0]} +${a.length-1}`},[]),F=m.useMemo(()=>[{key:"status",header:"Status",width:"80px",render:e=>t.jsx(G,{listType:"mail",filterType:"statuses",children:e.payload.status})},{key:"subject",header:"Subject",minWidth:"250px",render:e=>t.jsx(n,{truncate:!0,maxWidth:"350px",children:e.payload.subject.length>60?e.payload.subject.substring(0,60)+"...":e.payload.subject})},{key:"to",header:"To",width:"200px",render:e=>t.jsx(n,{mono:!0,secondary:!0,truncate:!0,maxWidth:"180px",children:u(e.payload.to)})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(J,{ms:e.payload.duration||0})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>{const a=(e.tags??[]).filter(l=>!Q.includes(l.toLowerCase()));return t.jsx(K,{tags:a,max:3,onTagClick:(l,A)=>{A.stopPropagation(),o("tags",l)}})}},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(n,{secondary:!0,className:"text-xs",children:L(P(e.createdAt),{addSuffix:!0})})}],[o,u]);return b&&i.length===0?t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):t.jsxs("div",{children:[t.jsx(B,{title:"Mail",icon:c,iconColor:"text-pink-600 dark:text-pink-400",count:i.length,totalCount:s==null?void 0:s.total,clearable:{type:"mail",label:"mail",onCleared:d},refreshing:r,autoRefreshEnabled:M,live:E,onAutoRefreshToggle:R,filters:x,filterControls:t.jsx($,{route:"mail"}),onClearAllFilters:h}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(H,{count:k,onClick:N,loading:r}),t.jsx(O,{columns:F,data:i,keyExtractor:e=>e.id,onRowClick:e=>g(`/mail/${e.id}`),rowClassName:e=>v(e.id)?"highlight-new":"",emptyMessage:"No emails recorded yet",error:C,onRetry:d,emptyIcon:t.jsx(c,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(q,{hasMore:w,onClick:T,loading:r})]})]})}export{te as default};
@@ -1 +1 @@
1
- import{j as e,d as o,F as b,C as g,D as u}from"./index-dkeMTrq0.js";import{b as y}from"./vendor-DBTT3jXp.js";import{p as x,f}from"./date-Dwgqy666.js";import{D as s,f as v}from"./DetailRow-CWJp1tTe.js";import{C as l}from"./types-CuCQ6L2Z.js";import{u as n,C as m,T as N}from"./EntryDetailPage-Dw2pcYO2.js";import{C as k}from"./CopyButton-djrkphpR.js";import{C as w}from"./circle-x-D14U2UWr.js";import"./search-C0XvQMrJ.js";function V({entry:p}){const{payload:a,createdAt:i}=p,t=n(),d=n(),[c,h]=y.useState("data"),r=[];a.data!==void 0&&r.push({id:"data",label:"Data",content:e.jsx(m,{data:a.data,toolbarState:t.state,searchBar:t.SearchBar,maxHeight:400})}),a.where!==void 0&&r.push({id:"where",label:"Where",content:e.jsx(m,{data:a.where,toolbarState:d.state,searchBar:d.SearchBar,maxHeight:400})});const j=()=>{if(c==="data"&&a.data!==void 0)return e.jsx(t.Toolbar,{data:a.data});if(c==="where"&&a.where!==void 0)return e.jsx(d.Toolbar,{data:a.where})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"p-2 bg-purple-100 dark:bg-purple-900/30 rounded-lg",children:e.jsx(o,{className:"h-5 w-5 text-purple-600 dark:text-purple-400"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white font-mono",children:a.entity}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Model Event"})]})]}),e.jsx(k,{text:a.entity,label:"Copy entity name"})]})}),e.jsxs("div",{className:`grid ${a.recordCount!==void 0?"grid-cols-2 md:grid-cols-4":"grid-cols-2 md:grid-cols-3"} divide-x divide-gray-200 dark:divide-gray-700`,children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(b,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Action"})]}),e.jsx("p",{className:"text-lg font-bold text-purple-600 dark:text-purple-400",children:a.action.toUpperCase()})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(o,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Entity"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white font-mono truncate",title:a.entity,children:a.entity})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(g,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[a.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),a.recordCount!==void 0&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(u,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Records"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:a.recordCount})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(s,{label:"Time",value:e.jsxs("span",{children:[v(x(i),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",f(x(i),{addSuffix:!0}),")"]})]})}),e.jsx(s,{label:"Action",value:e.jsx(l,{listType:"models",filterType:"actions",filterValue:a.action,children:a.action.toUpperCase()})}),e.jsx(s,{label:"Entity",value:e.jsx(l,{listType:"models",filterType:"entities",filterValue:a.entity,children:a.entity})}),a.source&&e.jsx(s,{label:"Source",value:e.jsx(l,{listType:"models",filterType:"sources",filterValue:a.source,children:a.source})}),e.jsx(s,{label:"Duration",value:`${a.duration}ms`}),a.recordCount!==void 0&&e.jsx(s,{label:"Records",value:String(a.recordCount)})]})})]}),a.error&&e.jsxs("div",{className:"card border-red-200 dark:border-red-800",children:[e.jsx("div",{className:"px-4 py-3 border-b border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(w,{className:"h-5 w-5 text-red-500"}),e.jsx("h2",{className:"text-lg font-semibold text-red-700 dark:text-red-400",children:"Error"})]})}),e.jsx("div",{className:"p-4 bg-red-50/50 dark:bg-red-900/10",children:e.jsx("pre",{className:"text-sm text-red-600 dark:text-red-400 font-mono whitespace-pre-wrap overflow-x-auto",children:a.error})})]}),r.length>0&&e.jsx(N,{tabs:r,defaultTab:"data",hashKey:"model",headerRight:j(),onTabChange:h})]})}export{V as default};
1
+ import{j as e,d as o,F as b,C as g,D as u}from"./index-HxcGVcSo.js";import{b as y}from"./vendor-DBTT3jXp.js";import{p as x,f}from"./date-Dwgqy666.js";import{D as s,f as v}from"./DetailRow-DKG3Vf9j.js";import{C as l}from"./types-BMBEhoQ2.js";import{u as n,C as m,T as N}from"./EntryDetailPage-BdBZLbAf.js";import{C as k}from"./CopyButton-DfPqcshv.js";import{C as w}from"./circle-x-B-V5s-zK.js";import"./search-VPXcw9Ki.js";function V({entry:p}){const{payload:a,createdAt:i}=p,t=n(),d=n(),[c,h]=y.useState("data"),r=[];a.data!==void 0&&r.push({id:"data",label:"Data",content:e.jsx(m,{data:a.data,toolbarState:t.state,searchBar:t.SearchBar,maxHeight:400})}),a.where!==void 0&&r.push({id:"where",label:"Where",content:e.jsx(m,{data:a.where,toolbarState:d.state,searchBar:d.SearchBar,maxHeight:400})});const j=()=>{if(c==="data"&&a.data!==void 0)return e.jsx(t.Toolbar,{data:a.data});if(c==="where"&&a.where!==void 0)return e.jsx(d.Toolbar,{data:a.where})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"p-2 bg-purple-100 dark:bg-purple-900/30 rounded-lg",children:e.jsx(o,{className:"h-5 w-5 text-purple-600 dark:text-purple-400"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white font-mono",children:a.entity}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Model Event"})]})]}),e.jsx(k,{text:a.entity,label:"Copy entity name"})]})}),e.jsxs("div",{className:`grid ${a.recordCount!==void 0?"grid-cols-2 md:grid-cols-4":"grid-cols-2 md:grid-cols-3"} divide-x divide-gray-200 dark:divide-gray-700`,children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(b,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Action"})]}),e.jsx("p",{className:"text-lg font-bold text-purple-600 dark:text-purple-400",children:a.action.toUpperCase()})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(o,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Entity"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white font-mono truncate",title:a.entity,children:a.entity})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(g,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[a.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),a.recordCount!==void 0&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(u,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Records"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:a.recordCount})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(s,{label:"Time",value:e.jsxs("span",{children:[v(x(i),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",f(x(i),{addSuffix:!0}),")"]})]})}),e.jsx(s,{label:"Action",value:e.jsx(l,{listType:"models",filterType:"actions",filterValue:a.action,children:a.action.toUpperCase()})}),e.jsx(s,{label:"Entity",value:e.jsx(l,{listType:"models",filterType:"entities",filterValue:a.entity,children:a.entity})}),a.source&&e.jsx(s,{label:"Source",value:e.jsx(l,{listType:"models",filterType:"sources",filterValue:a.source,children:a.source})}),e.jsx(s,{label:"Duration",value:`${a.duration}ms`}),a.recordCount!==void 0&&e.jsx(s,{label:"Records",value:String(a.recordCount)})]})})]}),a.error&&e.jsxs("div",{className:"card border-red-200 dark:border-red-800",children:[e.jsx("div",{className:"px-4 py-3 border-b border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(w,{className:"h-5 w-5 text-red-500"}),e.jsx("h2",{className:"text-lg font-semibold text-red-700 dark:text-red-400",children:"Error"})]})}),e.jsx("div",{className:"p-4 bg-red-50/50 dark:bg-red-900/10",children:e.jsx("pre",{className:"text-sm text-red-600 dark:text-red-400 font-mono whitespace-pre-wrap overflow-x-auto",children:a.error})})]}),r.length>0&&e.jsx(N,{tabs:r,defaultTab:"data",hashKey:"model",headerRight:j(),onTabChange:h})]})}export{V as default};
@@ -1 +1 @@
1
- import{j as t,d as c}from"./index-dkeMTrq0.js";import{e as P,b as A}from"./vendor-DBTT3jXp.js";import{f as D,p as T}from"./date-Dwgqy666.js";import{u as B,a as L,P as H,R as S,N as I,L as U}from"./PageHeader-9OQepDeQ.js";import{u as $,l as q,C as l}from"./types-CuCQ6L2Z.js";import{T as o,D as z,b as G}from"./DataTable-CDqXyed8.js";import"./timer-BVP3d7zc.js";function Y(){const u=P(),{addFilter:a,clearAll:p,serverFilters:m,headerFilters:h}=$("models"),{rangeFilters:x,windowMinutes:g}=B(),{entries:y,loading:f,refreshing:s,error:j,refresh:d,newEntriesCount:C,hasMore:w,loadMore:k,loadNew:N,autoRefreshEnabled:b,live:E,setAutoRefresh:v,meta:i,isHighlighted:R}=L({type:"model",limit:50,filters:{...m,...x},windowMinutes:g}),n=y.filter(e=>q(e)),M=A.useMemo(()=>[{key:"action",header:"Action",width:"120px",render:e=>t.jsx(l,{onClick:r=>{r.stopPropagation(),a("actions",e.payload.action)},children:e.payload.action.toUpperCase()})},{key:"entity",header:"Entity",width:"150px",render:e=>t.jsx(l,{onClick:r=>{r.stopPropagation(),a("entities",e.payload.entity)},className:"font-mono",children:e.payload.entity})},{key:"source",header:"Source",width:"150px",render:e=>{const r=e.payload.source;return r?t.jsx(l,{onClick:F=>{F.stopPropagation(),a("sources",r)},className:"font-mono text-xs",children:r}):t.jsx(o,{secondary:!0,children:"-"})}},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(z,{ms:e.payload.duration||0})},{key:"records",header:"Records",width:"80px",align:"center",render:e=>e.payload.recordCount!==void 0?t.jsx(o,{children:e.payload.recordCount}):t.jsx(o,{secondary:!0,children:"-"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(o,{secondary:!0,className:"text-xs",children:D(T(e.createdAt),{addSuffix:!0})})}],[a]);return f&&n.length===0?t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):t.jsxs("div",{children:[t.jsx(H,{title:"Models",icon:c,iconColor:"text-purple-600 dark:text-purple-400",count:n.length,totalCount:i==null?void 0:i.total,clearable:{type:"model",label:"models",onCleared:d},refreshing:s,autoRefreshEnabled:b,live:E,onAutoRefreshToggle:v,filters:h,filterControls:t.jsx(S,{route:"models"}),onClearAllFilters:p}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(I,{count:C,onClick:N,loading:s}),t.jsx(G,{columns:M,data:n,keyExtractor:e=>e.id,onRowClick:e=>u(`/models/${e.id}`),rowClassName:e=>R(e.id)?"highlight-new":"",emptyMessage:"No model events recorded yet",error:j,onRetry:d,emptyIcon:t.jsx(c,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(U,{hasMore:w,onClick:k,loading:s})]})]})}export{Y as default};
1
+ import{j as t,d as c}from"./index-HxcGVcSo.js";import{e as P,b as A}from"./vendor-DBTT3jXp.js";import{f as D,p as T}from"./date-Dwgqy666.js";import{u as B,a as L,P as H,R as S,N as I,L as U}from"./PageHeader-DR_M5h7z.js";import{u as $,l as q,C as l}from"./types-BMBEhoQ2.js";import{T as o,D as z,b as G}from"./DataTable-Cz2phOFe.js";import"./timer-I7o5QV6X.js";function Y(){const u=P(),{addFilter:a,clearAll:p,serverFilters:m,headerFilters:h}=$("models"),{rangeFilters:x,windowMinutes:g}=B(),{entries:y,loading:f,refreshing:s,error:j,refresh:d,newEntriesCount:C,hasMore:w,loadMore:k,loadNew:N,autoRefreshEnabled:b,live:E,setAutoRefresh:v,meta:i,isHighlighted:R}=L({type:"model",limit:50,filters:{...m,...x},windowMinutes:g}),n=y.filter(e=>q(e)),M=A.useMemo(()=>[{key:"action",header:"Action",width:"120px",render:e=>t.jsx(l,{onClick:r=>{r.stopPropagation(),a("actions",e.payload.action)},children:e.payload.action.toUpperCase()})},{key:"entity",header:"Entity",width:"150px",render:e=>t.jsx(l,{onClick:r=>{r.stopPropagation(),a("entities",e.payload.entity)},className:"font-mono",children:e.payload.entity})},{key:"source",header:"Source",width:"150px",render:e=>{const r=e.payload.source;return r?t.jsx(l,{onClick:F=>{F.stopPropagation(),a("sources",r)},className:"font-mono text-xs",children:r}):t.jsx(o,{secondary:!0,children:"-"})}},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(z,{ms:e.payload.duration||0})},{key:"records",header:"Records",width:"80px",align:"center",render:e=>e.payload.recordCount!==void 0?t.jsx(o,{children:e.payload.recordCount}):t.jsx(o,{secondary:!0,children:"-"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(o,{secondary:!0,className:"text-xs",children:D(T(e.createdAt),{addSuffix:!0})})}],[a]);return f&&n.length===0?t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):t.jsxs("div",{children:[t.jsx(H,{title:"Models",icon:c,iconColor:"text-purple-600 dark:text-purple-400",count:n.length,totalCount:i==null?void 0:i.total,clearable:{type:"model",label:"models",onCleared:d},refreshing:s,autoRefreshEnabled:b,live:E,onAutoRefreshToggle:v,filters:h,filterControls:t.jsx(S,{route:"models"}),onClearAllFilters:p}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(I,{count:C,onClick:N,loading:s}),t.jsx(G,{columns:M,data:n,keyExtractor:e=>e.id,onRowClick:e=>u(`/models/${e.id}`),rowClassName:e=>R(e.id)?"highlight-new":"",emptyMessage:"No model events recorded yet",error:j,onRetry:d,emptyIcon:t.jsx(c,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(U,{hasMore:w,onClick:k,loading:s})]})]})}export{Y as default};
@@ -1 +1 @@
1
- import{j as e,f as c,C as j}from"./index-dkeMTrq0.js";import{p as x,f as y}from"./date-Dwgqy666.js";import{D as s,f as b}from"./DetailRow-CWJp1tTe.js";import{C as n}from"./types-CuCQ6L2Z.js";import{u as f,C as N,T as u}from"./EntryDetailPage-Dw2pcYO2.js";import{C as v}from"./CopyButton-djrkphpR.js";import{C as k}from"./circle-check-big-C4ws6-wY.js";import{C as o}from"./circle-x-D14U2UWr.js";import{S as w}from"./send-CTeWfM1I.js";import"./vendor-DBTT3jXp.js";import"./search-C0XvQMrJ.js";function I({entry:m}){const{payload:a,createdAt:l}=m,i=f(),t=a.status==="sent"?{icon:k,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"}:{icon:o,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"},p=t.icon,d=a.metadata!==void 0?[{id:"metadata",label:"Metadata",content:e.jsx(N,{data:a.metadata,toolbarState:i.state,searchBar:i.SearchBar,maxHeight:400})}]:[],r=Array.isArray(a.recipient)?a.recipient:[a.recipient];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:`p-2 ${t.bg} rounded-lg`,children:e.jsx(c,{className:`h-5 w-5 ${t.color}`})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:a.title||a.type}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Notification"})]})]}),e.jsx(v,{text:r.join(", "),label:"Copy recipient"})]})}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 divide-x divide-gray-200 dark:divide-gray-700",children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(c,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Type"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white truncate",title:a.type,children:a.type})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(p,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Status"})]}),e.jsx("p",{className:`text-lg font-bold ${t.color}`,children:a.status.toUpperCase()})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(j,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[a.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(w,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Recipients"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:r.length})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(s,{label:"Time",value:e.jsxs("span",{children:[b(x(l),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",y(x(l),{addSuffix:!0}),")"]})]})}),e.jsx(s,{label:"Type",value:e.jsx(n,{listType:"notifications",filterType:"types",filterValue:a.type,children:a.type})}),e.jsx(s,{label:r.length>1?"Recipients":"Recipient",value:e.jsx("div",{className:"flex flex-wrap gap-2",children:r.map((h,g)=>e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:h},g))})}),a.title&&e.jsx(s,{label:"Title",value:a.title}),a.message&&e.jsx(s,{label:"Message",value:e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:a.message})}),e.jsx(s,{label:"Status",value:e.jsx(n,{listType:"notifications",filterType:"statuses",filterValue:a.status,children:a.status.toUpperCase()})}),e.jsx(s,{label:"Duration",value:`${a.duration}ms`})]})})]}),a.error&&e.jsxs("div",{className:"card border-red-200 dark:border-red-800",children:[e.jsx("div",{className:"px-4 py-3 border-b border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(o,{className:"h-5 w-5 text-red-500"}),e.jsx("h2",{className:"text-lg font-semibold text-red-700 dark:text-red-400",children:"Error"})]})}),e.jsx("div",{className:"p-4 bg-red-50/50 dark:bg-red-900/10",children:e.jsx("pre",{className:"text-sm text-red-600 dark:text-red-400 font-mono whitespace-pre-wrap overflow-x-auto",children:a.error})})]}),d.length>0&&e.jsx(u,{tabs:d,defaultTab:"metadata",hashKey:"notification",headerRight:e.jsx(i.Toolbar,{data:a.metadata})})]})}export{I as default};
1
+ import{j as e,f as c,C as j}from"./index-HxcGVcSo.js";import{p as x,f as y}from"./date-Dwgqy666.js";import{D as s,f as b}from"./DetailRow-DKG3Vf9j.js";import{C as n}from"./types-BMBEhoQ2.js";import{u as f,C as N,T as u}from"./EntryDetailPage-BdBZLbAf.js";import{C as v}from"./CopyButton-DfPqcshv.js";import{C as k}from"./circle-check-big-CiGeQW9J.js";import{C as o}from"./circle-x-B-V5s-zK.js";import{S as w}from"./send-CdCk9jQ5.js";import"./vendor-DBTT3jXp.js";import"./search-VPXcw9Ki.js";function I({entry:m}){const{payload:a,createdAt:l}=m,i=f(),t=a.status==="sent"?{icon:k,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"}:{icon:o,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"},p=t.icon,d=a.metadata!==void 0?[{id:"metadata",label:"Metadata",content:e.jsx(N,{data:a.metadata,toolbarState:i.state,searchBar:i.SearchBar,maxHeight:400})}]:[],r=Array.isArray(a.recipient)?a.recipient:[a.recipient];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:`p-2 ${t.bg} rounded-lg`,children:e.jsx(c,{className:`h-5 w-5 ${t.color}`})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:a.title||a.type}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Notification"})]})]}),e.jsx(v,{text:r.join(", "),label:"Copy recipient"})]})}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 divide-x divide-gray-200 dark:divide-gray-700",children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(c,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Type"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white truncate",title:a.type,children:a.type})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(p,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Status"})]}),e.jsx("p",{className:`text-lg font-bold ${t.color}`,children:a.status.toUpperCase()})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(j,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[a.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(w,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Recipients"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:r.length})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(s,{label:"Time",value:e.jsxs("span",{children:[b(x(l),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",y(x(l),{addSuffix:!0}),")"]})]})}),e.jsx(s,{label:"Type",value:e.jsx(n,{listType:"notifications",filterType:"types",filterValue:a.type,children:a.type})}),e.jsx(s,{label:r.length>1?"Recipients":"Recipient",value:e.jsx("div",{className:"flex flex-wrap gap-2",children:r.map((h,g)=>e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:h},g))})}),a.title&&e.jsx(s,{label:"Title",value:a.title}),a.message&&e.jsx(s,{label:"Message",value:e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:a.message})}),e.jsx(s,{label:"Status",value:e.jsx(n,{listType:"notifications",filterType:"statuses",filterValue:a.status,children:a.status.toUpperCase()})}),e.jsx(s,{label:"Duration",value:`${a.duration}ms`})]})})]}),a.error&&e.jsxs("div",{className:"card border-red-200 dark:border-red-800",children:[e.jsx("div",{className:"px-4 py-3 border-b border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(o,{className:"h-5 w-5 text-red-500"}),e.jsx("h2",{className:"text-lg font-semibold text-red-700 dark:text-red-400",children:"Error"})]})}),e.jsx("div",{className:"p-4 bg-red-50/50 dark:bg-red-900/10",children:e.jsx("pre",{className:"text-sm text-red-600 dark:text-red-400 font-mono whitespace-pre-wrap overflow-x-auto",children:a.error})})]}),d.length>0&&e.jsx(u,{tabs:d,defaultTab:"metadata",hashKey:"notification",headerRight:e.jsx(i.Toolbar,{data:a.metadata})})]})}export{I as default};
@@ -1 +1 @@
1
- import{j as t,f as d}from"./index-dkeMTrq0.js";import{e as T,b as D}from"./vendor-DBTT3jXp.js";import{f as M,p as P}from"./date-Dwgqy666.js";import{u as A,a as B,P as W,R as L,N as H,L as S}from"./PageHeader-9OQepDeQ.js";import{u as I,m as U,C as c}from"./types-CuCQ6L2Z.js";import{T as a,D as $,b as q}from"./DataTable-CDqXyed8.js";import"./timer-BVP3d7zc.js";function X(){const p=T(),{addFilter:i,clearAll:u,serverFilters:h,headerFilters:x}=I("notifications"),{rangeFilters:m,windowMinutes:f}=A(),{entries:g,loading:y,refreshing:r,error:j,refresh:l,newEntriesCount:C,hasMore:k,loadMore:w,loadNew:N,autoRefreshEnabled:b,live:E,setAutoRefresh:R,meta:s,isHighlighted:v}=B({type:"notification",limit:50,filters:{...h,...m},windowMinutes:f}),o=g.filter(e=>U(e)),F=D.useMemo(()=>[{key:"type",header:"Type",width:"150px",render:e=>t.jsx(c,{onClick:n=>{n.stopPropagation(),i("types",e.payload.type)},children:e.payload.type})},{key:"recipient",header:"Recipient",minWidth:"200px",render:e=>t.jsx(a,{mono:!0,truncate:!0,maxWidth:"250px",children:e.payload.recipient})},{key:"title",header:"Title",minWidth:"200px",render:e=>e.payload.title?t.jsx(a,{truncate:!0,maxWidth:"300px",children:e.payload.title}):t.jsx(a,{secondary:!0,children:"-"})},{key:"status",header:"Status",width:"100px",render:e=>t.jsx(c,{onClick:n=>{n.stopPropagation(),i("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx($,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(a,{secondary:!0,className:"text-xs",children:M(P(e.createdAt),{addSuffix:!0})})}],[i]);return y&&o.length===0?t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):t.jsxs("div",{children:[t.jsx(W,{title:"Notifications",icon:d,iconColor:"text-indigo-600 dark:text-indigo-400",count:o.length,totalCount:s==null?void 0:s.total,clearable:{type:"notification",label:"notifications",onCleared:l},refreshing:r,autoRefreshEnabled:b,live:E,onAutoRefreshToggle:R,filters:x,filterControls:t.jsx(L,{route:"notifications"}),onClearAllFilters:u}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(H,{count:C,onClick:N,loading:r}),t.jsx(q,{columns:F,data:o,keyExtractor:e=>e.id,onRowClick:e=>p(`/notifications/${e.id}`),rowClassName:e=>v(e.id)?"highlight-new":"",emptyMessage:"No notifications recorded yet",error:j,onRetry:l,emptyIcon:t.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(S,{hasMore:k,onClick:w,loading:r})]})]})}export{X as default};
1
+ import{j as t,f as d}from"./index-HxcGVcSo.js";import{e as T,b as D}from"./vendor-DBTT3jXp.js";import{f as M,p as P}from"./date-Dwgqy666.js";import{u as A,a as B,P as W,R as L,N as H,L as S}from"./PageHeader-DR_M5h7z.js";import{u as I,m as U,C as c}from"./types-BMBEhoQ2.js";import{T as a,D as $,b as q}from"./DataTable-Cz2phOFe.js";import"./timer-I7o5QV6X.js";function X(){const p=T(),{addFilter:i,clearAll:u,serverFilters:h,headerFilters:x}=I("notifications"),{rangeFilters:m,windowMinutes:f}=A(),{entries:g,loading:y,refreshing:r,error:j,refresh:l,newEntriesCount:C,hasMore:k,loadMore:w,loadNew:N,autoRefreshEnabled:b,live:E,setAutoRefresh:R,meta:s,isHighlighted:v}=B({type:"notification",limit:50,filters:{...h,...m},windowMinutes:f}),o=g.filter(e=>U(e)),F=D.useMemo(()=>[{key:"type",header:"Type",width:"150px",render:e=>t.jsx(c,{onClick:n=>{n.stopPropagation(),i("types",e.payload.type)},children:e.payload.type})},{key:"recipient",header:"Recipient",minWidth:"200px",render:e=>t.jsx(a,{mono:!0,truncate:!0,maxWidth:"250px",children:e.payload.recipient})},{key:"title",header:"Title",minWidth:"200px",render:e=>e.payload.title?t.jsx(a,{truncate:!0,maxWidth:"300px",children:e.payload.title}):t.jsx(a,{secondary:!0,children:"-"})},{key:"status",header:"Status",width:"100px",render:e=>t.jsx(c,{onClick:n=>{n.stopPropagation(),i("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx($,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(a,{secondary:!0,className:"text-xs",children:M(P(e.createdAt),{addSuffix:!0})})}],[i]);return y&&o.length===0?t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):t.jsxs("div",{children:[t.jsx(W,{title:"Notifications",icon:d,iconColor:"text-indigo-600 dark:text-indigo-400",count:o.length,totalCount:s==null?void 0:s.total,clearable:{type:"notification",label:"notifications",onCleared:l},refreshing:r,autoRefreshEnabled:b,live:E,onAutoRefreshToggle:R,filters:x,filterControls:t.jsx(L,{route:"notifications"}),onClearAllFilters:u}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(H,{count:C,onClick:N,loading:r}),t.jsx(q,{columns:F,data:o,keyExtractor:e=>e.id,onRowClick:e=>p(`/notifications/${e.id}`),rowClassName:e=>v(e.id)?"highlight-new":"",emptyMessage:"No notifications recorded yet",error:j,onRetry:l,emptyIcon:t.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(S,{hasMore:k,onClick:w,loading:r})]})]})}export{X as default};
@@ -1 +1 @@
1
- import{b as a,f as je}from"./vendor-DBTT3jXp.js";import{t as Se,z as q,p as I,v as Ne,w as Re,j as e,C as Ce,x as G,l as X,f as Ee,y as Le,k as $e,X as Fe}from"./index-dkeMTrq0.js";import{t as Ae}from"./types-CuCQ6L2Z.js";import{T as De}from"./timer-BVP3d7zc.js";function Oe(){return Se("/stream")}function Ie(s,r=!0){const n=a.useRef(s),[i,o]=a.useState(!1);return a.useEffect(()=>{n.current=s},[s]),a.useEffect(()=>{if(!r||typeof EventSource>"u")return;const d=new EventSource(Oe(),{withCredentials:!0}),u=l=>{try{n.current(JSON.parse(l.data))}catch{}};return d.addEventListener("entry",u),d.onopen=()=>o(!0),d.onerror=()=>o(!1),()=>{d.removeEventListener("entry",u),d.close(),o(!1)}},[r]),{connected:i}}function Y(s){return s==null?"":typeof s!="object"?String(s):Array.isArray(s)?"["+s.map(Y).join(",")+"]":"{"+Object.keys(s).sort().map(n=>`"${n}":${Y(s[n])}`).join(",")+"}"}const se=500;function ne(s,r){if(r.length===0)return s;const n=new Set(s.map(d=>d.id)),i=r.filter(d=>!n.has(d.id));if(i.length===0)return s;const o=[...i,...s];return o.length>se?o.slice(0,se):o}const ce="nestlens-auto-refresh";function qe(){try{const s=localStorage.getItem(ce);return s===null?!0:s==="true"}catch{return!0}}function Te(s){try{localStorage.setItem(ce,String(s))}catch{}}function ze(s={}){const{type:r,limit:n=50,autoRefresh:i,autoRefreshInterval:o=5e3,filters:d,windowMinutes:u}=s,l=Y(d),h=`${r}|${n}|${l}|${u??0}`,[j,N]=a.useState({key:l,value:d});j.key!==l&&N({key:l,value:d});const R=j.value,x=a.useCallback(()=>!u||u<=0?R:{...R,from:new Date(Date.now()-u*6e4).toISOString()},[R,u]),[m,f]=a.useState([]),[S,$]=a.useState(null),[C,E]=a.useState(!1),[M,F]=a.useState(null),[k,A]=a.useState(null),[y,p]=a.useState(0),[b,H]=a.useState(i??qe()),v=a.useRef(null),T=a.useRef(null),D=a.useRef(!1),W=a.useRef(null),oe=a.useRef(!0),de=S===null&&M===null,ue=C||S!==null&&S!==h,me=a.useRef(l),P=a.useRef(new Map),[,fe]=a.useState(0),Q=1e4,Z=a.useCallback(t=>{f(t.data),A(t.meta),v.current=t.meta.newestSequence,W.current=t.meta.newestSequence,p(0),F(null),oe.current=!1,me.current=l,$(h)},[l,h]),ee=a.useCallback(t=>{const c=t instanceof Error?t:new Error("Failed to fetch entries");F(c),console.error("Failed to fetch entries:",t),q.error("Failed to load entries"),$(h)},[h]),ge=a.useCallback(async()=>{if(!(!(k!=null&&k.oldestSequence)||!k.hasMore)){E(!0);try{const t=await I({type:r,limit:n,beforeSequence:k.oldestSequence,filters:x()});f(c=>{const g=new Set(c.map(w=>w.id));return[...c,...t.data.filter(w=>!g.has(w.id))]}),A(t.meta)}catch(t){console.error("Failed to load more entries:",t),q.error("Failed to load more entries")}finally{E(!1)}}},[r,n,k,x]),xe=a.useCallback(async()=>{if(v.current&&!D.current){D.current=!0,E(!0);try{const t=await I({type:r,limit:y||n,afterSequence:v.current,filters:x()});if(t.data.length>0){const c=Date.now();t.data.forEach(g=>{P.current.set(g.id,c)}),f(g=>ne(g,t.data)),v.current=t.meta.newestSequence,p(0)}}catch(t){console.error("Failed to load new entries:",t),q.error("Failed to load new entries")}finally{D.current=!1,E(!1)}}},[r,n,y,x]),U=a.useCallback(async()=>{E(!0);try{F(null);const t=await I({type:r,limit:n,filters:x()});f(t.data),A(t.meta),v.current=t.meta.newestSequence,W.current=t.meta.newestSequence,p(0)}catch(t){const c=t instanceof Error?t:new Error("Failed to refresh entries");F(c),console.error("Failed to refresh entries:",t),q.error("Failed to refresh entries")}finally{E(!1)}},[r,n,x]),he=t=>!!(t&&Object.values(t).some(c=>Array.isArray(c)?c.length>0:c!==void 0&&c!=="")),_=a.useCallback(async()=>{if(!v.current){await U();return}const t=x();try{if(!he(t)){const g=await Ne(v.current,r);p(g.data.count);return}const c=await I({type:r,limit:n,afterSequence:v.current,filters:t});p(c.data.length)}catch{}},[r,n,x,U]),ye=a.useCallback(t=>{H(t),Te(t)},[]),pe=a.useCallback(t=>{f(c=>c.map(g=>g.id===t.id?t:g))},[]);a.useEffect(()=>{let t=!0;return I({type:r,limit:n,filters:x()}).then(c=>{t&&Z(c)},c=>{t&&ee(c)}),()=>{t=!1}},[r,n,x,Z,ee]);const be=a.useCallback(t=>{const c=P.current.get(t);return c?Date.now()-c<Q:!1},[]),te=a.useCallback(()=>{const t=Date.now();let c=!1;P.current.forEach((g,w)=>{t-g>=Q&&(P.current.delete(w),c=!0)}),c&&fe(g=>g+1)},[]),B=a.useCallback(async()=>{if(v.current&&!D.current){D.current=!0;try{const t=W.current??v.current,g=(await Re(r)).data;if(typeof g=="number"&&g>t){const w=await I({type:r,limit:n,afterSequence:t,filters:x()});if(W.current=w.meta.hasMore?w.meta.newestSequence??t:g,w.data.length>0){const ve=Date.now();w.data.forEach(L=>{P.current.set(L.id,ve)});let re=0;f(L=>{const ae=ne(L,w.data);return re=ae.length-L.length,ae}),v.current=w.meta.newestSequence,A(L=>L?{...L,total:L.total+re,newestSequence:w.meta.newestSequence}:w.meta)}}}catch{}finally{D.current=!1}}},[r,n,x]);a.useEffect(()=>(b?T.current=setInterval(B,o):T.current=setInterval(_,o),()=>{T.current&&(clearInterval(T.current),T.current=null)}),[b,o,B,_]),a.useEffect(()=>{const t=setInterval(te,1e3);return()=>clearInterval(t)},[te]);const O=a.useRef(null),we=a.useCallback(t=>{r&&t.type!==r||O.current||(O.current=setTimeout(()=>{O.current=null,b?B():_()},200))},[r,b,B,_]),{connected:ke}=Ie(we);return a.useEffect(()=>()=>{O.current&&(clearTimeout(O.current),O.current=null)},[]),{entries:m,loading:de,refreshing:ue,error:M,meta:k,newEntriesCount:y,hasMore:(k==null?void 0:k.hasMore)??!1,loadMore:ge,loadNew:xe,refresh:U,setAutoRefresh:ye,autoRefreshEnabled:b,updateEntry:pe,isHighlighted:be,live:ke}}const J=[{id:"all",label:"Any time",minutes:0},{id:"5m",label:"Last 5 minutes",minutes:5},{id:"15m",label:"Last 15 minutes",minutes:15},{id:"1h",label:"Last hour",minutes:60},{id:"24h",label:"Last 24 hours",minutes:1440}],V=[{id:"any",label:"Any duration",ms:0},{id:"100",label:"Over 100ms",ms:100},{id:"500",label:"Over 500ms",ms:500},{id:"1000",label:"Over 1s",ms:1e3},{id:"5000",label:"Over 5s",ms:5e3}],K="window",z="slower",Pe=s=>J.some(r=>r.id===s),Me=s=>V.some(r=>r.id===s);function We(){var x;const[s,r]=je(),n=s.get(K),i=s.get(z),o=Pe(n)?n:"all",d=Me(i)?i:"any",u=a.useCallback((m,f,S)=>{r($=>{const C=new URLSearchParams($);return S?C.delete(m):C.set(m,f),C},{replace:!0})},[r]),l=a.useCallback(m=>u(K,m,m==="all"),[u]),h=a.useCallback(m=>u(z,m,m==="any"),[u]),j=a.useCallback(()=>{r(m=>{const f=new URLSearchParams(m);return f.delete(K),f.delete(z),f},{replace:!0})},[r]),N=((x=J.find(m=>m.id===o))==null?void 0:x.minutes)??0,R=a.useMemo(()=>{var f;const m=((f=V.find(S=>S.id===d))==null?void 0:f.ms)??0;return m>0?{minDuration:m}:{}},[d]);return{window:o,duration:d,setWindow:l,setDuration:h,windowMinutes:N,rangeFilters:R,hasRange:o!=="all"||d!=="any",clearRanges:j}}const ie="flex items-center gap-1.5 rounded-md px-2 py-1 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors cursor-pointer focus-within:ring-2 focus-within:ring-primary-500",le="appearance-none bg-transparent text-xs font-medium text-gray-700 dark:text-gray-200 border-0 p-0 pr-1 rounded focus:outline-none focus:ring-2 focus:ring-primary-500 cursor-pointer";function Ge({route:s}){var u;const{window:r,duration:n,setWindow:i,setDuration:o}=We(),d=((u=Ae(s))==null?void 0:u.measuresDuration)??!1;return e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("label",{className:ie,children:[e.jsx(Ce,{className:"h-3.5 w-3.5 flex-shrink-0","aria-hidden":"true"}),e.jsx("span",{className:"sr-only",children:"Time window"}),e.jsx("select",{"aria-label":"Time window","data-testid":"window-filter",value:r,onChange:l=>i(l.target.value),className:le,children:J.map(l=>e.jsx("option",{value:l.id,children:l.label},l.id))}),e.jsx(G,{className:"h-3 w-3 flex-shrink-0 opacity-60","aria-hidden":"true"})]}),d&&e.jsxs("label",{className:ie,children:[e.jsx(De,{className:"h-3.5 w-3.5 flex-shrink-0","aria-hidden":"true"}),e.jsx("span",{className:"sr-only",children:"Minimum duration"}),e.jsx("select",{"aria-label":"Minimum duration","data-testid":"duration-filter",value:n,onChange:l=>o(l.target.value),className:le,children:V.map(l=>e.jsx("option",{value:l.id,children:l.label},l.id))}),e.jsx(G,{className:"h-3 w-3 flex-shrink-0 opacity-60","aria-hidden":"true"})]})]})}function Ye({count:s,onClick:r,loading:n}){return s===0?null:e.jsxs("button",{onClick:r,disabled:n,className:"w-full py-3 px-4 bg-primary-50 dark:bg-primary-900/20 text-primary-600 dark:text-primary-400 font-medium rounded-lg hover:bg-primary-100 dark:hover:bg-primary-900/30 transition-colors flex items-center justify-center space-x-2 disabled:opacity-50",children:[n?e.jsx(X,{className:"h-4 w-4 animate-spin"}):e.jsx(Ee,{className:"h-4 w-4"}),e.jsxs("span",{children:["Load ",s," new ",s===1?"entry":"entries"]})]})}function Xe({hasMore:s,onClick:r,loading:n}){return s?e.jsxs("button",{onClick:r,disabled:n,className:"w-full py-3 px-4 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 font-medium rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors flex items-center justify-center space-x-2 disabled:opacity-50",children:[n?e.jsx(X,{className:"h-4 w-4 animate-spin"}):e.jsx(G,{className:"h-4 w-4"}),e.jsx("span",{children:"Load older entries"})]}):null}function _e({type:s,label:r,onCleared:n}){const[i,o]=a.useState(!1),[d,u]=a.useState(!1),l=a.useCallback(async()=>{if(!i){o(!0),setTimeout(()=>o(!1),5e3);return}o(!1),u(!0);try{const{message:h}=await Le(s);q.success(h),n()}catch(h){q.error(`Could not clear ${r}: ${h instanceof Error?h.message:String(h)}`)}finally{u(!1)}},[i,s,r,n]);return e.jsxs("button",{onClick:l,disabled:d,"aria-label":i?`Confirm deleting all ${r}`:`Delete all ${r}`,title:i?`Press again to delete all ${r}`:`Delete all ${r}`,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${i?"bg-red-600 text-white hover:bg-red-700":"text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-red-600 dark:hover:text-red-400"}`,children:[e.jsx($e,{className:"h-4 w-4"}),e.jsx("span",{children:i?`Delete all ${r}?`:"Clear"})]})}function Je({title:s,icon:r,iconColor:n="text-primary-600 dark:text-primary-400",count:i,totalCount:o,subtitle:d,loading:u,refreshing:l,onRefresh:h,clearable:j,autoRefreshEnabled:N,onAutoRefreshToggle:R,live:x,filters:m=[],onClearAllFilters:f,actions:S,filterControls:$}){const C=a.useRef(null),[E,M]=a.useState(0);a.useLayoutEffect(()=>{const y=C.current;if(!y)return;const p=()=>M(y.getBoundingClientRect().height);if(p(),typeof ResizeObserver>"u")return;const b=new ResizeObserver(p);return b.observe(y),()=>b.disconnect()},[]);const F=m.length>0,k=i??o,A=m.reduce((y,p)=>(y[p.category]||(y[p.category]=[]),y[p.category].push(p),y),{});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{ref:C,className:"fixed top-0 left-0 right-0 lg:left-64 z-30 bg-gray-50 dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700",children:[e.jsxs("div",{className:"h-16 px-4 lg:px-6 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"hidden sm:flex p-2 rounded-lg bg-gray-100 dark:bg-gray-800",children:e.jsx(r,{className:`h-5 w-5 ${n}`})}),e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white",children:s}),k!==void 0&&e.jsxs("span",{role:"status","aria-live":"polite",className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-300",children:[k.toLocaleString(),o!==void 0&&i!==void 0&&i!==o&&e.jsxs("span",{className:"text-gray-400 dark:text-gray-500 ml-1",children:["/ ",o.toLocaleString()]})]}),d&&e.jsx("span",{className:"hidden md:inline text-sm text-gray-500 dark:text-gray-400",children:d})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[S,x&&e.jsxs("span",{"data-testid":"live-indicator",className:"hidden sm:flex items-center space-x-1.5 px-2.5 py-1.5 rounded-lg text-sm font-medium bg-red-50 text-red-600 dark:bg-red-900/20 dark:text-red-400",title:"Live — entries stream in real time",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-red-500 animate-pulse"}),e.jsx("span",{children:"Live"})]}),R&&e.jsxs("button",{onClick:()=>R(!N),className:`hidden sm:flex items-center space-x-1.5 px-3 py-1.5 rounded-lg text-sm font-medium transition-colors whitespace-nowrap ${N?"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400":"bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700"}`,title:N?"Auto-refresh enabled":"Auto-refresh disabled",children:[e.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${N?"bg-green-500 animate-pulse":"bg-gray-400"}`}),e.jsx("span",{children:"Auto Refresh"})]}),j&&e.jsx(_e,{type:j.type,label:j.label,onCleared:j.onCleared}),h&&e.jsx("button",{onClick:h,disabled:!!u||!!l,"aria-busy":l,"aria-label":l?"Refreshing...":"Refresh",className:"p-2 rounded-lg text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-700 dark:hover:text-gray-200 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Refresh",children:e.jsx(X,{className:`h-4 w-4 ${l?"animate-spin":""}`})})]})]}),$&&e.jsx("div",{className:"px-4 lg:px-6 py-2 border-t border-gray-100 dark:border-gray-800 bg-gray-50/50 dark:bg-gray-900/50",children:$}),F&&e.jsx("div",{className:"px-4 lg:px-6 py-2 border-t border-gray-100 dark:border-gray-800 bg-gray-50/50 dark:bg-gray-900/50",children:e.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[e.jsx("span",{className:"text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider mr-1",children:"Filters:"}),Object.entries(A).map(([y,p])=>e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:[y,":"]}),p.map((b,H)=>e.jsxs("button",{onClick:b.onRemove,"aria-label":`Remove ${y} filter: ${b.value}`,className:"inline-flex items-center space-x-1 px-2 py-0.5 rounded-md text-xs font-medium bg-primary-100 dark:bg-primary-900/30 text-primary-700 dark:text-primary-300 hover:bg-primary-200 dark:hover:bg-primary-900/50 transition-colors group uppercase",children:[e.jsx("span",{children:b.value}),e.jsx(Fe,{className:"h-3 w-3 opacity-60 group-hover:opacity-100"})]},`${b.category}-${b.value}-${H}`))]},y)),f&&m.length>1&&e.jsx("button",{onClick:f,className:"ml-2 text-xs text-gray-500 dark:text-gray-400 hover:text-red-600 dark:hover:text-red-400 transition-colors",children:"Clear all"})]})})]}),e.jsx("div",{"aria-hidden":"true","data-testid":"page-header-spacer",style:{height:E}})]})}function Ve({tabs:s,activeTab:r,onChange:n}){return e.jsx("div",{className:"flex items-center space-x-1",children:s.map(i=>e.jsxs("button",{onClick:()=>n(i.id),className:`px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${r===i.id?"bg-primary-100 text-primary-700 dark:bg-primary-900/50 dark:text-primary-300":"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800"}`,children:[i.label,i.count!==void 0&&e.jsx("span",{className:`ml-1.5 text-xs ${r===i.id?"text-primary-600 dark:text-primary-400":"text-gray-400 dark:text-gray-500"}`,children:i.count})]},i.id))})}function Qe({label:s,enabled:r,onChange:n,icon:i}){return e.jsxs("button",{onClick:()=>n(!r),className:`flex items-center space-x-2 px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${r?"bg-primary-100 text-primary-700 dark:bg-primary-900/30 dark:text-primary-300":"bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700"}`,children:[i&&e.jsx(i,{className:"h-4 w-4"}),e.jsx("span",{children:s})]})}export{Ve as F,Xe as L,Ye as N,Je as P,Ge as R,Qe as T,ze as a,We as u};
1
+ import{b as a,f as je}from"./vendor-DBTT3jXp.js";import{t as Se,z as q,p as I,v as Ne,w as Re,j as e,C as Ce,x as G,l as X,f as Ee,y as Le,k as $e,X as Fe}from"./index-HxcGVcSo.js";import{t as Ae}from"./types-BMBEhoQ2.js";import{T as De}from"./timer-I7o5QV6X.js";function Oe(){return Se("/stream")}function Ie(s,r=!0){const n=a.useRef(s),[i,o]=a.useState(!1);return a.useEffect(()=>{n.current=s},[s]),a.useEffect(()=>{if(!r||typeof EventSource>"u")return;const d=new EventSource(Oe(),{withCredentials:!0}),u=l=>{try{n.current(JSON.parse(l.data))}catch{}};return d.addEventListener("entry",u),d.onopen=()=>o(!0),d.onerror=()=>o(!1),()=>{d.removeEventListener("entry",u),d.close(),o(!1)}},[r]),{connected:i}}function Y(s){return s==null?"":typeof s!="object"?String(s):Array.isArray(s)?"["+s.map(Y).join(",")+"]":"{"+Object.keys(s).sort().map(n=>`"${n}":${Y(s[n])}`).join(",")+"}"}const se=500;function ne(s,r){if(r.length===0)return s;const n=new Set(s.map(d=>d.id)),i=r.filter(d=>!n.has(d.id));if(i.length===0)return s;const o=[...i,...s];return o.length>se?o.slice(0,se):o}const ce="nestlens-auto-refresh";function qe(){try{const s=localStorage.getItem(ce);return s===null?!0:s==="true"}catch{return!0}}function Te(s){try{localStorage.setItem(ce,String(s))}catch{}}function ze(s={}){const{type:r,limit:n=50,autoRefresh:i,autoRefreshInterval:o=5e3,filters:d,windowMinutes:u}=s,l=Y(d),h=`${r}|${n}|${l}|${u??0}`,[j,N]=a.useState({key:l,value:d});j.key!==l&&N({key:l,value:d});const R=j.value,x=a.useCallback(()=>!u||u<=0?R:{...R,from:new Date(Date.now()-u*6e4).toISOString()},[R,u]),[m,f]=a.useState([]),[S,$]=a.useState(null),[C,E]=a.useState(!1),[M,F]=a.useState(null),[k,A]=a.useState(null),[y,p]=a.useState(0),[b,H]=a.useState(i??qe()),v=a.useRef(null),T=a.useRef(null),D=a.useRef(!1),W=a.useRef(null),oe=a.useRef(!0),de=S===null&&M===null,ue=C||S!==null&&S!==h,me=a.useRef(l),P=a.useRef(new Map),[,fe]=a.useState(0),Q=1e4,Z=a.useCallback(t=>{f(t.data),A(t.meta),v.current=t.meta.newestSequence,W.current=t.meta.newestSequence,p(0),F(null),oe.current=!1,me.current=l,$(h)},[l,h]),ee=a.useCallback(t=>{const c=t instanceof Error?t:new Error("Failed to fetch entries");F(c),console.error("Failed to fetch entries:",t),q.error("Failed to load entries"),$(h)},[h]),ge=a.useCallback(async()=>{if(!(!(k!=null&&k.oldestSequence)||!k.hasMore)){E(!0);try{const t=await I({type:r,limit:n,beforeSequence:k.oldestSequence,filters:x()});f(c=>{const g=new Set(c.map(w=>w.id));return[...c,...t.data.filter(w=>!g.has(w.id))]}),A(t.meta)}catch(t){console.error("Failed to load more entries:",t),q.error("Failed to load more entries")}finally{E(!1)}}},[r,n,k,x]),xe=a.useCallback(async()=>{if(v.current&&!D.current){D.current=!0,E(!0);try{const t=await I({type:r,limit:y||n,afterSequence:v.current,filters:x()});if(t.data.length>0){const c=Date.now();t.data.forEach(g=>{P.current.set(g.id,c)}),f(g=>ne(g,t.data)),v.current=t.meta.newestSequence,p(0)}}catch(t){console.error("Failed to load new entries:",t),q.error("Failed to load new entries")}finally{D.current=!1,E(!1)}}},[r,n,y,x]),U=a.useCallback(async()=>{E(!0);try{F(null);const t=await I({type:r,limit:n,filters:x()});f(t.data),A(t.meta),v.current=t.meta.newestSequence,W.current=t.meta.newestSequence,p(0)}catch(t){const c=t instanceof Error?t:new Error("Failed to refresh entries");F(c),console.error("Failed to refresh entries:",t),q.error("Failed to refresh entries")}finally{E(!1)}},[r,n,x]),he=t=>!!(t&&Object.values(t).some(c=>Array.isArray(c)?c.length>0:c!==void 0&&c!=="")),_=a.useCallback(async()=>{if(!v.current){await U();return}const t=x();try{if(!he(t)){const g=await Ne(v.current,r);p(g.data.count);return}const c=await I({type:r,limit:n,afterSequence:v.current,filters:t});p(c.data.length)}catch{}},[r,n,x,U]),ye=a.useCallback(t=>{H(t),Te(t)},[]),pe=a.useCallback(t=>{f(c=>c.map(g=>g.id===t.id?t:g))},[]);a.useEffect(()=>{let t=!0;return I({type:r,limit:n,filters:x()}).then(c=>{t&&Z(c)},c=>{t&&ee(c)}),()=>{t=!1}},[r,n,x,Z,ee]);const be=a.useCallback(t=>{const c=P.current.get(t);return c?Date.now()-c<Q:!1},[]),te=a.useCallback(()=>{const t=Date.now();let c=!1;P.current.forEach((g,w)=>{t-g>=Q&&(P.current.delete(w),c=!0)}),c&&fe(g=>g+1)},[]),B=a.useCallback(async()=>{if(v.current&&!D.current){D.current=!0;try{const t=W.current??v.current,g=(await Re(r)).data;if(typeof g=="number"&&g>t){const w=await I({type:r,limit:n,afterSequence:t,filters:x()});if(W.current=w.meta.hasMore?w.meta.newestSequence??t:g,w.data.length>0){const ve=Date.now();w.data.forEach(L=>{P.current.set(L.id,ve)});let re=0;f(L=>{const ae=ne(L,w.data);return re=ae.length-L.length,ae}),v.current=w.meta.newestSequence,A(L=>L?{...L,total:L.total+re,newestSequence:w.meta.newestSequence}:w.meta)}}}catch{}finally{D.current=!1}}},[r,n,x]);a.useEffect(()=>(b?T.current=setInterval(B,o):T.current=setInterval(_,o),()=>{T.current&&(clearInterval(T.current),T.current=null)}),[b,o,B,_]),a.useEffect(()=>{const t=setInterval(te,1e3);return()=>clearInterval(t)},[te]);const O=a.useRef(null),we=a.useCallback(t=>{r&&t.type!==r||O.current||(O.current=setTimeout(()=>{O.current=null,b?B():_()},200))},[r,b,B,_]),{connected:ke}=Ie(we);return a.useEffect(()=>()=>{O.current&&(clearTimeout(O.current),O.current=null)},[]),{entries:m,loading:de,refreshing:ue,error:M,meta:k,newEntriesCount:y,hasMore:(k==null?void 0:k.hasMore)??!1,loadMore:ge,loadNew:xe,refresh:U,setAutoRefresh:ye,autoRefreshEnabled:b,updateEntry:pe,isHighlighted:be,live:ke}}const J=[{id:"all",label:"Any time",minutes:0},{id:"5m",label:"Last 5 minutes",minutes:5},{id:"15m",label:"Last 15 minutes",minutes:15},{id:"1h",label:"Last hour",minutes:60},{id:"24h",label:"Last 24 hours",minutes:1440}],V=[{id:"any",label:"Any duration",ms:0},{id:"100",label:"Over 100ms",ms:100},{id:"500",label:"Over 500ms",ms:500},{id:"1000",label:"Over 1s",ms:1e3},{id:"5000",label:"Over 5s",ms:5e3}],K="window",z="slower",Pe=s=>J.some(r=>r.id===s),Me=s=>V.some(r=>r.id===s);function We(){var x;const[s,r]=je(),n=s.get(K),i=s.get(z),o=Pe(n)?n:"all",d=Me(i)?i:"any",u=a.useCallback((m,f,S)=>{r($=>{const C=new URLSearchParams($);return S?C.delete(m):C.set(m,f),C},{replace:!0})},[r]),l=a.useCallback(m=>u(K,m,m==="all"),[u]),h=a.useCallback(m=>u(z,m,m==="any"),[u]),j=a.useCallback(()=>{r(m=>{const f=new URLSearchParams(m);return f.delete(K),f.delete(z),f},{replace:!0})},[r]),N=((x=J.find(m=>m.id===o))==null?void 0:x.minutes)??0,R=a.useMemo(()=>{var f;const m=((f=V.find(S=>S.id===d))==null?void 0:f.ms)??0;return m>0?{minDuration:m}:{}},[d]);return{window:o,duration:d,setWindow:l,setDuration:h,windowMinutes:N,rangeFilters:R,hasRange:o!=="all"||d!=="any",clearRanges:j}}const ie="flex items-center gap-1.5 rounded-md px-2 py-1 text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors cursor-pointer focus-within:ring-2 focus-within:ring-primary-500",le="appearance-none bg-transparent text-xs font-medium text-gray-700 dark:text-gray-200 border-0 p-0 pr-1 rounded focus:outline-none focus:ring-2 focus:ring-primary-500 cursor-pointer";function Ge({route:s}){var u;const{window:r,duration:n,setWindow:i,setDuration:o}=We(),d=((u=Ae(s))==null?void 0:u.measuresDuration)??!1;return e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("label",{className:ie,children:[e.jsx(Ce,{className:"h-3.5 w-3.5 flex-shrink-0","aria-hidden":"true"}),e.jsx("span",{className:"sr-only",children:"Time window"}),e.jsx("select",{"aria-label":"Time window","data-testid":"window-filter",value:r,onChange:l=>i(l.target.value),className:le,children:J.map(l=>e.jsx("option",{value:l.id,children:l.label},l.id))}),e.jsx(G,{className:"h-3 w-3 flex-shrink-0 opacity-60","aria-hidden":"true"})]}),d&&e.jsxs("label",{className:ie,children:[e.jsx(De,{className:"h-3.5 w-3.5 flex-shrink-0","aria-hidden":"true"}),e.jsx("span",{className:"sr-only",children:"Minimum duration"}),e.jsx("select",{"aria-label":"Minimum duration","data-testid":"duration-filter",value:n,onChange:l=>o(l.target.value),className:le,children:V.map(l=>e.jsx("option",{value:l.id,children:l.label},l.id))}),e.jsx(G,{className:"h-3 w-3 flex-shrink-0 opacity-60","aria-hidden":"true"})]})]})}function Ye({count:s,onClick:r,loading:n}){return s===0?null:e.jsxs("button",{onClick:r,disabled:n,className:"w-full py-3 px-4 bg-primary-50 dark:bg-primary-900/20 text-primary-600 dark:text-primary-400 font-medium rounded-lg hover:bg-primary-100 dark:hover:bg-primary-900/30 transition-colors flex items-center justify-center space-x-2 disabled:opacity-50",children:[n?e.jsx(X,{className:"h-4 w-4 animate-spin"}):e.jsx(Ee,{className:"h-4 w-4"}),e.jsxs("span",{children:["Load ",s," new ",s===1?"entry":"entries"]})]})}function Xe({hasMore:s,onClick:r,loading:n}){return s?e.jsxs("button",{onClick:r,disabled:n,className:"w-full py-3 px-4 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 font-medium rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors flex items-center justify-center space-x-2 disabled:opacity-50",children:[n?e.jsx(X,{className:"h-4 w-4 animate-spin"}):e.jsx(G,{className:"h-4 w-4"}),e.jsx("span",{children:"Load older entries"})]}):null}function _e({type:s,label:r,onCleared:n}){const[i,o]=a.useState(!1),[d,u]=a.useState(!1),l=a.useCallback(async()=>{if(!i){o(!0),setTimeout(()=>o(!1),5e3);return}o(!1),u(!0);try{const{message:h}=await Le(s);q.success(h),n()}catch(h){q.error(`Could not clear ${r}: ${h instanceof Error?h.message:String(h)}`)}finally{u(!1)}},[i,s,r,n]);return e.jsxs("button",{onClick:l,disabled:d,"aria-label":i?`Confirm deleting all ${r}`:`Delete all ${r}`,title:i?`Press again to delete all ${r}`:`Delete all ${r}`,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${i?"bg-red-600 text-white hover:bg-red-700":"text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-red-600 dark:hover:text-red-400"}`,children:[e.jsx($e,{className:"h-4 w-4"}),e.jsx("span",{children:i?`Delete all ${r}?`:"Clear"})]})}function Je({title:s,icon:r,iconColor:n="text-primary-600 dark:text-primary-400",count:i,totalCount:o,subtitle:d,loading:u,refreshing:l,onRefresh:h,clearable:j,autoRefreshEnabled:N,onAutoRefreshToggle:R,live:x,filters:m=[],onClearAllFilters:f,actions:S,filterControls:$}){const C=a.useRef(null),[E,M]=a.useState(0);a.useLayoutEffect(()=>{const y=C.current;if(!y)return;const p=()=>M(y.getBoundingClientRect().height);if(p(),typeof ResizeObserver>"u")return;const b=new ResizeObserver(p);return b.observe(y),()=>b.disconnect()},[]);const F=m.length>0,k=i??o,A=m.reduce((y,p)=>(y[p.category]||(y[p.category]=[]),y[p.category].push(p),y),{});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{ref:C,className:"fixed top-0 left-0 right-0 lg:left-64 z-30 bg-gray-50 dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700",children:[e.jsxs("div",{className:"h-16 px-4 lg:px-6 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"hidden sm:flex p-2 rounded-lg bg-gray-100 dark:bg-gray-800",children:e.jsx(r,{className:`h-5 w-5 ${n}`})}),e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white",children:s}),k!==void 0&&e.jsxs("span",{role:"status","aria-live":"polite",className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-300",children:[k.toLocaleString(),o!==void 0&&i!==void 0&&i!==o&&e.jsxs("span",{className:"text-gray-400 dark:text-gray-500 ml-1",children:["/ ",o.toLocaleString()]})]}),d&&e.jsx("span",{className:"hidden md:inline text-sm text-gray-500 dark:text-gray-400",children:d})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[S,x&&e.jsxs("span",{"data-testid":"live-indicator",className:"hidden sm:flex items-center space-x-1.5 px-2.5 py-1.5 rounded-lg text-sm font-medium bg-red-50 text-red-600 dark:bg-red-900/20 dark:text-red-400",title:"Live — entries stream in real time",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-red-500 animate-pulse"}),e.jsx("span",{children:"Live"})]}),R&&e.jsxs("button",{onClick:()=>R(!N),className:`hidden sm:flex items-center space-x-1.5 px-3 py-1.5 rounded-lg text-sm font-medium transition-colors whitespace-nowrap ${N?"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400":"bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700"}`,title:N?"Auto-refresh enabled":"Auto-refresh disabled",children:[e.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${N?"bg-green-500 animate-pulse":"bg-gray-400"}`}),e.jsx("span",{children:"Auto Refresh"})]}),j&&e.jsx(_e,{type:j.type,label:j.label,onCleared:j.onCleared}),h&&e.jsx("button",{onClick:h,disabled:!!u||!!l,"aria-busy":l,"aria-label":l?"Refreshing...":"Refresh",className:"p-2 rounded-lg text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-700 dark:hover:text-gray-200 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Refresh",children:e.jsx(X,{className:`h-4 w-4 ${l?"animate-spin":""}`})})]})]}),$&&e.jsx("div",{className:"px-4 lg:px-6 py-2 border-t border-gray-100 dark:border-gray-800 bg-gray-50/50 dark:bg-gray-900/50",children:$}),F&&e.jsx("div",{className:"px-4 lg:px-6 py-2 border-t border-gray-100 dark:border-gray-800 bg-gray-50/50 dark:bg-gray-900/50",children:e.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[e.jsx("span",{className:"text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider mr-1",children:"Filters:"}),Object.entries(A).map(([y,p])=>e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:[y,":"]}),p.map((b,H)=>e.jsxs("button",{onClick:b.onRemove,"aria-label":`Remove ${y} filter: ${b.value}`,className:"inline-flex items-center space-x-1 px-2 py-0.5 rounded-md text-xs font-medium bg-primary-100 dark:bg-primary-900/30 text-primary-700 dark:text-primary-300 hover:bg-primary-200 dark:hover:bg-primary-900/50 transition-colors group uppercase",children:[e.jsx("span",{children:b.value}),e.jsx(Fe,{className:"h-3 w-3 opacity-60 group-hover:opacity-100"})]},`${b.category}-${b.value}-${H}`))]},y)),f&&m.length>1&&e.jsx("button",{onClick:f,className:"ml-2 text-xs text-gray-500 dark:text-gray-400 hover:text-red-600 dark:hover:text-red-400 transition-colors",children:"Clear all"})]})})]}),e.jsx("div",{"aria-hidden":"true","data-testid":"page-header-spacer",style:{height:E}})]})}function Ve({tabs:s,activeTab:r,onChange:n}){return e.jsx("div",{className:"flex items-center space-x-1",children:s.map(i=>e.jsxs("button",{onClick:()=>n(i.id),className:`px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${r===i.id?"bg-primary-100 text-primary-700 dark:bg-primary-900/50 dark:text-primary-300":"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800"}`,children:[i.label,i.count!==void 0&&e.jsx("span",{className:`ml-1.5 text-xs ${r===i.id?"text-primary-600 dark:text-primary-400":"text-gray-400 dark:text-gray-500"}`,children:i.count})]},i.id))})}function Qe({label:s,enabled:r,onChange:n,icon:i}){return e.jsxs("button",{onClick:()=>n(!r),className:`flex items-center space-x-2 px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${r?"bg-primary-100 text-primary-700 dark:bg-primary-900/30 dark:text-primary-300":"bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700"}`,children:[i&&e.jsx(i,{className:"h-4 w-4"}),e.jsx("span",{children:s})]})}export{Ve as F,Xe as L,Ye as N,Je as P,Ge as R,Qe as T,ze as a,We as u};
@@ -1 +1 @@
1
- import{j as r,D as d}from"./index-dkeMTrq0.js";import{e as P,b as u}from"./vendor-DBTT3jXp.js";import{f as Q,p as B}from"./date-Dwgqy666.js";import{u as O,a as W,P as H,T as I,R as Z,N as $,L as z}from"./PageHeader-9OQepDeQ.js";import{u as G,a as J,C as K}from"./types-CuCQ6L2Z.js";import{E as U}from"./EntrySearchInput-BGWM929F.js";import{T as c,D as V,a as X,b as Y}from"./DataTable-CDqXyed8.js";import{Z as h}from"./zap-CAbVWiHg.js";import"./timer-BVP3d7zc.js";import"./search-C0XvQMrJ.js";function de(){const p=P(),[i,m]=u.useState(!1),{addFilter:l,clearAll:x,serverFilters:g,headerFilters:y}=G("queries"),{rangeFilters:f,windowMinutes:w}=O(),j={...g,slow:i?!0:void 0},{entries:b,loading:C,refreshing:s,error:k,refresh:n,newEntriesCount:T,hasMore:N,loadMore:q,loadNew:v,autoRefreshEnabled:E,live:S,setAutoRefresh:F,meta:a,isHighlighted:R}=W({type:"query",limit:50,filters:{...j,...f},windowMinutes:w}),t=b.filter(e=>J(e)),D=u.useMemo(()=>[{key:"source",header:"Source",width:"120px",render:e=>r.jsx(K,{listType:"queries",filterType:"sources",children:e.payload.source||"unknown"})},{key:"query",header:"Query",minWidth:"300px",render:e=>r.jsxs("div",{className:"flex items-start space-x-2",children:[e.payload.slow&&r.jsx(h,{className:"h-4 w-4 text-yellow-500 flex-shrink-0 mt-0.5"}),r.jsx(c,{mono:!0,truncate:!0,maxWidth:"400px",children:e.payload.query.length>100?e.payload.query.substring(0,100)+"...":e.payload.query})]})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>r.jsx(V,{ms:e.payload.duration||0,slowThreshold:e.payload.slow?0:1e3})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>{const L=(e.payload.source||"unknown").toLowerCase(),M=(e.tags??[]).filter(o=>o.toLowerCase()!==L);return r.jsx(X,{tags:M,max:3,onTagClick:(o,A)=>{A.stopPropagation(),l("tags",o)}})}},{key:"time",header:"Time",width:"170px",align:"right",render:e=>r.jsx(c,{secondary:!0,className:"text-xs",children:Q(B(e.createdAt),{addSuffix:!0})})}],[l]);return C&&t.length===0?r.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:r.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):r.jsxs("div",{children:[r.jsx(H,{title:"Queries",icon:d,iconColor:"text-purple-600 dark:text-purple-400",count:t.length,totalCount:a==null?void 0:a.total,clearable:{type:"query",label:"queries",onCleared:n},refreshing:s,autoRefreshEnabled:E,live:S,onAutoRefreshToggle:F,filters:y,filterControls:r.jsx(Z,{route:"queries"}),onClearAllFilters:x,actions:r.jsx(I,{label:"Slow Only",enabled:i,onChange:m,icon:h})}),r.jsxs("div",{className:"space-y-4",children:[r.jsx(U,{placeholder:"Search by SQL, table, source, tag, or content..."}),r.jsx($,{count:T,onClick:v,loading:s}),r.jsx(Y,{columns:D,data:t,keyExtractor:e=>e.id,onRowClick:e=>p(`/queries/${e.id}`),rowClassName:e=>R(e.id)?"highlight-new":"",emptyMessage:"No queries recorded yet",error:k,onRetry:n,emptyIcon:r.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),r.jsx(z,{hasMore:N,onClick:q,loading:s})]})]})}export{de as default};
1
+ import{j as r,D as d}from"./index-HxcGVcSo.js";import{e as P,b as u}from"./vendor-DBTT3jXp.js";import{f as Q,p as B}from"./date-Dwgqy666.js";import{u as O,a as W,P as H,T as I,R as Z,N as $,L as z}from"./PageHeader-DR_M5h7z.js";import{u as G,a as J,C as K}from"./types-BMBEhoQ2.js";import{E as U}from"./EntrySearchInput-BF9N_f7y.js";import{T as c,D as V,a as X,b as Y}from"./DataTable-Cz2phOFe.js";import{Z as h}from"./zap-DMB3w7zm.js";import"./timer-I7o5QV6X.js";import"./search-VPXcw9Ki.js";function de(){const p=P(),[i,m]=u.useState(!1),{addFilter:l,clearAll:x,serverFilters:g,headerFilters:y}=G("queries"),{rangeFilters:f,windowMinutes:w}=O(),j={...g,slow:i?!0:void 0},{entries:b,loading:C,refreshing:s,error:k,refresh:n,newEntriesCount:T,hasMore:N,loadMore:q,loadNew:v,autoRefreshEnabled:E,live:S,setAutoRefresh:F,meta:a,isHighlighted:R}=W({type:"query",limit:50,filters:{...j,...f},windowMinutes:w}),t=b.filter(e=>J(e)),D=u.useMemo(()=>[{key:"source",header:"Source",width:"120px",render:e=>r.jsx(K,{listType:"queries",filterType:"sources",children:e.payload.source||"unknown"})},{key:"query",header:"Query",minWidth:"300px",render:e=>r.jsxs("div",{className:"flex items-start space-x-2",children:[e.payload.slow&&r.jsx(h,{className:"h-4 w-4 text-yellow-500 flex-shrink-0 mt-0.5"}),r.jsx(c,{mono:!0,truncate:!0,maxWidth:"400px",children:e.payload.query.length>100?e.payload.query.substring(0,100)+"...":e.payload.query})]})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>r.jsx(V,{ms:e.payload.duration||0,slowThreshold:e.payload.slow?0:1e3})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>{const L=(e.payload.source||"unknown").toLowerCase(),M=(e.tags??[]).filter(o=>o.toLowerCase()!==L);return r.jsx(X,{tags:M,max:3,onTagClick:(o,A)=>{A.stopPropagation(),l("tags",o)}})}},{key:"time",header:"Time",width:"170px",align:"right",render:e=>r.jsx(c,{secondary:!0,className:"text-xs",children:Q(B(e.createdAt),{addSuffix:!0})})}],[l]);return C&&t.length===0?r.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:r.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):r.jsxs("div",{children:[r.jsx(H,{title:"Queries",icon:d,iconColor:"text-purple-600 dark:text-purple-400",count:t.length,totalCount:a==null?void 0:a.total,clearable:{type:"query",label:"queries",onCleared:n},refreshing:s,autoRefreshEnabled:E,live:S,onAutoRefreshToggle:F,filters:y,filterControls:r.jsx(Z,{route:"queries"}),onClearAllFilters:x,actions:r.jsx(I,{label:"Slow Only",enabled:i,onChange:m,icon:h})}),r.jsxs("div",{className:"space-y-4",children:[r.jsx(U,{placeholder:"Search by SQL, table, source, tag, or content..."}),r.jsx($,{count:T,onClick:v,loading:s}),r.jsx(Y,{columns:D,data:t,keyExtractor:e=>e.id,onRowClick:e=>p(`/queries/${e.id}`),rowClassName:e=>R(e.id)?"highlight-new":"",emptyMessage:"No queries recorded yet",error:k,onRetry:n,emptyIcon:r.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),r.jsx(z,{hasMore:N,onClick:q,loading:s})]})]})}export{de as default};
@@ -1,4 +1,4 @@
1
- import{c as RT,j as r,z as UE}from"./index-dkeMTrq0.js";import{p as oE,f as PT}from"./date-Dwgqy666.js";import{D as K,f as nT}from"./DetailRow-CWJp1tTe.js";import{C as GE}from"./types-CuCQ6L2Z.js";import{g as iT,b as g}from"./vendor-DBTT3jXp.js";import{a as MT,b as UT}from"./EntryDetailPage-Dw2pcYO2.js";import"./search-C0XvQMrJ.js";/**
1
+ import{c as RT,j as r,z as UE}from"./index-HxcGVcSo.js";import{p as oE,f as PT}from"./date-Dwgqy666.js";import{D as K,f as nT}from"./DetailRow-DKG3Vf9j.js";import{C as GE}from"./types-BMBEhoQ2.js";import{g as iT,b as g}from"./vendor-DBTT3jXp.js";import{a as MT,b as UT}from"./EntryDetailPage-BdBZLbAf.js";import"./search-VPXcw9Ki.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{j as e,D as u,b as f,C as y}from"./index-dkeMTrq0.js";import{b as N}from"./vendor-DBTT3jXp.js";import{p as o,f as v}from"./date-Dwgqy666.js";import{D as a,f as k}from"./DetailRow-CWJp1tTe.js";import{C as n}from"./types-CuCQ6L2Z.js";import{u as x,C as m,T as C}from"./EntryDetailPage-Dw2pcYO2.js";import{C as w}from"./CopyButton-djrkphpR.js";import{C as T}from"./circle-check-big-C4ws6-wY.js";import{C as g}from"./circle-x-D14U2UWr.js";import"./search-C0XvQMrJ.js";function H({entry:h}){const{payload:s,createdAt:i}=h,d=x(),l=x(),[c,p]=N.useState("args"),r=s.status==="success"?{icon:T,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"}:{icon:g,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"},b=r.icon,t=[];s.args&&s.args.length>0&&t.push({id:"args",label:"Arguments",content:e.jsx(m,{data:s.args,toolbarState:d.state,searchBar:d.SearchBar,maxHeight:400})}),s.result!==void 0&&t.push({id:"result",label:"Result",content:e.jsx(m,{data:s.result,toolbarState:l.state,searchBar:l.SearchBar,maxHeight:400})});const j=()=>{if(c==="args"&&s.args&&s.args.length>0)return e.jsx(d.Toolbar,{data:s.args});if(c==="result"&&s.result!==void 0)return e.jsx(l.Toolbar,{data:s.result})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:`p-2 ${r.bg} rounded-lg`,children:e.jsx(u,{className:`h-5 w-5 ${r.color}`})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white font-mono",children:s.command}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Redis Command"})]})]}),e.jsx(w,{text:s.command,label:"Copy command"})]})}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 divide-x divide-gray-200 dark:divide-gray-700",children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(f,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Command"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white font-mono",children:s.command})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(b,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Status"})]}),e.jsx("p",{className:`text-lg font-bold ${r.color}`,children:s.status.toUpperCase()})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(y,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[s.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(a,{label:"Time",value:e.jsxs("span",{children:[k(o(i),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",v(o(i),{addSuffix:!0}),")"]})]})}),e.jsx(a,{label:"Command",value:e.jsx(n,{listType:"redis",filterType:"commands",filterValue:s.command,children:s.command})}),s.keyPattern&&e.jsx(a,{label:"Key Pattern",value:e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:s.keyPattern})}),e.jsx(a,{label:"Status",value:e.jsx(n,{listType:"redis",filterType:"statuses",filterValue:s.status,children:s.status.toUpperCase()})}),e.jsx(a,{label:"Duration",value:`${s.duration}ms`})]})})]}),s.error&&e.jsxs("div",{className:"card border-red-200 dark:border-red-800",children:[e.jsx("div",{className:"px-4 py-3 border-b border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(g,{className:"h-5 w-5 text-red-500"}),e.jsx("h2",{className:"text-lg font-semibold text-red-700 dark:text-red-400",children:"Error"})]})}),e.jsx("div",{className:"p-4 bg-red-50/50 dark:bg-red-900/10",children:e.jsx("pre",{className:"text-sm text-red-600 dark:text-red-400 font-mono whitespace-pre-wrap overflow-x-auto",children:s.error})})]}),t.length>0&&e.jsx(C,{tabs:t,defaultTab:"args",hashKey:"redis",headerRight:j(),onTabChange:p})]})}export{H as default};
1
+ import{j as e,D as u,b as f,C as y}from"./index-HxcGVcSo.js";import{b as N}from"./vendor-DBTT3jXp.js";import{p as o,f as v}from"./date-Dwgqy666.js";import{D as a,f as k}from"./DetailRow-DKG3Vf9j.js";import{C as n}from"./types-BMBEhoQ2.js";import{u as x,C as m,T as C}from"./EntryDetailPage-BdBZLbAf.js";import{C as w}from"./CopyButton-DfPqcshv.js";import{C as T}from"./circle-check-big-CiGeQW9J.js";import{C as g}from"./circle-x-B-V5s-zK.js";import"./search-VPXcw9Ki.js";function H({entry:h}){const{payload:s,createdAt:i}=h,d=x(),l=x(),[c,p]=N.useState("args"),r=s.status==="success"?{icon:T,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"}:{icon:g,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"},b=r.icon,t=[];s.args&&s.args.length>0&&t.push({id:"args",label:"Arguments",content:e.jsx(m,{data:s.args,toolbarState:d.state,searchBar:d.SearchBar,maxHeight:400})}),s.result!==void 0&&t.push({id:"result",label:"Result",content:e.jsx(m,{data:s.result,toolbarState:l.state,searchBar:l.SearchBar,maxHeight:400})});const j=()=>{if(c==="args"&&s.args&&s.args.length>0)return e.jsx(d.Toolbar,{data:s.args});if(c==="result"&&s.result!==void 0)return e.jsx(l.Toolbar,{data:s.result})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:`p-2 ${r.bg} rounded-lg`,children:e.jsx(u,{className:`h-5 w-5 ${r.color}`})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white font-mono",children:s.command}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Redis Command"})]})]}),e.jsx(w,{text:s.command,label:"Copy command"})]})}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 divide-x divide-gray-200 dark:divide-gray-700",children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(f,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Command"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white font-mono",children:s.command})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(b,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Status"})]}),e.jsx("p",{className:`text-lg font-bold ${r.color}`,children:s.status.toUpperCase()})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(y,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[s.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(a,{label:"Time",value:e.jsxs("span",{children:[k(o(i),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",v(o(i),{addSuffix:!0}),")"]})]})}),e.jsx(a,{label:"Command",value:e.jsx(n,{listType:"redis",filterType:"commands",filterValue:s.command,children:s.command})}),s.keyPattern&&e.jsx(a,{label:"Key Pattern",value:e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:s.keyPattern})}),e.jsx(a,{label:"Status",value:e.jsx(n,{listType:"redis",filterType:"statuses",filterValue:s.status,children:s.status.toUpperCase()})}),e.jsx(a,{label:"Duration",value:`${s.duration}ms`})]})})]}),s.error&&e.jsxs("div",{className:"card border-red-200 dark:border-red-800",children:[e.jsx("div",{className:"px-4 py-3 border-b border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(g,{className:"h-5 w-5 text-red-500"}),e.jsx("h2",{className:"text-lg font-semibold text-red-700 dark:text-red-400",children:"Error"})]})}),e.jsx("div",{className:"p-4 bg-red-50/50 dark:bg-red-900/10",children:e.jsx("pre",{className:"text-sm text-red-600 dark:text-red-400 font-mono whitespace-pre-wrap overflow-x-auto",children:s.error})})]}),t.length>0&&e.jsx(C,{tabs:t,defaultTab:"args",hashKey:"redis",headerRight:j(),onTabChange:p})]})}export{H as default};
@@ -1 +1 @@
1
- import{j as a,D as l}from"./index-dkeMTrq0.js";import{e as D,b as F}from"./vendor-DBTT3jXp.js";import{f as M,p as T}from"./date-Dwgqy666.js";import{u as A,a as B,P as L,R as H,N as S,L as W}from"./PageHeader-9OQepDeQ.js";import{u as I,k as K,C as c}from"./types-CuCQ6L2Z.js";import{T as n,D as U,b as $}from"./DataTable-CDqXyed8.js";import"./timer-BVP3d7zc.js";function X(){const m=D(),{addFilter:t,clearAll:u,serverFilters:h,headerFilters:p}=I("redis"),{rangeFilters:x,windowMinutes:g}=A(),{entries:y,loading:f,refreshing:r,error:j,refresh:d,newEntriesCount:C,hasMore:k,loadMore:w,loadNew:b,autoRefreshEnabled:N,live:R,setAutoRefresh:E,meta:s,isHighlighted:P}=B({type:"redis",limit:50,filters:{...h,...x},windowMinutes:g}),o=y.filter(e=>K(e)),v=F.useMemo(()=>[{key:"command",header:"Command",width:"120px",render:e=>a.jsx(c,{onClick:i=>{i.stopPropagation(),t("commands",e.payload.command)},className:"font-mono",children:e.payload.command})},{key:"keyPattern",header:"Key Pattern",minWidth:"200px",render:e=>e.payload.keyPattern?a.jsx(n,{mono:!0,truncate:!0,maxWidth:"300px",children:e.payload.keyPattern}):a.jsx(n,{secondary:!0,children:"-"})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>a.jsx(U,{ms:e.payload.duration||0})},{key:"status",header:"Status",width:"100px",render:e=>a.jsx(c,{onClick:i=>{i.stopPropagation(),t("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(n,{secondary:!0,className:"text-xs",children:M(T(e.createdAt),{addSuffix:!0})})}],[t]);return f&&o.length===0?a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):a.jsxs("div",{children:[a.jsx(L,{title:"Redis",icon:l,iconColor:"text-red-600 dark:text-red-400",count:o.length,totalCount:s==null?void 0:s.total,clearable:{type:"redis",label:"redis",onCleared:d},refreshing:r,autoRefreshEnabled:N,live:R,onAutoRefreshToggle:E,filters:p,filterControls:a.jsx(H,{route:"redis"}),onClearAllFilters:u}),a.jsxs("div",{className:"space-y-4",children:[a.jsx(S,{count:C,onClick:b,loading:r}),a.jsx($,{columns:v,data:o,keyExtractor:e=>e.id,onRowClick:e=>m(`/redis/${e.id}`),rowClassName:e=>P(e.id)?"highlight-new":"",emptyMessage:"No Redis commands recorded yet",error:j,onRetry:d,emptyIcon:a.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(W,{hasMore:k,onClick:w,loading:r})]})]})}export{X as default};
1
+ import{j as a,D as l}from"./index-HxcGVcSo.js";import{e as D,b as F}from"./vendor-DBTT3jXp.js";import{f as M,p as T}from"./date-Dwgqy666.js";import{u as A,a as B,P as L,R as H,N as S,L as W}from"./PageHeader-DR_M5h7z.js";import{u as I,k as K,C as c}from"./types-BMBEhoQ2.js";import{T as n,D as U,b as $}from"./DataTable-Cz2phOFe.js";import"./timer-I7o5QV6X.js";function X(){const m=D(),{addFilter:t,clearAll:u,serverFilters:h,headerFilters:p}=I("redis"),{rangeFilters:x,windowMinutes:g}=A(),{entries:y,loading:f,refreshing:r,error:j,refresh:d,newEntriesCount:C,hasMore:k,loadMore:w,loadNew:b,autoRefreshEnabled:N,live:R,setAutoRefresh:E,meta:s,isHighlighted:P}=B({type:"redis",limit:50,filters:{...h,...x},windowMinutes:g}),o=y.filter(e=>K(e)),v=F.useMemo(()=>[{key:"command",header:"Command",width:"120px",render:e=>a.jsx(c,{onClick:i=>{i.stopPropagation(),t("commands",e.payload.command)},className:"font-mono",children:e.payload.command})},{key:"keyPattern",header:"Key Pattern",minWidth:"200px",render:e=>e.payload.keyPattern?a.jsx(n,{mono:!0,truncate:!0,maxWidth:"300px",children:e.payload.keyPattern}):a.jsx(n,{secondary:!0,children:"-"})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>a.jsx(U,{ms:e.payload.duration||0})},{key:"status",header:"Status",width:"100px",render:e=>a.jsx(c,{onClick:i=>{i.stopPropagation(),t("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(n,{secondary:!0,className:"text-xs",children:M(T(e.createdAt),{addSuffix:!0})})}],[t]);return f&&o.length===0?a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):a.jsxs("div",{children:[a.jsx(L,{title:"Redis",icon:l,iconColor:"text-red-600 dark:text-red-400",count:o.length,totalCount:s==null?void 0:s.total,clearable:{type:"redis",label:"redis",onCleared:d},refreshing:r,autoRefreshEnabled:N,live:R,onAutoRefreshToggle:E,filters:p,filterControls:a.jsx(H,{route:"redis"}),onClearAllFilters:u}),a.jsxs("div",{className:"space-y-4",children:[a.jsx(S,{count:C,onClick:b,loading:r}),a.jsx($,{columns:v,data:o,keyExtractor:e=>e.id,onRowClick:e=>m(`/redis/${e.id}`),rowClassName:e=>P(e.id)?"highlight-new":"",emptyMessage:"No Redis commands recorded yet",error:j,onRetry:d,emptyIcon:a.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(W,{hasMore:k,onClick:w,loading:r})]})]})}export{X as default};