nestlens 0.9.5 → 0.9.7
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-f_msI3hE.js → BatchDetailView-BVwqprXl.js} +1 -1
- package/dist/dashboard/public/assets/{BatchesPage-COmdj9E6.js → BatchesPage-D6Y-VbZW.js} +1 -1
- package/dist/dashboard/public/assets/{CacheDetailView-BRIYfUCk.js → CacheDetailView-DAKwW79l.js} +1 -1
- package/dist/dashboard/public/assets/{CachePage-1dKbc2tB.js → CachePage-D3ZAuKbE.js} +1 -1
- package/dist/dashboard/public/assets/{CommandDetailView-SbWoks8L.js → CommandDetailView-DUlOruy-.js} +1 -1
- package/dist/dashboard/public/assets/{CommandsPage-mv4_Xpb8.js → CommandsPage-8Ly-1pVn.js} +1 -1
- package/dist/dashboard/public/assets/{CopyButton-CrzxYi0-.js → CopyButton-CCiHK8SA.js} +1 -1
- package/dist/dashboard/public/assets/{DashboardPage-bE0HpSpI.js → DashboardPage-HQJ5EqZi.js} +1 -1
- package/dist/dashboard/public/assets/{DataTable-D_B9L2P1.js → DataTable-IY4rgbLi.js} +1 -1
- package/dist/dashboard/public/assets/{DetailRow-CTntOefv.js → DetailRow-BrSIGemm.js} +1 -1
- package/dist/dashboard/public/assets/{DumpDetailView-CS0W_Fhj.js → DumpDetailView-Df-ygu8R.js} +1 -1
- package/dist/dashboard/public/assets/{DumpsPage-nBA0RU8L.js → DumpsPage-DX7kzOSi.js} +1 -1
- package/dist/dashboard/public/assets/{EntryDetailPage-CCYipAPI.js → EntryDetailPage-CvuUpMuM.js} +3 -3
- package/dist/dashboard/public/assets/{EntrySearchInput-CBsoywRC.js → EntrySearchInput-Cep2-s2v.js} +1 -1
- package/dist/dashboard/public/assets/{EventDetailView-C_Octrjz.js → EventDetailView-DTTwJXmG.js} +1 -1
- package/dist/dashboard/public/assets/{EventsPage-BybxWOjD.js → EventsPage-DDPJ2rMk.js} +1 -1
- package/dist/dashboard/public/assets/{ExceptionDetailView-CnZP7x3w.js → ExceptionDetailView-IU2r55Ep.js} +1 -1
- package/dist/dashboard/public/assets/{ExceptionsPage-BWMsdqA3.js → ExceptionsPage-DBYRnysW.js} +1 -1
- package/dist/dashboard/public/assets/{GateDetailView-BOuqeShR.js → GateDetailView-Dk4Dflc1.js} +1 -1
- package/dist/dashboard/public/assets/{GatesPage-o9TsnTtk.js → GatesPage-CbZbVBab.js} +1 -1
- package/dist/dashboard/public/assets/{GraphQLDetailView-D_FLY4dF.js → GraphQLDetailView-CkaJ573i.js} +1 -1
- package/dist/dashboard/public/assets/{GraphQLPage-DKJ9u9z3.js → GraphQLPage-CT1lBIqP.js} +1 -1
- package/dist/dashboard/public/assets/{HttpClientDetailView-C8VgNH8S.js → HttpClientDetailView-uzkJ0a2W.js} +1 -1
- package/dist/dashboard/public/assets/{HttpClientPage-BjjoqX4k.js → HttpClientPage-UVqfS3lX.js} +1 -1
- package/dist/dashboard/public/assets/{JobDetailView-BkZzaTMf.js → JobDetailView-Bw_G0h-k.js} +1 -1
- package/dist/dashboard/public/assets/{JobsPage-C91EUJaf.js → JobsPage-BehPu36v.js} +1 -1
- package/dist/dashboard/public/assets/{LogDetailView-DFZNDmS1.js → LogDetailView-C4zHaxtW.js} +1 -1
- package/dist/dashboard/public/assets/{LogsPage-BoOB2OBf.js → LogsPage-rc3m7U7I.js} +1 -1
- package/dist/dashboard/public/assets/{MailDetailView-BBVeJUQd.js → MailDetailView-C0agIRwB.js} +1 -1
- package/dist/dashboard/public/assets/{MailPage-DZc4bMQs.js → MailPage-DKkMqiyO.js} +1 -1
- package/dist/dashboard/public/assets/{ModelDetailView-D5dGSC3N.js → ModelDetailView-ezmk3atr.js} +1 -1
- package/dist/dashboard/public/assets/{ModelsPage-BLjVZHU6.js → ModelsPage-BHnRG1du.js} +1 -1
- package/dist/dashboard/public/assets/{NotificationDetailView-2AbBjEYS.js → NotificationDetailView-BRxW--Ek.js} +1 -1
- package/dist/dashboard/public/assets/{NotificationsPage-itJ9zwbx.js → NotificationsPage-BrTG1nga.js} +1 -1
- package/dist/dashboard/public/assets/PageHeader-CA02rA6z.js +1 -0
- package/dist/dashboard/public/assets/{QueriesPage-CIyyc7KX.js → QueriesPage-kGgFPHUq.js} +1 -1
- package/dist/dashboard/public/assets/{QueryDetailView-BA3mGoug.js → QueryDetailView-BuP7IA2L.js} +1 -1
- package/dist/dashboard/public/assets/{RedisDetailView-CkdXLdAC.js → RedisDetailView-CnhWC0Lh.js} +1 -1
- package/dist/dashboard/public/assets/{RedisPage-SCnniVtj.js → RedisPage-BSyT0Q7O.js} +1 -1
- package/dist/dashboard/public/assets/{RequestDetailView-DG6EGBEM.js → RequestDetailView-Nb4Miizp.js} +1 -1
- package/dist/dashboard/public/assets/{RequestsPage-DCTATkVH.js → RequestsPage-ExHuUYNY.js} +1 -1
- package/dist/dashboard/public/assets/{ScheduleDetailView-DG1DcaZ7.js → ScheduleDetailView-sPecJ0Wy.js} +1 -1
- package/dist/dashboard/public/assets/{SchedulePage-BnANcfw7.js → SchedulePage-BqISID5x.js} +1 -1
- package/dist/dashboard/public/assets/{UserCard-CNVZ6J5d.js → UserCard-Ds2eFQ5u.js} +1 -1
- package/dist/dashboard/public/assets/{ViewDetailView-DDTAXGx5.js → ViewDetailView-B-euVoGK.js} +1 -1
- package/dist/dashboard/public/assets/{ViewsPage-n225oIjy.js → ViewsPage-Czow9YAd.js} +1 -1
- package/dist/dashboard/public/assets/{calendar-kof3FJFK.js → calendar-DjIv6CVc.js} +1 -1
- package/dist/dashboard/public/assets/{circle-alert-BwqdWTrp.js → circle-alert-YrNLnEY3.js} +1 -1
- package/dist/dashboard/public/assets/{circle-check-big-AxG0GO0t.js → circle-check-big-DArmNZLQ.js} +1 -1
- package/dist/dashboard/public/assets/{circle-x-C7VSxDUA.js → circle-x-BAiU-N3B.js} +1 -1
- package/dist/dashboard/public/assets/{eye-PbOZKiAk.js → eye-DMeWKkCr.js} +1 -1
- package/dist/dashboard/public/assets/{index-RTIFvTxK.js → index-CCIS1AbN.js} +2 -2
- package/dist/dashboard/public/assets/{search-BR0hqW8X.js → search-CtGPQIEG.js} +1 -1
- package/dist/dashboard/public/assets/{send-zuskvJ21.js → send-BjuXpyOz.js} +1 -1
- package/dist/dashboard/public/assets/{timer-CbE3s2nJ.js → timer-C0_HYkkd.js} +1 -1
- package/dist/dashboard/public/assets/{types-B9aISL8r.js → types-DTQLegxJ.js} +1 -1
- package/dist/dashboard/public/assets/{users-BGDQIOU8.js → users-CUxyUz2K.js} +1 -1
- package/dist/dashboard/public/assets/{zap-CwXufZjZ.js → zap-DzO0l81l.js} +1 -1
- package/dist/dashboard/public/index.html +1 -1
- package/package.json +1 -1
- package/dist/dashboard/public/assets/PageHeader-D6tK4KfC.js +0 -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-CCIS1AbN.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-Cep2-s2v.js";import{u as $,P as z,N as V,L as J}from"./PageHeader-CA02rA6z.js";import{u as K,s as X,C as x}from"./types-DTQLegxJ.js";import{T as h,G as Y,N as Z,D as _,a as ee,b as ae}from"./DataTable-IY4rgbLi.js";import"./search-CtGPQIEG.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-CCIS1AbN.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-BrSIGemm.js";import{C as i,B}from"./types-DTQLegxJ.js";import{u as j,T as f,C as l}from"./EntryDetailPage-CvuUpMuM.js";import"./search-CtGPQIEG.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-BjjoqX4k.js → HttpClientPage-UVqfS3lX.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t,d as h}from"./index-
|
|
1
|
+
import{j as t,d as h}from"./index-CCIS1AbN.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-CA02rA6z.js";import{u as L,j as S,C as l}from"./types-DTQLegxJ.js";import{T as d,D as W,b as $}from"./DataTable-IY4rgbLi.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-BkZzaTMf.js → JobDetailView-Bw_G0h-k.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-CCIS1AbN.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-BrSIGemm.js";import{C as i}from"./types-DTQLegxJ.js";import{u as b,C as p,T as D}from"./EntryDetailPage-CvuUpMuM.js";import{C as S}from"./CopyButton-CCiHK8SA.js";import{C as y}from"./circle-alert-YrNLnEY3.js";import{C as B}from"./circle-check-big-DArmNZLQ.js";import"./search-CtGPQIEG.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-CCIS1AbN.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-CA02rA6z.js";import{u as P,e as R,C as o}from"./types-DTQLegxJ.js";import{T as i,D as J,b as q}from"./DataTable-IY4rgbLi.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-DFZNDmS1.js → LogDetailView-C4zHaxtW.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./index-
|
|
1
|
+
import{j as a}from"./index-CCIS1AbN.js";import{p as d,f as x}from"./badgeColors-DQ_P_DOX.js";import{D as s,f as m}from"./DetailRow-BrSIGemm.js";import{C as o}from"./types-DTQLegxJ.js";import{u as b,C as h,T as g}from"./EntryDetailPage-CvuUpMuM.js";import"./vendor-DBTT3jXp.js";import"./search-CtGPQIEG.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-CCIS1AbN.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-CA02rA6z.js";import{u as R,c as B,C as i}from"./types-DTQLegxJ.js";import{E as D}from"./EntrySearchInput-Cep2-s2v.js";import{T as o,b as S}from"./DataTable-IY4rgbLi.js";import"./search-CtGPQIEG.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-BBVeJUQd.js → MailDetailView-C0agIRwB.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-CCIS1AbN.js";import{C as zn,B as Hn}from"./types-DTQLegxJ.js";import{p as Gt,f as Gn}from"./badgeColors-DQ_P_DOX.js";import{D as B,f as Bn}from"./DetailRow-BrSIGemm.js";import{T as Wn}from"./EntryDetailPage-CvuUpMuM.js";import{C as be}from"./CopyButton-CCiHK8SA.js";import{C as $n}from"./circle-x-BAiU-N3B.js";import{C as Yn}from"./circle-check-big-DArmNZLQ.js";import{U as Xn}from"./users-CUxyUz2K.js";import{C as Vn}from"./circle-alert-YrNLnEY3.js";import"./vendor-DBTT3jXp.js";import"./search-CtGPQIEG.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-CCIS1AbN.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-CA02rA6z.js";import{u as $,g as B,C as H}from"./types-DTQLegxJ.js";import{T as l,D as q,a as I,b as z}from"./DataTable-IY4rgbLi.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-D5dGSC3N.js → ModelDetailView-ezmk3atr.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-CCIS1AbN.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-BrSIGemm.js";import{C as l}from"./types-DTQLegxJ.js";import{u as n,C as m,T as N}from"./EntryDetailPage-CvuUpMuM.js";import{C as k}from"./CopyButton-CCiHK8SA.js";import{C as w}from"./circle-x-BAiU-N3B.js";import"./search-CtGPQIEG.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-CCIS1AbN.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-CA02rA6z.js";import{u as H,l as S,C as l}from"./types-DTQLegxJ.js";import{T as o,D as $,b as I}from"./DataTable-IY4rgbLi.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-CCIS1AbN.js";import{p as x,f as y}from"./badgeColors-DQ_P_DOX.js";import{D as s,f as b}from"./DetailRow-BrSIGemm.js";import{C as n}from"./types-DTQLegxJ.js";import{u as N,C as f,T as u}from"./EntryDetailPage-CvuUpMuM.js";import{C as v}from"./CopyButton-CCiHK8SA.js";import{C as k}from"./circle-check-big-DArmNZLQ.js";import{C as o}from"./circle-x-BAiU-N3B.js";import{S as w}from"./send-BjuXpyOz.js";import"./vendor-DBTT3jXp.js";import"./search-CtGPQIEG.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-itJ9zwbx.js → NotificationsPage-BrTG1nga.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t,e as l}from"./index-
|
|
1
|
+
import{j as t,e as l}from"./index-CCIS1AbN.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-CA02rA6z.js";import{u as W,m as L,C as d}from"./types-DTQLegxJ.js";import{T as a,D as H,b as S}from"./DataTable-IY4rgbLi.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as t}from"./vendor-DBTT3jXp.js";import{p as ce,z as D,m as q,q as ie,s as _,j as r,i as K,e as le,t as oe,X as de}from"./index-CCIS1AbN.js";function ue(){return ce("/stream")}function ge(s,a=!0){const n=t.useRef(s),[l,d]=t.useState(!1);return t.useEffect(()=>{n.current=s},[s]),t.useEffect(()=>{if(!a||typeof EventSource>"u")return;const u=new EventSource(ue(),{withCredentials:!0}),g=x=>{try{n.current(JSON.parse(x.data))}catch{}};return u.addEventListener("entry",g),u.onopen=()=>d(!0),u.onerror=()=>d(!1),()=>{u.removeEventListener("entry",g),u.close(),d(!1)}},[a]),{connected:l}}function T(s){return s==null?"":typeof s!="object"?String(s):Array.isArray(s)?"["+s.map(T).join(",")+"]":"{"+Object.keys(s).sort().map(n=>`"${n}":${T(s[n])}`).join(",")+"}"}const z="nestlens-auto-refresh";function xe(){try{const s=localStorage.getItem(z);return s===null?!0:s==="true"}catch{return!0}}function me(s){try{localStorage.setItem(z,String(s))}catch{}}function pe(s={}){const{type:a,limit:n=50,autoRefresh:l,autoRefreshInterval:d=5e3,filters:u}=s,g=T(u),x=`${a}|${n}|${g}`,[E,w]=t.useState({key:g,value:u});E.key!==g&&w({key:g,value:u});const o=E.value,[H,p]=t.useState([]),[j,L]=t.useState(null),[I,k]=t.useState(!1),[R,N]=t.useState(null),[i,y]=t.useState(null),[h,v]=t.useState(0),[C,G]=t.useState(l??xe()),f=t.useRef(null),F=t.useRef(null),J=t.useRef(!0),W=j===null&&R===null,X=I||j!==null&&j!==x,Y=t.useRef(g),$=t.useRef(new Map),[,Q]=t.useState(0),B=1e4,M=t.useCallback(e=>{p(e.data),y(e.meta),f.current=e.meta.newestSequence,v(0),N(null),J.current=!1,Y.current=g,L(x)},[g,x]),U=t.useCallback(e=>{const c=e instanceof Error?e:new Error("Failed to fetch entries");N(c),console.error("Failed to fetch entries:",e),D.error("Failed to load entries"),L(x)},[x]),V=t.useCallback(async()=>{if(!(!(i!=null&&i.oldestSequence)||!i.hasMore)){k(!0);try{const e=await q({type:a,limit:n,beforeSequence:i.oldestSequence,filters:o});p(c=>[...c,...e.data]),y(e.meta)}catch(e){console.error("Failed to load more entries:",e),D.error("Failed to load more entries")}finally{k(!1)}}},[a,n,i,o]),Z=t.useCallback(async()=>{if(f.current){k(!0);try{const e=await q({type:a,limit:h||n,afterSequence:f.current,filters:o});if(e.data.length>0){const c=Date.now();e.data.forEach(m=>{$.current.set(m.id,c)}),p(m=>[...e.data,...m]),f.current=e.meta.newestSequence,v(0)}}catch(e){console.error("Failed to load new entries:",e),D.error("Failed to load new entries")}finally{k(!1)}}},[a,n,h,o]),ee=t.useCallback(async()=>{k(!0);try{N(null);const e=await q({type:a,limit:n,filters:o});p(e.data),y(e.meta),f.current=e.meta.newestSequence,v(0)}catch(e){const c=e instanceof Error?e:new Error("Failed to refresh entries");N(c),console.error("Failed to refresh entries:",e),D.error("Failed to refresh entries")}finally{k(!1)}},[a,n,o]),A=t.useCallback(async()=>{if(!f.current){try{(await ie(a)).data&&v(1)}catch{}return}try{const e=await _(f.current,a);v(e.data.count)}catch{}},[a]),re=t.useCallback(e=>{G(e),me(e)},[]),te=t.useCallback(e=>{p(c=>c.map(m=>m.id===e.id?e:m))},[]);t.useEffect(()=>{q({type:a,limit:n,filters:o}).then(M,U)},[a,n,o,M,U]);const ae=t.useCallback(e=>{const c=$.current.get(e);return c?Date.now()-c<B:!1},[]),P=t.useCallback(()=>{const e=Date.now();let c=!1;$.current.forEach((m,b)=>{e-m>=B&&($.current.delete(b),c=!0)}),c&&Q(m=>m+1)},[]),O=t.useCallback(async()=>{if(f.current)try{const e=await _(f.current,a);if(e.data.count>0){const c=await q({type:a,limit:e.data.count,afterSequence:f.current,filters:o});if(c.data.length>0){const m=Date.now();c.data.forEach(b=>{$.current.set(b.id,m)}),p(b=>[...c.data,...b]),f.current=c.meta.newestSequence,y(b=>b?{...b,total:b.total+c.data.length,newestSequence:c.meta.newestSequence}:c.meta)}}}catch{}},[a,o]);t.useEffect(()=>(C?F.current=setInterval(O,d):F.current=setInterval(A,d),()=>{F.current&&(clearInterval(F.current),F.current=null)}),[C,d,O,A]),t.useEffect(()=>{const e=setInterval(P,1e3);return()=>clearInterval(e)},[P]);const S=t.useRef(null),se=t.useCallback(e=>{a&&e.type!==a||S.current||(S.current=setTimeout(()=>{S.current=null,C?O():A()},200))},[a,C,O,A]),{connected:ne}=ge(se);return t.useEffect(()=>()=>{S.current&&(clearTimeout(S.current),S.current=null)},[]),{entries:H,loading:W,refreshing:X,error:R,meta:i,newEntriesCount:h,hasMore:(i==null?void 0:i.hasMore)??!1,loadMore:V,loadNew:Z,refresh:ee,setAutoRefresh:re,autoRefreshEnabled:C,updateEntry:te,isHighlighted:ae,live:ne}}function he({count:s,onClick:a,loading:n}){return s===0?null:r.jsxs("button",{onClick:a,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(K,{className:"h-4 w-4 animate-spin"}):r.jsx(le,{className:"h-4 w-4"}),r.jsxs("span",{children:["Load ",s," new ",s===1?"entry":"entries"]})]})}function be({hasMore:s,onClick:a,loading:n}){return s?r.jsxs("button",{onClick:a,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(K,{className:"h-4 w-4 animate-spin"}):r.jsx(oe,{className:"h-4 w-4"}),r.jsx("span",{children:"Load older entries"})]}):null}function ke({title:s,icon:a,iconColor:n="text-primary-600 dark:text-primary-400",count:l,totalCount:d,subtitle:u,loading:g,refreshing:x,onRefresh:E,autoRefreshEnabled:w,onAutoRefreshToggle:o,live:H,filters:p=[],onClearAllFilters:j,actions:L,filterControls:I}){const k=p.length>0,R=l??d,N=p.reduce((i,y)=>(i[y.category]||(i[y.category]=[]),i[y.category].push(y),i),{});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(a,{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}),R!==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:[R.toLocaleString(),d!==void 0&&l!==void 0&&l!==d&&r.jsxs("span",{className:"text-gray-400 dark:text-gray-500 ml-1",children:["/ ",d.toLocaleString()]})]}),u&&r.jsx("span",{className:"hidden md:inline text-sm text-gray-500 dark:text-gray-400",children:u})]})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[L,H&&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"})]}),o&&r.jsxs("button",{onClick:()=>o(!w),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 ${w?"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:w?"Auto-refresh enabled":"Auto-refresh disabled",children:[r.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${w?"bg-green-500 animate-pulse":"bg-gray-400"}`}),r.jsx("span",{children:"Auto Refresh"})]}),E&&r.jsx("button",{onClick:E,disabled:!!g||!!x,"aria-busy":x,"aria-label":x?"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(K,{className:`h-4 w-4 ${x?"animate-spin":""}`})})]})]}),I&&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:I}),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: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(N).map(([i,y])=>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:[i,":"]}),y.map((h,v)=>r.jsxs("button",{onClick:h.onRemove,"aria-label":`Remove ${i} filter: ${h.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:h.value}),r.jsx(de,{className:"h-3 w-3 opacity-60 group-hover:opacity-100"})]},`${h.category}-${h.value}-${v}`))]},i)),j&&p.length>1&&r.jsx("button",{onClick:j,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 ve({tabs:s,activeTab:a,onChange:n}){return r.jsx("div",{className:"flex items-center space-x-1",children:s.map(l=>r.jsxs("button",{onClick:()=>n(l.id),className:`px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${a===l.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:[l.label,l.count!==void 0&&r.jsx("span",{className:`ml-1.5 text-xs ${a===l.id?"text-primary-600 dark:text-primary-400":"text-gray-400 dark:text-gray-500"}`,children:l.count})]},l.id))})}function we({label:s,enabled:a,onChange:n,icon:l}){return r.jsxs("button",{onClick:()=>n(!a),className:`flex items-center space-x-2 px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${a?"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:[l&&r.jsx(l,{className:"h-4 w-4"}),r.jsx("span",{children:s})]})}export{ve as F,be as L,he as N,ke as P,we as T,pe as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a,D as n}from"./index-
|
|
1
|
+
import{j as a,D as n}from"./index-CCIS1AbN.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-CA02rA6z.js";import{u as I,a as Z,C as $}from"./types-DTQLegxJ.js";import{E as z}from"./EntrySearchInput-Cep2-s2v.js";import{T as u,D as G,a as J,b as K}from"./DataTable-IY4rgbLi.js";import{Z as c}from"./zap-DzO0l81l.js";import"./search-CtGPQIEG.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-BA3mGoug.js → QueryDetailView-BuP7IA2L.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-CCIS1AbN.js";import{p as oE,f as PT}from"./badgeColors-DQ_P_DOX.js";import{D as K,f as nT}from"./DetailRow-BrSIGemm.js";import{C as GE}from"./types-DTQLegxJ.js";import{g as iT,b as g}from"./vendor-DBTT3jXp.js";import{a as MT,b as UT}from"./EntryDetailPage-CvuUpMuM.js";import"./search-CtGPQIEG.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-CkdXLdAC.js → RedisDetailView-CnhWC0Lh.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-CCIS1AbN.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-BrSIGemm.js";import{C as n}from"./types-DTQLegxJ.js";import{u as x,C as m,T as C}from"./EntryDetailPage-CvuUpMuM.js";import{C as w}from"./CopyButton-CCiHK8SA.js";import{C as T}from"./circle-check-big-DArmNZLQ.js";import{C as g}from"./circle-x-BAiU-N3B.js";import"./search-CtGPQIEG.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-CCIS1AbN.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-CA02rA6z.js";import{u as L,k as H,C as l}from"./types-DTQLegxJ.js";import{T as n,D as S,b as W}from"./DataTable-IY4rgbLi.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-DG6EGBEM.js → RequestDetailView-Nb4Miizp.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
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
|
+
import{j as e,g}from"./index-CCIS1AbN.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-BrSIGemm.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-DTQLegxJ.js";import{u as S,T as C,C as j}from"./EntryDetailPage-CvuUpMuM.js";import{U as F}from"./UserCard-Ds2eFQ5u.js";import"./search-CtGPQIEG.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-CCIS1AbN.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-CA02rA6z.js";import{u as S,i as G,C as l}from"./types-DTQLegxJ.js";import{E as B}from"./EntrySearchInput-Cep2-s2v.js";import{T as d,D as I,a as O,b as U}from"./DataTable-IY4rgbLi.js";import"./search-CtGPQIEG.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-CCIS1AbN.js";import{f as a,c as N}from"./format-BlNP-apw.js";import{C as o,B as v}from"./types-DTQLegxJ.js";import{p as l,f as m}from"./badgeColors-DQ_P_DOX.js";import{D as t,f as g}from"./DetailRow-BrSIGemm.js";import{C as u}from"./circle-x-BAiU-N3B.js";import{C as k}from"./circle-check-big-DArmNZLQ.js";import{T as w}from"./timer-C0_HYkkd.js";import{C as T}from"./calendar-DjIv6CVc.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-CCIS1AbN.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-CA02rA6z.js";import{u as q,h as z,C as m}from"./types-DTQLegxJ.js";import{T as i,D as G,a as J,b as K}from"./DataTable-IY4rgbLi.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as h}from"./index-
|
|
1
|
+
import{j as h}from"./index-CCIS1AbN.js";import{D as _}from"./DetailRow-BrSIGemm.js";function J(x){function j(t,l){return t<<l|t>>>32-l}function i(t,l){const a=(t&65535)+(l&65535);return(t>>16)+(l>>16)+(a>>16)<<16|a&65535}function E(t,l,a){return t&l|~t&a}function R(t,l,a){return t&a|l&~a}function T(t,l,a){return t^l^a}function M(t,l,a){return l^(t|~a)}function c(t,l,a,f,p,S,g){return t=i(t,i(i(E(l,a,f),p),g)),i(j(t,S),l)}function d(t,l,a,f,p,S,g){return t=i(t,i(i(R(l,a,f),p),g)),i(j(t,S),l)}function m(t,l,a,f,p,S,g){return t=i(t,i(i(T(l,a,f),p),g)),i(j(t,S),l)}function u(t,l,a,f,p,S,g){return t=i(t,i(i(M(l,a,f),p),g)),i(j(t,S),l)}function q(t){const l=[],a=t.length,f=a+8,S=((f-f%64)/64+1)*16;for(let b=0;b<S;b++)l[b]=0;let g=0,N=0;for(;N<a;){const b=(N-N%4)/4;g=N%4*8,l[b]=l[b]|t.charCodeAt(N)<<g,N++}const $=(N-N%4)/4;return g=N%4*8,l[$]=l[$]|128<<g,l[S-2]=a<<3,l[S-1]=a>>>29,l}function v(t){let l="";for(let a=0;a<=3;a++){const f=t>>>a*8&255;l+=("0"+f.toString(16)).slice(-2)}return l}const s=q(x);let e=1732584193,n=4023233417,r=2562383102,o=271733878;const w=7,y=12,W=17,C=22,A=5,U=9,k=14,D=20,B=4,G=11,H=16,I=23,O=6,F=10,L=15,P=21;for(let t=0;t<s.length;t+=16){const l=e,a=n,f=r,p=o;e=c(e,n,r,o,s[t+0],w,3614090360),o=c(o,e,n,r,s[t+1],y,3905402710),r=c(r,o,e,n,s[t+2],W,606105819),n=c(n,r,o,e,s[t+3],C,3250441966),e=c(e,n,r,o,s[t+4],w,4118548399),o=c(o,e,n,r,s[t+5],y,1200080426),r=c(r,o,e,n,s[t+6],W,2821735955),n=c(n,r,o,e,s[t+7],C,4249261313),e=c(e,n,r,o,s[t+8],w,1770035416),o=c(o,e,n,r,s[t+9],y,2336552879),r=c(r,o,e,n,s[t+10],W,4294925233),n=c(n,r,o,e,s[t+11],C,2304563134),e=c(e,n,r,o,s[t+12],w,1804603682),o=c(o,e,n,r,s[t+13],y,4254626195),r=c(r,o,e,n,s[t+14],W,2792965006),n=c(n,r,o,e,s[t+15],C,1236535329),e=d(e,n,r,o,s[t+1],A,4129170786),o=d(o,e,n,r,s[t+6],U,3225465664),r=d(r,o,e,n,s[t+11],k,643717713),n=d(n,r,o,e,s[t+0],D,3921069994),e=d(e,n,r,o,s[t+5],A,3593408605),o=d(o,e,n,r,s[t+10],U,38016083),r=d(r,o,e,n,s[t+15],k,3634488961),n=d(n,r,o,e,s[t+4],D,3889429448),e=d(e,n,r,o,s[t+9],A,568446438),o=d(o,e,n,r,s[t+14],U,3275163606),r=d(r,o,e,n,s[t+3],k,4107603335),n=d(n,r,o,e,s[t+8],D,1163531501),e=d(e,n,r,o,s[t+13],A,2850285829),o=d(o,e,n,r,s[t+2],U,4243563512),r=d(r,o,e,n,s[t+7],k,1735328473),n=d(n,r,o,e,s[t+12],D,2368359562),e=m(e,n,r,o,s[t+5],B,4294588738),o=m(o,e,n,r,s[t+8],G,2272392833),r=m(r,o,e,n,s[t+11],H,1839030562),n=m(n,r,o,e,s[t+14],I,4259657740),e=m(e,n,r,o,s[t+1],B,2763975236),o=m(o,e,n,r,s[t+4],G,1272893353),r=m(r,o,e,n,s[t+7],H,4139469664),n=m(n,r,o,e,s[t+10],I,3200236656),e=m(e,n,r,o,s[t+13],B,681279174),o=m(o,e,n,r,s[t+0],G,3936430074),r=m(r,o,e,n,s[t+3],H,3572445317),n=m(n,r,o,e,s[t+6],I,76029189),e=m(e,n,r,o,s[t+9],B,3654602809),o=m(o,e,n,r,s[t+12],G,3873151461),r=m(r,o,e,n,s[t+15],H,530742520),n=m(n,r,o,e,s[t+2],I,3299628645),e=u(e,n,r,o,s[t+0],O,4096336452),o=u(o,e,n,r,s[t+7],F,1126891415),r=u(r,o,e,n,s[t+14],L,2878612391),n=u(n,r,o,e,s[t+5],P,4237533241),e=u(e,n,r,o,s[t+12],O,1700485571),o=u(o,e,n,r,s[t+3],F,2399980690),r=u(r,o,e,n,s[t+10],L,4293915773),n=u(n,r,o,e,s[t+1],P,2240044497),e=u(e,n,r,o,s[t+8],O,1873313359),o=u(o,e,n,r,s[t+15],F,4264355552),r=u(r,o,e,n,s[t+6],L,2734768916),n=u(n,r,o,e,s[t+13],P,1309151649),e=u(e,n,r,o,s[t+4],O,4149444226),o=u(o,e,n,r,s[t+11],F,3174756917),r=u(r,o,e,n,s[t+2],L,718787259),n=u(n,r,o,e,s[t+9],P,3951481745),e=i(e,l),n=i(n,a),r=i(r,f),o=i(o,p)}return v(e)+v(n)+v(r)+v(o)}function K(x,j=80){return`https://www.gravatar.com/avatar/${J(x.toLowerCase().trim())}?d=identicon&s=${j}`}function X({user:x}){const j=x.email?K(x.email):null;return h.jsxs("div",{className:"card",children:[h.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:h.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Authenticated User"})}),h.jsx("div",{className:"p-4",children:h.jsxs("dl",{className:"divide-y-0",children:[h.jsx(_,{label:"ID",value:h.jsx("code",{className:"text-sm font-mono bg-gray-100 dark:bg-gray-800 px-2 py-0.5 rounded",children:String(x.id)})}),x.name&&h.jsx(_,{label:"Name",value:h.jsxs("span",{className:"flex items-center gap-2",children:[j&&h.jsx("img",{src:j,alt:x.name,className:"w-6 h-6 rounded-full"}),h.jsx("span",{children:x.name})]})}),x.email&&h.jsx(_,{label:"Email Address",value:h.jsx("a",{href:`mailto:${x.email}`,className:"text-indigo-600 dark:text-indigo-400 hover:underline",children:x.email})})]})})]})}export{X as U};
|