nestlens 0.9.4 → 0.9.5
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.
- package/dist/dashboard/public/assets/{BatchDetailView-CBbONEZ6.js → BatchDetailView-f_msI3hE.js} +1 -1
- package/dist/dashboard/public/assets/{BatchesPage-C5asqolh.js → BatchesPage-COmdj9E6.js} +1 -1
- package/dist/dashboard/public/assets/{CacheDetailView-CqMU8Hge.js → CacheDetailView-BRIYfUCk.js} +1 -1
- package/dist/dashboard/public/assets/{CachePage-Ce_yT75F.js → CachePage-1dKbc2tB.js} +1 -1
- package/dist/dashboard/public/assets/{CommandDetailView-LlOynfrs.js → CommandDetailView-SbWoks8L.js} +1 -1
- package/dist/dashboard/public/assets/{CommandsPage-BwMh373Z.js → CommandsPage-mv4_Xpb8.js} +1 -1
- package/dist/dashboard/public/assets/{CopyButton-YkpN9Yi5.js → CopyButton-CrzxYi0-.js} +1 -1
- package/dist/dashboard/public/assets/{DashboardPage-DdaOxHZ2.js → DashboardPage-bE0HpSpI.js} +1 -1
- package/dist/dashboard/public/assets/{DataTable-C9UKN_wr.js → DataTable-D_B9L2P1.js} +1 -1
- package/dist/dashboard/public/assets/{DetailRow-D_sZP7WV.js → DetailRow-CTntOefv.js} +1 -1
- package/dist/dashboard/public/assets/{DumpDetailView-B6Zk2IcH.js → DumpDetailView-CS0W_Fhj.js} +1 -1
- package/dist/dashboard/public/assets/{DumpsPage-BrYuIT5U.js → DumpsPage-nBA0RU8L.js} +1 -1
- package/dist/dashboard/public/assets/{EntryDetailPage-D7qvNuMn.js → EntryDetailPage-CCYipAPI.js} +3 -3
- package/dist/dashboard/public/assets/{EntrySearchInput-DeOYz9h4.js → EntrySearchInput-CBsoywRC.js} +1 -1
- package/dist/dashboard/public/assets/{EventDetailView-dR0UDb6r.js → EventDetailView-C_Octrjz.js} +1 -1
- package/dist/dashboard/public/assets/{EventsPage-O1icFuRw.js → EventsPage-BybxWOjD.js} +1 -1
- package/dist/dashboard/public/assets/{ExceptionDetailView-FijwhgLY.js → ExceptionDetailView-CnZP7x3w.js} +1 -1
- package/dist/dashboard/public/assets/{ExceptionsPage-KuyeMrqK.js → ExceptionsPage-BWMsdqA3.js} +1 -1
- package/dist/dashboard/public/assets/{GateDetailView-CCUc65Vb.js → GateDetailView-BOuqeShR.js} +1 -1
- package/dist/dashboard/public/assets/{GatesPage-BKLfGgS9.js → GatesPage-o9TsnTtk.js} +1 -1
- package/dist/dashboard/public/assets/{GraphQLDetailView-DN7qwLjl.js → GraphQLDetailView-D_FLY4dF.js} +1 -1
- package/dist/dashboard/public/assets/{GraphQLPage-BqkJnBEt.js → GraphQLPage-DKJ9u9z3.js} +1 -1
- package/dist/dashboard/public/assets/{HttpClientDetailView-D7SRccHj.js → HttpClientDetailView-C8VgNH8S.js} +1 -1
- package/dist/dashboard/public/assets/{HttpClientPage-qC_nBzq2.js → HttpClientPage-BjjoqX4k.js} +1 -1
- package/dist/dashboard/public/assets/{JobDetailView-B4A5Y2PM.js → JobDetailView-BkZzaTMf.js} +1 -1
- package/dist/dashboard/public/assets/{JobsPage-DyiOLpB1.js → JobsPage-C91EUJaf.js} +1 -1
- package/dist/dashboard/public/assets/{LogDetailView-DZyruHPx.js → LogDetailView-DFZNDmS1.js} +1 -1
- package/dist/dashboard/public/assets/{LogsPage-6dDP3Pu_.js → LogsPage-BoOB2OBf.js} +1 -1
- package/dist/dashboard/public/assets/{MailDetailView-CLhOX0PN.js → MailDetailView-BBVeJUQd.js} +1 -1
- package/dist/dashboard/public/assets/{MailPage-tBhdhWmz.js → MailPage-DZc4bMQs.js} +1 -1
- package/dist/dashboard/public/assets/{ModelDetailView-CVszB9Qw.js → ModelDetailView-D5dGSC3N.js} +1 -1
- package/dist/dashboard/public/assets/{ModelsPage-BTLkoWRR.js → ModelsPage-BLjVZHU6.js} +1 -1
- package/dist/dashboard/public/assets/{NotificationDetailView-CwpaMgGn.js → NotificationDetailView-2AbBjEYS.js} +1 -1
- package/dist/dashboard/public/assets/{NotificationsPage-BOPuEc8u.js → NotificationsPage-itJ9zwbx.js} +1 -1
- package/dist/dashboard/public/assets/{PageHeader-BQ2bLFIt.js → PageHeader-D6tK4KfC.js} +1 -1
- package/dist/dashboard/public/assets/{QueriesPage-Plp4pZSN.js → QueriesPage-CIyyc7KX.js} +1 -1
- package/dist/dashboard/public/assets/{QueryDetailView-B64qfjgM.js → QueryDetailView-BA3mGoug.js} +1 -1
- package/dist/dashboard/public/assets/{RedisDetailView-BJ2OaAFq.js → RedisDetailView-CkdXLdAC.js} +1 -1
- package/dist/dashboard/public/assets/{RedisPage-CS2bcK-q.js → RedisPage-SCnniVtj.js} +1 -1
- package/dist/dashboard/public/assets/{RequestDetailView-DtTVzNFt.js → RequestDetailView-DG6EGBEM.js} +1 -1
- package/dist/dashboard/public/assets/{RequestsPage-D9KghDZ-.js → RequestsPage-DCTATkVH.js} +1 -1
- package/dist/dashboard/public/assets/{ScheduleDetailView-D8WOTS8u.js → ScheduleDetailView-DG1DcaZ7.js} +1 -1
- package/dist/dashboard/public/assets/{SchedulePage-B3mUO2Ng.js → SchedulePage-BnANcfw7.js} +1 -1
- package/dist/dashboard/public/assets/{UserCard-B8lhlqKk.js → UserCard-CNVZ6J5d.js} +1 -1
- package/dist/dashboard/public/assets/{ViewDetailView-CUH2MA6k.js → ViewDetailView-DDTAXGx5.js} +1 -1
- package/dist/dashboard/public/assets/{ViewsPage-BhlcyTU3.js → ViewsPage-n225oIjy.js} +1 -1
- package/dist/dashboard/public/assets/{calendar-gUrKMEEq.js → calendar-kof3FJFK.js} +1 -1
- package/dist/dashboard/public/assets/{circle-alert-WNDYen0I.js → circle-alert-BwqdWTrp.js} +1 -1
- package/dist/dashboard/public/assets/{circle-check-big-B6oE8hF5.js → circle-check-big-AxG0GO0t.js} +1 -1
- package/dist/dashboard/public/assets/{circle-x-Ch0JMytg.js → circle-x-C7VSxDUA.js} +1 -1
- package/dist/dashboard/public/assets/{eye-DWj2WfH_.js → eye-PbOZKiAk.js} +1 -1
- package/dist/dashboard/public/assets/{index-B1QFrlfD.js → index-RTIFvTxK.js} +2 -2
- package/dist/dashboard/public/assets/{search-n3qpR8sp.js → search-BR0hqW8X.js} +1 -1
- package/dist/dashboard/public/assets/{send-DkLuIqBH.js → send-zuskvJ21.js} +1 -1
- package/dist/dashboard/public/assets/{timer-Dczpo1G1.js → timer-CbE3s2nJ.js} +1 -1
- package/dist/dashboard/public/assets/{types-DwzjtRI3.js → types-B9aISL8r.js} +1 -1
- package/dist/dashboard/public/assets/{users-D7CwV95U.js → users-BGDQIOU8.js} +1 -1
- package/dist/dashboard/public/assets/{zap-C7m34sPr.js → zap-CwXufZjZ.js} +1 -1
- package/dist/dashboard/public/index.html +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as M,j as a}from"./index-
|
|
1
|
+
import{c as M,j as a}from"./index-RTIFvTxK.js";import{e as Q,f as U,b as p}from"./vendor-DBTT3jXp.js";import{f as W,p as I}from"./badgeColors-DQ_P_DOX.js";import{E as O}from"./EntrySearchInput-CBsoywRC.js";import{u as $,P as z,N as V,L as J}from"./PageHeader-D6tK4KfC.js";import{u as K,s as X,C as x}from"./types-B9aISL8r.js";import{T as h,G as Y,N as Z,D as _,a as ee,b as ae}from"./DataTable-D_B9L2P1.js";import"./search-BR0hqW8X.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-
|
|
1
|
+
import{j as e}from"./index-RTIFvTxK.js";import{b as T}from"./vendor-DBTT3jXp.js";import{p as b,f as E}from"./badgeColors-DQ_P_DOX.js";import{D as s,f as N}from"./DetailRow-CTntOefv.js";import{C as i,B}from"./types-B9aISL8r.js";import{u as j,T as f,C as l}from"./EntryDetailPage-CCYipAPI.js";import"./search-BR0hqW8X.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};
|
package/dist/dashboard/public/assets/{HttpClientPage-qC_nBzq2.js → HttpClientPage-BjjoqX4k.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t,d as h}from"./index-
|
|
1
|
+
import{j as t,d as h}from"./index-RTIFvTxK.js";import{e as R,b as v}from"./vendor-DBTT3jXp.js";import{f as H,p as D}from"./badgeColors-DQ_P_DOX.js";import{u as F,P as M,N as A,L as B}from"./PageHeader-D6tK4KfC.js";import{u as L,j as S,C as l}from"./types-B9aISL8r.js";import{T as d,D as W,b as $}from"./DataTable-D_B9L2P1.js";function O(){const c=R(),{addFilter:s,clearAll:u,serverFilters:m,headerFilters:p,hasFilters:x}=L("http-client"),{entries:g,loading:y,refreshing:r,newEntriesCount:f,hasMore:C,loadMore:j,loadNew:k,autoRefreshEnabled:w,live:N,setAutoRefresh:E,meta:o,isHighlighted:b}=F({type:"http-client",limit:50,filters:m}),n=g.filter(e=>S(e)),P=v.useMemo(()=>[{key:"method",header:"Method",width:"90px",render:e=>t.jsx(l,{onClick:a=>{a.stopPropagation(),s("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(),s("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(),s("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(W,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(d,{secondary:!0,className:"text-xs",children:H(D(e.createdAt),{addSuffix:!0})})}],[s]);if(y&&n.length===0)return 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"})});const T=x?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(M,{title:"HTTP Client",icon:h,iconColor:"text-cyan-600 dark:text-cyan-400",count:n.length,totalCount:o==null?void 0:o.total,refreshing:r,autoRefreshEnabled:w,live:N,onAutoRefreshToggle:E,filters:p,onClearAllFilters:u}),t.jsxs("div",{className:`${T} space-y-4 transition-all duration-200`,children:[t.jsx(A,{count:f,onClick:k,loading:r}),t.jsx($,{columns:P,data:n,keyExtractor:e=>e.id,onRowClick:e=>c(`/http-client/${e.id}`),rowClassName:e=>b(e.id)?"highlight-new":"",emptyMessage:"No outgoing HTTP requests recorded yet",emptyIcon:t.jsx(h,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(B,{hasMore:C,onClick:j,loading:r})]})]})}export{O as default};
|
package/dist/dashboard/public/assets/{JobDetailView-B4A5Y2PM.js → JobDetailView-BkZzaTMf.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as k,C as h,i as j,j as e,B as n}from"./index-
|
|
1
|
+
import{c as k,C as h,i as j,j as e,B as n}from"./index-RTIFvTxK.js";import{b as w}from"./vendor-DBTT3jXp.js";import{p as m,f as C}from"./badgeColors-DQ_P_DOX.js";import{D as s,f as T}from"./DetailRow-CTntOefv.js";import{C as i}from"./types-B9aISL8r.js";import{u as b,C as p,T as D}from"./EntryDetailPage-CCYipAPI.js";import{C as S}from"./CopyButton-CrzxYi0-.js";import{C as y}from"./circle-alert-BwqdWTrp.js";import{C as B}from"./circle-check-big-AxG0GO0t.js";import"./search-BR0hqW8X.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 l}from"./index-
|
|
1
|
+
import{j as t,B as l}from"./index-RTIFvTxK.js";import{e as T,b as E}from"./vendor-DBTT3jXp.js";import{f as v,p as A}from"./badgeColors-DQ_P_DOX.js";import{u as D,P as B,N as F,L as M}from"./PageHeader-D6tK4KfC.js";import{u as P,e as R,C as o}from"./types-B9aISL8r.js";import{T as i,D as J,b as q}from"./DataTable-D_B9L2P1.js";function W(){const n=T(),{clearAll:d,serverFilters:u,headerFilters:c,hasFilters:h}=P("jobs"),{entries:p,loading:m,refreshing:a,newEntriesCount:x,hasMore:y,loadMore:f,loadNew:g,autoRefreshEnabled:j,live:b,setAutoRefresh:w,meta:s,isHighlighted:k}=D({type:"job",limit:50,filters:u}),r=p.filter(e=>R(e)),C=E.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(J,{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:v(A(e.createdAt),{addSuffix:!0})})}],[]);if(m&&r.length===0)return 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"})});const N=h?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(B,{title:"Jobs",icon:l,iconColor:"text-yellow-600 dark:text-yellow-400",count:r.length,totalCount:s==null?void 0:s.total,refreshing:a,autoRefreshEnabled:j,live:b,onAutoRefreshToggle:w,filters:c,onClearAllFilters:d}),t.jsxs("div",{className:`${N} space-y-4 transition-all duration-200`,children:[t.jsx(F,{count:x,onClick:g,loading:a}),t.jsx(q,{columns:C,data:r,keyExtractor:e=>e.id,onRowClick:e=>n(`/jobs/${e.id}`),rowClassName:e=>k(e.id)?"highlight-new":"",emptyMessage:"No jobs recorded yet",emptyIcon:t.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(M,{hasMore:y,onClick:f,loading:a})]})]})}export{W as default};
|
package/dist/dashboard/public/assets/{LogDetailView-DZyruHPx.js → LogDetailView-DFZNDmS1.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./index-
|
|
1
|
+
import{j as a}from"./index-RTIFvTxK.js";import{p as d,f as x}from"./badgeColors-DQ_P_DOX.js";import{D as s,f as m}from"./DetailRow-CTntOefv.js";import{C as o}from"./types-B9aISL8r.js";import{u as b,C as h,T as g}from"./EntryDetailPage-CCYipAPI.js";import"./vendor-DBTT3jXp.js";import"./search-BR0hqW8X.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 l}from"./index-
|
|
1
|
+
import{j as t,F as l}from"./index-RTIFvTxK.js";import{e as E,b as k}from"./vendor-DBTT3jXp.js";import{f as T,p as F}from"./badgeColors-DQ_P_DOX.js";import{u as L,P as M,N as A,L as P}from"./PageHeader-D6tK4KfC.js";import{u as R,c as B,C as i}from"./types-B9aISL8r.js";import{E as D}from"./EntrySearchInput-CBsoywRC.js";import{T as o,b as S}from"./DataTable-D_B9L2P1.js";import"./search-BR0hqW8X.js";function K(){const n=E(),{clearAll:d,serverFilters:c,headerFilters:g,hasFilters:m}=R("logs"),{entries:x,loading:h,refreshing:s,newEntriesCount:p,hasMore:u,loadMore:f,loadNew:y,autoRefreshEnabled:j,live:v,setAutoRefresh:C,meta:a,isHighlighted:N}=L({type:"log",limit:50,filters:c}),r=x.filter(e=>B(e)),b=k.useMemo(()=>[{key:"level",header:"Level",width:"100px",render:e=>t.jsx(i,{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(i,{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:T(F(e.createdAt),{addSuffix:!0})})}],[]);if(h&&r.length===0)return 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"})});const w=m?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(M,{title:"Logs",icon:l,iconColor:"text-green-600 dark:text-green-400",count:r.length,totalCount:a==null?void 0:a.total,refreshing:s,autoRefreshEnabled:j,live:v,onAutoRefreshToggle:C,filters:g,onClearAllFilters:d}),t.jsxs("div",{className:`${w} space-y-4 transition-all duration-200`,children:[t.jsx(D,{placeholder:"Search by message, level, context, tag, or content..."}),t.jsx(A,{count:p,onClick:y,loading:s}),t.jsx(S,{columns:b,data:r,keyExtractor:e=>e.id,onRowClick:e=>n(`/logs/${e.id}`),rowClassName:e=>N(e.id)?"highlight-new":"",emptyMessage:"No logs recorded yet",emptyIcon:t.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(P,{hasMore:u,onClick:f,loading:s})]})]})}export{K as default};
|
package/dist/dashboard/public/assets/{MailDetailView-CLhOX0PN.js → MailDetailView-BBVeJUQd.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as Un,j as i,M as Ht,C as Fn}from"./index-
|
|
1
|
+
import{c as Un,j as i,M as Ht,C as Fn}from"./index-RTIFvTxK.js";import{C as zn,B as Hn}from"./types-B9aISL8r.js";import{p as Gt,f as Gn}from"./badgeColors-DQ_P_DOX.js";import{D as B,f as Bn}from"./DetailRow-CTntOefv.js";import{T as Wn}from"./EntryDetailPage-CCYipAPI.js";import{C as be}from"./CopyButton-CrzxYi0-.js";import{C as $n}from"./circle-x-C7VSxDUA.js";import{C as Yn}from"./circle-check-big-AxG0GO0t.js";import{U as Xn}from"./users-BGDQIOU8.js";import{C as Vn}from"./circle-alert-BwqdWTrp.js";import"./vendor-DBTT3jXp.js";import"./search-BR0hqW8X.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 u}from"./index-
|
|
1
|
+
import{j as t,M as u}from"./index-RTIFvTxK.js";import{e as D,b as c}from"./vendor-DBTT3jXp.js";import{f as F,p as P}from"./badgeColors-DQ_P_DOX.js";import{u as R,P as L,N as S,L as W}from"./PageHeader-D6tK4KfC.js";import{u as $,g as B,C as H}from"./types-B9aISL8r.js";import{T as l,D as q,a as I,b as z}from"./DataTable-D_B9L2P1.js";const G=["sent","failed","pending","queued","error"];function X(){const h=D(),{addFilter:o,clearAll:m,serverFilters:g,headerFilters:p,hasFilters:x}=$("mail"),{entries:f,loading:y,refreshing:r,newEntriesCount:j,hasMore:b,loadMore:k,loadNew:C,autoRefreshEnabled:w,live:T,setAutoRefresh:N,meta:s,isHighlighted:E}=R({type:"mail",limit:50,filters:g}),i=f.filter(e=>B(e)),d=c.useCallback(e=>{const a=Array.isArray(e)?e:[e];return a.length===1?a[0]:`${a[0]} +${a.length-1}`},[]),M=c.useMemo(()=>[{key:"status",header:"Status",width:"80px",render:e=>t.jsx(H,{listType:"mail",filterType:"statuses",children:e.payload.status})},{key:"subject",header:"Subject",minWidth:"250px",render:e=>t.jsx(l,{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(l,{mono:!0,secondary:!0,truncate:!0,maxWidth:"180px",children:d(e.payload.to)})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(q,{ms:e.payload.duration||0})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>{const a=(e.tags??[]).filter(n=>!G.includes(n.toLowerCase()));return t.jsx(I,{tags:a,max:3,onTagClick:(n,A)=>{A.stopPropagation(),o("tags",n)}})}},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(l,{secondary:!0,className:"text-xs",children:F(P(e.createdAt),{addSuffix:!0})})}],[o,d]);if(y&&i.length===0)return 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"})});const v=x?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(L,{title:"Mail",icon:u,iconColor:"text-pink-600 dark:text-pink-400",count:i.length,totalCount:s==null?void 0:s.total,refreshing:r,autoRefreshEnabled:w,live:T,onAutoRefreshToggle:N,filters:p,onClearAllFilters:m}),t.jsxs("div",{className:`${v} space-y-4 transition-all duration-200`,children:[t.jsx(S,{count:j,onClick:C,loading:r}),t.jsx(z,{columns:M,data:i,keyExtractor:e=>e.id,onRowClick:e=>h(`/mail/${e.id}`),rowClassName:e=>E(e.id)?"highlight-new":"",emptyMessage:"No emails recorded yet",emptyIcon:t.jsx(u,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(W,{hasMore:b,onClick:k,loading:r})]})]})}export{X as default};
|
package/dist/dashboard/public/assets/{ModelDetailView-CVszB9Qw.js → ModelDetailView-D5dGSC3N.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,b as o,F as b,C as g,D as u}from"./index-
|
|
1
|
+
import{j as e,b as o,F as b,C as g,D as u}from"./index-RTIFvTxK.js";import{b as y}from"./vendor-DBTT3jXp.js";import{p as x,f}from"./badgeColors-DQ_P_DOX.js";import{D as s,f as v}from"./DetailRow-CTntOefv.js";import{C as l}from"./types-B9aISL8r.js";import{u as n,C as m,T as N}from"./EntryDetailPage-CCYipAPI.js";import{C as k}from"./CopyButton-CrzxYi0-.js";import{C as w}from"./circle-x-C7VSxDUA.js";import"./search-BR0hqW8X.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,b as d}from"./index-
|
|
1
|
+
import{j as t,b as d}from"./index-RTIFvTxK.js";import{e as P,b as A}from"./vendor-DBTT3jXp.js";import{f as D,p as F}from"./badgeColors-DQ_P_DOX.js";import{u as R,P as T,N as B,L}from"./PageHeader-D6tK4KfC.js";import{u as H,l as S,C as l}from"./types-B9aISL8r.js";import{T as o,D as $,b as I}from"./DataTable-D_B9L2P1.js";function O(){const c=P(),{addFilter:r,clearAll:u,serverFilters:p,headerFilters:h,hasFilters:x}=H("models"),{entries:m,loading:g,refreshing:s,newEntriesCount:y,hasMore:f,loadMore:j,loadNew:C,autoRefreshEnabled:k,live:w,setAutoRefresh:N,meta:i,isHighlighted:b}=R({type:"model",limit:50,filters:p}),n=m.filter(e=>S(e)),E=A.useMemo(()=>[{key:"action",header:"Action",width:"120px",render:e=>t.jsx(l,{onClick:a=>{a.stopPropagation(),r("actions",e.payload.action)},children:e.payload.action.toUpperCase()})},{key:"entity",header:"Entity",width:"150px",render:e=>t.jsx(l,{onClick:a=>{a.stopPropagation(),r("entities",e.payload.entity)},className:"font-mono",children:e.payload.entity})},{key:"source",header:"Source",width:"150px",render:e=>{const a=e.payload.source;return a?t.jsx(l,{onClick:M=>{M.stopPropagation(),r("sources",a)},className:"font-mono text-xs",children:a}):t.jsx(o,{secondary:!0,children:"-"})}},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx($,{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(F(e.createdAt),{addSuffix:!0})})}],[r]);if(g&&n.length===0)return 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"})});const v=x?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(T,{title:"Models",icon:d,iconColor:"text-purple-600 dark:text-purple-400",count:n.length,totalCount:i==null?void 0:i.total,refreshing:s,autoRefreshEnabled:k,live:w,onAutoRefreshToggle:N,filters:h,onClearAllFilters:u}),t.jsxs("div",{className:`${v} space-y-4 transition-all duration-200`,children:[t.jsx(B,{count:y,onClick:C,loading:s}),t.jsx(I,{columns:E,data:n,keyExtractor:e=>e.id,onRowClick:e=>c(`/models/${e.id}`),rowClassName:e=>b(e.id)?"highlight-new":"",emptyMessage:"No model events recorded yet",emptyIcon:t.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(L,{hasMore:f,onClick:j,loading:s})]})]})}export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,e as c,C as j}from"./index-
|
|
1
|
+
import{j as e,e as c,C as j}from"./index-RTIFvTxK.js";import{p as x,f as y}from"./badgeColors-DQ_P_DOX.js";import{D as s,f as b}from"./DetailRow-CTntOefv.js";import{C as n}from"./types-B9aISL8r.js";import{u as N,C as f,T as u}from"./EntryDetailPage-CCYipAPI.js";import{C as v}from"./CopyButton-CrzxYi0-.js";import{C as k}from"./circle-check-big-AxG0GO0t.js";import{C as o}from"./circle-x-C7VSxDUA.js";import{S as w}from"./send-zuskvJ21.js";import"./vendor-DBTT3jXp.js";import"./search-BR0hqW8X.js";function I({entry:m}){const{payload:a,createdAt:l}=m,i=N(),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(f,{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};
|
package/dist/dashboard/public/assets/{NotificationsPage-BOPuEc8u.js → NotificationsPage-itJ9zwbx.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t,e as l}from"./index-
|
|
1
|
+
import{j as t,e as l}from"./index-RTIFvTxK.js";import{e as T,b as P}from"./vendor-DBTT3jXp.js";import{f as D,p as F}from"./badgeColors-DQ_P_DOX.js";import{u as R,P as A,N as M,L as B}from"./PageHeader-D6tK4KfC.js";import{u as W,m as L,C as d}from"./types-B9aISL8r.js";import{T as a,D as H,b as S}from"./DataTable-D_B9L2P1.js";function J(){const c=T(),{addFilter:i,clearAll:p,serverFilters:u,headerFilters:h,hasFilters:x}=W("notifications"),{entries:m,loading:g,refreshing:r,newEntriesCount:f,hasMore:y,loadMore:j,loadNew:C,autoRefreshEnabled:k,live:N,setAutoRefresh:w,meta:s,isHighlighted:b}=R({type:"notification",limit:50,filters:u}),o=m.filter(e=>L(e)),E=P.useMemo(()=>[{key:"type",header:"Type",width:"150px",render:e=>t.jsx(d,{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(d,{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(H,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(a,{secondary:!0,className:"text-xs",children:D(F(e.createdAt),{addSuffix:!0})})}],[i]);if(g&&o.length===0)return 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"})});const v=x?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(A,{title:"Notifications",icon:l,iconColor:"text-indigo-600 dark:text-indigo-400",count:o.length,totalCount:s==null?void 0:s.total,refreshing:r,autoRefreshEnabled:k,live:N,onAutoRefreshToggle:w,filters:h,onClearAllFilters:p}),t.jsxs("div",{className:`${v} space-y-4 transition-all duration-200`,children:[t.jsx(M,{count:f,onClick:C,loading:r}),t.jsx(S,{columns:E,data:o,keyExtractor:e=>e.id,onRowClick:e=>c(`/notifications/${e.id}`),rowClassName:e=>b(e.id)?"highlight-new":"",emptyMessage:"No notifications recorded yet",emptyIcon:t.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(B,{hasMore:y,onClick:j,loading:r})]})]})}export{J as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a}from"./vendor-DBTT3jXp.js";import{p as ae,z as O,m as F,q as se,s as U,j as r,i as H,e as ne,t as ce,X as le}from"./index-B1QFrlfD.js";function ie(){return ae("/stream")}function oe(s,t=!0){const n=a.useRef(s),[i,u]=a.useState(!1);return a.useEffect(()=>{n.current=s},[s]),a.useEffect(()=>{if(!t||typeof EventSource>"u")return;const l=new EventSource(ie(),{withCredentials:!0}),p=g=>{try{n.current(JSON.parse(g.data))}catch{}};return l.addEventListener("entry",p),l.onopen=()=>u(!0),l.onerror=()=>u(!1),()=>{l.removeEventListener("entry",p),l.close(),u(!1)}},[t]),{connected:i}}function D(s){return s==null?"":typeof s!="object"?String(s):Array.isArray(s)?"["+s.map(D).join(",")+"]":"{"+Object.keys(s).sort().map(n=>`"${n}":${D(s[n])}`).join(",")+"}"}const P="nestlens-auto-refresh";function de(){try{const s=localStorage.getItem(P);return s===null?!0:s==="true"}catch{return!0}}function ue(s){try{localStorage.setItem(P,String(s))}catch{}}function me(s={}){const{type:t,limit:n=50,autoRefresh:i,autoRefreshInterval:u=5e3,filters:l}=s,p=D(l),g=`${t}|${n}|${p}`,[$,f]=a.useState([]),[j,q]=a.useState(null),[S,h]=a.useState(!1),[L,k]=a.useState(null),[x,v]=a.useState(null),[E,o]=a.useState(0),[m,w]=a.useState(i??de()),d=a.useRef(null),R=a.useRef(null),_=a.useRef(!0),z=j===null&&L===null,G=S||j!==null&&j!==g,J=a.useRef(p),C=a.useRef(new Map),[,W]=a.useState(0),T=1e4,K=a.useCallback(e=>{f(e.data),v(e.meta),d.current=e.meta.newestSequence,o(0),k(null),_.current=!1,J.current=p,q(g)},[p,g]),B=a.useCallback(e=>{const c=e instanceof Error?e:new Error("Failed to fetch entries");k(c),console.error("Failed to fetch entries:",e),O.error("Failed to load entries"),q(g)},[g]),X=a.useCallback(async()=>{if(!(!(x!=null&&x.oldestSequence)||!x.hasMore)){h(!0);try{const e=await F({type:t,limit:n,beforeSequence:x.oldestSequence,filters:l});f(c=>[...c,...e.data]),v(e.meta)}catch(e){console.error("Failed to load more entries:",e),O.error("Failed to load more entries")}finally{h(!1)}}},[t,n,x,l]),Y=a.useCallback(async()=>{if(d.current){h(!0);try{const e=await F({type:t,limit:E||n,afterSequence:d.current,filters:l});if(e.data.length>0){const c=Date.now();e.data.forEach(y=>{C.current.set(y.id,c)}),f(y=>[...e.data,...y]),d.current=e.meta.newestSequence,o(0)}}catch(e){console.error("Failed to load new entries:",e),O.error("Failed to load new entries")}finally{h(!1)}}},[t,n,E,l]),Q=a.useCallback(async()=>{h(!0);try{k(null);const e=await F({type:t,limit:n,filters:l});f(e.data),v(e.meta),d.current=e.meta.newestSequence,o(0)}catch(e){const c=e instanceof Error?e:new Error("Failed to refresh entries");k(c),console.error("Failed to refresh entries:",e),O.error("Failed to refresh entries")}finally{h(!1)}},[t,n,l]),A=a.useCallback(async()=>{if(!d.current){try{(await se(t)).data&&o(1)}catch{}return}try{const e=await U(d.current,t);o(e.data.count)}catch{}},[t]),V=a.useCallback(e=>{w(e),ue(e)},[]),Z=a.useCallback(e=>{f(c=>c.map(y=>y.id===e.id?e:y))},[]);a.useEffect(()=>{F({type:t,limit:n,filters:l}).then(K,B)},[t,n,l,K,B]);const ee=a.useCallback(e=>{const c=C.current.get(e);return c?Date.now()-c<T:!1},[]),M=a.useCallback(()=>{const e=Date.now();let c=!1;C.current.forEach((y,b)=>{e-y>=T&&(C.current.delete(b),c=!0)}),c&&W(y=>y+1)},[]),I=a.useCallback(async()=>{if(d.current)try{const e=await U(d.current,t);if(e.data.count>0){const c=await F({type:t,limit:e.data.count,afterSequence:d.current,filters:l});if(c.data.length>0){const y=Date.now();c.data.forEach(b=>{C.current.set(b.id,y)}),f(b=>[...c.data,...b]),d.current=c.meta.newestSequence,v(b=>b?{...b,total:b.total+c.data.length,newestSequence:c.meta.newestSequence}:c.meta)}}}catch{}},[t,l]);a.useEffect(()=>(m?R.current=setInterval(I,u):R.current=setInterval(A,u),()=>{R.current&&(clearInterval(R.current),R.current=null)}),[m,u,I,A]),a.useEffect(()=>{const e=setInterval(M,1e3);return()=>clearInterval(e)},[M]);const N=a.useRef(null),re=a.useCallback(e=>{t&&e.type!==t||N.current||(N.current=setTimeout(()=>{N.current=null,m?I():A()},200))},[t,m,I,A]),{connected:te}=oe(re);return a.useEffect(()=>()=>{N.current&&(clearTimeout(N.current),N.current=null)},[]),{entries:$,loading:z,refreshing:G,error:L,meta:x,newEntriesCount:E,hasMore:(x==null?void 0:x.hasMore)??!1,loadMore:X,loadNew:Y,refresh:Q,setAutoRefresh:V,autoRefreshEnabled:m,updateEntry:Z,isHighlighted:ee,live:te}}function ye({count:s,onClick:t,loading:n}){return s===0?null:r.jsxs("button",{onClick:t,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?r.jsx(H,{className:"h-4 w-4 animate-spin"}):r.jsx(ne,{className:"h-4 w-4"}),r.jsxs("span",{children:["Load ",s," new ",s===1?"entry":"entries"]})]})}function fe({hasMore:s,onClick:t,loading:n}){return s?r.jsxs("button",{onClick:t,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?r.jsx(H,{className:"h-4 w-4 animate-spin"}):r.jsx(ce,{className:"h-4 w-4"}),r.jsx("span",{children:"Load older entries"})]}):null}function pe({title:s,icon:t,iconColor:n="text-primary-600 dark:text-primary-400",count:i,totalCount:u,subtitle:l,loading:p,refreshing:g,onRefresh:$,autoRefreshEnabled:f,onAutoRefreshToggle:j,live:q,filters:S=[],onClearAllFilters:h,actions:L,filterControls:k}){const x=S.length>0,v=i??u,E=S.reduce((o,m)=>(o[m.category]||(o[m.category]=[]),o[m.category].push(m),o),{});return r.jsxs("div",{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:[r.jsxs("div",{className:"h-16 px-4 lg:px-6 flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("div",{className:"hidden sm:flex p-2 rounded-lg bg-gray-100 dark:bg-gray-800",children:r.jsx(t,{className:`h-5 w-5 ${n}`})}),r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white",children:s}),v!==void 0&&r.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:[v.toLocaleString(),u!==void 0&&i!==void 0&&i!==u&&r.jsxs("span",{className:"text-gray-400 dark:text-gray-500 ml-1",children:["/ ",u.toLocaleString()]})]}),l&&r.jsx("span",{className:"hidden md:inline text-sm text-gray-500 dark:text-gray-400",children:l})]})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[L,q&&r.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:[r.jsx("span",{className:"w-2 h-2 rounded-full bg-red-500 animate-pulse"}),r.jsx("span",{children:"Live"})]}),j&&r.jsxs("button",{onClick:()=>j(!f),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 ${f?"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:f?"Auto-refresh enabled":"Auto-refresh disabled",children:[r.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${f?"bg-green-500 animate-pulse":"bg-gray-400"}`}),r.jsx("span",{children:"Auto Refresh"})]}),$&&r.jsx("button",{onClick:$,disabled:!!p||!!g,"aria-busy":g,"aria-label":g?"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:r.jsx(H,{className:`h-4 w-4 ${g?"animate-spin":""}`})})]})]}),k&&r.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:k}),x&&r.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:r.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[r.jsx("span",{className:"text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider mr-1",children:"Filters:"}),Object.entries(E).map(([o,m])=>r.jsxs("div",{className:"flex items-center space-x-1",children:[r.jsxs("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:[o,":"]}),m.map((w,d)=>r.jsxs("button",{onClick:w.onRemove,"aria-label":`Remove ${o} filter: ${w.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:[r.jsx("span",{children:w.value}),r.jsx(le,{className:"h-3 w-3 opacity-60 group-hover:opacity-100"})]},`${w.category}-${w.value}-${d}`))]},o)),h&&S.length>1&&r.jsx("button",{onClick:h,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"})]})})]})}function he({tabs:s,activeTab:t,onChange:n}){return r.jsx("div",{className:"flex items-center space-x-1",children:s.map(i=>r.jsxs("button",{onClick:()=>n(i.id),className:`px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${t===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&&r.jsx("span",{className:`ml-1.5 text-xs ${t===i.id?"text-primary-600 dark:text-primary-400":"text-gray-400 dark:text-gray-500"}`,children:i.count})]},i.id))})}function be({label:s,enabled:t,onChange:n,icon:i}){return r.jsxs("button",{onClick:()=>n(!t),className:`flex items-center space-x-2 px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${t?"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&&r.jsx(i,{className:"h-4 w-4"}),r.jsx("span",{children:s})]})}export{he as F,fe as L,ye as N,pe as P,be as T,me as u};
|
|
1
|
+
import{b as a}from"./vendor-DBTT3jXp.js";import{p as ae,z as O,m as F,q as se,s as U,j as r,i as H,e as ne,t as ce,X as le}from"./index-RTIFvTxK.js";function ie(){return ae("/stream")}function oe(s,t=!0){const n=a.useRef(s),[i,u]=a.useState(!1);return a.useEffect(()=>{n.current=s},[s]),a.useEffect(()=>{if(!t||typeof EventSource>"u")return;const l=new EventSource(ie(),{withCredentials:!0}),p=g=>{try{n.current(JSON.parse(g.data))}catch{}};return l.addEventListener("entry",p),l.onopen=()=>u(!0),l.onerror=()=>u(!1),()=>{l.removeEventListener("entry",p),l.close(),u(!1)}},[t]),{connected:i}}function D(s){return s==null?"":typeof s!="object"?String(s):Array.isArray(s)?"["+s.map(D).join(",")+"]":"{"+Object.keys(s).sort().map(n=>`"${n}":${D(s[n])}`).join(",")+"}"}const P="nestlens-auto-refresh";function de(){try{const s=localStorage.getItem(P);return s===null?!0:s==="true"}catch{return!0}}function ue(s){try{localStorage.setItem(P,String(s))}catch{}}function me(s={}){const{type:t,limit:n=50,autoRefresh:i,autoRefreshInterval:u=5e3,filters:l}=s,p=D(l),g=`${t}|${n}|${p}`,[$,f]=a.useState([]),[j,q]=a.useState(null),[S,h]=a.useState(!1),[L,k]=a.useState(null),[x,v]=a.useState(null),[E,o]=a.useState(0),[m,w]=a.useState(i??de()),d=a.useRef(null),R=a.useRef(null),_=a.useRef(!0),z=j===null&&L===null,G=S||j!==null&&j!==g,J=a.useRef(p),C=a.useRef(new Map),[,W]=a.useState(0),T=1e4,K=a.useCallback(e=>{f(e.data),v(e.meta),d.current=e.meta.newestSequence,o(0),k(null),_.current=!1,J.current=p,q(g)},[p,g]),B=a.useCallback(e=>{const c=e instanceof Error?e:new Error("Failed to fetch entries");k(c),console.error("Failed to fetch entries:",e),O.error("Failed to load entries"),q(g)},[g]),X=a.useCallback(async()=>{if(!(!(x!=null&&x.oldestSequence)||!x.hasMore)){h(!0);try{const e=await F({type:t,limit:n,beforeSequence:x.oldestSequence,filters:l});f(c=>[...c,...e.data]),v(e.meta)}catch(e){console.error("Failed to load more entries:",e),O.error("Failed to load more entries")}finally{h(!1)}}},[t,n,x,l]),Y=a.useCallback(async()=>{if(d.current){h(!0);try{const e=await F({type:t,limit:E||n,afterSequence:d.current,filters:l});if(e.data.length>0){const c=Date.now();e.data.forEach(y=>{C.current.set(y.id,c)}),f(y=>[...e.data,...y]),d.current=e.meta.newestSequence,o(0)}}catch(e){console.error("Failed to load new entries:",e),O.error("Failed to load new entries")}finally{h(!1)}}},[t,n,E,l]),Q=a.useCallback(async()=>{h(!0);try{k(null);const e=await F({type:t,limit:n,filters:l});f(e.data),v(e.meta),d.current=e.meta.newestSequence,o(0)}catch(e){const c=e instanceof Error?e:new Error("Failed to refresh entries");k(c),console.error("Failed to refresh entries:",e),O.error("Failed to refresh entries")}finally{h(!1)}},[t,n,l]),A=a.useCallback(async()=>{if(!d.current){try{(await se(t)).data&&o(1)}catch{}return}try{const e=await U(d.current,t);o(e.data.count)}catch{}},[t]),V=a.useCallback(e=>{w(e),ue(e)},[]),Z=a.useCallback(e=>{f(c=>c.map(y=>y.id===e.id?e:y))},[]);a.useEffect(()=>{F({type:t,limit:n,filters:l}).then(K,B)},[t,n,l,K,B]);const ee=a.useCallback(e=>{const c=C.current.get(e);return c?Date.now()-c<T:!1},[]),M=a.useCallback(()=>{const e=Date.now();let c=!1;C.current.forEach((y,b)=>{e-y>=T&&(C.current.delete(b),c=!0)}),c&&W(y=>y+1)},[]),I=a.useCallback(async()=>{if(d.current)try{const e=await U(d.current,t);if(e.data.count>0){const c=await F({type:t,limit:e.data.count,afterSequence:d.current,filters:l});if(c.data.length>0){const y=Date.now();c.data.forEach(b=>{C.current.set(b.id,y)}),f(b=>[...c.data,...b]),d.current=c.meta.newestSequence,v(b=>b?{...b,total:b.total+c.data.length,newestSequence:c.meta.newestSequence}:c.meta)}}}catch{}},[t,l]);a.useEffect(()=>(m?R.current=setInterval(I,u):R.current=setInterval(A,u),()=>{R.current&&(clearInterval(R.current),R.current=null)}),[m,u,I,A]),a.useEffect(()=>{const e=setInterval(M,1e3);return()=>clearInterval(e)},[M]);const N=a.useRef(null),re=a.useCallback(e=>{t&&e.type!==t||N.current||(N.current=setTimeout(()=>{N.current=null,m?I():A()},200))},[t,m,I,A]),{connected:te}=oe(re);return a.useEffect(()=>()=>{N.current&&(clearTimeout(N.current),N.current=null)},[]),{entries:$,loading:z,refreshing:G,error:L,meta:x,newEntriesCount:E,hasMore:(x==null?void 0:x.hasMore)??!1,loadMore:X,loadNew:Y,refresh:Q,setAutoRefresh:V,autoRefreshEnabled:m,updateEntry:Z,isHighlighted:ee,live:te}}function ye({count:s,onClick:t,loading:n}){return s===0?null:r.jsxs("button",{onClick:t,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?r.jsx(H,{className:"h-4 w-4 animate-spin"}):r.jsx(ne,{className:"h-4 w-4"}),r.jsxs("span",{children:["Load ",s," new ",s===1?"entry":"entries"]})]})}function fe({hasMore:s,onClick:t,loading:n}){return s?r.jsxs("button",{onClick:t,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?r.jsx(H,{className:"h-4 w-4 animate-spin"}):r.jsx(ce,{className:"h-4 w-4"}),r.jsx("span",{children:"Load older entries"})]}):null}function pe({title:s,icon:t,iconColor:n="text-primary-600 dark:text-primary-400",count:i,totalCount:u,subtitle:l,loading:p,refreshing:g,onRefresh:$,autoRefreshEnabled:f,onAutoRefreshToggle:j,live:q,filters:S=[],onClearAllFilters:h,actions:L,filterControls:k}){const x=S.length>0,v=i??u,E=S.reduce((o,m)=>(o[m.category]||(o[m.category]=[]),o[m.category].push(m),o),{});return r.jsxs("div",{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:[r.jsxs("div",{className:"h-16 px-4 lg:px-6 flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("div",{className:"hidden sm:flex p-2 rounded-lg bg-gray-100 dark:bg-gray-800",children:r.jsx(t,{className:`h-5 w-5 ${n}`})}),r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white",children:s}),v!==void 0&&r.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:[v.toLocaleString(),u!==void 0&&i!==void 0&&i!==u&&r.jsxs("span",{className:"text-gray-400 dark:text-gray-500 ml-1",children:["/ ",u.toLocaleString()]})]}),l&&r.jsx("span",{className:"hidden md:inline text-sm text-gray-500 dark:text-gray-400",children:l})]})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[L,q&&r.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:[r.jsx("span",{className:"w-2 h-2 rounded-full bg-red-500 animate-pulse"}),r.jsx("span",{children:"Live"})]}),j&&r.jsxs("button",{onClick:()=>j(!f),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 ${f?"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:f?"Auto-refresh enabled":"Auto-refresh disabled",children:[r.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${f?"bg-green-500 animate-pulse":"bg-gray-400"}`}),r.jsx("span",{children:"Auto Refresh"})]}),$&&r.jsx("button",{onClick:$,disabled:!!p||!!g,"aria-busy":g,"aria-label":g?"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:r.jsx(H,{className:`h-4 w-4 ${g?"animate-spin":""}`})})]})]}),k&&r.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:k}),x&&r.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:r.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[r.jsx("span",{className:"text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider mr-1",children:"Filters:"}),Object.entries(E).map(([o,m])=>r.jsxs("div",{className:"flex items-center space-x-1",children:[r.jsxs("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:[o,":"]}),m.map((w,d)=>r.jsxs("button",{onClick:w.onRemove,"aria-label":`Remove ${o} filter: ${w.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:[r.jsx("span",{children:w.value}),r.jsx(le,{className:"h-3 w-3 opacity-60 group-hover:opacity-100"})]},`${w.category}-${w.value}-${d}`))]},o)),h&&S.length>1&&r.jsx("button",{onClick:h,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"})]})})]})}function he({tabs:s,activeTab:t,onChange:n}){return r.jsx("div",{className:"flex items-center space-x-1",children:s.map(i=>r.jsxs("button",{onClick:()=>n(i.id),className:`px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${t===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&&r.jsx("span",{className:`ml-1.5 text-xs ${t===i.id?"text-primary-600 dark:text-primary-400":"text-gray-400 dark:text-gray-500"}`,children:i.count})]},i.id))})}function be({label:s,enabled:t,onChange:n,icon:i}){return r.jsxs("button",{onClick:()=>n(!t),className:`flex items-center space-x-2 px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${t?"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&&r.jsx(i,{className:"h-4 w-4"}),r.jsx("span",{children:s})]})}export{he as F,fe as L,ye as N,pe as P,be as T,me as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a,D as n}from"./index-
|
|
1
|
+
import{j as a,D as n}from"./index-RTIFvTxK.js";import{e as A,b as d}from"./vendor-DBTT3jXp.js";import{f as M,p as Q}from"./badgeColors-DQ_P_DOX.js";import{u as R,P as B,T as O,N as W,L as H}from"./PageHeader-D6tK4KfC.js";import{u as I,a as Z,C as $}from"./types-B9aISL8r.js";import{E as z}from"./EntrySearchInput-CBsoywRC.js";import{T as u,D as G,a as J,b as K}from"./DataTable-D_B9L2P1.js";import{Z as c}from"./zap-CwXufZjZ.js";import"./search-BR0hqW8X.js";function te(){const h=A(),[i,p]=d.useState(!1),{addFilter:l,clearAll:m,serverFilters:x,headerFilters:g,hasFilters:y}=I("queries"),f={...x,slow:i?!0:void 0},{entries:w,loading:j,refreshing:s,newEntriesCount:b,hasMore:C,loadMore:k,loadNew:T,autoRefreshEnabled:N,live:v,setAutoRefresh:E,meta:r,isHighlighted:S}=R({type:"query",limit:50,filters:f}),t=w.filter(e=>Z(e)),q=d.useMemo(()=>[{key:"source",header:"Source",width:"120px",render:e=>a.jsx($,{listType:"queries",filterType:"sources",children:e.payload.source||"unknown"})},{key:"query",header:"Query",minWidth:"300px",render:e=>a.jsxs("div",{className:"flex items-start space-x-2",children:[e.payload.slow&&a.jsx(c,{className:"h-4 w-4 text-yellow-500 flex-shrink-0 mt-0.5"}),a.jsx(u,{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=>a.jsx(G,{ms:e.payload.duration||0,slowThreshold:e.payload.slow?0:1e3})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>{const F=(e.payload.source||"unknown").toLowerCase(),L=(e.tags??[]).filter(o=>o.toLowerCase()!==F);return a.jsx(J,{tags:L,max:3,onTagClick:(o,P)=>{P.stopPropagation(),l("tags",o)}})}},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(u,{secondary:!0,className:"text-xs",children:M(Q(e.createdAt),{addSuffix:!0})})}],[l]);if(j&&t.length===0)return 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"})});const D=y?"pt-28":"pt-16";return a.jsxs("div",{children:[a.jsx(B,{title:"Queries",icon:n,iconColor:"text-purple-600 dark:text-purple-400",count:t.length,totalCount:r==null?void 0:r.total,refreshing:s,autoRefreshEnabled:N,live:v,onAutoRefreshToggle:E,filters:g,onClearAllFilters:m,actions:a.jsx(O,{label:"Slow Only",enabled:i,onChange:p,icon:c})}),a.jsxs("div",{className:`${D} space-y-4 transition-all duration-200`,children:[a.jsx(z,{placeholder:"Search by SQL, table, source, tag, or content..."}),a.jsx(W,{count:b,onClick:T,loading:s}),a.jsx(K,{columns:q,data:t,keyExtractor:e=>e.id,onRowClick:e=>h(`/queries/${e.id}`),rowClassName:e=>S(e.id)?"highlight-new":"",emptyMessage:"No queries recorded yet",emptyIcon:a.jsx(n,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(H,{hasMore:C,onClick:k,loading:s})]})]})}export{te as default};
|
package/dist/dashboard/public/assets/{QueryDetailView-B64qfjgM.js → QueryDetailView-BA3mGoug.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as RT,j as r,z as UE}from"./index-
|
|
1
|
+
import{c as RT,j as r,z as UE}from"./index-RTIFvTxK.js";import{p as oE,f as PT}from"./badgeColors-DQ_P_DOX.js";import{D as K,f as nT}from"./DetailRow-CTntOefv.js";import{C as GE}from"./types-B9aISL8r.js";import{g as iT,b as g}from"./vendor-DBTT3jXp.js";import{a as MT,b as UT}from"./EntryDetailPage-CCYipAPI.js";import"./search-BR0hqW8X.js";/**
|
|
2
2
|
* @license lucide-react v0.468.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
package/dist/dashboard/public/assets/{RedisDetailView-BJ2OaAFq.js → RedisDetailView-CkdXLdAC.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,D as u,a as f,C as y}from"./index-
|
|
1
|
+
import{j as e,D as u,a as f,C as y}from"./index-RTIFvTxK.js";import{b as N}from"./vendor-DBTT3jXp.js";import{p as o,f as v}from"./badgeColors-DQ_P_DOX.js";import{D as a,f as k}from"./DetailRow-CTntOefv.js";import{C as n}from"./types-B9aISL8r.js";import{u as x,C as m,T as C}from"./EntryDetailPage-CCYipAPI.js";import{C as w}from"./CopyButton-CrzxYi0-.js";import{C as T}from"./circle-check-big-AxG0GO0t.js";import{C as g}from"./circle-x-C7VSxDUA.js";import"./search-BR0hqW8X.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 d}from"./index-
|
|
1
|
+
import{j as a,D as d}from"./index-RTIFvTxK.js";import{e as R,b as v}from"./vendor-DBTT3jXp.js";import{f as D,p as F}from"./badgeColors-DQ_P_DOX.js";import{u as T,P as A,N as M,L as B}from"./PageHeader-D6tK4KfC.js";import{u as L,k as H,C as l}from"./types-B9aISL8r.js";import{T as n,D as S,b as W}from"./DataTable-D_B9L2P1.js";function G(){const c=R(),{addFilter:t,clearAll:m,serverFilters:u,headerFilters:h,hasFilters:p}=L("redis"),{entries:x,loading:g,refreshing:r,newEntriesCount:y,hasMore:f,loadMore:j,loadNew:k,autoRefreshEnabled:C,live:w,setAutoRefresh:N,meta:s,isHighlighted:b}=T({type:"redis",limit:50,filters:u}),o=x.filter(e=>H(e)),P=v.useMemo(()=>[{key:"command",header:"Command",width:"120px",render:e=>a.jsx(l,{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(S,{ms:e.payload.duration||0})},{key:"status",header:"Status",width:"100px",render:e=>a.jsx(l,{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:D(F(e.createdAt),{addSuffix:!0})})}],[t]);if(g&&o.length===0)return 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"})});const E=p?"pt-28":"pt-16";return a.jsxs("div",{children:[a.jsx(A,{title:"Redis",icon:d,iconColor:"text-red-600 dark:text-red-400",count:o.length,totalCount:s==null?void 0:s.total,refreshing:r,autoRefreshEnabled:C,live:w,onAutoRefreshToggle:N,filters:h,onClearAllFilters:m}),a.jsxs("div",{className:`${E} space-y-4 transition-all duration-200`,children:[a.jsx(M,{count:y,onClick:k,loading:r}),a.jsx(W,{columns:P,data:o,keyExtractor:e=>e.id,onRowClick:e=>c(`/redis/${e.id}`),rowClassName:e=>b(e.id)?"highlight-new":"",emptyMessage:"No Redis commands recorded yet",emptyIcon:a.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(B,{hasMore:f,onClick:j,loading:r})]})]})}export{G as default};
|
package/dist/dashboard/public/assets/{RequestDetailView-DtTVzNFt.js → RequestDetailView-DG6EGBEM.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,g}from"./index-B1QFrlfD.js";import{b as h,L as y}from"./vendor-DBTT3jXp.js";import{f as q,p as k}from"./badgeColors-DQ_P_DOX.js";import{D as c,f as $}from"./DetailRow-D_sZP7WV.js";import{b as R,c as H,a as D,d as V,e as U,f as L,g as O,C as o,B as E}from"./types-DwzjtRI3.js";import{u as S,T as C,C as j}from"./EntryDetailPage-D7qvNuMn.js";import{U as F}from"./UserCard-B8lhlqKk.js";import"./search-n3qpR8sp.js";function p(r){return r<1?"<1 ms":r<1e3?`${r.toFixed(2)} ms`:`${(r/1e3).toFixed(2)} s`}function b(r,t){return r.length<=t?r:r.substring(0,t)+"..."}function I({entries:r}){const t=h.useMemo(()=>{const a=r.filter(l=>R(l)),n=r.filter(l=>H(l)),d=r.filter(l=>D(l)),x=r.filter(l=>V(l)),f=r.filter(l=>U(l)),N=r.filter(l=>L(l)),T=r.filter(l=>O(l));return{exceptions:a,logs:n,queries:d,events:x,jobs:f,cache:N,mail:T}},[r]),s=h.useMemo(()=>[{id:"exceptions",label:"Exceptions",entries:t.exceptions,color:"bg-red-500"},{id:"logs",label:"Logs",entries:t.logs,color:"bg-blue-500"},{id:"queries",label:"Queries",entries:t.queries,color:"bg-purple-500"},{id:"events",label:"Events",entries:t.events,color:"bg-green-500"},{id:"jobs",label:"Jobs",entries:t.jobs,color:"bg-yellow-500"},{id:"cache",label:"Cache",entries:t.cache,color:"bg-cyan-500"},{id:"mail",label:"Mail",entries:t.mail,color:"bg-pink-500"}].filter(n=>n.entries.length>0),[t]),[i,m]=h.useState(()=>t.exceptions.length>0?"exceptions":t.logs.length>0?"logs":t.queries.length>0?"queries":t.events.length>0?"events":t.jobs.length>0?"jobs":t.cache.length>0?"cache":t.mail.length>0?"mail":"queries"),u=h.useMemo(()=>{if(t.queries.length===0)return null;const a=t.queries.reduce((x,f)=>x+f.payload.duration,0),n=new Set(t.queries.map(x=>x.payload.query)).size,d=t.queries.length-n;return{total:a,duplicates:d}},[t.queries]);return s.length===0?null:e.jsxs("div",{className:"card overflow-hidden",children:[e.jsx("div",{className:"flex flex-wrap gap-1 p-2 bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:s.map(a=>e.jsxs("button",{onClick:()=>m(a.id),className:`px-3 py-1.5 text-sm font-medium rounded-md transition-colors flex items-center gap-2 ${i===a.id?"bg-white dark:bg-gray-900 text-gray-900 dark:text-white shadow-sm":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:[a.label,e.jsx("span",{className:`inline-flex items-center justify-center px-1.5 py-0.5 text-xs font-medium rounded ${i===a.id?"bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300":"bg-gray-200 dark:bg-gray-600 text-gray-600 dark:text-gray-400"}`,children:a.entries.length})]},a.id))}),e.jsxs("div",{children:[i==="queries"&&t.queries.length>0&&e.jsxs("div",{children:[u&&e.jsxs("div",{className:"px-4 py-2 bg-gray-100 dark:bg-gray-800/50 text-sm text-gray-600 dark:text-gray-400 flex justify-between",children:[e.jsxs("span",{children:[t.queries.length," queries, ",u.duplicates," of which are duplicated"]}),e.jsxs("span",{children:["Total: ",e.jsx("strong",{children:p(u.total)})]})]}),e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.queries.map(a=>e.jsxs(y,{to:`/queries/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsx("code",{className:"text-sm font-mono text-gray-700 dark:text-gray-300 truncate flex-1 mr-4",children:b(a.payload.query,70)}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[a.payload.slow&&e.jsx(o,{listType:"queries",children:"SLOW"}),e.jsx("span",{className:`text-sm font-mono ${a.payload.slow?"text-yellow-600 dark:text-yellow-400":"text-gray-500 dark:text-gray-400"}`,children:p(a.payload.duration)}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))})]}),i==="exceptions"&&t.exceptions.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.exceptions.map(a=>e.jsx(y,{to:`/exceptions/${a.id}`,className:"block px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex-1 min-w-0 mr-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(o,{listType:"exceptions",filterType:"names",filterValue:a.payload.name,children:a.payload.name}),e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400 truncate",children:b(a.payload.message,60)})]}),a.payload.context&&e.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-500 mt-1",children:["at ",a.payload.context]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:q(k(a.createdAt),{addSuffix:!0})}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]})},a.id))}),i==="logs"&&t.logs.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.logs.map(a=>e.jsxs(y,{to:`/logs/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 mr-4",children:[e.jsx(o,{listType:"logs",filterType:"levels",filterValue:a.payload.level,children:a.payload.level.toUpperCase()}),e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300 truncate",children:b(a.payload.message,60)}),a.payload.context&&e.jsx(o,{listType:"logs",filterType:"contexts",filterValue:a.payload.context,className:"text-xs",children:a.payload.context})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:q(k(a.createdAt),{addSuffix:!0})}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))}),i==="events"&&t.events.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.events.map(a=>e.jsxs(y,{to:`/events/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 mr-4",children:[e.jsx(o,{listType:"events",children:a.payload.name}),e.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:[a.payload.listeners.length," listener(s)"]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsx("span",{className:"text-sm font-mono text-gray-500 dark:text-gray-400",children:p(a.payload.duration)}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))}),i==="jobs"&&t.jobs.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.jobs.map(a=>e.jsxs(y,{to:`/jobs/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 mr-4",children:[e.jsx(o,{listType:"jobs",filterType:"statuses",filterValue:a.payload.status,children:a.payload.status.toUpperCase()}),e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:a.payload.name}),e.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:["on ",a.payload.queue]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[a.payload.duration!==void 0&&e.jsx("span",{className:"text-sm font-mono text-gray-500 dark:text-gray-400",children:p(a.payload.duration)}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))}),i==="cache"&&t.cache.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.cache.map(a=>e.jsxs(y,{to:`/cache/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 mr-4",children:[e.jsx(o,{listType:"cache",filterType:"operations",filterValue:a.payload.operation,children:a.payload.operation.toUpperCase()}),e.jsx("code",{className:"text-sm font-mono text-gray-700 dark:text-gray-300 truncate",children:b(a.payload.key,50)}),a.payload.hit!==void 0&&e.jsx(o,{listType:"cache",clickable:!1,children:a.payload.hit?"HIT":"MISS"})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsx("span",{className:"text-sm font-mono text-gray-500 dark:text-gray-400",children:p(a.payload.duration)}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))}),i==="mail"&&t.mail.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.mail.map(a=>e.jsxs(y,{to:`/mail/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 mr-4",children:[e.jsx(o,{listType:"mail",filterType:"statuses",filterValue:a.payload.status,children:a.payload.status.toUpperCase()}),e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300 truncate",children:a.payload.subject}),e.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:["to ",Array.isArray(a.payload.to)?a.payload.to.join(", "):a.payload.to]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsx("span",{className:"text-sm font-mono text-gray-500 dark:text-gray-400",children:p(a.payload.duration)}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))})]})]})}function J(r){if(r===0)return"0 B";const t=1024,s=["B","KB","MB","GB"],i=Math.floor(Math.log(r)/Math.log(t));return`${parseFloat((r/Math.pow(t,i)).toFixed(1))} ${s[i]}`}function K(r){return r<1e3?`${r} ms`:`${(r/1e3).toFixed(2)} s`}function P(r,t){if(t){const s=Object.keys(t).find(i=>i.toLowerCase()==="host");if(s&&t[s])return t[s]}try{return new URL(r).host}catch{return"-"}}function Q(r,t){return r!=null&&r.toLowerCase().includes("/graphql")?"GRAPHQL":t.toUpperCase()}function ae({entry:r,related:t=[]}){const{payload:s,createdAt:i}=r,m=P(s.url,s.headers),u=Q(s.path,s.method),a=(r.tags??[]).filter(M=>M.toUpperCase()!==u),n=S(),d=S(),[x,f]=h.useState("payload"),[N,T]=h.useState("response"),l={};s.body&&(l.body=s.body),s.query&&Object.keys(s.query).length>0&&(l.query=s.query),s.params&&Object.keys(s.params).length>0&&(l.params=s.params);const w={payload:Object.keys(l).length>0?l:{},headers:s.headers||{}},v={response:s.responseBody||{},"response-headers":s.responseHeaders??{},session:s.session&&Object.keys(s.session).length>0?s.session:{}},B=[{id:"payload",label:"Payload",content:e.jsx(j,{data:w.payload,toolbarState:n.state,searchBar:n.SearchBar,maxHeight:400})},{id:"headers",label:"Headers",content:e.jsx(j,{data:w.headers,toolbarState:n.state,searchBar:n.SearchBar,maxHeight:400})}],A=[{id:"response",label:"Response",content:e.jsx(j,{data:v.response,toolbarState:d.state,searchBar:d.SearchBar,maxHeight:400})},{id:"response-headers",label:"Headers",content:e.jsx(j,{data:v["response-headers"],toolbarState:d.state,searchBar:d.SearchBar,maxHeight:400})},{id:"session",label:"Session",content:e.jsx(j,{data:v.session,toolbarState:d.state,searchBar:d.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:"Request Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(c,{label:"Time",value:e.jsxs("span",{children:[$(k(i),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",q(k(i),{addSuffix:!0}),")"]})]})}),e.jsx(c,{label:"Hostname",value:m!=="-"?e.jsx(o,{listType:"requests",filterType:"hostnames",filterValue:m,className:"font-mono",children:m}):"-"}),s.controllerAction&&e.jsx(c,{label:"Controller Action",value:e.jsx(o,{listType:"requests",filterType:"controllers",filterValue:s.controllerAction,className:"font-mono",children:s.controllerAction})}),e.jsx(c,{label:"Path",value:e.jsx(o,{listType:"requests",filterType:"paths",filterValue:s.path,className:"font-mono",children:s.path})}),e.jsx(c,{label:"Status",value:s.statusCode?e.jsx(o,{listType:"requests",filterType:"statuses",filterValue:String(s.statusCode),children:String(s.statusCode)}):"-"}),e.jsx(c,{label:"Duration",value:s.duration!==void 0?e.jsx("span",{className:s.duration>1e3?"text-yellow-600 dark:text-yellow-400 font-medium":"",children:K(s.duration)}):"-"}),e.jsx(c,{label:"IP Address",value:s.ip?e.jsx(o,{listType:"requests",filterType:"ips",filterValue:s.ip,className:"font-mono",children:s.ip}):"-"}),s.userAgent&&e.jsx(c,{label:"User Agent",value:e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:s.userAgent})}),s.handler&&s.handler!==s.controllerAction&&e.jsx(c,{label:"Handler",value:e.jsx("code",{className:"font-mono text-sm",children:s.handler})}),e.jsx(c,{label:"Memory Usage",value:s.memory!==void 0?J(s.memory):"-"}),a.length>0&&e.jsx(c,{label:"Tags",value:e.jsx(E,{items:a,listType:"requests",maxItems:99})})]})})]}),s.user&&e.jsx(F,{user:s.user}),e.jsx(C,{tabs:B,defaultTab:"payload",hashKey:"req",headerRight:e.jsx(n.Toolbar,{data:w[x]}),onTabChange:f}),e.jsx(C,{tabs:A,defaultTab:"response",hashKey:"res",headerRight:e.jsx(d.Toolbar,{data:v[N]}),onTabChange:T}),e.jsx(I,{entries:t})]})}export{ae as default};
|
|
1
|
+
import{j as e,g}from"./index-RTIFvTxK.js";import{b as h,L as y}from"./vendor-DBTT3jXp.js";import{f as q,p as k}from"./badgeColors-DQ_P_DOX.js";import{D as c,f as $}from"./DetailRow-CTntOefv.js";import{b as R,c as H,a as D,d as V,e as U,f as L,g as O,C as o,B as E}from"./types-B9aISL8r.js";import{u as S,T as C,C as j}from"./EntryDetailPage-CCYipAPI.js";import{U as F}from"./UserCard-CNVZ6J5d.js";import"./search-BR0hqW8X.js";function p(r){return r<1?"<1 ms":r<1e3?`${r.toFixed(2)} ms`:`${(r/1e3).toFixed(2)} s`}function b(r,t){return r.length<=t?r:r.substring(0,t)+"..."}function I({entries:r}){const t=h.useMemo(()=>{const a=r.filter(l=>R(l)),n=r.filter(l=>H(l)),d=r.filter(l=>D(l)),x=r.filter(l=>V(l)),f=r.filter(l=>U(l)),N=r.filter(l=>L(l)),T=r.filter(l=>O(l));return{exceptions:a,logs:n,queries:d,events:x,jobs:f,cache:N,mail:T}},[r]),s=h.useMemo(()=>[{id:"exceptions",label:"Exceptions",entries:t.exceptions,color:"bg-red-500"},{id:"logs",label:"Logs",entries:t.logs,color:"bg-blue-500"},{id:"queries",label:"Queries",entries:t.queries,color:"bg-purple-500"},{id:"events",label:"Events",entries:t.events,color:"bg-green-500"},{id:"jobs",label:"Jobs",entries:t.jobs,color:"bg-yellow-500"},{id:"cache",label:"Cache",entries:t.cache,color:"bg-cyan-500"},{id:"mail",label:"Mail",entries:t.mail,color:"bg-pink-500"}].filter(n=>n.entries.length>0),[t]),[i,m]=h.useState(()=>t.exceptions.length>0?"exceptions":t.logs.length>0?"logs":t.queries.length>0?"queries":t.events.length>0?"events":t.jobs.length>0?"jobs":t.cache.length>0?"cache":t.mail.length>0?"mail":"queries"),u=h.useMemo(()=>{if(t.queries.length===0)return null;const a=t.queries.reduce((x,f)=>x+f.payload.duration,0),n=new Set(t.queries.map(x=>x.payload.query)).size,d=t.queries.length-n;return{total:a,duplicates:d}},[t.queries]);return s.length===0?null:e.jsxs("div",{className:"card overflow-hidden",children:[e.jsx("div",{className:"flex flex-wrap gap-1 p-2 bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:s.map(a=>e.jsxs("button",{onClick:()=>m(a.id),className:`px-3 py-1.5 text-sm font-medium rounded-md transition-colors flex items-center gap-2 ${i===a.id?"bg-white dark:bg-gray-900 text-gray-900 dark:text-white shadow-sm":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:[a.label,e.jsx("span",{className:`inline-flex items-center justify-center px-1.5 py-0.5 text-xs font-medium rounded ${i===a.id?"bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300":"bg-gray-200 dark:bg-gray-600 text-gray-600 dark:text-gray-400"}`,children:a.entries.length})]},a.id))}),e.jsxs("div",{children:[i==="queries"&&t.queries.length>0&&e.jsxs("div",{children:[u&&e.jsxs("div",{className:"px-4 py-2 bg-gray-100 dark:bg-gray-800/50 text-sm text-gray-600 dark:text-gray-400 flex justify-between",children:[e.jsxs("span",{children:[t.queries.length," queries, ",u.duplicates," of which are duplicated"]}),e.jsxs("span",{children:["Total: ",e.jsx("strong",{children:p(u.total)})]})]}),e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.queries.map(a=>e.jsxs(y,{to:`/queries/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsx("code",{className:"text-sm font-mono text-gray-700 dark:text-gray-300 truncate flex-1 mr-4",children:b(a.payload.query,70)}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[a.payload.slow&&e.jsx(o,{listType:"queries",children:"SLOW"}),e.jsx("span",{className:`text-sm font-mono ${a.payload.slow?"text-yellow-600 dark:text-yellow-400":"text-gray-500 dark:text-gray-400"}`,children:p(a.payload.duration)}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))})]}),i==="exceptions"&&t.exceptions.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.exceptions.map(a=>e.jsx(y,{to:`/exceptions/${a.id}`,className:"block px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex-1 min-w-0 mr-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(o,{listType:"exceptions",filterType:"names",filterValue:a.payload.name,children:a.payload.name}),e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400 truncate",children:b(a.payload.message,60)})]}),a.payload.context&&e.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-500 mt-1",children:["at ",a.payload.context]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:q(k(a.createdAt),{addSuffix:!0})}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]})},a.id))}),i==="logs"&&t.logs.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.logs.map(a=>e.jsxs(y,{to:`/logs/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 mr-4",children:[e.jsx(o,{listType:"logs",filterType:"levels",filterValue:a.payload.level,children:a.payload.level.toUpperCase()}),e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300 truncate",children:b(a.payload.message,60)}),a.payload.context&&e.jsx(o,{listType:"logs",filterType:"contexts",filterValue:a.payload.context,className:"text-xs",children:a.payload.context})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:q(k(a.createdAt),{addSuffix:!0})}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))}),i==="events"&&t.events.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.events.map(a=>e.jsxs(y,{to:`/events/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 mr-4",children:[e.jsx(o,{listType:"events",children:a.payload.name}),e.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:[a.payload.listeners.length," listener(s)"]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsx("span",{className:"text-sm font-mono text-gray-500 dark:text-gray-400",children:p(a.payload.duration)}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))}),i==="jobs"&&t.jobs.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.jobs.map(a=>e.jsxs(y,{to:`/jobs/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 mr-4",children:[e.jsx(o,{listType:"jobs",filterType:"statuses",filterValue:a.payload.status,children:a.payload.status.toUpperCase()}),e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:a.payload.name}),e.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:["on ",a.payload.queue]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[a.payload.duration!==void 0&&e.jsx("span",{className:"text-sm font-mono text-gray-500 dark:text-gray-400",children:p(a.payload.duration)}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))}),i==="cache"&&t.cache.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.cache.map(a=>e.jsxs(y,{to:`/cache/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 mr-4",children:[e.jsx(o,{listType:"cache",filterType:"operations",filterValue:a.payload.operation,children:a.payload.operation.toUpperCase()}),e.jsx("code",{className:"text-sm font-mono text-gray-700 dark:text-gray-300 truncate",children:b(a.payload.key,50)}),a.payload.hit!==void 0&&e.jsx(o,{listType:"cache",clickable:!1,children:a.payload.hit?"HIT":"MISS"})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsx("span",{className:"text-sm font-mono text-gray-500 dark:text-gray-400",children:p(a.payload.duration)}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))}),i==="mail"&&t.mail.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.mail.map(a=>e.jsxs(y,{to:`/mail/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 mr-4",children:[e.jsx(o,{listType:"mail",filterType:"statuses",filterValue:a.payload.status,children:a.payload.status.toUpperCase()}),e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300 truncate",children:a.payload.subject}),e.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:["to ",Array.isArray(a.payload.to)?a.payload.to.join(", "):a.payload.to]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsx("span",{className:"text-sm font-mono text-gray-500 dark:text-gray-400",children:p(a.payload.duration)}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))})]})]})}function J(r){if(r===0)return"0 B";const t=1024,s=["B","KB","MB","GB"],i=Math.floor(Math.log(r)/Math.log(t));return`${parseFloat((r/Math.pow(t,i)).toFixed(1))} ${s[i]}`}function K(r){return r<1e3?`${r} ms`:`${(r/1e3).toFixed(2)} s`}function P(r,t){if(t){const s=Object.keys(t).find(i=>i.toLowerCase()==="host");if(s&&t[s])return t[s]}try{return new URL(r).host}catch{return"-"}}function Q(r,t){return r!=null&&r.toLowerCase().includes("/graphql")?"GRAPHQL":t.toUpperCase()}function ae({entry:r,related:t=[]}){const{payload:s,createdAt:i}=r,m=P(s.url,s.headers),u=Q(s.path,s.method),a=(r.tags??[]).filter(M=>M.toUpperCase()!==u),n=S(),d=S(),[x,f]=h.useState("payload"),[N,T]=h.useState("response"),l={};s.body&&(l.body=s.body),s.query&&Object.keys(s.query).length>0&&(l.query=s.query),s.params&&Object.keys(s.params).length>0&&(l.params=s.params);const w={payload:Object.keys(l).length>0?l:{},headers:s.headers||{}},v={response:s.responseBody||{},"response-headers":s.responseHeaders??{},session:s.session&&Object.keys(s.session).length>0?s.session:{}},B=[{id:"payload",label:"Payload",content:e.jsx(j,{data:w.payload,toolbarState:n.state,searchBar:n.SearchBar,maxHeight:400})},{id:"headers",label:"Headers",content:e.jsx(j,{data:w.headers,toolbarState:n.state,searchBar:n.SearchBar,maxHeight:400})}],A=[{id:"response",label:"Response",content:e.jsx(j,{data:v.response,toolbarState:d.state,searchBar:d.SearchBar,maxHeight:400})},{id:"response-headers",label:"Headers",content:e.jsx(j,{data:v["response-headers"],toolbarState:d.state,searchBar:d.SearchBar,maxHeight:400})},{id:"session",label:"Session",content:e.jsx(j,{data:v.session,toolbarState:d.state,searchBar:d.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:"Request Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(c,{label:"Time",value:e.jsxs("span",{children:[$(k(i),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",q(k(i),{addSuffix:!0}),")"]})]})}),e.jsx(c,{label:"Hostname",value:m!=="-"?e.jsx(o,{listType:"requests",filterType:"hostnames",filterValue:m,className:"font-mono",children:m}):"-"}),s.controllerAction&&e.jsx(c,{label:"Controller Action",value:e.jsx(o,{listType:"requests",filterType:"controllers",filterValue:s.controllerAction,className:"font-mono",children:s.controllerAction})}),e.jsx(c,{label:"Path",value:e.jsx(o,{listType:"requests",filterType:"paths",filterValue:s.path,className:"font-mono",children:s.path})}),e.jsx(c,{label:"Status",value:s.statusCode?e.jsx(o,{listType:"requests",filterType:"statuses",filterValue:String(s.statusCode),children:String(s.statusCode)}):"-"}),e.jsx(c,{label:"Duration",value:s.duration!==void 0?e.jsx("span",{className:s.duration>1e3?"text-yellow-600 dark:text-yellow-400 font-medium":"",children:K(s.duration)}):"-"}),e.jsx(c,{label:"IP Address",value:s.ip?e.jsx(o,{listType:"requests",filterType:"ips",filterValue:s.ip,className:"font-mono",children:s.ip}):"-"}),s.userAgent&&e.jsx(c,{label:"User Agent",value:e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:s.userAgent})}),s.handler&&s.handler!==s.controllerAction&&e.jsx(c,{label:"Handler",value:e.jsx("code",{className:"font-mono text-sm",children:s.handler})}),e.jsx(c,{label:"Memory Usage",value:s.memory!==void 0?J(s.memory):"-"}),a.length>0&&e.jsx(c,{label:"Tags",value:e.jsx(E,{items:a,listType:"requests",maxItems:99})})]})})]}),s.user&&e.jsx(F,{user:s.user}),e.jsx(C,{tabs:B,defaultTab:"payload",hashKey:"req",headerRight:e.jsx(n.Toolbar,{data:w[x]}),onTabChange:f}),e.jsx(C,{tabs:A,defaultTab:"response",hashKey:"res",headerRight:e.jsx(d.Toolbar,{data:v[N]}),onTabChange:T}),e.jsx(I,{entries:t})]})}export{ae as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t,A as P,d as A}from"./index-
|
|
1
|
+
import{j as t,A as P,d as A}from"./index-RTIFvTxK.js";import{e as q,b as R}from"./vendor-DBTT3jXp.js";import{f as v,p as D}from"./badgeColors-DQ_P_DOX.js";import{u as L,P as M,N as F,L as H}from"./PageHeader-D6tK4KfC.js";import{u as S,i as G,C as l}from"./types-B9aISL8r.js";import{E as B}from"./EntrySearchInput-CBsoywRC.js";import{T as d,D as I,a as O,b as U}from"./DataTable-D_B9L2P1.js";import"./search-BR0hqW8X.js";const W=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS","GRAPHQL"],Q=s=>{var a;return(a=s.payload.path)!=null&&a.toLowerCase().includes("/graphql")?"GRAPHQL":s.payload.method.toUpperCase()};function _(){const s=q(),{addFilter:a,clearAll:u,serverFilters:h,headerFilters:p,hasFilters:c}=S("requests"),{entries:m,loading:g,refreshing:r,newEntriesCount:x,hasMore:y,loadMore:f,loadNew:j,autoRefreshEnabled:C,live:T,setAutoRefresh:E,meta:i,isHighlighted:b}=L({type:"request",limit:50,filters:h}),o=m.filter(e=>G(e)),k=R.useMemo(()=>[{key:"method",header:"Method",width:"100px",render:e=>t.jsx(l,{listType:"requests",filterType:"methods",children:Q(e)})},{key:"path",header:"Path",minWidth:"200px",render:e=>t.jsx(d,{mono:!0,truncate:!0,maxWidth:"400px",children:e.payload.path})},{key:"status",header:"Status",width:"80px",align:"center",render:e=>t.jsx(l,{listType:"requests",filterType:"statuses",children:e.payload.statusCode??0})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(I,{ms:e.payload.duration??0})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>t.jsx(O,{tags:(e.tags??[]).filter(n=>!W.includes(n.toUpperCase())),max:3,onTagClick:(n,N)=>{N.stopPropagation(),a("tags",n)}})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(d,{secondary:!0,className:"text-xs",children:v(D(e.createdAt),{addSuffix:!0})})}],[a]);if(g&&o.length===0)return 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"})});const w=c?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(M,{title:"Requests",icon:P,iconColor:"text-blue-600 dark:text-blue-400",count:o.length,totalCount:i==null?void 0:i.total,refreshing:r,autoRefreshEnabled:C,live:T,onAutoRefreshToggle:E,filters:p,onClearAllFilters:u}),t.jsxs("div",{className:`${w} space-y-4 transition-all duration-200`,children:[t.jsx(B,{placeholder:"Search by path, method, status, tag, or content..."}),t.jsx(F,{count:x,onClick:j,loading:r}),t.jsx(U,{columns:k,data:o,keyExtractor:e=>e.id,onRowClick:e=>s(`/requests/${e.id}`),emptyMessage:"No requests recorded yet",emptyIcon:t.jsx(A,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"}),rowClassName:e=>b(e.id)?"highlight-new":""}),t.jsx(H,{hasMore:y,onClick:f,loading:r})]})]})}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w as b,j as e,C as n}from"./index-
|
|
1
|
+
import{w as b,j as e,C as n}from"./index-RTIFvTxK.js";import{f as a,c as N}from"./format-BlNP-apw.js";import{C as o,B as v}from"./types-B9aISL8r.js";import{p as l,f as m}from"./badgeColors-DQ_P_DOX.js";import{D as t,f as g}from"./DetailRow-CTntOefv.js";import{C as u}from"./circle-x-C7VSxDUA.js";import{C as k}from"./circle-check-big-AxG0GO0t.js";import{T as w}from"./timer-CbE3s2nJ.js";import{C as T}from"./calendar-kof3FJFK.js";import"./vendor-DBTT3jXp.js";function d(i){try{return N.toString(i)}catch{return null}}const h={started:{icon:b,color:"text-blue-500",bg:"bg-blue-100 dark:bg-blue-900/30",label:"STARTED"},completed:{icon:k,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30",label:"COMPLETED"},failed:{icon:u,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30",label:"FAILED"}},C=["started","completed","failed"];function I({entry:i}){const{payload:s,createdAt:c,tags:j}=i,x=(j??[]).filter(f=>!C.includes(f.toLowerCase())),r=h[s.status]||h.started,p=r.icon,y=()=>s.cron?s.cron:s.interval?`${s.interval}ms`:"-";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.jsx("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(n,{className:`h-5 w-5 ${r.color}`})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white truncate font-mono",children:s.name}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Scheduled Task"})]})]})})}),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(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 ${s.status==="completed"?"text-green-600 dark:text-green-400":s.status==="failed"?"text-red-600 dark:text-red-400":"text-blue-600 dark:text-blue-400"}`,children:r.label})]}),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:"Duration"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:s.duration!==void 0?e.jsxs(e.Fragment,{children:[s.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(T,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Schedule"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white font-mono",children:y()}),s.cron&&d(s.cron)&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:d(s.cron)}),s.interval&&a(s.interval)&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:a(s.interval)})]}),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:"Timeout"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:s.timeout!==void 0?e.jsxs(e.Fragment,{children:[s.timeout,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]}):"-"}),s.timeout!==void 0&&a(s.timeout)&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:a(s.timeout)})]})]})]}),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(t,{label:"Time",value:e.jsxs("span",{children:[g(l(c),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",m(l(c),{addSuffix:!0}),")"]})]})}),e.jsx(t,{label:"Task Name",value:e.jsx(o,{listType:"schedule",filterType:"names",filterValue:s.name,className:"font-mono",children:s.name})}),s.cron&&e.jsx(t,{label:"Cron Expression",value:e.jsxs("div",{children:[e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:s.cron}),d(s.cron)&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:d(s.cron)})]})}),s.interval&&e.jsx(t,{label:"Interval",value:e.jsxs("div",{children:[e.jsxs("span",{children:[s.interval,"ms"]}),a(s.interval)&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:a(s.interval)})]})}),e.jsx(t,{label:"Status",value:e.jsx(o,{listType:"schedule",filterType:"statuses",filterValue:s.status,children:s.status})}),s.duration!==void 0&&e.jsx(t,{label:"Duration",value:`${s.duration}ms`}),s.timeout!==void 0&&e.jsx(t,{label:"Timeout",value:e.jsxs("div",{children:[e.jsxs("span",{children:[s.timeout,"ms"]}),a(s.timeout)&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:a(s.timeout)})]})}),s.nextRun&&e.jsx(t,{label:"Next Run",value:e.jsxs("span",{children:[g(l(s.nextRun),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",m(l(s.nextRun),{addSuffix:!0}),")"]})]})}),x.length>0&&e.jsx(t,{label:"Tags",value:e.jsx(v,{items:x,listType:"schedule"})})]})})]}),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(u,{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})})]})]})}export{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a,C as c}from"./index-
|
|
1
|
+
import{j as a,C as c}from"./index-RTIFvTxK.js";import{e as A,b as u}from"./vendor-DBTT3jXp.js";import{f as h,c as L}from"./format-BlNP-apw.js";import{f as R,p as H}from"./badgeColors-DQ_P_DOX.js";import{u as B,P as W,N as $,L as I}from"./PageHeader-D6tK4KfC.js";import{u as q,h as z,C as m}from"./types-B9aISL8r.js";import{T as i,D as G,a as J,b as K}from"./DataTable-D_B9L2P1.js";const O=["started","completed","failed"];function p(t){try{return L.toString(t)}catch{return null}}function ee(){const t=A(),{addFilter:n,clearAll:x,serverFilters:g,headerFilters:f,hasFilters:y}=q("schedule"),{entries:k,loading:j,refreshing:s,newEntriesCount:C,hasMore:N,loadMore:T,loadNew:v,autoRefreshEnabled:b,live:w,setAutoRefresh:E,meta:r,isHighlighted:S}=B({type:"schedule",limit:50,filters:g}),l=k.filter(e=>z(e)),d=u.useCallback(e=>e.payload.cron?e.payload.cron:e.payload.interval?`${e.payload.interval}ms`:"-",[]),D=u.useMemo(()=>[{key:"task",header:"Task",minWidth:"200px",render:e=>a.jsx(m,{listType:"schedule",filterType:"names",className:"font-mono",children:e.payload.name})},{key:"schedule",header:"Schedule",minWidth:"150px",render:e=>a.jsxs("div",{children:[a.jsx(i,{mono:!0,children:d(e)}),e.payload.cron&&p(e.payload.cron)&&a.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 block mt-0.5",children:p(e.payload.cron)}),e.payload.interval&&h(e.payload.interval)&&a.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 block mt-0.5",children:h(e.payload.interval)})]})},{key:"status",header:"Status",width:"100px",render:e=>a.jsx(m,{listType:"schedule",filterType:"statuses",children:e.payload.status})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>e.payload.duration?a.jsx(G,{ms:e.payload.duration}):a.jsx(i,{secondary:!0,children:"—"})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>{const M=(e.tags??[]).filter(o=>!O.includes(o.toLowerCase()));return a.jsx(J,{tags:M,max:3,onTagClick:(o,P)=>{P.stopPropagation(),n("tags",o)}})}},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(i,{secondary:!0,className:"text-xs",children:R(H(e.createdAt),{addSuffix:!0})})}],[n,d]);if(j&&l.length===0)return 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"})});const F=y?"pt-28":"pt-16";return a.jsxs("div",{children:[a.jsx(W,{title:"Schedule",icon:c,iconColor:"text-gray-600 dark:text-gray-400",count:l.length,totalCount:r==null?void 0:r.total,refreshing:s,autoRefreshEnabled:b,live:w,onAutoRefreshToggle:E,filters:f,onClearAllFilters:x}),a.jsxs("div",{className:`${F} space-y-4 transition-all duration-200`,children:[a.jsx($,{count:C,onClick:v,loading:s}),a.jsx(K,{columns:D,data:l,keyExtractor:e=>e.id,onRowClick:e=>t(`/schedule/${e.id}`),rowClassName:e=>S(e.id)?"highlight-new":"",emptyMessage:"No scheduled tasks recorded yet",emptyIcon:a.jsx(c,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(I,{hasMore:N,onClick:T,loading:s})]})]})}export{ee as default};
|