railwatch 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/app/frontend/components/railwatch/stat.tsx +13 -1
- data/app/frontend/hooks/use-live.ts +26 -0
- data/docs/configuration.md +3 -1
- data/lib/railwatch/version.rb +1 -1
- data/lib/railwatch.rb +9 -2
- data/public/railwatch/assets/{app-layout-LvxN9xSS.js → app-layout-CpEbDy93.js} +1 -1
- data/public/railwatch/assets/{arrow-up-DG01k9AL.js → arrow-up-DAODKT5N.js} +1 -1
- data/public/railwatch/assets/{braces-C3w7pfxS.js → braces-DgB4bqp0.js} +1 -1
- data/public/railwatch/assets/{card-Dpwlr0uY.js → card-C4EFUWG1.js} +1 -1
- data/public/railwatch/assets/{chart-DJHv3R7W.js → chart-CD6EHDjG.js} +1 -1
- data/public/railwatch/assets/{chart-hover-CEH-DtXO.js → chart-hover-B5cFOZ24.js} +1 -1
- data/public/railwatch/assets/{chart-panel-CUdIzJvk.js → chart-panel-XD8qJDmg.js} +1 -1
- data/public/railwatch/assets/{code-BRZprwun.js → code-CuTKEYtT.js} +1 -1
- data/public/railwatch/assets/{copy-id-CwhGGiwF.js → copy-id-COM9oXfT.js} +1 -1
- data/public/railwatch/assets/{cursor-load-more-uF1_955Q.js → cursor-load-more-CleS4nD4.js} +1 -1
- data/public/railwatch/assets/{data-table-DYi-N0hm.js → data-table-Bzj8zcao.js} +1 -1
- data/public/railwatch/assets/{env-layout-HdcOaPPX.js → env-layout-Dic4A8Kn.js} +1 -1
- data/public/railwatch/assets/{execution-path-CElXXFO_.js → execution-path-C7Up9w4e.js} +1 -1
- data/public/railwatch/assets/{filter-bar-DEv0G_34.js → filter-bar-B5wbix1y.js} +1 -1
- data/public/railwatch/assets/{flamegraph-SKD9yxW9.js → flamegraph-Dve4TVkl.js} +1 -1
- data/public/railwatch/assets/{frames-CUpyJQDy.js → frames-CkDFkUhi.js} +1 -1
- data/public/railwatch/assets/{index-HRXGir-0.js → index-0glo-UpF.js} +1 -1
- data/public/railwatch/assets/{index-CvqfEExO.js → index-6t2RLBwA.js} +1 -1
- data/public/railwatch/assets/{index-CjxXgOs-.js → index-7fYWYI1v.js} +1 -1
- data/public/railwatch/assets/{index-CiRMSYMn.js → index-B2hTf0w6.js} +1 -1
- data/public/railwatch/assets/{index-74ocuU5d.js → index-B51WiPQg.js} +1 -1
- data/public/railwatch/assets/{index-BxCXBHP2.js → index-BA3nScnV.js} +1 -1
- data/public/railwatch/assets/{index-CIaZkokF.js → index-BheGBdI9.js} +1 -1
- data/public/railwatch/assets/{index-d-3J7gQ5.js → index-BxSwNl8H.js} +1 -1
- data/public/railwatch/assets/{index-BBCEkLqp.js → index-CEcv5bba.js} +1 -1
- data/public/railwatch/assets/{index-CEetm4oC.js → index-CG7VCShP.js} +1 -1
- data/public/railwatch/assets/{index-ClL-PYEV.js → index-CXSEiNWw.js} +1 -1
- data/public/railwatch/assets/{index-B_KFb9LS.js → index-C_3JsXHv.js} +1 -1
- data/public/railwatch/assets/{index-DJd3OUSd.js → index-CgoVIV-m.js} +1 -1
- data/public/railwatch/assets/{index-C1jc1OoH.js → index-CnlT_aCL.js} +1 -1
- data/public/railwatch/assets/{index-DPD-rLp6.js → index-D7t5pSOT.js} +1 -1
- data/public/railwatch/assets/{index-CteZ6fop.js → index-DJZkxYZf.js} +1 -1
- data/public/railwatch/assets/{index-Ce4SB5AB.js → index-DKwz3gSX.js} +1 -1
- data/public/railwatch/assets/{index-CNH85TZp.js → index-DTLmaJha.js} +1 -1
- data/public/railwatch/assets/{index-UJOUALr_.js → index-D_dUD6LY.js} +1 -1
- data/public/railwatch/assets/{index-BqK_VKom.js → index-Dj03Gham.js} +1 -1
- data/public/railwatch/assets/{index-DrayARrI.js → index-DqeNWrJc.js} +1 -1
- data/public/railwatch/assets/{index-oQrvBpOm.js → index-DwGETVLb.js} +1 -1
- data/public/railwatch/assets/{index-CxTLT-Qh.js → index-Dx7oNB2j.js} +1 -1
- data/public/railwatch/assets/{index-BDcglJzX.js → index-Kxpc-Jju.js} +1 -1
- data/public/railwatch/assets/{index-B8NA62Lz.js → index-YqmR-RY4.js} +1 -1
- data/public/railwatch/assets/{index-2W-ppwap.js → index-kX9K5M8z.js} +1 -1
- data/public/railwatch/assets/{index-DYK_dps4.js → index-wH-xxmJK.js} +1 -1
- data/public/railwatch/assets/{index-C7zREldp.js → index-x18ma-AF.js} +1 -1
- data/public/railwatch/assets/{inertia-FoqYZAk8.js → inertia-b7M33AzA.js} +2 -2
- data/public/railwatch/assets/{json-viewer-CxqMojEm.js → json-viewer-C0RZwcC2.js} +1 -1
- data/public/railwatch/assets/{klass-DEF-Vat5.js → klass-BT-gRTuY.js} +1 -1
- data/public/railwatch/assets/{origin-identity-Y6gvfQVR.js → origin-identity-ouOEvOlq.js} +1 -1
- data/public/railwatch/assets/{percentile-picker-E2aUdLxx.js → percentile-picker-BYFo11OE.js} +1 -1
- data/public/railwatch/assets/{relative-time-DcJbkKlN.js → relative-time-CJX4HXBB.js} +1 -1
- data/public/railwatch/assets/{release-health-C8WSCDKD.js → release-health-CIxeXQ_e.js} +1 -1
- data/public/railwatch/assets/{route-qO5vX1p-.js → route-eUFnanVO.js} +1 -1
- data/public/railwatch/assets/{segmented-BWee8uc9.js → segmented-CJq8WOHZ.js} +1 -1
- data/public/railwatch/assets/{select-G7rNBzv0.js → select-vYjStP1q.js} +1 -1
- data/public/railwatch/assets/{series-chart-C5nXIUc5.js → series-chart-FBOfRLhK.js} +1 -1
- data/public/railwatch/assets/{show-CTO8Lvd2.js → show-BBNCHyV9.js} +1 -1
- data/public/railwatch/assets/{show-Nfpxs8su.js → show-BJcTlqdU.js} +1 -1
- data/public/railwatch/assets/{show-CH7yxt7R.js → show-Bq4w9YtT.js} +1 -1
- data/public/railwatch/assets/{show-DyzHM527.js → show-C5SMVt6Z.js} +1 -1
- data/public/railwatch/assets/{show-BEa9PGu1.js → show-C7w8Tnt2.js} +1 -1
- data/public/railwatch/assets/{show-ddjUMo9G.js → show-D7fBqLw0.js} +1 -1
- data/public/railwatch/assets/{show-DnYsDMUt.js → show-DGPuUSHE.js} +1 -1
- data/public/railwatch/assets/{show-ksjbSzDH.js → show-DNY79oEl.js} +1 -1
- data/public/railwatch/assets/{show-BpCO49d3.js → show-DeTnRall.js} +1 -1
- data/public/railwatch/assets/{show-BiT_Aloc.js → show-daCAn8qV.js} +1 -1
- data/public/railwatch/assets/{show-BEWisLQw.js → show-zaB17ZGC.js} +1 -1
- data/public/railwatch/assets/{sort-header-uOq5VlrB.js → sort-header-dslBMND2.js} +1 -1
- data/public/railwatch/assets/{sparkline-cell-DgGij0cu.js → sparkline-cell-C7fhjJby.js} +1 -1
- data/public/railwatch/assets/stat-nY8iS5q9.js +1 -0
- data/public/railwatch/assets/{status-badge-BDkOXa-C.js → status-badge-D40D8TiV.js} +1 -1
- data/public/railwatch/assets/{tenant-path-DU0ezKSU.js → tenant-path-UhieazCc.js} +1 -1
- data/public/railwatch/assets/{use-clipboard-DoENmlWY.js → use-clipboard-T9kCBcs8.js} +1 -1
- data/public/railwatch/assets/use-live-rp6jfGac.js +1 -0
- data/public/railwatch/manifest.json +611 -611
- metadata +74 -74
- data/public/railwatch/assets/stat-BTzNKTm2.js +0 -1
- data/public/railwatch/assets/use-live-CE_fN5_6.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{x as Oe,c as be,r as Re,o as Pe,j as s,L as ke,J as qe,d as Ee,u as Le,K as Te,i as De}from"./inertia-FoqYZAk8.js";import{C as Me}from"./chart-hover-CEH-DtXO.js";import{V as Ce,D as Ae}from"./chart-panel-CUdIzJvk.js";import{D as ve}from"./data-table-DYi-N0hm.js";import{q as Ie,b as Ne,a4 as ze,E as Se,O as Ke,a5 as He}from"./app-layout-LvxN9xSS.js";import{u as Be,C as Je}from"./use-clipboard-DoENmlWY.js";import{b as ae,c as ce,a as ue,C as de}from"./card-Dpwlr0uY.js";import{u as We,P as Ve,E as Fe}from"./env-layout-HdcOaPPX.js";import{R as Ge}from"./relative-time-DcJbkKlN.js";import{S as Ze}from"./sparkline-cell-DgGij0cu.js";import{S as J,a as Qe}from"./stat-BTzNKTm2.js";import{I as Ue}from"./status-badge-BDkOXa-C.js";import{c as W,p as ge,m as me,a as $e}from"./format-B9SDkrWj.js";import{crashFreeTone as Xe,rate as Ye}from"./release-health-C8WSCDKD.js";import"./series-chart-C5nXIUc5.js";import"./chart-DJHv3R7W.js";import"./use-live-CE_fN5_6.js";import"./segmented-BWee8uc9.js";import"./arrow-up-DG01k9AL.js";const et=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],tt=Oe("refresh-cw",et),st=1500;function ie(t){const e=be.c(17),{code:l,className:p}=t,[,j]=Be(),[x,g]=Re.useState(!1);let r;e[0]!==l||e[1]!==j?(r=()=>{j(l).then(m=>{m&&(g(!0),window.setTimeout(()=>g(!1),st))})},e[0]=l,e[1]=j,e[2]=r):r=e[2];const u=r;let o;e[3]!==p?(o=Pe("relative",p),e[3]=p,e[4]=o):o=e[4];let d;e[5]!==l?(d=s.jsx("pre",{className:"bg-muted overflow-x-auto rounded p-3 pr-10 font-mono text-xs",children:l}),e[5]=l,e[6]=d):d=e[6];const n=x?"Copied code":"Copy code";let i;e[7]!==x?(i=x?s.jsx(Ie,{className:"size-3.5 text-emerald-500"}):s.jsx(Je,{className:"size-3.5 opacity-60"}),e[7]=x,e[8]=i):i=e[8];let a;e[9]!==u||e[10]!==n||e[11]!==i?(a=s.jsx(Ne,{type:"button","aria-label":n,variant:"ghost",size:"icon",className:"absolute top-1.5 right-1.5 size-6",onClick:u,children:i}),e[9]=u,e[10]=n,e[11]=i,e[12]=a):a=e[12];let c;return e[13]!==o||e[14]!==d||e[15]!==a?(c=s.jsxs("div",{className:o,children:[d,a]}),e[13]=o,e[14]=d,e[15]=a,e[16]=c):c=e[16],c}function rt(t){const e=be.c(22),{tokenPrefix:l,newToken:p,className:j}=t,x=p??`${l}…`,g=ot;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ae,{children:s.jsx(ce,{children:"Set up this environment"})}),e[0]=r):r=e[0];let u;e[1]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsxs("li",{children:["Add the gem",s.jsx(ie,{code:'gem "railwatch"',className:"mt-1.5"})]}),e[1]=u):u=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("li",{children:["Run the generator",s.jsx(ie,{code:"bin/rails generate railwatch:install --cloud",className:"mt-1.5"})]}),e[2]=o):o=e[2];const d=`RAILWATCH_TOKEN=${x}`;let n;e[3]!==d?(n=s.jsx(ie,{code:d,className:"mt-1.5"}),e[3]=d,e[4]=n):n=e[4];let i;e[5]!==p?(i=!p&&s.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:"Showing the token prefix only. The full token is shown once, right after an environment is created."}),e[5]=p,e[6]=i):i=e[6];let a;e[7]!==n||e[8]!==i?(a=s.jsxs("li",{children:["Set the token in the app's environment",n,i]}),e[7]=n,e[8]=i,e[9]=a):a=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs("li",{children:["Check every piece is wired up",s.jsx(ie,{code:"bin/rails railwatch:doctor",className:"mt-1.5"}),s.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:"Prints a ✓/✗ line per check — token, ingest, middleware, routes, deploy marker, browser client, test matchers — and exits non-zero if anything required is missing."})]}),e[10]=c):c=e[10];let m,f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsxs("li",{children:["Connect your AI assistant",s.jsxs("p",{className:"text-muted-foreground mt-1 text-xs",children:["Generate a personal token on your"," ",s.jsx(ke,{href:qe(),className:"underline underline-offset-4",children:"profile page"})," ","for paste-ready Claude Code, Cursor, VS Code, and Zed config."]})]}),m=s.jsx("li",{children:"Deploy"}),e[11]=m,e[12]=f):(m=e[11],f=e[12]);let h;e[13]!==a?(h=s.jsxs("ol",{className:"list-inside list-decimal space-y-3 text-sm",children:[u,o,a,c,f,m]}),e[13]=a,e[14]=h):h=e[14];let y;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 text-xs",children:[s.jsx(ze,{lastSeenAt:null}),"Waiting for first event…"]}),e[15]=y):y=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs("div",{className:"flex items-center justify-between border-t pt-3",children:[y,s.jsxs(Ne,{type:"button",variant:"outline",size:"sm",onClick:g,children:[s.jsx(tt,{className:"size-3.5"}),"Check now"]})]}),e[16]=v):v=e[16];let _;e[17]!==h?(_=s.jsxs(ue,{className:"space-y-4",children:[h,v]}),e[17]=h,e[18]=_):_=e[18];let b;return e[19]!==j||e[20]!==_?(b=s.jsxs(de,{className:j,children:[r,_]}),e[19]=j,e[20]=_,e[21]=b):b=e[21],b}function ot(){return Ee.reload()}function Ht(t){const e=be.c(109),{environment:l}=Le().props,{window:p,label:j}=We(),x=l.application_id,g=l.id,r=t.totals.requests.current,u=t.totals.requests.previous,o=t.totals.jobs.current,d=t.totals.jobs.previous,n=p==="custom"?"vs previous period":`vs previous ${j}`;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=[{title:"Overview",href:"#"}],e[0]=i):i=e[0];const a=`${l.application_name} · ${l.name}`;let c;e[1]!==l.last_seen_at?(c=l.last_seen_at?s.jsxs(s.Fragment,{children:["Last event ",s.jsx(Ge,{iso:l.last_seen_at})]}):"No events received yet.",e[1]=l.last_seen_at,e[2]=c):c=e[2];let m;e[3]!==a||e[4]!==c?(m=s.jsx(Ve,{title:a,description:c}),e[3]=a,e[4]=c,e[5]=m):m=e[5];let f;e[6]!==l.last_seen_at||e[7]!==l.token_prefix?(f=!l.last_seen_at&&s.jsx(rt,{tokenPrefix:l.token_prefix}),e[6]=l.last_seen_at,e[7]=l.token_prefix,e[8]=f):f=e[8];let h;e[9]!==r.count?(h={value:r.count,format:W},e[9]=r.count,e[10]=h):h=e[10];let y;e[11]!==r.count||e[12]!==r.errors?(y=ge(r.errors,r.count),e[11]=r.count,e[12]=r.errors,e[13]=y):y=e[13];let v;e[14]!==r.client_errors||e[15]!==r.count?(v=ge(r.client_errors,r.count),e[14]=r.client_errors,e[15]=r.count,e[16]=v):v=e[16];const _=`${y} 5xx · ${v} 4xx`,b=r.errors>0?"warning":void 0;let k;e[17]!==r.count||e[18]!==u.count?(k={current:r.count,previous:u.count,goodDirection:"up"},e[17]=r.count,e[18]=u.count,e[19]=k):k=e[19];let w;e[20]!==n||e[21]!==k||e[22]!==h||e[23]!==_||e[24]!==b?(w=s.jsx(J,{label:"Requests",roll:h,hint:_,tone:b,delta:k,deltaCaption:n}),e[20]=n,e[21]=k,e[22]=h,e[23]=_,e[24]=b,e[25]=w):w=e[25];const he=r.p95/1e3;let C;e[26]!==he?(C=me(he),e[26]=he,e[27]=C):C=e[27];const fe=r.avg/1e3;let V;e[28]!==fe?(V=me(fe),e[28]=fe,e[29]=V):V=e[29];const pe=r.max/1e3;let F;e[30]!==pe?(F=me(pe),e[30]=pe,e[31]=F):F=e[31];const xe=`avg ${V} · max ${F}`;let S;e[32]!==r.p95||e[33]!==u.p95?(S={current:r.p95,previous:u.p95,goodDirection:"down"},e[32]=r.p95,e[33]=u.p95,e[34]=S):S=e[34];let N;e[35]!==n||e[36]!==C||e[37]!==xe||e[38]!==S?(N=s.jsx(J,{label:"Request p95",value:C,hint:xe,delta:S,deltaCaption:n}),e[35]=n,e[36]=C,e[37]=xe,e[38]=S,e[39]=N):N=e[39];let $;e[40]!==o.count?($={value:o.count,format:W},e[40]=o.count,e[41]=$):$=e[41];let G;e[42]!==o.count||e[43]!==o.errors?(G=ge(o.errors,o.count),e[42]=o.count,e[43]=o.errors,e[44]=G):G=e[44];const _e=`${G} failed`,je=o.errors>0?"warning":void 0;let O;e[45]!==o.count||e[46]!==d.count?(O={current:o.count,previous:d.count,goodDirection:"up"},e[45]=o.count,e[46]=d.count,e[47]=O):O=e[47];let R;e[48]!==n||e[49]!==$||e[50]!==_e||e[51]!==je||e[52]!==O?(R=s.jsx(J,{label:"Job attempts",roll:$,hint:_e,tone:je,delta:O,deltaCaption:n}),e[48]=n,e[49]=$,e[50]=_e,e[51]=je,e[52]=O,e[53]=R):R=e[53];const ye=t.issues.length?"destructive":"success";let P;e[54]!==t.issues.length||e[55]!==ye?(P=s.jsx(J,{label:"Open issues",value:t.issues.length,tone:ye}),e[54]=t.issues.length,e[55]=ye,e[56]=P):P=e[56];let q;e[57]!==t.release_health?(q=t.release_health&&s.jsx(J,{label:"Crash-free sessions",value:Ye(t.release_health.crash_free_sessions),tone:Xe(t.release_health.crash_free_sessions),hint:`${t.release_health.ref} · ${W(t.release_health.sessions)} sessions`}),e[57]=t.release_health,e[58]=q):q=e[58];let E;e[59]!==w||e[60]!==N||e[61]!==R||e[62]!==P||e[63]!==q?(E=s.jsxs(Qe,{children:[w,N,R,P,q]}),e[59]=w,e[60]=N,e[61]=R,e[62]=P,e[63]=q,e[64]=E):E=e[64];let L;e[65]!==t.deploys||e[66]!==t.request_series?(L=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[s.jsx(Ce,{label:"Requests",data:t.request_series,deploys:t.deploys}),s.jsx(Ae,{label:"Request latency",data:t.request_series,deploys:t.deploys})]}),e[65]=t.deploys,e[66]=t.request_series,e[67]=L):L=e[67];let Z;e[68]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsx(ae,{children:s.jsx(ce,{children:"Slowest routes (p95)"})}),e[68]=Z):Z=e[68];let T;e[69]!==x||e[70]!==g?(T={key:"name",header:"Route",grow:!0,cell:we=>s.jsx(ke,{className:"font-mono text-xs hover:underline",href:Te(x,g,we.group_hash),children:we.name})},e[69]=x,e[70]=g,e[71]=T):T=e[71];let Q,U,X,Y;e[72]===Symbol.for("react.memo_cache_sentinel")?(Q={key:"trend",hideOnMobile:!0,header:"Trend",cell:vt},U={key:"count",header:"Count",align:"right",cell:yt},X={key:"p95",header:"p95",align:"right",cell:jt},Y={key:"errors",hideOnMobile:!0,header:"5xx",align:"right",cell:_t},e[72]=Q,e[73]=U,e[74]=X,e[75]=Y):(Q=e[72],U=e[73],X=e[74],Y=e[75]);let D;e[76]!==T?(D=[T,Q,U,X,Y],e[76]=T,e[77]=D):D=e[77];let M;e[78]!==t.slow_routes||e[79]!==D?(M=s.jsxs(de,{children:[Z,s.jsx(ue,{children:s.jsx(ve,{rows:t.slow_routes,rowKey:bt,hoverKey:gt,columns:D})})]}),e[78]=t.slow_routes,e[79]=D,e[80]=M):M=e[80];let ee;e[81]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(ae,{children:s.jsx(ce,{children:"Open issues"})}),e[81]=ee):ee=e[81];let te,se;e[82]===Symbol.for("react.memo_cache_sentinel")?(te=s.jsx(Se,{icon:Ke,title:"No open issues",description:"Issues are grouped from repeated request, job, and exception errors."}),se=[{key:"key",header:"Issue",cell:pt},{key:"title",header:"Title",cell:ft},{key:"status",hideOnMobile:!0,header:"",cell:ht},{key:"n",hideOnMobile:!0,header:"Count",align:"right",cell:mt},{key:"last",header:"Last",align:"right",cell:dt}],e[82]=te,e[83]=se):(te=e[82],se=e[83]);let A;e[84]!==t.issues?(A=s.jsxs(de,{children:[ee,s.jsx(ue,{children:s.jsx(ve,{rows:t.issues,rowKey:xt,empty:te,columns:se})})]}),e[84]=t.issues,e[85]=A):A=e[85];let I;e[86]!==M||e[87]!==A?(I=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[M,A]}),e[86]=M,e[87]=A,e[88]=I):I=e[88];let z;e[89]!==t.deploys||e[90]!==t.job_series?(z=s.jsx(Ce,{label:"Jobs",legend:"job",seriesLabel:"Attempts",data:t.job_series,deploys:t.deploys}),e[89]=t.deploys,e[90]=t.job_series,e[91]=z):z=e[91];let re;e[92]===Symbol.for("react.memo_cache_sentinel")?(re=s.jsx(ae,{children:s.jsx(ce,{children:"Servers"})}),e[92]=re):re=e[92];let K;e[93]!==t.processes?(K=Object.entries(t.processes),e[93]=t.processes,e[94]=K):K=e[94];let oe,le;e[95]===Symbol.for("react.memo_cache_sentinel")?(oe=s.jsx(Se,{icon:He,title:"No process has reported yet",description:"Server processes report here once they boot with the gem installed."}),le=[{key:"server",header:"Server",cell:ct},{key:"role",header:"Role",cell:at},{key:"deploy",header:"Deploy",cell:it},{key:"ver",hideOnMobile:!0,header:"Ruby / Rails",cell:nt},{key:"boot",hideOnMobile:!0,header:"Booted",align:"right",cell:lt}],e[95]=oe,e[96]=le):(oe=e[95],le=e[96]);let H;e[97]!==K?(H=s.jsxs(de,{children:[re,s.jsx(ue,{children:s.jsx(ve,{rows:K,rowKey:ut,empty:oe,columns:le})})]}),e[97]=K,e[98]=H):H=e[98];let B;e[99]!==z||e[100]!==H?(B=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[z,H]}),e[99]=z,e[100]=H,e[101]=B):B=e[101];let ne;return e[102]!==m||e[103]!==E||e[104]!==L||e[105]!==f||e[106]!==I||e[107]!==B?(ne=s.jsx(Fe,{title:"Overview",crumbs:i,children:s.jsxs(Me,{children:[m,f,E,L,I,B]})}),e[102]=m,e[103]=E,e[104]=L,e[105]=f,e[106]=I,e[107]=B,e[108]=ne):ne=e[108],ne}function lt(t){const[,e]=t;return $e(e.booted_at)}function nt(t){const[,e]=t;return`${e.ruby_version} / ${e.rails_version}`}function it(t){const[,e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e.deploy?.slice(0,10)})}function at(t){const[,e]=t;return e.role}function ct(t){const[e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e})}function ut(t){const[e]=t;return e}function dt(t){return $e(t.last_seen_at)}function mt(t){return W(t.occurrences)}function ht(t){return s.jsx(Ue,{status:t.status})}function ft(t){return s.jsx("span",{className:"line-clamp-1 text-xs",children:t.title})}function pt(t){return s.jsx(ke,{className:"font-mono text-xs hover:underline",href:De(t.id),children:t.key})}function xt(t){return t.id}function _t(t){return t.errors}function jt(t){return me(t.p95)}function yt(t){return W(t.count)}function vt(t){return s.jsx(Ze,{data:t.sparkline,hoverKey:t.group_hash})}function gt(t){return t.group_hash}function bt(t){return t.group_hash}export{Ht as default};
|
|
1
|
+
import{x as Oe,c as be,r as Re,o as Pe,j as s,L as ke,J as qe,d as Ee,u as Le,K as Te,i as De}from"./inertia-b7M33AzA.js";import{C as Me}from"./chart-hover-B5cFOZ24.js";import{V as Ce,D as Ae}from"./chart-panel-XD8qJDmg.js";import{D as ve}from"./data-table-Bzj8zcao.js";import{q as Ie,b as Ne,a4 as ze,E as Se,O as Ke,a5 as He}from"./app-layout-CpEbDy93.js";import{u as Be,C as Je}from"./use-clipboard-T9kCBcs8.js";import{b as ae,c as ce,a as ue,C as de}from"./card-C4EFUWG1.js";import{u as We,P as Ve,E as Fe}from"./env-layout-Dic4A8Kn.js";import{R as Ge}from"./relative-time-CJX4HXBB.js";import{S as Ze}from"./sparkline-cell-C7fhjJby.js";import{S as J,a as Qe}from"./stat-nY8iS5q9.js";import{I as Ue}from"./status-badge-D40D8TiV.js";import{c as W,p as ge,m as me,a as $e}from"./format-B9SDkrWj.js";import{crashFreeTone as Xe,rate as Ye}from"./release-health-CIxeXQ_e.js";import"./series-chart-FBOfRLhK.js";import"./chart-CD6EHDjG.js";import"./use-live-rp6jfGac.js";import"./segmented-CJq8WOHZ.js";import"./arrow-up-DAODKT5N.js";const et=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],tt=Oe("refresh-cw",et),st=1500;function ie(t){const e=be.c(17),{code:l,className:p}=t,[,j]=Be(),[x,g]=Re.useState(!1);let r;e[0]!==l||e[1]!==j?(r=()=>{j(l).then(m=>{m&&(g(!0),window.setTimeout(()=>g(!1),st))})},e[0]=l,e[1]=j,e[2]=r):r=e[2];const u=r;let o;e[3]!==p?(o=Pe("relative",p),e[3]=p,e[4]=o):o=e[4];let d;e[5]!==l?(d=s.jsx("pre",{className:"bg-muted overflow-x-auto rounded p-3 pr-10 font-mono text-xs",children:l}),e[5]=l,e[6]=d):d=e[6];const n=x?"Copied code":"Copy code";let i;e[7]!==x?(i=x?s.jsx(Ie,{className:"size-3.5 text-emerald-500"}):s.jsx(Je,{className:"size-3.5 opacity-60"}),e[7]=x,e[8]=i):i=e[8];let a;e[9]!==u||e[10]!==n||e[11]!==i?(a=s.jsx(Ne,{type:"button","aria-label":n,variant:"ghost",size:"icon",className:"absolute top-1.5 right-1.5 size-6",onClick:u,children:i}),e[9]=u,e[10]=n,e[11]=i,e[12]=a):a=e[12];let c;return e[13]!==o||e[14]!==d||e[15]!==a?(c=s.jsxs("div",{className:o,children:[d,a]}),e[13]=o,e[14]=d,e[15]=a,e[16]=c):c=e[16],c}function rt(t){const e=be.c(22),{tokenPrefix:l,newToken:p,className:j}=t,x=p??`${l}…`,g=ot;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ae,{children:s.jsx(ce,{children:"Set up this environment"})}),e[0]=r):r=e[0];let u;e[1]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsxs("li",{children:["Add the gem",s.jsx(ie,{code:'gem "railwatch"',className:"mt-1.5"})]}),e[1]=u):u=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("li",{children:["Run the generator",s.jsx(ie,{code:"bin/rails generate railwatch:install --cloud",className:"mt-1.5"})]}),e[2]=o):o=e[2];const d=`RAILWATCH_TOKEN=${x}`;let n;e[3]!==d?(n=s.jsx(ie,{code:d,className:"mt-1.5"}),e[3]=d,e[4]=n):n=e[4];let i;e[5]!==p?(i=!p&&s.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:"Showing the token prefix only. The full token is shown once, right after an environment is created."}),e[5]=p,e[6]=i):i=e[6];let a;e[7]!==n||e[8]!==i?(a=s.jsxs("li",{children:["Set the token in the app's environment",n,i]}),e[7]=n,e[8]=i,e[9]=a):a=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs("li",{children:["Check every piece is wired up",s.jsx(ie,{code:"bin/rails railwatch:doctor",className:"mt-1.5"}),s.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:"Prints a ✓/✗ line per check — token, ingest, middleware, routes, deploy marker, browser client, test matchers — and exits non-zero if anything required is missing."})]}),e[10]=c):c=e[10];let m,f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsxs("li",{children:["Connect your AI assistant",s.jsxs("p",{className:"text-muted-foreground mt-1 text-xs",children:["Generate a personal token on your"," ",s.jsx(ke,{href:qe(),className:"underline underline-offset-4",children:"profile page"})," ","for paste-ready Claude Code, Cursor, VS Code, and Zed config."]})]}),m=s.jsx("li",{children:"Deploy"}),e[11]=m,e[12]=f):(m=e[11],f=e[12]);let h;e[13]!==a?(h=s.jsxs("ol",{className:"list-inside list-decimal space-y-3 text-sm",children:[u,o,a,c,f,m]}),e[13]=a,e[14]=h):h=e[14];let y;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 text-xs",children:[s.jsx(ze,{lastSeenAt:null}),"Waiting for first event…"]}),e[15]=y):y=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs("div",{className:"flex items-center justify-between border-t pt-3",children:[y,s.jsxs(Ne,{type:"button",variant:"outline",size:"sm",onClick:g,children:[s.jsx(tt,{className:"size-3.5"}),"Check now"]})]}),e[16]=v):v=e[16];let _;e[17]!==h?(_=s.jsxs(ue,{className:"space-y-4",children:[h,v]}),e[17]=h,e[18]=_):_=e[18];let b;return e[19]!==j||e[20]!==_?(b=s.jsxs(de,{className:j,children:[r,_]}),e[19]=j,e[20]=_,e[21]=b):b=e[21],b}function ot(){return Ee.reload()}function Ht(t){const e=be.c(109),{environment:l}=Le().props,{window:p,label:j}=We(),x=l.application_id,g=l.id,r=t.totals.requests.current,u=t.totals.requests.previous,o=t.totals.jobs.current,d=t.totals.jobs.previous,n=p==="custom"?"vs previous period":`vs previous ${j}`;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=[{title:"Overview",href:"#"}],e[0]=i):i=e[0];const a=`${l.application_name} · ${l.name}`;let c;e[1]!==l.last_seen_at?(c=l.last_seen_at?s.jsxs(s.Fragment,{children:["Last event ",s.jsx(Ge,{iso:l.last_seen_at})]}):"No events received yet.",e[1]=l.last_seen_at,e[2]=c):c=e[2];let m;e[3]!==a||e[4]!==c?(m=s.jsx(Ve,{title:a,description:c}),e[3]=a,e[4]=c,e[5]=m):m=e[5];let f;e[6]!==l.last_seen_at||e[7]!==l.token_prefix?(f=!l.last_seen_at&&s.jsx(rt,{tokenPrefix:l.token_prefix}),e[6]=l.last_seen_at,e[7]=l.token_prefix,e[8]=f):f=e[8];let h;e[9]!==r.count?(h={value:r.count,format:W},e[9]=r.count,e[10]=h):h=e[10];let y;e[11]!==r.count||e[12]!==r.errors?(y=ge(r.errors,r.count),e[11]=r.count,e[12]=r.errors,e[13]=y):y=e[13];let v;e[14]!==r.client_errors||e[15]!==r.count?(v=ge(r.client_errors,r.count),e[14]=r.client_errors,e[15]=r.count,e[16]=v):v=e[16];const _=`${y} 5xx · ${v} 4xx`,b=r.errors>0?"warning":void 0;let k;e[17]!==r.count||e[18]!==u.count?(k={current:r.count,previous:u.count,goodDirection:"up"},e[17]=r.count,e[18]=u.count,e[19]=k):k=e[19];let w;e[20]!==n||e[21]!==k||e[22]!==h||e[23]!==_||e[24]!==b?(w=s.jsx(J,{label:"Requests",roll:h,hint:_,tone:b,delta:k,deltaCaption:n}),e[20]=n,e[21]=k,e[22]=h,e[23]=_,e[24]=b,e[25]=w):w=e[25];const he=r.p95/1e3;let C;e[26]!==he?(C=me(he),e[26]=he,e[27]=C):C=e[27];const fe=r.avg/1e3;let V;e[28]!==fe?(V=me(fe),e[28]=fe,e[29]=V):V=e[29];const pe=r.max/1e3;let F;e[30]!==pe?(F=me(pe),e[30]=pe,e[31]=F):F=e[31];const xe=`avg ${V} · max ${F}`;let S;e[32]!==r.p95||e[33]!==u.p95?(S={current:r.p95,previous:u.p95,goodDirection:"down"},e[32]=r.p95,e[33]=u.p95,e[34]=S):S=e[34];let N;e[35]!==n||e[36]!==C||e[37]!==xe||e[38]!==S?(N=s.jsx(J,{label:"Request p95",value:C,hint:xe,delta:S,deltaCaption:n}),e[35]=n,e[36]=C,e[37]=xe,e[38]=S,e[39]=N):N=e[39];let $;e[40]!==o.count?($={value:o.count,format:W},e[40]=o.count,e[41]=$):$=e[41];let G;e[42]!==o.count||e[43]!==o.errors?(G=ge(o.errors,o.count),e[42]=o.count,e[43]=o.errors,e[44]=G):G=e[44];const _e=`${G} failed`,je=o.errors>0?"warning":void 0;let O;e[45]!==o.count||e[46]!==d.count?(O={current:o.count,previous:d.count,goodDirection:"up"},e[45]=o.count,e[46]=d.count,e[47]=O):O=e[47];let R;e[48]!==n||e[49]!==$||e[50]!==_e||e[51]!==je||e[52]!==O?(R=s.jsx(J,{label:"Job attempts",roll:$,hint:_e,tone:je,delta:O,deltaCaption:n}),e[48]=n,e[49]=$,e[50]=_e,e[51]=je,e[52]=O,e[53]=R):R=e[53];const ye=t.issues.length?"destructive":"success";let P;e[54]!==t.issues.length||e[55]!==ye?(P=s.jsx(J,{label:"Open issues",value:t.issues.length,tone:ye}),e[54]=t.issues.length,e[55]=ye,e[56]=P):P=e[56];let q;e[57]!==t.release_health?(q=t.release_health&&s.jsx(J,{label:"Crash-free sessions",value:Ye(t.release_health.crash_free_sessions),tone:Xe(t.release_health.crash_free_sessions),hint:`${t.release_health.ref} · ${W(t.release_health.sessions)} sessions`}),e[57]=t.release_health,e[58]=q):q=e[58];let E;e[59]!==w||e[60]!==N||e[61]!==R||e[62]!==P||e[63]!==q?(E=s.jsxs(Qe,{children:[w,N,R,P,q]}),e[59]=w,e[60]=N,e[61]=R,e[62]=P,e[63]=q,e[64]=E):E=e[64];let L;e[65]!==t.deploys||e[66]!==t.request_series?(L=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[s.jsx(Ce,{label:"Requests",data:t.request_series,deploys:t.deploys}),s.jsx(Ae,{label:"Request latency",data:t.request_series,deploys:t.deploys})]}),e[65]=t.deploys,e[66]=t.request_series,e[67]=L):L=e[67];let Z;e[68]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsx(ae,{children:s.jsx(ce,{children:"Slowest routes (p95)"})}),e[68]=Z):Z=e[68];let T;e[69]!==x||e[70]!==g?(T={key:"name",header:"Route",grow:!0,cell:we=>s.jsx(ke,{className:"font-mono text-xs hover:underline",href:Te(x,g,we.group_hash),children:we.name})},e[69]=x,e[70]=g,e[71]=T):T=e[71];let Q,U,X,Y;e[72]===Symbol.for("react.memo_cache_sentinel")?(Q={key:"trend",hideOnMobile:!0,header:"Trend",cell:vt},U={key:"count",header:"Count",align:"right",cell:yt},X={key:"p95",header:"p95",align:"right",cell:jt},Y={key:"errors",hideOnMobile:!0,header:"5xx",align:"right",cell:_t},e[72]=Q,e[73]=U,e[74]=X,e[75]=Y):(Q=e[72],U=e[73],X=e[74],Y=e[75]);let D;e[76]!==T?(D=[T,Q,U,X,Y],e[76]=T,e[77]=D):D=e[77];let M;e[78]!==t.slow_routes||e[79]!==D?(M=s.jsxs(de,{children:[Z,s.jsx(ue,{children:s.jsx(ve,{rows:t.slow_routes,rowKey:bt,hoverKey:gt,columns:D})})]}),e[78]=t.slow_routes,e[79]=D,e[80]=M):M=e[80];let ee;e[81]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(ae,{children:s.jsx(ce,{children:"Open issues"})}),e[81]=ee):ee=e[81];let te,se;e[82]===Symbol.for("react.memo_cache_sentinel")?(te=s.jsx(Se,{icon:Ke,title:"No open issues",description:"Issues are grouped from repeated request, job, and exception errors."}),se=[{key:"key",header:"Issue",cell:pt},{key:"title",header:"Title",cell:ft},{key:"status",hideOnMobile:!0,header:"",cell:ht},{key:"n",hideOnMobile:!0,header:"Count",align:"right",cell:mt},{key:"last",header:"Last",align:"right",cell:dt}],e[82]=te,e[83]=se):(te=e[82],se=e[83]);let A;e[84]!==t.issues?(A=s.jsxs(de,{children:[ee,s.jsx(ue,{children:s.jsx(ve,{rows:t.issues,rowKey:xt,empty:te,columns:se})})]}),e[84]=t.issues,e[85]=A):A=e[85];let I;e[86]!==M||e[87]!==A?(I=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[M,A]}),e[86]=M,e[87]=A,e[88]=I):I=e[88];let z;e[89]!==t.deploys||e[90]!==t.job_series?(z=s.jsx(Ce,{label:"Jobs",legend:"job",seriesLabel:"Attempts",data:t.job_series,deploys:t.deploys}),e[89]=t.deploys,e[90]=t.job_series,e[91]=z):z=e[91];let re;e[92]===Symbol.for("react.memo_cache_sentinel")?(re=s.jsx(ae,{children:s.jsx(ce,{children:"Servers"})}),e[92]=re):re=e[92];let K;e[93]!==t.processes?(K=Object.entries(t.processes),e[93]=t.processes,e[94]=K):K=e[94];let oe,le;e[95]===Symbol.for("react.memo_cache_sentinel")?(oe=s.jsx(Se,{icon:He,title:"No process has reported yet",description:"Server processes report here once they boot with the gem installed."}),le=[{key:"server",header:"Server",cell:ct},{key:"role",header:"Role",cell:at},{key:"deploy",header:"Deploy",cell:it},{key:"ver",hideOnMobile:!0,header:"Ruby / Rails",cell:nt},{key:"boot",hideOnMobile:!0,header:"Booted",align:"right",cell:lt}],e[95]=oe,e[96]=le):(oe=e[95],le=e[96]);let H;e[97]!==K?(H=s.jsxs(de,{children:[re,s.jsx(ue,{children:s.jsx(ve,{rows:K,rowKey:ut,empty:oe,columns:le})})]}),e[97]=K,e[98]=H):H=e[98];let B;e[99]!==z||e[100]!==H?(B=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[z,H]}),e[99]=z,e[100]=H,e[101]=B):B=e[101];let ne;return e[102]!==m||e[103]!==E||e[104]!==L||e[105]!==f||e[106]!==I||e[107]!==B?(ne=s.jsx(Fe,{title:"Overview",crumbs:i,children:s.jsxs(Me,{children:[m,f,E,L,I,B]})}),e[102]=m,e[103]=E,e[104]=L,e[105]=f,e[106]=I,e[107]=B,e[108]=ne):ne=e[108],ne}function lt(t){const[,e]=t;return $e(e.booted_at)}function nt(t){const[,e]=t;return`${e.ruby_version} / ${e.rails_version}`}function it(t){const[,e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e.deploy?.slice(0,10)})}function at(t){const[,e]=t;return e.role}function ct(t){const[e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e})}function ut(t){const[e]=t;return e}function dt(t){return $e(t.last_seen_at)}function mt(t){return W(t.occurrences)}function ht(t){return s.jsx(Ue,{status:t.status})}function ft(t){return s.jsx("span",{className:"line-clamp-1 text-xs",children:t.title})}function pt(t){return s.jsx(ke,{className:"font-mono text-xs hover:underline",href:De(t.id),children:t.key})}function xt(t){return t.id}function _t(t){return t.errors}function jt(t){return me(t.p95)}function yt(t){return W(t.count)}function vt(t){return s.jsx(Ze,{data:t.sparkline,hoverKey:t.group_hash})}function gt(t){return t.group_hash}function bt(t){return t.group_hash}export{Ht as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $,u as P,j as i,o as N,L as I}from"./inertia-
|
|
1
|
+
import{c as $,u as P,j as i,o as N,L as I}from"./inertia-b7M33AzA.js";import{C as R}from"./copy-id-COM9oXfT.js";import{E as q}from"./app-layout-CpEbDy93.js";import{P as C,E as K}from"./env-layout-Dic4A8Kn.js";import{a as B,S as w}from"./stat-nY8iS5q9.js";import{K as H}from"./status-badge-D40D8TiV.js";import{e as W}from"./execution-path-C7Up9w4e.js";import{c as E,m as L,s as T}from"./format-B9SDkrWj.js";import"./use-clipboard-T9kCBcs8.js";import"./use-live-rp6jfGac.js";import"./segmented-CJq8WOHZ.js";import"./arrow-up-DAODKT5N.js";const A={request:"REQ",job_attempt:"JOB",scheduled_task:"TASK",command:"CMD",outgoing_request:"HTTP"};function M(t,e,s,h=0){return t.flatMap(g=>{const r=g.execution;return[{key:r.execution_id,depth:h,kind:r.kind,label:r.name,server:r.server,offset:r.offset,duration:r.duration,href:W({applicationId:e,environmentId:s,source:r.kind,executionId:r.execution_id}),failed:T(r.status,r.outcome)==="destructive"},...r.outgoing.map(a=>({key:`o-${a.id}`,depth:h+1,kind:"outgoing_request",label:`${a.method??""} ${a.url}`.trim(),server:null,offset:a.offset,duration:a.duration??0,href:null,failed:T(a.status_code)==="destructive"})),...M(g.children,e,s,h+1)]})}function D(t){const e=$.c(33),{row:s,scale:h}=t,g=`${s.depth*.75}rem`;let r;e[0]!==g?(r={paddingLeft:g},e[0]=g,e[1]=r):r=e[1];const a=s.failed?"destructive":"muted",p=A[s.kind]??s.kind;let l;e[2]!==a||e[3]!==p?(l=i.jsx(H,{tone:a,children:p}),e[2]=a,e[3]=p,e[4]=l):l=e[4];let n;e[5]!==s.label?(n=i.jsx("span",{className:"truncate font-mono",children:s.label}),e[5]=s.label,e[6]=n):n=e[6];let o;e[7]!==s.server?(o=s.server&&i.jsx("span",{className:"text-muted-foreground hidden shrink-0 font-mono text-[10px] sm:inline",children:s.server}),e[7]=s.server,e[8]=o):o=e[8];let c;e[9]!==r||e[10]!==l||e[11]!==n||e[12]!==o?(c=i.jsxs("span",{className:"col-start-1 row-start-1 flex min-w-0 items-center gap-1.5",style:r,children:[l,n,o]}),e[9]=r,e[10]=l,e[11]=n,e[12]=o,e[13]=c):c=e[13];let d;e[14]!==s.duration?(d=L(s.duration),e[14]=s.duration,e[15]=d):d=e[15];let f;e[16]!==d?(f=i.jsx("span",{className:"col-start-2 row-start-1 text-right font-mono tabular-nums md:col-start-3",children:d}),e[16]=d,e[17]=f):f=e[17];const j=s.failed?"bg-danger":s.href?"bg-primary":"bg-ok";let b;e[18]!==j?(b=N("block h-full rounded",j),e[18]=j,e[19]=b):b=e[19];const y=`${Math.min(99,s.offset/h*100)}%`,k=`${Math.max(.5,s.duration/h*100)}%`;let m;e[20]!==y||e[21]!==k?(m={marginLeft:y,width:k},e[20]=y,e[21]=k,e[22]=m):m=e[22];let u;e[23]!==b||e[24]!==m?(u=i.jsx("span",{className:"bg-muted/30 col-span-2 col-start-1 row-start-2 h-2 rounded md:col-span-1 md:col-start-2 md:row-start-1 md:h-3",children:i.jsx("span",{className:b,style:m})}),e[23]=b,e[24]=m,e[25]=u):u=e[25];let v;e[26]!==f||e[27]!==u||e[28]!==c?(v=i.jsxs(i.Fragment,{children:[c,f,u]}),e[26]=f,e[27]=u,e[28]=c,e[29]=v):v=e[29];const x=v;let _;return e[30]!==x||e[31]!==s.href?(_=s.href?i.jsx(I,{href:s.href,className:N("grid grid-cols-[1fr_4rem] items-center gap-x-2 gap-y-1 border-b px-2 py-1.5 text-xs last:border-b-0 md:grid-cols-[minmax(0,18rem)_1fr_4rem]","hover:bg-muted/40"),children:x}):i.jsx("div",{className:N("grid grid-cols-[1fr_4rem] items-center gap-x-2 gap-y-1 border-b px-2 py-1.5 text-xs last:border-b-0 md:grid-cols-[minmax(0,18rem)_1fr_4rem]","text-muted-foreground"),children:x}),e[30]=x,e[31]=s.href,e[32]=_):_=e[32],_}function re(t){const e=$.c(38),{environment:s}=P().props,h=s.application_id,g=s.id;let r,a,p,l,n,o,c;if(e[0]!==h||e[1]!==g||e[2]!==t.duration||e[3]!==t.roots||e[4]!==t.services||e[5]!==t.span_count||e[6]!==t.trace_id){const j=M(t.roots,h,g),b=j.filter(J),y=b.filter(F).length,k=Math.max(t.duration,1);r=K,l="Trace",e[14]===Symbol.for("react.memo_cache_sentinel")?(n=[{title:"Trace",href:"#"}],e[14]=n):n=e[14],e[15]!==t.trace_id?(o=i.jsx(C,{withWindow:!1,title:i.jsxs("span",{className:"flex min-w-0 items-center gap-1",children:[i.jsx("span",{className:"truncate font-mono text-base md:text-xl",children:t.trace_id}),i.jsx(R,{value:t.trace_id,label:""})]}),description:"Every execution that shares this trace id, nested by the call that started it."}),e[15]=t.trace_id,e[16]=o):o=e[16];let m;e[17]!==t.services.length?(m=E(t.services.length),e[17]=t.services.length,e[18]=m):m=e[18];let u;e[19]!==t.services?(u=t.services.join(" · "),e[19]=t.services,e[20]=u):u=e[20];let v;e[21]!==m||e[22]!==u?(v=i.jsx(w,{label:"Services",value:m,hint:u}),e[21]=m,e[22]=u,e[23]=v):v=e[23];let x;e[24]!==t.duration?(x=L(t.duration),e[24]=t.duration,e[25]=x):x=e[25];let _;e[26]!==x?(_=i.jsx(w,{label:"Total duration",value:x}),e[26]=x,e[27]=_):_=e[27],c=i.jsxs(B,{children:[i.jsx(w,{label:"Executions",value:E(b.length),hint:`${t.span_count} spans`}),v,_,i.jsx(w,{label:"Errors",value:E(y),tone:y?"destructive":void 0})]}),a="bg-card -mx-3 overflow-hidden border-y md:mx-0 md:rounded-lg md:border",p=j.length===0?i.jsx(q,{title:"Nothing in this trace",description:"No execution reported this trace id."}):j.map(S=>i.jsx(D,{row:S,scale:k},S.key)),e[0]=h,e[1]=g,e[2]=t.duration,e[3]=t.roots,e[4]=t.services,e[5]=t.span_count,e[6]=t.trace_id,e[7]=r,e[8]=a,e[9]=p,e[10]=l,e[11]=n,e[12]=o,e[13]=c}else r=e[7],a=e[8],p=e[9],l=e[10],n=e[11],o=e[12],c=e[13];let d;e[28]!==a||e[29]!==p?(d=i.jsx("div",{className:a,children:p}),e[28]=a,e[29]=p,e[30]=d):d=e[30];let f;return e[31]!==r||e[32]!==l||e[33]!==n||e[34]!==o||e[35]!==c||e[36]!==d?(f=i.jsxs(r,{title:l,crumbs:n,children:[o,c,d]}),e[31]=r,e[32]=l,e[33]=n,e[34]=o,e[35]=c,e[36]=d,e[37]=f):f=e[37],f}function F(t){return t.failed}function J(t){return t.href!==null}export{re as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as se,u as ne,a2 as re,j as s,L as ae,f as oe}from"./inertia-
|
|
1
|
+
import{c as se,u as ne,a2 as re,j as s,L as ae,f as oe}from"./inertia-b7M33AzA.js";import{V as ie,D as le}from"./chart-panel-XD8qJDmg.js";import{D as Z}from"./data-table-Bzj8zcao.js";import{E as ee}from"./app-layout-CpEbDy93.js";import{P as ce,E as me}from"./env-layout-Dic4A8Kn.js";import{S as T,a as ue}from"./stat-nY8iS5q9.js";import{S as de}from"./status-badge-D40D8TiV.js";import{C as fe,a as pe,b as xe,c as he}from"./card-C4EFUWG1.js";import{c as Y,m as P,w as je}from"./format-B9SDkrWj.js";import{B as te}from"./braces-DgB4bqp0.js";import"./series-chart-FBOfRLhK.js";import"./chart-hover-B5cFOZ24.js";import"./chart-CD6EHDjG.js";import"./use-live-rp6jfGac.js";import"./segmented-CJq8WOHZ.js";import"./arrow-up-DAODKT5N.js";function ge(t){const e=se.c(5),{attributes:o}=t;let i;e[0]!==o?(i=Object.entries(o),e[0]=o,e[1]=i):i=e[1];const r=i;if(r.length===0){let n;return e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("span",{className:"text-muted-foreground text-xs",children:"–"}),e[2]=n):n=e[2],n}let a;return e[3]!==r?(a=s.jsx("span",{className:"flex flex-wrap gap-1",children:r.map(ye)}),e[3]=r,e[4]=a):a=e[4],a}function ye(t){const[e,o]=t;return s.jsxs("span",{className:"bg-muted rounded-sm px-1.5 font-mono text-[10px]",children:[e,"=",String(o)]},e)}function ze(t){const e=se.c(73),{environment:o,window:i}=ne().props,r=o.application_id,a=o.id,n=t.summary.current,V=t.name??"Span";let l;e[0]!==r||e[1]!==a||e[2]!==i?(l=re(r,a,{window:i}),e[0]=r,e[1]=a,e[2]=i,e[3]=l):l=e[3];let c;e[4]!==l?(c={title:"Spans",href:l},e[4]=l,e[5]=c):c=e[5];const W=t.name??"Span";let m;e[6]!==W?(m={title:W,href:"#"},e[6]=W,e[7]=m):m=e[7];let u;e[8]!==c||e[9]!==m?(u=[c,m],e[8]=c,e[9]=m,e[10]=u):u=e[10];const q=t.name??"Span";let d;e[11]!==q?(d=s.jsx(ce,{title:s.jsx("span",{className:"font-mono",children:q}),description:"Every recording of this span in the window."}),e[11]=q,e[12]=d):d=e[12];let f;e[13]!==n.count?(f=Y(n.count),e[13]=n.count,e[14]=f):f=e[14];let p;e[15]!==n.count||e[16]!==t.summary.previous.count?(p={current:n.count,previous:t.summary.previous.count,goodDirection:"up"},e[15]=n.count,e[16]=t.summary.previous.count,e[17]=p):p=e[17];let x;e[18]!==f||e[19]!==p?(x=s.jsx(T,{label:"Recorded",value:f,delta:p,deltaCaption:"vs previous period"}),e[18]=f,e[19]=p,e[20]=x):x=e[20];let h;e[21]!==n.errors?(h=Y(n.errors),e[21]=n.errors,e[22]=h):h=e[22];const F=n.errors?"destructive":void 0;let j;e[23]!==h||e[24]!==F?(j=s.jsx(T,{label:"Failed",value:h,tone:F}),e[23]=h,e[24]=F,e[25]=j):j=e[25];const I=n.p95/1e3;let g;e[26]!==I?(g=P(I,2),e[26]=I,e[27]=g):g=e[27];const z=n.p99/1e3;let C;e[28]!==z?(C=P(z,2),e[28]=z,e[29]=C):C=e[29];const G=`p99 ${C}`;let y;e[30]!==g||e[31]!==G?(y=s.jsx(T,{label:"p95",value:g,hint:G}),e[30]=g,e[31]=G,e[32]=y):y=e[32];const J=n.max/1e3;let b;e[33]!==J?(b=P(J,2),e[33]=J,e[34]=b):b=e[34];const Q=n.avg/1e3;let D;e[35]!==Q?(D=P(Q,2),e[35]=Q,e[36]=D):D=e[36];const U=`avg ${D}`;let v;e[37]!==b||e[38]!==U?(v=s.jsx(T,{label:"Max",value:b,hint:U}),e[37]=b,e[38]=U,e[39]=v):v=e[39];let _;e[40]!==x||e[41]!==j||e[42]!==y||e[43]!==v?(_=s.jsxs(ue,{children:[x,j,y,v]}),e[40]=x,e[41]=j,e[42]=y,e[43]=v,e[44]=_):_=e[44];let S;e[45]!==t.series?(S=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[s.jsx(ie,{legend:"outcome",label:"Recordings",seriesLabel:"Spans",data:t.series}),s.jsx(le,{label:"Duration",data:t.series})]}),e[45]=t.series,e[46]=S):S=e[46];let R;e[47]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(xe,{children:s.jsx(he,{children:"Attributes"})}),e[47]=R):R=e[47];let L,M;e[48]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(ee,{icon:te,title:"No attributes recorded",description:"Pass a hash to Railwatch.span to tag each recording."}),M=[{key:"k",header:"Key",cell:Pe},{key:"v",header:"Most common values",cell:ke},{key:"n",header:"Spans",align:"right",cell:Ne}],e[48]=L,e[49]=M):(L=e[48],M=e[49]);let w;e[50]!==t.facets?(w=s.jsxs(fe,{children:[R,s.jsx(pe,{children:s.jsx(Z,{rows:t.facets,rowKey:Ce,empty:L,columns:M})})]}),e[50]=t.facets,e[51]=w):w=e[51];let $,A,B;e[52]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(ee,{icon:te,title:"No recordings in this window",description:"Widen the time window to see older recordings of this span."}),A={key:"when",header:"When",cell:Se},B={key:"status",header:"Status",cell:_e},e[52]=$,e[53]=A,e[54]=B):($=e[52],A=e[53],B=e[54]);let N;e[55]!==r||e[56]!==a?(N={key:"in",hideOnMobile:!0,header:"In",cell:X=>X.execution_id?s.jsx(ae,{className:"font-mono text-xs hover:underline",href:oe(r,a,X.execution_id),children:X.execution_preview}):s.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})},e[55]=r,e[56]=a,e[57]=N):N=e[57];let K,O;e[58]===Symbol.for("react.memo_cache_sentinel")?(K={key:"attrs",hideOnMobile:!0,header:"Attributes",cell:ve},O={key:"d",header:"Duration",align:"right",cell:be},e[58]=K,e[59]=O):(K=e[58],O=e[59]);let k;e[60]!==N?(k=[A,B,N,K,O],e[60]=N,e[61]=k):k=e[61];let E;e[62]!==t.samples||e[63]!==k?(E=s.jsx(Z,{rows:t.samples,rowKey:we,empty:$,columns:k}),e[62]=t.samples,e[63]=k,e[64]=E):E=e[64];let H;return e[65]!==V||e[66]!==_||e[67]!==S||e[68]!==w||e[69]!==E||e[70]!==u||e[71]!==d?(H=s.jsxs(me,{title:V,crumbs:u,children:[d,_,S,w,E]}),e[65]=V,e[66]=_,e[67]=S,e[68]=w,e[69]=E,e[70]=u,e[71]=d,e[72]=H):H=e[72],H}function be(t){return P(t.duration,2)}function ve(t){return s.jsx(ge,{attributes:t.attributes})}function _e(t){return s.jsx(de,{outcome:t.status})}function Se(t){return s.jsx("span",{className:"text-xs",children:je(t.occurred_at)})}function we(t){return t.id}function Ne(t){return Y(t.count)}function ke(t){return s.jsx("span",{className:"flex flex-wrap gap-1",children:t.values.map(Ee)})}function Ee(t){const[e,o]=t;return s.jsxs("span",{className:"bg-muted rounded-sm px-1.5 font-mono text-[10px]",children:[e,s.jsxs("span",{className:"text-muted-foreground",children:[" ×",o]})]},e)}function Pe(t){return s.jsx("span",{className:"font-mono text-xs",children:t.key})}function Ce(t){return t.key}export{ze as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as v,j as t,c as q,o as S,u as Ut,L as ze,p as Gt,q as Tt,s as Kt,t as Jt,i as Qt}from"./inertia-FoqYZAk8.js";import{D as Ve}from"./data-table-DYi-N0hm.js";import{F as Wt}from"./flamegraph-SKD9yxW9.js";import{C as Yt,E as Zt}from"./frames-CUpyJQDy.js";import{J as dt}from"./json-viewer-CxqMojEm.js";import{O as Et}from"./origin-identity-Y6gvfQVR.js";import{P as Xt,E as es}from"./env-layout-HdcOaPPX.js";import{S as me,a as ts}from"./stat-BTzNKTm2.js";import{S as it,L as ss}from"./status-badge-BDkOXa-C.js";import{d as It,e as Ot,u as Dt,f as ns,A as rs,P as Ue,g as R,h as vt,i as as,j as os,D as is,k as ls,l as Lt,m as cs,n as ds,o as us,I as ms,p as fs,B as jt,q as At,b as ps}from"./app-layout-LvxN9xSS.js";import{m as y,u as xs,w as hs,c as $t,b as Ht}from"./format-B9SDkrWj.js";import{C as ie,b as le,c as ce,a as de}from"./card-Dpwlr0uY.js";import{u as Mt,C as gs}from"./use-clipboard-DoENmlWY.js";import{e as bs}from"./execution-path-CElXXFO_.js";import"./chart-hover-CEH-DtXO.js";import"./segmented-BWee8uc9.js";import"./source-link-B2183i2-.js";import"./tenant-path-DU0ezKSU.js";import"./use-live-CE_fN5_6.js";import"./arrow-up-DG01k9AL.js";var vs=Object.defineProperty,te=(s,e)=>vs(s,"name",{value:e,configurable:!0}),ut,_t="HoverCard",[zt,cr]=It(_t,[Ot]),yt=Ot(),[js,lt]=zt(_t),_s=te(s=>{const{__scopeHoverCard:e,children:r,open:l,defaultOpen:i,onOpenChange:a,openDelay:c=700,closeDelay:n=300}=s,o=yt(e),m=v.useRef(0),x=v.useRef(0),d=v.useRef(!1),f=v.useRef(!1),[h,g]=Dt({prop:l,defaultProp:i??!1,onChange:a,caller:_t}),p=v.useCallback(()=>{clearTimeout(x.current),m.current=window.setTimeout(()=>g(!0),c)},[c,g]),_=v.useCallback(()=>{clearTimeout(m.current),!d.current&&!f.current&&(x.current=window.setTimeout(()=>g(!1),n))},[n,g]),N=v.useCallback(()=>g(!1),[g]);return v.useEffect(()=>()=>{clearTimeout(m.current),clearTimeout(x.current)},[]),t.jsx(js,{scope:e,open:h,onOpenChange:g,onOpen:p,onClose:_,onDismiss:N,hasSelectionRef:d,isPointerDownOnContentRef:f,children:t.jsx(ns,{...o,children:r})})},"HoverCard"),ys="HoverCardTrigger",Ns=v.forwardRef(te(function(e,r){const{__scopeHoverCard:l,...i}=e,a=lt(ys,l),c=yt(l);return t.jsx(rs,{asChild:!0,...c,children:t.jsx(Ue.a,{"data-state":a.open?"open":"closed",...i,ref:r,onPointerEnter:R(e.onPointerEnter,Be(a.onOpen)),onPointerLeave:R(e.onPointerLeave,Be(a.onClose)),onFocus:R(e.onFocus,a.onOpen),onBlur:R(e.onBlur,a.onClose),onTouchStart:R(e.onTouchStart,n=>n.preventDefault())})})},"HoverCardTrigger")),Ft="HoverCardPortal",[ws,ks]=zt(Ft,{forceMount:void 0}),Cs=te(s=>{const{__scopeHoverCard:e,forceMount:r,children:l,container:i}=s,a=lt(Ft,e);return t.jsx(ws,{scope:e,forceMount:r,children:t.jsx(vt,{present:r||a.open,children:t.jsx(as,{asChild:!0,container:i,children:l})})})},"HoverCardPortal"),ht="HoverCardContent",Ss=v.forwardRef(te(function(e,r){const l=ks(ht,e.__scopeHoverCard),{forceMount:i=l.forceMount,...a}=e,c=lt(ht,e.__scopeHoverCard);return t.jsx(vt,{present:i||c.open,children:t.jsx(Ts,{"data-state":c.open?"open":"closed",...a,onPointerEnter:R(e.onPointerEnter,Be(c.onOpen)),onPointerLeave:R(e.onPointerLeave,Be(c.onClose)),ref:r})})},"HoverCardContent")),Ts=v.forwardRef(te(function(e,r){const{__scopeHoverCard:l,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:c,onInteractOutside:n,...o}=e,m=lt(ht,l),x=yt(l),d=v.useRef(null),f=os(r,d),[h,g]=v.useState(!1);return v.useEffect(()=>{if(h){const p=document.body;return ut=p.style.userSelect||p.style.webkitUserSelect,p.style.userSelect="none",p.style.webkitUserSelect="none",()=>{p.style.userSelect=ut,p.style.webkitUserSelect=ut}}},[h]),v.useEffect(()=>{if(d.current){const p=te(()=>{g(!1),m.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(m.hasSelectionRef.current=!0)})},"handlePointerUp");return document.addEventListener("pointerup",p),()=>{document.removeEventListener("pointerup",p),m.hasSelectionRef.current=!1,m.isPointerDownOnContentRef.current=!1}}},[m.isPointerDownOnContentRef,m.hasSelectionRef]),v.useEffect(()=>{d.current&&Vt(d.current).forEach(_=>_.setAttribute("tabindex","-1"))}),t.jsx(is,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:n,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:R(c,p=>{p.preventDefault()}),onDismiss:m.onDismiss,children:t.jsx(ls,{...x,...o,onPointerDown:R(o.onPointerDown,p=>{p.currentTarget.contains(p.target)&&g(!0),m.hasSelectionRef.current=!1,m.isPointerDownOnContentRef.current=!0}),ref:f,style:{...o.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})},"HoverCardContentImpl"));function Be(s){return e=>e.pointerType==="touch"?void 0:s()}te(Be,"excludeTouch");function Vt(s){const e=[],r=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,{acceptNode:te(l=>l.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,"acceptNode")});for(;r.nextNode();)e.push(r.currentNode);return e}te(Vt,"getTabbableNodes");var Es=_s,$s=Ns,qs=Cs,Ps=Ss,Rs=Object.defineProperty,Fe=(s,e)=>Rs(s,"name",{value:e,configurable:!0}),Nt="Tabs",[Is,dr]=It(Nt,[Lt]),Bt=Lt(),[Os,wt]=Is(Nt),Ds=v.forwardRef(Fe(function(e,r){const{__scopeTabs:l,value:i,onValueChange:a,defaultValue:c,orientation:n="horizontal",dir:o,activationMode:m="automatic",...x}=e,d=cs(o),[f,h]=Dt({prop:i,onChange:a,defaultProp:c??"",caller:Nt});return t.jsx(Os,{scope:l,baseId:ds(),value:f,onValueChange:h,orientation:n,dir:d,activationMode:m,children:t.jsx(Ue.div,{dir:d,"data-orientation":n,...x,ref:r})})},"Tabs")),Ls="TabsList",As=v.forwardRef(Fe(function(e,r){const{__scopeTabs:l,loop:i=!0,...a}=e,c=wt(Ls,l),n=Bt(l);return t.jsx(us,{asChild:!0,...n,orientation:c.orientation,dir:c.dir,loop:i,children:t.jsx(Ue.div,{role:"tablist","aria-orientation":c.orientation,...a,ref:r})})},"TabsList")),Hs="TabsTrigger",Ms=v.forwardRef(Fe(function(e,r){const{__scopeTabs:l,value:i,disabled:a=!1,...c}=e,n=wt(Hs,l),o=Bt(l),m=kt(n.baseId,i),x=Ct(n.baseId,i),d=i===n.value;return t.jsx(ms,{asChild:!0,...o,focusable:!a,active:d,children:t.jsx(Ue.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":x,"data-state":d?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:m,...c,ref:r,onMouseDown:R(e.onMouseDown,f=>{!a&&f.button===0&&f.ctrlKey===!1?n.onValueChange(i):f.preventDefault()}),onKeyDown:R(e.onKeyDown,f=>{a||f.target!==f.currentTarget||[" ","Enter"].includes(f.key)&&n.onValueChange(i)}),onFocus:R(e.onFocus,()=>{const f=n.activationMode!=="manual";!d&&!a&&f&&n.onValueChange(i)})})})},"TabsTrigger")),zs="TabsContent",Fs=v.forwardRef(Fe(function(e,r){const{__scopeTabs:l,value:i,forceMount:a,children:c,...n}=e,o=wt(zs,l),m=kt(o.baseId,i),x=Ct(o.baseId,i),d=i===o.value,f=v.useRef(d);return v.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),t.jsx(vt,{present:a||d,children:({present:h})=>t.jsx(Ue.div,{"data-state":d?"active":"inactive","data-orientation":o.orientation,role:"tabpanel","aria-labelledby":m,hidden:!h,id:x,tabIndex:0,...n,ref:r,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&c})})},"TabsContent"));function kt(s,e){return`${s}-trigger-${e}`}Fe(kt,"makeTriggerId");function Ct(s,e){return`${s}-content-${e}`}Fe(Ct,"makeContentId");var Vs=Ds,Bs=As,Us=Ms,Gs=Fs;const Ks=new Set(["SELECT","FROM","WHERE","JOIN","LEFT","INNER","ON","AND","OR","ORDER","BY","GROUP","LIMIT","OFFSET","INSERT","INTO","VALUES","UPDATE","SET","DELETE","RETURNING","AS","IN","IS","NULL","NOT","DISTINCT","COUNT","SUM","AVG","MAX","MIN","CASE","WHEN","THEN","ELSE","END"]),mt=/("(?:[^"]|"")*"|`(?:[^`]|``)*`)|('(?:[^']|'')*')|(\?)|(\b\d+(?:\.\d+)?\b)|(\b[A-Za-z_][A-Za-z_0-9]*\b)/g;function Js(s){const e=[];let r=0;mt.lastIndex=0;let l;for(;l=mt.exec(s);){l.index>r&&e.push({text:s.slice(r,l.index),kind:"text"});const[i,a,c,n,o]=l;a?e.push({text:i,kind:"identifier"}):c?e.push({text:i,kind:"string"}):n?e.push({text:i,kind:"placeholder"}):o?e.push({text:i,kind:"number"}):Ks.has(i.toUpperCase())?e.push({text:i,kind:"keyword"}):e.push({text:i,kind:"text"}),r=mt.lastIndex}return r<s.length&&e.push({text:s.slice(r),kind:"text"}),e}const Qs={keyword:"text-primary font-semibold",string:"text-emerald-600 dark:text-emerald-400",number:"text-amber-600 dark:text-amber-400",placeholder:"text-primary font-semibold",identifier:"text-muted-foreground",text:""};function St(s){const e=q.c(16),{sql:r,wrap:l,inline:i,className:a}=s,c=l===void 0?!1:l,n=i===void 0?!1:i;let o,m,x,d;if(e[0]!==a||e[1]!==n||e[2]!==r||e[3]!==c){const h=Js(r);o=n?"span":"code";const p=c?"break-words whitespace-pre-wrap":"block max-w-full truncate";e[8]!==a||e[9]!==p?(m=S("font-mono text-xs",p,a),e[8]=a,e[9]=p,e[10]=m):m=e[10],x=c?void 0:r,d=h.map(Ws),e[0]=a,e[1]=n,e[2]=r,e[3]=c,e[4]=o,e[5]=m,e[6]=x,e[7]=d}else o=e[4],m=e[5],x=e[6],d=e[7];let f;return e[11]!==o||e[12]!==m||e[13]!==x||e[14]!==d?(f=t.jsx(o,{className:m,title:x,children:d}),e[11]=o,e[12]=m,e[13]=x,e[14]=d,e[15]=f):f=e[15],f}function Ws(s,e){return t.jsx("span",{className:Qs[s.kind]||void 0,children:s.text},e)}function Ys(s){const e=q.c(4);let r;e[0]!==s?({...r}=s,e[0]=s,e[1]=r):r=e[1];let l;return e[2]!==r?(l=t.jsx(Es,{"data-slot":"hover-card",...r}),e[2]=r,e[3]=l):l=e[3],l}function Zs(s){const e=q.c(4);let r;e[0]!==s?({...r}=s,e[0]=s,e[1]=r):r=e[1];let l;return e[2]!==r?(l=t.jsx($s,{"data-slot":"hover-card-trigger",...r}),e[2]=r,e[3]=l):l=e[3],l}function Xs(s){const e=q.c(12);let r,l,i,a;e[0]!==s?({className:r,align:i,sideOffset:a,...l}=s,e[0]=s,e[1]=r,e[2]=l,e[3]=i,e[4]=a):(r=e[1],l=e[2],i=e[3],a=e[4]);const c=i===void 0?"center":i,n=a===void 0?4:a;let o;e[5]!==r?(o=S("bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",r),e[5]=r,e[6]=o):o=e[6];let m;return e[7]!==c||e[8]!==l||e[9]!==n||e[10]!==o?(m=t.jsx(qs,{"data-slot":"hover-card-portal",children:t.jsx(Ps,{"data-slot":"hover-card-content",align:c,sideOffset:n,className:o,...l})}),e[7]=c,e[8]=l,e[9]=n,e[10]=o,e[11]=m):m=e[11],m}const qt={query:"bg-sky-500",transaction:"bg-sky-300",cache_event:"bg-violet-500",outgoing_request:"bg-orange-500",mail:"bg-pink-500",broadcast:"bg-teal-500",enqueued_job:"bg-amber-500",view_render:"bg-emerald-500",storage_op:"bg-indigo-500",exception:"bg-red-500",log:"bg-neutral-400",span:"bg-fuchsia-500",attachment:"bg-lime-500",llm_call:"bg-cyan-400"},gt={query:"Query",cache_event:"Cache",outgoing_request:"Outgoing",mail:"Mail",broadcast:"Broadcast",log:"Log",exception:"Exception",view_render:"View",storage_op:"Storage",enqueued_job:"Job",transaction:"Transaction",span:"Span",attachment:"Attachment",llm_call:"LLM"},en=["middleware_before","action","render","middleware_after","body"],bt={middleware_before:"before middleware",action:"action",render:"render",middleware_after:"after middleware",body:"body"},ft=[10,25,50,100,250,500,1e3,2500,5e3,1e4,3e4,6e4];function tn(s){const e=s/8;return ft.find(r=>r>=e)??ft[ft.length-1]}function sn(s,e){const r=[];for(let l=0;l<=s;l+=e)r.push(l);return r}const pt="grid grid-cols-[6rem_1fr_3.5rem] items-center gap-2 md:grid-cols-[5rem_13rem_1fr_4rem]",xt="hidden md:block";function Pt(s){const e=q.c(32),{entry:r,showSource:l}=s;let i;e[0]!==r.detail?(i=r.detail??{},e[0]=r.detail,e[1]=i):i=e[1];const a=i,c=gt[r.type]??r.type;let n;e[2]!==c?(n=t.jsx("span",{children:c}),e[2]=c,e[3]=n):n=e[3];let o;e[4]!==r.stage?(o=r.stage&&t.jsxs("span",{children:["· ",bt[r.stage]??r.stage]}),e[4]=r.stage,e[5]=o):o=e[5];let m;e[6]!==n||e[7]!==o?(m=t.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 text-[10px] tracking-wide uppercase",children:[n,o]}),e[6]=n,e[7]=o,e[8]=m):m=e[8];let x;e[9]!==a||e[10]!==r.label||e[11]!==r.sql||e[12]!==r.type||e[13]!==l?(x=r.type==="query"&&r.sql?t.jsx(St,{sql:r.sql,wrap:!0,className:"text-[11px]"}):r.type==="cache_event"?t.jsxs("div",{className:"font-mono text-xs break-all",children:[String(a.op??"")," ",t.jsx("span",{className:"font-semibold",children:String(a.key??"")})]}):r.type==="outgoing_request"?t.jsxs("div",{className:"font-mono text-xs break-all",children:[String(a.method??"")," ",String(a.url??r.label),a.status!=null&&t.jsxs("span",{className:"text-muted-foreground",children:[" → ",String(a.status)]}),l&&typeof a.body=="string"&&a.body!==""&&t.jsx("pre",{className:"bg-muted mt-1.5 max-h-48 overflow-auto rounded p-2 text-[10px] break-all whitespace-pre-wrap",children:a.body})]}):r.type==="llm_call"?t.jsxs("div",{className:"font-mono text-xs break-all",children:[String(a.tool??r.label),a.input_tokens!=null&&t.jsxs("span",{className:"text-muted-foreground",children:[" ","· ",String(a.input_tokens)," in / ",String(a.output_tokens??0)," out"]}),a.cost!=null&&t.jsxs("span",{className:"text-muted-foreground",children:[" ","· ",xs(Number(a.cost))]}),a.step!=null&&t.jsxs("span",{className:"text-muted-foreground",children:[" ","· ",String(a.workflow??"")," / ",String(a.step)]}),a.error!=null&&t.jsx("div",{className:"text-destructive mt-1",children:String(a.error)})]}):r.type==="mail"?t.jsx("div",{className:"font-mono text-xs break-all",children:String(a.subject??r.label)}):r.type==="log"?t.jsxs("div",{className:"font-mono text-xs break-words",children:[t.jsx("span",{className:"text-muted-foreground uppercase",children:String(a.level??"")})," ",String(a.message??r.label)]}):r.type==="exception"?t.jsx("div",{className:"text-destructive font-mono text-xs break-words",children:r.label}):t.jsx("div",{className:"font-mono text-xs break-words",children:r.label}),e[9]=a,e[10]=r.label,e[11]=r.sql,e[12]=r.type,e[13]=l,e[14]=x):x=e[14];let d;e[15]!==r.offset?(d=y(r.offset),e[15]=r.offset,e[16]=d):d=e[16];let f;e[17]!==d?(f=t.jsxs("span",{children:["+",d]}),e[17]=d,e[18]=f):f=e[18];let h;e[19]!==r.duration?(h=r.duration!=null&&t.jsx("span",{children:y(r.duration)}),e[19]=r.duration,e[20]=h):h=e[20];let g;e[21]!==f||e[22]!==h?(g=t.jsxs("div",{className:"text-muted-foreground flex flex-wrap gap-x-3 text-[11px] tabular-nums",children:[f,h]}),e[21]=f,e[22]=h,e[23]=g):g=e[23];let p;e[24]!==r.source||e[25]!==l?(p=l&&r.source&&t.jsx("div",{className:"text-muted-foreground border-t pt-1 font-mono text-[11px] break-all",children:r.source}),e[24]=r.source,e[25]=l,e[26]=p):p=e[26];let _;return e[27]!==g||e[28]!==p||e[29]!==m||e[30]!==x?(_=t.jsxs("div",{className:"space-y-1.5",children:[m,x,g,p]}),e[27]=g,e[28]=p,e[29]=m,e[30]=x,e[31]=_):_=e[31],_}function Rt(s){const e=q.c(7),{ticks:r,span:l}=s;let i;if(e[0]!==l||e[1]!==r){let c;e[3]!==l?(c=n=>t.jsx("div",{className:"bg-border/60 pointer-events-none absolute top-0 h-full w-px",style:{left:`${n/l*100}%`}},n),e[3]=l,e[4]=c):c=e[4],i=r.map(c),e[0]=l,e[1]=r,e[2]=i}else i=e[2];let a;return e[5]!==i?(a=t.jsx(t.Fragment,{children:i}),e[5]=i,e[6]=a):a=e[6],a}function nn(s){const e=q.c(70),{entries:r,total:l,stages:i}=s;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=new Set,e[0]=a):a=e[0];const[c,n]=v.useState(a),[o,m]=v.useState(null);let x;e[1]!==r||e[2]!==l?(x=Math.max(l,...r.map(rn),1),e[1]=r,e[2]=l,e[3]=x):x=e[3];const d=x;let f,h,g,p,_,N,w,k;if(e[4]!==r||e[5]!==o||e[6]!==c||e[7]!==d||e[8]!==i){const se=tn(d),C=sn(d,se);let E;if(e[17]!==r){E=new Map;for(const u of r)E.set(u.type,(E.get(u.type)??0)+1);e[17]=r,e[18]=E}else E=e[18];const O=E;let D;e[19]!==c?(D=u=>!c.has(u.type),e[19]=c,e[20]=D):D=e[20];const ee=r.filter(D);let L;e[21]===Symbol.for("react.memo_cache_sentinel")?(L=function(j){n(P=>{const X=new Set(P);return X.has(j)?X.delete(j):X.add(j),X})},e[21]=L):L=e[21];const ne=L;let A;e[22]!==i?(A=u=>i[u]!==void 0,e[22]=i,e[23]=A):A=e[23];let H;e[24]!==i?(H=(u,j)=>{const P=u.length>0?u[u.length-1].start+u[u.length-1].width:0;return u.push({name:j,start:P,width:i[j]}),u},e[24]=i,e[25]=H):H=e[25];const re=en.filter(A).reduce(H,[]);N="space-y-2",e[26]!==O||e[27]!==c?(w=O.size>0&&t.jsx("div",{className:"flex flex-wrap items-center gap-1.5",children:[...O.entries()].map(u=>{const[j,P]=u;return t.jsxs("button",{type:"button",onClick:()=>ne(j),className:S("flex items-center gap-1.5 rounded-full border px-2 py-0.5 text-[10px] font-medium transition-colors",c.has(j)?"text-muted-foreground opacity-50":"hover:bg-muted/60"),children:[t.jsx("span",{className:S("size-1.5 rounded-full",qt[j]??"bg-neutral-500")}),gt[j]??j,t.jsx("span",{className:"text-muted-foreground tabular-nums",children:P})]},j)})}),e[26]=O,e[27]=c,e[28]=w):w=e[28];let M,z,F;e[29]===Symbol.for("react.memo_cache_sentinel")?(M=S(pt,"px-2 text-[10px]"),z=t.jsx("div",{className:xt}),F=t.jsx("div",{}),e[29]=M,e[30]=z,e[31]=F):(M=e[29],z=e[30],F=e[31]);let V;e[32]!==d?(V=u=>t.jsx("span",{className:"text-muted-foreground absolute -translate-x-1/2 tabular-nums",style:{left:`${u/d*100}%`},children:y(u,0)},u),e[32]=d,e[33]=V):V=e[33];const W=C.map(V);let $;e[34]!==W?($=t.jsx("div",{className:"relative h-4 select-none",children:W}),e[34]=W,e[35]=$):$=e[35];let ae;e[36]===Symbol.for("react.memo_cache_sentinel")?(ae=t.jsx("div",{}),e[36]=ae):ae=e[36],e[37]!==$?(k=t.jsxs("div",{className:M,children:[z,F,$,ae]}),e[37]=$,e[38]=k):k=e[38];let oe,B,U;e[39]===Symbol.for("react.memo_cache_sentinel")?(oe=S(pt,"px-2"),B=t.jsx("div",{className:xt}),U=t.jsx("div",{}),e[39]=oe,e[40]=B,e[41]=U):(oe=e[39],B=e[40],U=e[41]);let Y;e[42]!==d||e[43]!==C?(Y=t.jsx(Rt,{ticks:C,span:d}),e[42]=d,e[43]=C,e[44]=Y):Y=e[44];let G;e[45]!==d?(G=u=>t.jsxs("div",{className:"border-background bg-primary/20 absolute top-0 flex h-full items-center overflow-hidden border-r px-1 whitespace-nowrap",style:{left:`${u.start/d*100}%`,width:`${u.width/d*100}%`},title:`${bt[u.name]??u.name} ${y(u.width)}`,children:[bt[u.name]??u.name," ",y(u.width,0)]},u.name),e[45]=d,e[46]=G):G=e[46];const ue=re.map(G);let Z;e[47]!==Y||e[48]!==ue?(Z=t.jsxs("div",{className:"bg-muted/40 relative h-5 overflow-hidden rounded text-[10px]",children:[Y,ue]}),e[47]=Y,e[48]=ue,e[49]=Z):Z=e[49];let K;e[50]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx("div",{}),e[50]=K):K=e[50],e[51]!==Z?(f=t.jsxs("div",{className:oe,children:[B,U,Z,K]}),e[51]=Z,e[52]=f):f=e[52],h="max-h-[32rem] overflow-y-auto rounded-lg border",e[53]!==r.length?(g=r.length===0&&t.jsx("div",{className:"text-muted-foreground p-4 text-center text-sm",children:"No child events recorded."}),e[53]=r.length,e[54]=g):g=e[54],p=r.length>0&&ee.length===0&&t.jsx("div",{className:"text-muted-foreground p-4 text-center text-sm",children:"No events match the active filters."});let J;e[55]!==o||e[56]!==d||e[57]!==C?(J=u=>{const j=`${u.type}-${u.id}`,P=d>0&&(u.duration??0)/d>.1,X=u.type==="exception";return t.jsxs("div",{className:"border-b last:border-b-0",style:{contentVisibility:"auto",containIntrinsicSize:"0 28px"},children:[t.jsxs(Ys,{openDelay:150,children:[t.jsx(Zs,{asChild:!0,children:t.jsxs("button",{type:"button",onClick:()=>m(o===j?null:j),className:S(pt,"hover:bg-muted/40 w-full px-2 py-1 text-left text-xs"),children:[t.jsx("span",{className:S("text-muted-foreground truncate font-mono",xt),children:gt[u.type]??u.type}),u.type==="query"&&u.sql?t.jsx(St,{sql:u.sql}):t.jsx("span",{className:"truncate font-mono",children:u.label}),t.jsxs("div",{className:"bg-muted/30 relative h-3 rounded",children:[t.jsx(Rt,{ticks:C,span:d}),X?t.jsx("div",{className:"absolute top-1/2 size-2.5 -translate-x-1/2 -translate-y-1/2 rotate-45 bg-red-500",style:{left:`${Math.min(100,u.offset/d*100)}%`}}):t.jsx("div",{className:S("absolute top-0 h-full rounded",qt[u.type]??"bg-neutral-500",P?"ring-foreground/30 opacity-100 ring-1 ring-inset":"opacity-70"),style:{left:`${Math.min(100,u.offset/d*100)}%`,width:`${Math.max(.3,(u.duration??0)/d*100)}%`}})]}),t.jsx("span",{className:S("text-muted-foreground text-right tabular-nums",P&&"text-foreground font-semibold"),children:u.duration!=null?y(u.duration):"–"})]})}),t.jsx(Xs,{className:"w-80",align:"start",children:t.jsx(Pt,{entry:u})})]}),o===j&&t.jsx("div",{className:"bg-muted/20 border-t px-4 py-2",children:t.jsx(Pt,{entry:u,showSource:!0})})]},j)},e[55]=o,e[56]=d,e[57]=C,e[58]=J):J=e[58],_=ee.map(J),e[4]=r,e[5]=o,e[6]=c,e[7]=d,e[8]=i,e[9]=f,e[10]=h,e[11]=g,e[12]=p,e[13]=_,e[14]=N,e[15]=w,e[16]=k}else f=e[9],h=e[10],g=e[11],p=e[12],_=e[13],N=e[14],w=e[15],k=e[16];let T;e[59]!==h||e[60]!==g||e[61]!==p||e[62]!==_?(T=t.jsxs("div",{className:h,children:[g,p,_]}),e[59]=h,e[60]=g,e[61]=p,e[62]=_,e[63]=T):T=e[63];let I;return e[64]!==f||e[65]!==T||e[66]!==N||e[67]!==w||e[68]!==k?(I=t.jsxs("div",{className:N,children:[w,k,f,T]}),e[64]=f,e[65]=T,e[66]=N,e[67]=w,e[68]=k,e[69]=I):I=e[69],I}function rn(s){return s.offset+(s.duration??0)}function an(s){const e=q.c(10);let r,l,i;e[0]!==s?({className:r,orientation:i,...l}=s,e[0]=s,e[1]=r,e[2]=l,e[3]=i):(r=e[1],l=e[2],i=e[3]);const a=i===void 0?"horizontal":i;let c;e[4]!==r?(c=S("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",r),e[4]=r,e[5]=c):c=e[5];let n;return e[6]!==a||e[7]!==l||e[8]!==c?(n=t.jsx(Vs,{"data-slot":"tabs","data-orientation":a,orientation:a,className:c,...l}),e[6]=a,e[7]=l,e[8]=c,e[9]=n):n=e[9],n}const on=fs("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function ln(s){const e=q.c(11);let r,l,i;e[0]!==s?({className:r,variant:i,...l}=s,e[0]=s,e[1]=r,e[2]=l,e[3]=i):(r=e[1],l=e[2],i=e[3]);const a=i===void 0?"default":i;let c;e[4]!==r||e[5]!==a?(c=S(on({variant:a}),r),e[4]=r,e[5]=a,e[6]=c):c=e[6];let n;return e[7]!==l||e[8]!==c||e[9]!==a?(n=t.jsx(Bs,{"data-slot":"tabs-list","data-variant":a,className:c,...l}),e[7]=l,e[8]=c,e[9]=a,e[10]=n):n=e[10],n}function at(s){const e=q.c(8);let r,l;e[0]!==s?({className:r,...l}=s,e[0]=s,e[1]=r,e[2]=l):(r=e[1],l=e[2]);let i;e[3]!==r?(i=S("text-foreground/60 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",r),e[3]=r,e[4]=i):i=e[4];let a;return e[5]!==l||e[6]!==i?(a=t.jsx(Us,{"data-slot":"tabs-trigger",className:i,...l}),e[5]=l,e[6]=i,e[7]=a):a=e[7],a}function ot(s){const e=q.c(8);let r,l;e[0]!==s?({className:r,...l}=s,e[0]=s,e[1]=r,e[2]=l):(r=e[1],l=e[2]);let i;e[3]!==r?(i=S("flex-1 outline-none",r),e[3]=r,e[4]=i):i=e[4];let a;return e[5]!==l||e[6]!==i?(a=t.jsx(Gs,{"data-slot":"tabs-content",className:i,...l}),e[5]=l,e[6]=i,e[7]=a):a=e[7],a}const cn={request:"Request",job_attempt:"Job attempt",scheduled_task:"Scheduled task",command:"Command",channel_action:"Channel action"};function dn(s){const e=q.c(8),{value:r}=s,[,l]=Mt(),[i,a]=v.useState(!1);let c;e[0]!==l||e[1]!==r?(c=()=>{(async()=>await l(r)&&(a(!0),setTimeout(()=>a(!1),1200)))()},e[0]=l,e[1]=r,e[2]=c):c=e[2];let n;e[3]!==i?(n=i?t.jsx(At,{className:"size-3"}):t.jsx(gs,{className:"size-3"}),e[3]=i,e[4]=n):n=e[4];let o;return e[5]!==c||e[6]!==n?(o=t.jsx("button",{type:"button",onClick:c,className:"hover:text-foreground text-muted-foreground ml-1 inline-flex align-middle",title:"Copy",children:n}),e[5]=c,e[6]=n,e[7]=o):o=e[7],o}function un(s){try{return JSON.parse(String(s))}catch{return String(s)}}function mn(s,e){const r=[];r.push(`# ${e.name}`),r.push(""),r.push(`- status: ${e.status??e.outcome??"-"}`),r.push(`- duration: ${y(e.duration)}`),r.push(`- occurred_at: ${e.occurred_at}`),r.push(""),r.push("## Stages");for(const[i,a]of Object.entries(e.stages))r.push(`- ${i}: ${y(a)}`);r.push(""),r.push("## Counters");for(const[i,a]of Object.entries(e.counters))r.push(`- ${i}: ${a}`);if(s.exceptions.length>0){r.push(""),r.push("## Exceptions");for(const i of s.exceptions){r.push(`### ${i.class_name}: ${i.message}`);for(const a of i.frames.filter(c=>c.in_app))r.push(`- ${a.file}:${a.line} in \`${a.function}\``)}}const l=[...s.queries].sort((i,a)=>a.duration-i.duration).slice(0,5);if(l.length>0){r.push(""),r.push("## Slow queries");for(const i of l)r.push(`- ${y(i.duration,2)} — \`${i.sql}\``)}return r.join(`
|
|
1
|
+
import{r as v,j as t,c as q,o as S,u as Ut,L as ze,p as Gt,q as Tt,s as Kt,t as Jt,i as Qt}from"./inertia-b7M33AzA.js";import{D as Ve}from"./data-table-Bzj8zcao.js";import{F as Wt}from"./flamegraph-Dve4TVkl.js";import{C as Yt,E as Zt}from"./frames-CkDFkUhi.js";import{J as dt}from"./json-viewer-C0RZwcC2.js";import{O as Et}from"./origin-identity-ouOEvOlq.js";import{P as Xt,E as es}from"./env-layout-Dic4A8Kn.js";import{S as me,a as ts}from"./stat-nY8iS5q9.js";import{S as it,L as ss}from"./status-badge-D40D8TiV.js";import{d as It,e as Ot,u as Dt,f as ns,A as rs,P as Ue,g as R,h as vt,i as as,j as os,D as is,k as ls,l as Lt,m as cs,n as ds,o as us,I as ms,p as fs,B as jt,q as At,b as ps}from"./app-layout-CpEbDy93.js";import{m as y,u as xs,w as hs,c as $t,b as Ht}from"./format-B9SDkrWj.js";import{C as ie,b as le,c as ce,a as de}from"./card-C4EFUWG1.js";import{u as Mt,C as gs}from"./use-clipboard-T9kCBcs8.js";import{e as bs}from"./execution-path-C7Up9w4e.js";import"./chart-hover-B5cFOZ24.js";import"./segmented-CJq8WOHZ.js";import"./source-link-B2183i2-.js";import"./tenant-path-UhieazCc.js";import"./use-live-rp6jfGac.js";import"./arrow-up-DAODKT5N.js";var vs=Object.defineProperty,te=(s,e)=>vs(s,"name",{value:e,configurable:!0}),ut,_t="HoverCard",[zt,cr]=It(_t,[Ot]),yt=Ot(),[js,lt]=zt(_t),_s=te(s=>{const{__scopeHoverCard:e,children:r,open:l,defaultOpen:i,onOpenChange:a,openDelay:c=700,closeDelay:n=300}=s,o=yt(e),m=v.useRef(0),x=v.useRef(0),d=v.useRef(!1),f=v.useRef(!1),[h,g]=Dt({prop:l,defaultProp:i??!1,onChange:a,caller:_t}),p=v.useCallback(()=>{clearTimeout(x.current),m.current=window.setTimeout(()=>g(!0),c)},[c,g]),_=v.useCallback(()=>{clearTimeout(m.current),!d.current&&!f.current&&(x.current=window.setTimeout(()=>g(!1),n))},[n,g]),N=v.useCallback(()=>g(!1),[g]);return v.useEffect(()=>()=>{clearTimeout(m.current),clearTimeout(x.current)},[]),t.jsx(js,{scope:e,open:h,onOpenChange:g,onOpen:p,onClose:_,onDismiss:N,hasSelectionRef:d,isPointerDownOnContentRef:f,children:t.jsx(ns,{...o,children:r})})},"HoverCard"),ys="HoverCardTrigger",Ns=v.forwardRef(te(function(e,r){const{__scopeHoverCard:l,...i}=e,a=lt(ys,l),c=yt(l);return t.jsx(rs,{asChild:!0,...c,children:t.jsx(Ue.a,{"data-state":a.open?"open":"closed",...i,ref:r,onPointerEnter:R(e.onPointerEnter,Be(a.onOpen)),onPointerLeave:R(e.onPointerLeave,Be(a.onClose)),onFocus:R(e.onFocus,a.onOpen),onBlur:R(e.onBlur,a.onClose),onTouchStart:R(e.onTouchStart,n=>n.preventDefault())})})},"HoverCardTrigger")),Ft="HoverCardPortal",[ws,ks]=zt(Ft,{forceMount:void 0}),Cs=te(s=>{const{__scopeHoverCard:e,forceMount:r,children:l,container:i}=s,a=lt(Ft,e);return t.jsx(ws,{scope:e,forceMount:r,children:t.jsx(vt,{present:r||a.open,children:t.jsx(as,{asChild:!0,container:i,children:l})})})},"HoverCardPortal"),ht="HoverCardContent",Ss=v.forwardRef(te(function(e,r){const l=ks(ht,e.__scopeHoverCard),{forceMount:i=l.forceMount,...a}=e,c=lt(ht,e.__scopeHoverCard);return t.jsx(vt,{present:i||c.open,children:t.jsx(Ts,{"data-state":c.open?"open":"closed",...a,onPointerEnter:R(e.onPointerEnter,Be(c.onOpen)),onPointerLeave:R(e.onPointerLeave,Be(c.onClose)),ref:r})})},"HoverCardContent")),Ts=v.forwardRef(te(function(e,r){const{__scopeHoverCard:l,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:c,onInteractOutside:n,...o}=e,m=lt(ht,l),x=yt(l),d=v.useRef(null),f=os(r,d),[h,g]=v.useState(!1);return v.useEffect(()=>{if(h){const p=document.body;return ut=p.style.userSelect||p.style.webkitUserSelect,p.style.userSelect="none",p.style.webkitUserSelect="none",()=>{p.style.userSelect=ut,p.style.webkitUserSelect=ut}}},[h]),v.useEffect(()=>{if(d.current){const p=te(()=>{g(!1),m.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(m.hasSelectionRef.current=!0)})},"handlePointerUp");return document.addEventListener("pointerup",p),()=>{document.removeEventListener("pointerup",p),m.hasSelectionRef.current=!1,m.isPointerDownOnContentRef.current=!1}}},[m.isPointerDownOnContentRef,m.hasSelectionRef]),v.useEffect(()=>{d.current&&Vt(d.current).forEach(_=>_.setAttribute("tabindex","-1"))}),t.jsx(is,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:n,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:R(c,p=>{p.preventDefault()}),onDismiss:m.onDismiss,children:t.jsx(ls,{...x,...o,onPointerDown:R(o.onPointerDown,p=>{p.currentTarget.contains(p.target)&&g(!0),m.hasSelectionRef.current=!1,m.isPointerDownOnContentRef.current=!0}),ref:f,style:{...o.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})},"HoverCardContentImpl"));function Be(s){return e=>e.pointerType==="touch"?void 0:s()}te(Be,"excludeTouch");function Vt(s){const e=[],r=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,{acceptNode:te(l=>l.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,"acceptNode")});for(;r.nextNode();)e.push(r.currentNode);return e}te(Vt,"getTabbableNodes");var Es=_s,$s=Ns,qs=Cs,Ps=Ss,Rs=Object.defineProperty,Fe=(s,e)=>Rs(s,"name",{value:e,configurable:!0}),Nt="Tabs",[Is,dr]=It(Nt,[Lt]),Bt=Lt(),[Os,wt]=Is(Nt),Ds=v.forwardRef(Fe(function(e,r){const{__scopeTabs:l,value:i,onValueChange:a,defaultValue:c,orientation:n="horizontal",dir:o,activationMode:m="automatic",...x}=e,d=cs(o),[f,h]=Dt({prop:i,onChange:a,defaultProp:c??"",caller:Nt});return t.jsx(Os,{scope:l,baseId:ds(),value:f,onValueChange:h,orientation:n,dir:d,activationMode:m,children:t.jsx(Ue.div,{dir:d,"data-orientation":n,...x,ref:r})})},"Tabs")),Ls="TabsList",As=v.forwardRef(Fe(function(e,r){const{__scopeTabs:l,loop:i=!0,...a}=e,c=wt(Ls,l),n=Bt(l);return t.jsx(us,{asChild:!0,...n,orientation:c.orientation,dir:c.dir,loop:i,children:t.jsx(Ue.div,{role:"tablist","aria-orientation":c.orientation,...a,ref:r})})},"TabsList")),Hs="TabsTrigger",Ms=v.forwardRef(Fe(function(e,r){const{__scopeTabs:l,value:i,disabled:a=!1,...c}=e,n=wt(Hs,l),o=Bt(l),m=kt(n.baseId,i),x=Ct(n.baseId,i),d=i===n.value;return t.jsx(ms,{asChild:!0,...o,focusable:!a,active:d,children:t.jsx(Ue.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":x,"data-state":d?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:m,...c,ref:r,onMouseDown:R(e.onMouseDown,f=>{!a&&f.button===0&&f.ctrlKey===!1?n.onValueChange(i):f.preventDefault()}),onKeyDown:R(e.onKeyDown,f=>{a||f.target!==f.currentTarget||[" ","Enter"].includes(f.key)&&n.onValueChange(i)}),onFocus:R(e.onFocus,()=>{const f=n.activationMode!=="manual";!d&&!a&&f&&n.onValueChange(i)})})})},"TabsTrigger")),zs="TabsContent",Fs=v.forwardRef(Fe(function(e,r){const{__scopeTabs:l,value:i,forceMount:a,children:c,...n}=e,o=wt(zs,l),m=kt(o.baseId,i),x=Ct(o.baseId,i),d=i===o.value,f=v.useRef(d);return v.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),t.jsx(vt,{present:a||d,children:({present:h})=>t.jsx(Ue.div,{"data-state":d?"active":"inactive","data-orientation":o.orientation,role:"tabpanel","aria-labelledby":m,hidden:!h,id:x,tabIndex:0,...n,ref:r,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&c})})},"TabsContent"));function kt(s,e){return`${s}-trigger-${e}`}Fe(kt,"makeTriggerId");function Ct(s,e){return`${s}-content-${e}`}Fe(Ct,"makeContentId");var Vs=Ds,Bs=As,Us=Ms,Gs=Fs;const Ks=new Set(["SELECT","FROM","WHERE","JOIN","LEFT","INNER","ON","AND","OR","ORDER","BY","GROUP","LIMIT","OFFSET","INSERT","INTO","VALUES","UPDATE","SET","DELETE","RETURNING","AS","IN","IS","NULL","NOT","DISTINCT","COUNT","SUM","AVG","MAX","MIN","CASE","WHEN","THEN","ELSE","END"]),mt=/("(?:[^"]|"")*"|`(?:[^`]|``)*`)|('(?:[^']|'')*')|(\?)|(\b\d+(?:\.\d+)?\b)|(\b[A-Za-z_][A-Za-z_0-9]*\b)/g;function Js(s){const e=[];let r=0;mt.lastIndex=0;let l;for(;l=mt.exec(s);){l.index>r&&e.push({text:s.slice(r,l.index),kind:"text"});const[i,a,c,n,o]=l;a?e.push({text:i,kind:"identifier"}):c?e.push({text:i,kind:"string"}):n?e.push({text:i,kind:"placeholder"}):o?e.push({text:i,kind:"number"}):Ks.has(i.toUpperCase())?e.push({text:i,kind:"keyword"}):e.push({text:i,kind:"text"}),r=mt.lastIndex}return r<s.length&&e.push({text:s.slice(r),kind:"text"}),e}const Qs={keyword:"text-primary font-semibold",string:"text-emerald-600 dark:text-emerald-400",number:"text-amber-600 dark:text-amber-400",placeholder:"text-primary font-semibold",identifier:"text-muted-foreground",text:""};function St(s){const e=q.c(16),{sql:r,wrap:l,inline:i,className:a}=s,c=l===void 0?!1:l,n=i===void 0?!1:i;let o,m,x,d;if(e[0]!==a||e[1]!==n||e[2]!==r||e[3]!==c){const h=Js(r);o=n?"span":"code";const p=c?"break-words whitespace-pre-wrap":"block max-w-full truncate";e[8]!==a||e[9]!==p?(m=S("font-mono text-xs",p,a),e[8]=a,e[9]=p,e[10]=m):m=e[10],x=c?void 0:r,d=h.map(Ws),e[0]=a,e[1]=n,e[2]=r,e[3]=c,e[4]=o,e[5]=m,e[6]=x,e[7]=d}else o=e[4],m=e[5],x=e[6],d=e[7];let f;return e[11]!==o||e[12]!==m||e[13]!==x||e[14]!==d?(f=t.jsx(o,{className:m,title:x,children:d}),e[11]=o,e[12]=m,e[13]=x,e[14]=d,e[15]=f):f=e[15],f}function Ws(s,e){return t.jsx("span",{className:Qs[s.kind]||void 0,children:s.text},e)}function Ys(s){const e=q.c(4);let r;e[0]!==s?({...r}=s,e[0]=s,e[1]=r):r=e[1];let l;return e[2]!==r?(l=t.jsx(Es,{"data-slot":"hover-card",...r}),e[2]=r,e[3]=l):l=e[3],l}function Zs(s){const e=q.c(4);let r;e[0]!==s?({...r}=s,e[0]=s,e[1]=r):r=e[1];let l;return e[2]!==r?(l=t.jsx($s,{"data-slot":"hover-card-trigger",...r}),e[2]=r,e[3]=l):l=e[3],l}function Xs(s){const e=q.c(12);let r,l,i,a;e[0]!==s?({className:r,align:i,sideOffset:a,...l}=s,e[0]=s,e[1]=r,e[2]=l,e[3]=i,e[4]=a):(r=e[1],l=e[2],i=e[3],a=e[4]);const c=i===void 0?"center":i,n=a===void 0?4:a;let o;e[5]!==r?(o=S("bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",r),e[5]=r,e[6]=o):o=e[6];let m;return e[7]!==c||e[8]!==l||e[9]!==n||e[10]!==o?(m=t.jsx(qs,{"data-slot":"hover-card-portal",children:t.jsx(Ps,{"data-slot":"hover-card-content",align:c,sideOffset:n,className:o,...l})}),e[7]=c,e[8]=l,e[9]=n,e[10]=o,e[11]=m):m=e[11],m}const qt={query:"bg-sky-500",transaction:"bg-sky-300",cache_event:"bg-violet-500",outgoing_request:"bg-orange-500",mail:"bg-pink-500",broadcast:"bg-teal-500",enqueued_job:"bg-amber-500",view_render:"bg-emerald-500",storage_op:"bg-indigo-500",exception:"bg-red-500",log:"bg-neutral-400",span:"bg-fuchsia-500",attachment:"bg-lime-500",llm_call:"bg-cyan-400"},gt={query:"Query",cache_event:"Cache",outgoing_request:"Outgoing",mail:"Mail",broadcast:"Broadcast",log:"Log",exception:"Exception",view_render:"View",storage_op:"Storage",enqueued_job:"Job",transaction:"Transaction",span:"Span",attachment:"Attachment",llm_call:"LLM"},en=["middleware_before","action","render","middleware_after","body"],bt={middleware_before:"before middleware",action:"action",render:"render",middleware_after:"after middleware",body:"body"},ft=[10,25,50,100,250,500,1e3,2500,5e3,1e4,3e4,6e4];function tn(s){const e=s/8;return ft.find(r=>r>=e)??ft[ft.length-1]}function sn(s,e){const r=[];for(let l=0;l<=s;l+=e)r.push(l);return r}const pt="grid grid-cols-[6rem_1fr_3.5rem] items-center gap-2 md:grid-cols-[5rem_13rem_1fr_4rem]",xt="hidden md:block";function Pt(s){const e=q.c(32),{entry:r,showSource:l}=s;let i;e[0]!==r.detail?(i=r.detail??{},e[0]=r.detail,e[1]=i):i=e[1];const a=i,c=gt[r.type]??r.type;let n;e[2]!==c?(n=t.jsx("span",{children:c}),e[2]=c,e[3]=n):n=e[3];let o;e[4]!==r.stage?(o=r.stage&&t.jsxs("span",{children:["· ",bt[r.stage]??r.stage]}),e[4]=r.stage,e[5]=o):o=e[5];let m;e[6]!==n||e[7]!==o?(m=t.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 text-[10px] tracking-wide uppercase",children:[n,o]}),e[6]=n,e[7]=o,e[8]=m):m=e[8];let x;e[9]!==a||e[10]!==r.label||e[11]!==r.sql||e[12]!==r.type||e[13]!==l?(x=r.type==="query"&&r.sql?t.jsx(St,{sql:r.sql,wrap:!0,className:"text-[11px]"}):r.type==="cache_event"?t.jsxs("div",{className:"font-mono text-xs break-all",children:[String(a.op??"")," ",t.jsx("span",{className:"font-semibold",children:String(a.key??"")})]}):r.type==="outgoing_request"?t.jsxs("div",{className:"font-mono text-xs break-all",children:[String(a.method??"")," ",String(a.url??r.label),a.status!=null&&t.jsxs("span",{className:"text-muted-foreground",children:[" → ",String(a.status)]}),l&&typeof a.body=="string"&&a.body!==""&&t.jsx("pre",{className:"bg-muted mt-1.5 max-h-48 overflow-auto rounded p-2 text-[10px] break-all whitespace-pre-wrap",children:a.body})]}):r.type==="llm_call"?t.jsxs("div",{className:"font-mono text-xs break-all",children:[String(a.tool??r.label),a.input_tokens!=null&&t.jsxs("span",{className:"text-muted-foreground",children:[" ","· ",String(a.input_tokens)," in / ",String(a.output_tokens??0)," out"]}),a.cost!=null&&t.jsxs("span",{className:"text-muted-foreground",children:[" ","· ",xs(Number(a.cost))]}),a.step!=null&&t.jsxs("span",{className:"text-muted-foreground",children:[" ","· ",String(a.workflow??"")," / ",String(a.step)]}),a.error!=null&&t.jsx("div",{className:"text-destructive mt-1",children:String(a.error)})]}):r.type==="mail"?t.jsx("div",{className:"font-mono text-xs break-all",children:String(a.subject??r.label)}):r.type==="log"?t.jsxs("div",{className:"font-mono text-xs break-words",children:[t.jsx("span",{className:"text-muted-foreground uppercase",children:String(a.level??"")})," ",String(a.message??r.label)]}):r.type==="exception"?t.jsx("div",{className:"text-destructive font-mono text-xs break-words",children:r.label}):t.jsx("div",{className:"font-mono text-xs break-words",children:r.label}),e[9]=a,e[10]=r.label,e[11]=r.sql,e[12]=r.type,e[13]=l,e[14]=x):x=e[14];let d;e[15]!==r.offset?(d=y(r.offset),e[15]=r.offset,e[16]=d):d=e[16];let f;e[17]!==d?(f=t.jsxs("span",{children:["+",d]}),e[17]=d,e[18]=f):f=e[18];let h;e[19]!==r.duration?(h=r.duration!=null&&t.jsx("span",{children:y(r.duration)}),e[19]=r.duration,e[20]=h):h=e[20];let g;e[21]!==f||e[22]!==h?(g=t.jsxs("div",{className:"text-muted-foreground flex flex-wrap gap-x-3 text-[11px] tabular-nums",children:[f,h]}),e[21]=f,e[22]=h,e[23]=g):g=e[23];let p;e[24]!==r.source||e[25]!==l?(p=l&&r.source&&t.jsx("div",{className:"text-muted-foreground border-t pt-1 font-mono text-[11px] break-all",children:r.source}),e[24]=r.source,e[25]=l,e[26]=p):p=e[26];let _;return e[27]!==g||e[28]!==p||e[29]!==m||e[30]!==x?(_=t.jsxs("div",{className:"space-y-1.5",children:[m,x,g,p]}),e[27]=g,e[28]=p,e[29]=m,e[30]=x,e[31]=_):_=e[31],_}function Rt(s){const e=q.c(7),{ticks:r,span:l}=s;let i;if(e[0]!==l||e[1]!==r){let c;e[3]!==l?(c=n=>t.jsx("div",{className:"bg-border/60 pointer-events-none absolute top-0 h-full w-px",style:{left:`${n/l*100}%`}},n),e[3]=l,e[4]=c):c=e[4],i=r.map(c),e[0]=l,e[1]=r,e[2]=i}else i=e[2];let a;return e[5]!==i?(a=t.jsx(t.Fragment,{children:i}),e[5]=i,e[6]=a):a=e[6],a}function nn(s){const e=q.c(70),{entries:r,total:l,stages:i}=s;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=new Set,e[0]=a):a=e[0];const[c,n]=v.useState(a),[o,m]=v.useState(null);let x;e[1]!==r||e[2]!==l?(x=Math.max(l,...r.map(rn),1),e[1]=r,e[2]=l,e[3]=x):x=e[3];const d=x;let f,h,g,p,_,N,w,k;if(e[4]!==r||e[5]!==o||e[6]!==c||e[7]!==d||e[8]!==i){const se=tn(d),C=sn(d,se);let E;if(e[17]!==r){E=new Map;for(const u of r)E.set(u.type,(E.get(u.type)??0)+1);e[17]=r,e[18]=E}else E=e[18];const O=E;let D;e[19]!==c?(D=u=>!c.has(u.type),e[19]=c,e[20]=D):D=e[20];const ee=r.filter(D);let L;e[21]===Symbol.for("react.memo_cache_sentinel")?(L=function(j){n(P=>{const X=new Set(P);return X.has(j)?X.delete(j):X.add(j),X})},e[21]=L):L=e[21];const ne=L;let A;e[22]!==i?(A=u=>i[u]!==void 0,e[22]=i,e[23]=A):A=e[23];let H;e[24]!==i?(H=(u,j)=>{const P=u.length>0?u[u.length-1].start+u[u.length-1].width:0;return u.push({name:j,start:P,width:i[j]}),u},e[24]=i,e[25]=H):H=e[25];const re=en.filter(A).reduce(H,[]);N="space-y-2",e[26]!==O||e[27]!==c?(w=O.size>0&&t.jsx("div",{className:"flex flex-wrap items-center gap-1.5",children:[...O.entries()].map(u=>{const[j,P]=u;return t.jsxs("button",{type:"button",onClick:()=>ne(j),className:S("flex items-center gap-1.5 rounded-full border px-2 py-0.5 text-[10px] font-medium transition-colors",c.has(j)?"text-muted-foreground opacity-50":"hover:bg-muted/60"),children:[t.jsx("span",{className:S("size-1.5 rounded-full",qt[j]??"bg-neutral-500")}),gt[j]??j,t.jsx("span",{className:"text-muted-foreground tabular-nums",children:P})]},j)})}),e[26]=O,e[27]=c,e[28]=w):w=e[28];let M,z,F;e[29]===Symbol.for("react.memo_cache_sentinel")?(M=S(pt,"px-2 text-[10px]"),z=t.jsx("div",{className:xt}),F=t.jsx("div",{}),e[29]=M,e[30]=z,e[31]=F):(M=e[29],z=e[30],F=e[31]);let V;e[32]!==d?(V=u=>t.jsx("span",{className:"text-muted-foreground absolute -translate-x-1/2 tabular-nums",style:{left:`${u/d*100}%`},children:y(u,0)},u),e[32]=d,e[33]=V):V=e[33];const W=C.map(V);let $;e[34]!==W?($=t.jsx("div",{className:"relative h-4 select-none",children:W}),e[34]=W,e[35]=$):$=e[35];let ae;e[36]===Symbol.for("react.memo_cache_sentinel")?(ae=t.jsx("div",{}),e[36]=ae):ae=e[36],e[37]!==$?(k=t.jsxs("div",{className:M,children:[z,F,$,ae]}),e[37]=$,e[38]=k):k=e[38];let oe,B,U;e[39]===Symbol.for("react.memo_cache_sentinel")?(oe=S(pt,"px-2"),B=t.jsx("div",{className:xt}),U=t.jsx("div",{}),e[39]=oe,e[40]=B,e[41]=U):(oe=e[39],B=e[40],U=e[41]);let Y;e[42]!==d||e[43]!==C?(Y=t.jsx(Rt,{ticks:C,span:d}),e[42]=d,e[43]=C,e[44]=Y):Y=e[44];let G;e[45]!==d?(G=u=>t.jsxs("div",{className:"border-background bg-primary/20 absolute top-0 flex h-full items-center overflow-hidden border-r px-1 whitespace-nowrap",style:{left:`${u.start/d*100}%`,width:`${u.width/d*100}%`},title:`${bt[u.name]??u.name} ${y(u.width)}`,children:[bt[u.name]??u.name," ",y(u.width,0)]},u.name),e[45]=d,e[46]=G):G=e[46];const ue=re.map(G);let Z;e[47]!==Y||e[48]!==ue?(Z=t.jsxs("div",{className:"bg-muted/40 relative h-5 overflow-hidden rounded text-[10px]",children:[Y,ue]}),e[47]=Y,e[48]=ue,e[49]=Z):Z=e[49];let K;e[50]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx("div",{}),e[50]=K):K=e[50],e[51]!==Z?(f=t.jsxs("div",{className:oe,children:[B,U,Z,K]}),e[51]=Z,e[52]=f):f=e[52],h="max-h-[32rem] overflow-y-auto rounded-lg border",e[53]!==r.length?(g=r.length===0&&t.jsx("div",{className:"text-muted-foreground p-4 text-center text-sm",children:"No child events recorded."}),e[53]=r.length,e[54]=g):g=e[54],p=r.length>0&&ee.length===0&&t.jsx("div",{className:"text-muted-foreground p-4 text-center text-sm",children:"No events match the active filters."});let J;e[55]!==o||e[56]!==d||e[57]!==C?(J=u=>{const j=`${u.type}-${u.id}`,P=d>0&&(u.duration??0)/d>.1,X=u.type==="exception";return t.jsxs("div",{className:"border-b last:border-b-0",style:{contentVisibility:"auto",containIntrinsicSize:"0 28px"},children:[t.jsxs(Ys,{openDelay:150,children:[t.jsx(Zs,{asChild:!0,children:t.jsxs("button",{type:"button",onClick:()=>m(o===j?null:j),className:S(pt,"hover:bg-muted/40 w-full px-2 py-1 text-left text-xs"),children:[t.jsx("span",{className:S("text-muted-foreground truncate font-mono",xt),children:gt[u.type]??u.type}),u.type==="query"&&u.sql?t.jsx(St,{sql:u.sql}):t.jsx("span",{className:"truncate font-mono",children:u.label}),t.jsxs("div",{className:"bg-muted/30 relative h-3 rounded",children:[t.jsx(Rt,{ticks:C,span:d}),X?t.jsx("div",{className:"absolute top-1/2 size-2.5 -translate-x-1/2 -translate-y-1/2 rotate-45 bg-red-500",style:{left:`${Math.min(100,u.offset/d*100)}%`}}):t.jsx("div",{className:S("absolute top-0 h-full rounded",qt[u.type]??"bg-neutral-500",P?"ring-foreground/30 opacity-100 ring-1 ring-inset":"opacity-70"),style:{left:`${Math.min(100,u.offset/d*100)}%`,width:`${Math.max(.3,(u.duration??0)/d*100)}%`}})]}),t.jsx("span",{className:S("text-muted-foreground text-right tabular-nums",P&&"text-foreground font-semibold"),children:u.duration!=null?y(u.duration):"–"})]})}),t.jsx(Xs,{className:"w-80",align:"start",children:t.jsx(Pt,{entry:u})})]}),o===j&&t.jsx("div",{className:"bg-muted/20 border-t px-4 py-2",children:t.jsx(Pt,{entry:u,showSource:!0})})]},j)},e[55]=o,e[56]=d,e[57]=C,e[58]=J):J=e[58],_=ee.map(J),e[4]=r,e[5]=o,e[6]=c,e[7]=d,e[8]=i,e[9]=f,e[10]=h,e[11]=g,e[12]=p,e[13]=_,e[14]=N,e[15]=w,e[16]=k}else f=e[9],h=e[10],g=e[11],p=e[12],_=e[13],N=e[14],w=e[15],k=e[16];let T;e[59]!==h||e[60]!==g||e[61]!==p||e[62]!==_?(T=t.jsxs("div",{className:h,children:[g,p,_]}),e[59]=h,e[60]=g,e[61]=p,e[62]=_,e[63]=T):T=e[63];let I;return e[64]!==f||e[65]!==T||e[66]!==N||e[67]!==w||e[68]!==k?(I=t.jsxs("div",{className:N,children:[w,k,f,T]}),e[64]=f,e[65]=T,e[66]=N,e[67]=w,e[68]=k,e[69]=I):I=e[69],I}function rn(s){return s.offset+(s.duration??0)}function an(s){const e=q.c(10);let r,l,i;e[0]!==s?({className:r,orientation:i,...l}=s,e[0]=s,e[1]=r,e[2]=l,e[3]=i):(r=e[1],l=e[2],i=e[3]);const a=i===void 0?"horizontal":i;let c;e[4]!==r?(c=S("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",r),e[4]=r,e[5]=c):c=e[5];let n;return e[6]!==a||e[7]!==l||e[8]!==c?(n=t.jsx(Vs,{"data-slot":"tabs","data-orientation":a,orientation:a,className:c,...l}),e[6]=a,e[7]=l,e[8]=c,e[9]=n):n=e[9],n}const on=fs("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function ln(s){const e=q.c(11);let r,l,i;e[0]!==s?({className:r,variant:i,...l}=s,e[0]=s,e[1]=r,e[2]=l,e[3]=i):(r=e[1],l=e[2],i=e[3]);const a=i===void 0?"default":i;let c;e[4]!==r||e[5]!==a?(c=S(on({variant:a}),r),e[4]=r,e[5]=a,e[6]=c):c=e[6];let n;return e[7]!==l||e[8]!==c||e[9]!==a?(n=t.jsx(Bs,{"data-slot":"tabs-list","data-variant":a,className:c,...l}),e[7]=l,e[8]=c,e[9]=a,e[10]=n):n=e[10],n}function at(s){const e=q.c(8);let r,l;e[0]!==s?({className:r,...l}=s,e[0]=s,e[1]=r,e[2]=l):(r=e[1],l=e[2]);let i;e[3]!==r?(i=S("text-foreground/60 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",r),e[3]=r,e[4]=i):i=e[4];let a;return e[5]!==l||e[6]!==i?(a=t.jsx(Us,{"data-slot":"tabs-trigger",className:i,...l}),e[5]=l,e[6]=i,e[7]=a):a=e[7],a}function ot(s){const e=q.c(8);let r,l;e[0]!==s?({className:r,...l}=s,e[0]=s,e[1]=r,e[2]=l):(r=e[1],l=e[2]);let i;e[3]!==r?(i=S("flex-1 outline-none",r),e[3]=r,e[4]=i):i=e[4];let a;return e[5]!==l||e[6]!==i?(a=t.jsx(Gs,{"data-slot":"tabs-content",className:i,...l}),e[5]=l,e[6]=i,e[7]=a):a=e[7],a}const cn={request:"Request",job_attempt:"Job attempt",scheduled_task:"Scheduled task",command:"Command",channel_action:"Channel action"};function dn(s){const e=q.c(8),{value:r}=s,[,l]=Mt(),[i,a]=v.useState(!1);let c;e[0]!==l||e[1]!==r?(c=()=>{(async()=>await l(r)&&(a(!0),setTimeout(()=>a(!1),1200)))()},e[0]=l,e[1]=r,e[2]=c):c=e[2];let n;e[3]!==i?(n=i?t.jsx(At,{className:"size-3"}):t.jsx(gs,{className:"size-3"}),e[3]=i,e[4]=n):n=e[4];let o;return e[5]!==c||e[6]!==n?(o=t.jsx("button",{type:"button",onClick:c,className:"hover:text-foreground text-muted-foreground ml-1 inline-flex align-middle",title:"Copy",children:n}),e[5]=c,e[6]=n,e[7]=o):o=e[7],o}function un(s){try{return JSON.parse(String(s))}catch{return String(s)}}function mn(s,e){const r=[];r.push(`# ${e.name}`),r.push(""),r.push(`- status: ${e.status??e.outcome??"-"}`),r.push(`- duration: ${y(e.duration)}`),r.push(`- occurred_at: ${e.occurred_at}`),r.push(""),r.push("## Stages");for(const[i,a]of Object.entries(e.stages))r.push(`- ${i}: ${y(a)}`);r.push(""),r.push("## Counters");for(const[i,a]of Object.entries(e.counters))r.push(`- ${i}: ${a}`);if(s.exceptions.length>0){r.push(""),r.push("## Exceptions");for(const i of s.exceptions){r.push(`### ${i.class_name}: ${i.message}`);for(const a of i.frames.filter(c=>c.in_app))r.push(`- ${a.file}:${a.line} in \`${a.function}\``)}}const l=[...s.queries].sort((i,a)=>a.duration-i.duration).slice(0,5);if(l.length>0){r.push(""),r.push("## Slow queries");for(const i of l)r.push(`- ${y(i.duration,2)} — \`${i.sql}\``)}return r.join(`
|
|
2
2
|
`)}function ur(s){const e=q.c(244),{environment:r,range:l,window:i}=Ut().props,a=r.application_id,c=r.id,n=s.execution,o=n.detail;let m;e[0]!==o.headers?(m=o.headers??{},e[0]=o.headers,e[1]=m):m=e[1];const x=m,d=o.inertia,[,f]=Mt(),[h,g]=v.useState(!1),p=n.name,_=cn[n.kind]??n.kind;let N;e[2]!==_?(N={title:_,href:"#"},e[2]=_,e[3]=N):N=e[3];let w;e[4]!==n.name?(w={title:n.name,href:"#"},e[4]=n.name,e[5]=w):w=e[5];let k;e[6]!==N||e[7]!==w?(k=[N,w],e[6]=N,e[7]=w,e[8]=k):k=e[8];let T;e[9]!==n.outcome||e[10]!==n.status?(T=t.jsx(it,{status:n.status,outcome:n.outcome}),e[9]=n.outcome,e[10]=n.status,e[11]=T):T=e[11];let I;e[12]!==n.name?(I=t.jsx("span",{className:"font-mono",children:n.name}),e[12]=n.name,e[13]=I):I=e[13];let se;e[14]!==n.profiled?(se=n.profiled&&t.jsx(jt,{variant:"secondary",className:"font-mono",children:"profiled"}),e[14]=n.profiled,e[15]=se):se=e[15];let C;e[16]!==T||e[17]!==I||e[18]!==se?(C=t.jsxs("span",{className:"flex flex-wrap items-center gap-2",children:[T,I,se]}),e[16]=T,e[17]=I,e[18]=se,e[19]=C):C=e[19];let E;e[20]!==n.occurred_at?(E=hs(n.occurred_at),e[20]=n.occurred_at,e[21]=E):E=e[21];let O;e[22]!==E?(O=t.jsx("span",{children:E}),e[22]=E,e[23]=O):O=e[23];let D;e[24]!==n.server?(D=n.server&&t.jsxs("span",{children:["server ",n.server]}),e[24]=n.server,e[25]=D):D=e[25];let ee;e[26]!==n.deploy?(ee=n.deploy&&t.jsxs("span",{children:["deploy ",n.deploy.slice(0,12)]}),e[26]=n.deploy,e[27]=ee):ee=e[27];let L;e[28]!==a||e[29]!==c||e[30]!==s.person||e[31]!==l||e[32]!==i||e[33]!==n.tenant||e[34]!==n.user_ref?(L=n.user_ref&&t.jsxs("span",{className:"inline-flex items-center gap-1",children:["origin user",t.jsx(Et,{applicationId:a,environmentId:c,kind:"user",range:l,window:i,user_ref:n.user_ref,tenant:n.tenant,person:s.person&&{ref:s.person.ref,name:s.person.name??s.person.ref}})]}),e[28]=a,e[29]=c,e[30]=s.person,e[31]=l,e[32]=i,e[33]=n.tenant,e[34]=n.user_ref,e[35]=L):L=e[35];let ne;e[36]!==a||e[37]!==c||e[38]!==l||e[39]!==i||e[40]!==n.tenant||e[41]!==n.user_ref?(ne=n.tenant&&t.jsxs("span",{className:"inline-flex items-center gap-1",children:["origin tenant",t.jsx(Et,{applicationId:a,environmentId:c,kind:"tenant",range:l,window:i,user_ref:n.user_ref,tenant:n.tenant,person:null})]}),e[36]=a,e[37]=c,e[38]=l,e[39]=i,e[40]=n.tenant,e[41]=n.user_ref,e[42]=ne):ne=e[42];let A;e[43]!==O||e[44]!==D||e[45]!==ee||e[46]!==L||e[47]!==ne?(A=t.jsxs("span",{className:"flex flex-wrap gap-x-3 text-xs",children:[O,D,ee,L,ne]}),e[43]=O,e[44]=D,e[45]=ee,e[46]=L,e[47]=ne,e[48]=A):A=e[48];let H;e[49]!==f||e[50]!==s||e[51]!==n?(H=()=>{(async()=>await f(mn(s,n))&&(g(!0),setTimeout(()=>g(!1),1200)))()},e[49]=f,e[50]=s,e[51]=n,e[52]=H):H=e[52];let re;e[53]!==h?(re=h?t.jsx(At,{className:"size-3.5"}):t.jsx(Yt,{className:"size-3.5"}),e[53]=h,e[54]=re):re=e[54];let M;e[55]!==H||e[56]!==re?(M=t.jsxs(ps,{type:"button",variant:"outline",size:"sm",onClick:H,children:[re,"Copy as Markdown"]}),e[55]=H,e[56]=re,e[57]=M):M=e[57];let z;e[58]!==A||e[59]!==M||e[60]!==C?(z=t.jsx(Xt,{withWindow:!1,title:C,description:A,actions:M}),e[58]=A,e[59]=M,e[60]=C,e[61]=z):z=e[61];let F;e[62]!==s.issues?(F=s.issues.length>0&&t.jsx("div",{className:"flex flex-wrap gap-2",children:s.issues.map(Fn)}),e[62]=s.issues,e[63]=F):F=e[63];let V;e[64]!==n.duration?(V=y(n.duration),e[64]=n.duration,e[65]=V):V=e[65];let W;e[66]!==n.queue_latency?(W=n.queue_latency!=null?`queued ${y(n.queue_latency)}`:void 0,e[66]=n.queue_latency,e[67]=W):W=e[67];let $;e[68]!==V||e[69]!==W?($=t.jsx(me,{label:"Duration",value:V,hint:W}),e[68]=V,e[69]=W,e[70]=$):$=e[70];const ae=n.counters.queries??0,oe=`${n.counters.cached_queries??0} cached · ${n.counters.hydrated_models??0} models`;let B;e[71]!==ae||e[72]!==oe?(B=t.jsx(me,{label:"Queries",value:ae,hint:oe}),e[71]=ae,e[72]=oe,e[73]=B):B=e[73];let U;e[74]!==n.queue_time?(U=n.queue_time!=null&&t.jsx(me,{label:"Queue time",value:y(n.queue_time)}),e[74]=n.queue_time,e[75]=U):U=e[75];const Y=n.counters.cache_events??0;let G;e[76]!==Y?(G=t.jsx(me,{label:"Cache",value:Y}),e[76]=Y,e[77]=G):G=e[77];const ue=n.counters.outgoing_requests??0,Z=`${n.counters.jobs_enqueued??0} jobs enqueued · ${n.counters.mail??0} mail`;let K;e[78]!==ue||e[79]!==Z?(K=t.jsx(me,{label:"Outgoing",value:ue,hint:Z}),e[78]=ue,e[79]=Z,e[80]=K):K=e[80];let J;e[81]!==n.allocations?(J=$t(n.allocations),e[81]=n.allocations,e[82]=J):J=e[82];let u;e[83]!==n.peak_memory?(u=n.peak_memory?`RSS ${Ht(n.peak_memory)}`:void 0,e[83]=n.peak_memory,e[84]=u):u=e[84];let j;e[85]!==J||e[86]!==u?(j=t.jsx(me,{label:"Allocations",value:J,hint:u}),e[85]=J,e[86]=u,e[87]=j):j=e[87];const P=n.counters.exceptions??0,X=n.counters.exceptions?"destructive":void 0,ct=n.counters.lazy_loads?`${n.counters.lazy_loads} lazy loads`:void 0;let fe;e[88]!==P||e[89]!==X||e[90]!==ct?(fe=t.jsx(me,{label:"Exceptions",value:P,tone:X,hint:ct}),e[88]=P,e[89]=X,e[90]=ct,e[91]=fe):fe=e[91];let pe;e[92]!==$||e[93]!==B||e[94]!==U||e[95]!==G||e[96]!==K||e[97]!==j||e[98]!==fe?(pe=t.jsxs(ts,{children:[$,B,U,G,K,j,fe]}),e[92]=$,e[93]=B,e[94]=U,e[95]=G,e[96]=K,e[97]=j,e[98]=fe,e[99]=pe):pe=e[99];let xe;e[100]!==a||e[101]!==c||e[102]!==s.trace||e[103]!==s.trace_url?(xe=s.trace.length>1&&t.jsxs(ie,{children:[t.jsx(le,{children:t.jsxs(ce,{className:"flex flex-wrap items-center justify-between gap-2",children:["Trace",s.trace_url&&t.jsx(ze,{href:s.trace_url,className:"text-primary text-xs font-normal hover:underline",children:"View distributed trace"})]})}),t.jsx(de,{children:t.jsx("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:s.trace.map((b,Q)=>{const Me=Math.max(...s.trace.map(zn),1);return t.jsxs("span",{className:"flex items-center gap-2",children:[Q>0&&t.jsx("span",{className:"text-muted-foreground",children:"→"}),t.jsxs(ze,{href:bs({applicationId:a,environmentId:c,source:b.kind,executionId:b.execution_id}),className:b.current?"bg-muted flex items-center gap-1.5 rounded px-2 py-1 font-semibold":"hover:bg-muted flex items-center gap-1.5 rounded px-2 py-1",children:[t.jsx(it,{status:b.status,outcome:b.outcome})," ",t.jsx("span",{className:"font-mono",children:b.name}),t.jsx("span",{className:"bg-muted-foreground/25 relative h-1.5 w-10 overflow-hidden rounded-full",children:t.jsx("span",{className:"bg-primary absolute inset-y-0 left-0 rounded-full",style:{width:`${Math.max(4,b.duration/Me*100)}%`}})}),t.jsx("span",{className:"text-muted-foreground",children:y(b.duration)})]})]},b.execution_id)})})})]}),e[100]=a,e[101]=c,e[102]=s.trace,e[103]=s.trace_url,e[104]=xe):xe=e[104];let he;if(e[105]!==s.exceptions||e[106]!==s.execution){let b;e[108]!==s.execution?(b=Q=>t.jsxs(ie,{className:"border-destructive/40",children:[t.jsx(le,{children:t.jsx(ce,{children:"Exception"})}),t.jsx(de,{children:t.jsx(Zt,{exception:Q,deploy:s.execution.deploy})})]},Q.id),e[108]=s.execution,e[109]=b):b=e[109],he=s.exceptions.map(b),e[105]=s.exceptions,e[106]=s.execution,e[107]=he}else he=e[107];let Ge;e[110]===Symbol.for("react.memo_cache_sentinel")?(Ge=t.jsx(le,{children:t.jsx(ce,{children:"Timeline"})}),e[110]=Ge):Ge=e[110];let ge;e[111]!==s.timeline||e[112]!==n.duration||e[113]!==n.stages?(ge=t.jsxs(ie,{children:[Ge,t.jsx(de,{children:t.jsx(nn,{entries:s.timeline,total:n.duration,stages:n.stages})})]}),e[111]=s.timeline,e[112]=n.duration,e[113]=n.stages,e[114]=ge):ge=e[114];let be;e[115]!==s.spans?(be=s.spans.length>0&&t.jsxs(ie,{children:[t.jsx(le,{children:t.jsx(ce,{children:"Spans"})}),t.jsx(de,{children:t.jsx(Ve,{rows:s.spans,rowKey:Mn,columns:[{key:"off",header:"+ms",align:"right",cell:Hn},{key:"name",header:"Span",cell:An},{key:"status",header:"Status",cell:Ln},{key:"attrs",header:"Attributes",cell:On},{key:"dur",header:"Duration",align:"right",cell:In}]})})]}),e[115]=s.spans,e[116]=be):be=e[116];let ve;e[117]!==a||e[118]!==c||e[119]!==s.profile?(ve=s.profile&&t.jsxs(ie,{children:[t.jsx(le,{children:t.jsxs(ce,{className:"flex flex-wrap items-center justify-between gap-2",children:["Profile",t.jsx(ze,{href:Gt(a,c,s.profile.id),className:"text-primary text-xs font-normal hover:underline",children:"Open full profile"})]})}),t.jsxs(de,{className:"space-y-2",children:[t.jsxs("p",{className:"text-muted-foreground font-mono text-[11px]",children:[s.profile.profiler,s.profile.mode?` · ${s.profile.mode}`:""," ·"," ",$t(s.profile.samples)," samples · ",y(s.profile.duration),s.profile.truncated&&" · truncated for this page"]}),t.jsx(Wt,{collapsed:s.profile.collapsed})]})]}),e[117]=a,e[118]=c,e[119]=s.profile,e[120]=ve):ve=e[120];let je;e[121]!==a||e[122]!==c||e[123]!==s.attachments?(je=s.attachments.length>0&&t.jsxs(ie,{children:[t.jsx(le,{children:t.jsx(ce,{children:"Attachments"})}),t.jsx(de,{children:t.jsx(Ve,{rows:s.attachments,rowKey:Rn,columns:[{key:"name",header:"Name",className:"max-w-0",cell:Pn},{key:"type",hideOnMobile:!0,header:"Type",cell:qn},{key:"size",header:"Size",align:"right",cell:$n},{key:"links",header:"",align:"right",cell:b=>t.jsxs("span",{className:"flex justify-end gap-3",children:[b.viewable&&t.jsx("a",{className:"text-primary hover:underline",href:Tt(a,c,b.id,{view:1}),children:"View"}),t.jsx("a",{className:"text-primary hover:underline",href:Tt(a,c,b.id),children:"Download"})]})}]})})]}),e[121]=a,e[122]=c,e[123]=s.attachments,e[124]=je):je=e[124];let _e;e[125]!==s.queries.length?(_e=t.jsxs(at,{value:"queries",children:["Queries (",s.queries.length,")"]}),e[125]=s.queries.length,e[126]=_e):_e=e[126];let ye;e[127]!==s.logs.length?(ye=t.jsxs(at,{value:"logs",children:["Logs (",s.logs.length,")"]}),e[127]=s.logs.length,e[128]=ye):ye=e[128];let Ne;e[129]!==s.enqueued_jobs.length?(Ne=t.jsxs(at,{value:"jobs",children:["Enqueued jobs (",s.enqueued_jobs.length,")"]}),e[129]=s.enqueued_jobs.length,e[130]=Ne):Ne=e[130];let Ke;e[131]===Symbol.for("react.memo_cache_sentinel")?(Ke=t.jsx(at,{value:"request",children:"Details"}),e[131]=Ke):Ke=e[131];let we;e[132]!==_e||e[133]!==ye||e[134]!==Ne?(we=t.jsxs(ln,{children:[_e,ye,Ne,Ke]}),e[132]=_e,e[133]=ye,e[134]=Ne,e[135]=we):we=e[135];let Je;e[136]===Symbol.for("react.memo_cache_sentinel")?(Je={key:"off",header:"+ms",align:"right",cell:Tn},e[136]=Je):Je=e[136];let ke;e[137]!==a||e[138]!==c?(ke={key:"sql",header:"SQL",cell:b=>t.jsx(ze,{href:Kt(a,c,b.group_hash),children:t.jsx(St,{sql:b.sql,className:"hover:underline"})})},e[137]=a,e[138]=c,e[139]=ke):ke=e[139];let Qe,We,Ye;e[140]===Symbol.for("react.memo_cache_sentinel")?(Qe={key:"rows",header:"Rows",align:"right",cell:Sn},We={key:"src",header:"Source",cell:Cn},Ye={key:"dur",header:"Duration",align:"right",cell:kn},e[140]=Qe,e[141]=We,e[142]=Ye):(Qe=e[140],We=e[141],Ye=e[142]);let Ce;e[143]!==ke?(Ce=[Je,ke,Qe,We,Ye],e[143]=ke,e[144]=Ce):Ce=e[144];let Se;e[145]!==s.queries||e[146]!==Ce?(Se=t.jsx(ot,{value:"queries",children:t.jsx(Ve,{rows:s.queries,rowKey:En,empty:"No queries.",columns:Ce})}),e[145]=s.queries,e[146]=Ce,e[147]=Se):Se=e[147];let Ze;e[148]===Symbol.for("react.memo_cache_sentinel")?(Ze=[{key:"lvl",header:"Level",cell:Nn},{key:"msg",header:"Message",cell:yn},{key:"tags",header:"Tags",cell:_n},{key:"stage",header:"Stage",cell:jn}],e[148]=Ze):Ze=e[148];let Te;e[149]!==s.logs?(Te=t.jsx(ot,{value:"logs",children:t.jsx(Ve,{rows:s.logs,rowKey:wn,empty:"No logs.",columns:Ze})}),e[149]=s.logs,e[150]=Te):Te=e[150];let Xe,et,tt;e[151]===Symbol.for("react.memo_cache_sentinel")?(Xe={key:"name",header:"Job",cell:bn},et={key:"queue",header:"Queue",cell:gn},tt={key:"id",header:"Job id",cell:hn},e[151]=Xe,e[152]=et,e[153]=tt):(Xe=e[151],et=e[152],tt=e[153]);let Ee;e[154]!==a||e[155]!==c?(Ee=[Xe,et,tt,{key:"attempt",header:"Attempt",cell:b=>b.attempt_execution_id?t.jsx(ze,{className:"hover:underline",href:Jt(a,c,b.attempt_execution_id),children:t.jsx(it,{outcome:b.attempt_outcome})}):t.jsx("span",{className:"text-muted-foreground text-xs",children:"not seen yet"})}],e[154]=a,e[155]=c,e[156]=Ee):Ee=e[156];let $e;e[157]!==s.enqueued_jobs||e[158]!==Ee?($e=t.jsx(ot,{value:"jobs",children:t.jsx(Ve,{rows:s.enqueued_jobs,rowKey:vn,empty:"No jobs enqueued.",columns:Ee})}),e[157]=s.enqueued_jobs,e[158]=Ee,e[159]=$e):$e=e[159];let st;e[160]===Symbol.for("react.memo_cache_sentinel")?(st=t.jsx(le,{children:t.jsx(ce,{children:"Execution"})}),e[160]=st):st=e[160];let qe;if(e[161]!==o.arguments_preview||e[162]!==o.db_runtime||e[163]!==o.format||e[164]!==o.halted_callback||e[165]!==o.ip||e[166]!==o.redirect_to||e[167]!==o.schedule||e[168]!==o.url||e[169]!==o.user_agent||e[170]!==o.view_runtime||e[171]!==n.action||e[172]!==n.attempt||e[173]!==n.controller||e[174]!==n.execution_id||e[175]!==n.inertia_component||e[176]!==n.job_id||e[177]!==n.kind||e[178]!==n.queue||e[179]!==n.route||e[180]!==n.task_key||e[181]!==n.trace_id){const b=n.controller&&`${n.controller}#${n.action}`;let Q;e[183]!==o.arguments_preview?(Q=Array.isArray(o.arguments_preview)?o.arguments_preview.join(", "):void 0,e[183]=o.arguments_preview,e[184]=Q):Q=e[184];let Me;e[185]!==o.db_runtime||e[186]!==o.format||e[187]!==o.halted_callback||e[188]!==o.ip||e[189]!==o.redirect_to||e[190]!==o.schedule||e[191]!==o.url||e[192]!==o.user_agent||e[193]!==o.view_runtime||e[194]!==b||e[195]!==Q||e[196]!==n.attempt||e[197]!==n.execution_id||e[198]!==n.inertia_component||e[199]!==n.job_id||e[200]!==n.kind||e[201]!==n.queue||e[202]!==n.route||e[203]!==n.task_key||e[204]!==n.trace_id?(Me={kind:n.kind,trace_id:n.trace_id,execution_id:n.execution_id,controller:b,route:n.route,url:o.url,ip:o.ip,format:o.format,queue:n.queue,attempt:n.attempt,job_id:n.job_id,task_key:n.task_key,schedule:o.schedule,inertia_component:n.inertia_component,redirect_to:o.redirect_to,halted_callback:o.halted_callback,view_runtime:o.view_runtime,db_runtime:o.db_runtime,user_agent:o.user_agent,arguments:Q},e[185]=o.db_runtime,e[186]=o.format,e[187]=o.halted_callback,e[188]=o.ip,e[189]=o.redirect_to,e[190]=o.schedule,e[191]=o.url,e[192]=o.user_agent,e[193]=o.view_runtime,e[194]=b,e[195]=Q,e[196]=n.attempt,e[197]=n.execution_id,e[198]=n.inertia_component,e[199]=n.job_id,e[200]=n.kind,e[201]=n.queue,e[202]=n.route,e[203]=n.task_key,e[204]=n.trace_id,e[205]=Me):Me=e[205],qe=t.jsx("dl",{className:"grid gap-y-1 text-xs sm:grid-cols-[10rem_1fr]",children:Object.entries(Me).filter(xn).map(pn)}),e[161]=o.arguments_preview,e[162]=o.db_runtime,e[163]=o.format,e[164]=o.halted_callback,e[165]=o.ip,e[166]=o.redirect_to,e[167]=o.schedule,e[168]=o.url,e[169]=o.user_agent,e[170]=o.view_runtime,e[171]=n.action,e[172]=n.attempt,e[173]=n.controller,e[174]=n.execution_id,e[175]=n.inertia_component,e[176]=n.job_id,e[177]=n.kind,e[178]=n.queue,e[179]=n.route,e[180]=n.task_key,e[181]=n.trace_id,e[182]=qe}else qe=e[182];let Pe;e[206]!==d?(Pe=d&&t.jsx("div",{className:"mt-3",children:t.jsx(dt,{data:d})}),e[206]=d,e[207]=Pe):Pe=e[207];let Re;e[208]!==o.context?(Re=o.context&&o.context!=="{}"&&t.jsx("div",{className:"mt-3",children:t.jsx(dt,{data:un(o.context)})}),e[208]=o.context,e[209]=Re):Re=e[209];let Ie;e[210]!==qe||e[211]!==Pe||e[212]!==Re?(Ie=t.jsxs(ie,{children:[st,t.jsxs(de,{children:[qe,Pe,Re]})]}),e[210]=qe,e[211]=Pe,e[212]=Re,e[213]=Ie):Ie=e[213];let nt;e[214]===Symbol.for("react.memo_cache_sentinel")?(nt=t.jsx(le,{children:t.jsx(ce,{children:"Headers"})}),e[214]=nt):nt=e[214];let Oe;e[215]!==x?(Oe=t.jsx("dl",{className:"grid gap-y-1 text-xs sm:grid-cols-[12rem_1fr]",children:Object.entries(x).map(fn)}),e[215]=x,e[216]=Oe):Oe=e[216];let De;e[217]!==o.payload?(De=o.payload!=null&&t.jsx("div",{className:"mt-3",children:t.jsx(dt,{data:o.payload})}),e[217]=o.payload,e[218]=De):De=e[218];let Le;e[219]!==Oe||e[220]!==De?(Le=t.jsxs(ie,{children:[nt,t.jsxs(de,{children:[Oe,De]})]}),e[219]=Oe,e[220]=De,e[221]=Le):Le=e[221];let Ae;e[222]!==Ie||e[223]!==Le?(Ae=t.jsx(ot,{value:"request",children:t.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[Ie,Le]})}),e[222]=Ie,e[223]=Le,e[224]=Ae):Ae=e[224];let He;e[225]!==we||e[226]!==Se||e[227]!==Te||e[228]!==$e||e[229]!==Ae?(He=t.jsxs(an,{defaultValue:"queries",children:[we,Se,Te,$e,Ae]}),e[225]=we,e[226]=Se,e[227]=Te,e[228]=$e,e[229]=Ae,e[230]=He):He=e[230];let rt;return e[231]!==z||e[232]!==F||e[233]!==pe||e[234]!==xe||e[235]!==he||e[236]!==ge||e[237]!==be||e[238]!==ve||e[239]!==je||e[240]!==k||e[241]!==He||e[242]!==n.name?(rt=t.jsxs(es,{title:p,crumbs:k,children:[z,F,pe,xe,he,ge,be,ve,je,He]}),e[231]=z,e[232]=F,e[233]=pe,e[234]=xe,e[235]=he,e[236]=ge,e[237]=be,e[238]=ve,e[239]=je,e[240]=k,e[241]=He,e[242]=n.name,e[243]=rt):rt=e[243],rt}function fn(s){const[e,r]=s;return t.jsxs("div",{className:"contents",children:[t.jsx("dt",{className:"text-muted-foreground font-mono",children:e}),t.jsx("dd",{className:"font-mono break-all",children:r})]},e)}function pn(s){const[e,r]=s;return t.jsxs("div",{className:"contents",children:[t.jsx("dt",{className:"text-muted-foreground",children:e}),t.jsxs("dd",{className:"font-mono break-all",children:[String(r),(e==="trace_id"||e==="execution_id")&&t.jsx(dn,{value:String(r)})]})]},e)}function xn(s){const[,e]=s;return e!=null&&e!==""}function hn(s){return t.jsx("span",{className:"font-mono text-xs",children:s.job_id})}function gn(s){return s.queue}function bn(s){return t.jsx("span",{className:"font-mono text-xs",children:s.name})}function vn(s){return s.id}function jn(s){return t.jsx("span",{className:"text-muted-foreground text-xs",children:s.stage??""})}function _n(s){return s.tags.join(" ")}function yn(s){return t.jsx("span",{className:"font-mono text-xs whitespace-pre-wrap",children:s.message})}function Nn(s){return t.jsx(ss,{level:s.level})}function wn(s){return s.id}function kn(s){return y(s.duration,2)}function Cn(s){return t.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:s.source??""})}function Sn(s){return s.row_count??"–"}function Tn(s){return s.offset.toFixed(1)}function En(s){return s.id}function $n(s){return Ht(s.bytes)}function qn(s){return t.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:s.content_type??"–"})}function Pn(s){return t.jsxs("span",{className:"flex items-center gap-1.5",children:[t.jsx("span",{className:"truncate font-mono text-xs",children:s.name}),s.truncated&&t.jsx(jt,{variant:"secondary",children:"truncated"})]})}function Rn(s){return s.id}function In(s){return y(s.duration,2)}function On(s){return t.jsx("span",{className:"flex flex-wrap gap-1",children:Object.entries(s.attributes).map(Dn)})}function Dn(s){const[e,r]=s;return t.jsxs("span",{className:"bg-muted rounded-sm px-1.5 font-mono text-[10px]",children:[e,"=",String(r)]},e)}function Ln(s){return t.jsx(it,{outcome:s.status})}function An(s){return t.jsx("span",{className:"font-mono text-xs",children:s.name})}function Hn(s){return s.offset.toFixed(1)}function Mn(s){return s.id}function zn(s){return s.duration}function Fn(s){return t.jsx(ze,{href:Qt(s.id),children:t.jsx(jt,{variant:"destructive",className:"font-mono",children:s.key})},s.id)}export{ur as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as A,u as B,O as G,j as s,L as J}from"./inertia-
|
|
1
|
+
import{c as A,u as B,O as G,j as s,L as J}from"./inertia-b7M33AzA.js";import{F as K}from"./flamegraph-Dve4TVkl.js";import{P as M,E as Q}from"./env-layout-Dic4A8Kn.js";import{S as N,a as T}from"./stat-nY8iS5q9.js";import{C as U,a as V}from"./card-C4EFUWG1.js";import{e as X}from"./execution-path-C7Up9w4e.js";import{w as Y,c as Z,m as z,b as ee}from"./format-B9SDkrWj.js";import"./data-table-Bzj8zcao.js";import"./chart-hover-B5cFOZ24.js";import"./app-layout-CpEbDy93.js";import"./segmented-CJq8WOHZ.js";import"./use-live-rp6jfGac.js";import"./arrow-up-DAODKT5N.js";function me(i){const e=A.c(71),{environment:q,window:I}=B().props,l=q.application_id,r=q.id,t=i.profile,L=t.execution_preview??"Profile";let o;e[0]!==l||e[1]!==r||e[2]!==I?(o=G(l,r,{window:I}),e[0]=l,e[1]=r,e[2]=I,e[3]=o):o=e[3];let a;e[4]!==o?(a={title:"Profiles",href:o},e[4]=o,e[5]=a):a=e[5];const F=t.execution_preview??`Profile ${t.id}`;let n;e[6]!==F?(n={title:F,href:"#"},e[6]=F,e[7]=n):n=e[7];let c;e[8]!==a||e[9]!==n?(c=[a,n],e[8]=a,e[9]=n,e[10]=c):c=e[10];const R=t.execution_preview??`Profile ${t.id}`;let d;e[11]!==R?(d=s.jsx("span",{className:"font-mono",children:R}),e[11]=R,e[12]=d):d=e[12];let p;e[13]!==t.occurred_at?(p=Y(t.occurred_at),e[13]=t.occurred_at,e[14]=p):p=e[14];let f;e[15]!==p?(f=s.jsx("span",{children:p}),e[15]=p,e[16]=f):f=e[16];const D=t.mode?` · ${t.mode}`:"";let u;e[17]!==D||e[18]!==t.profiler?(u=s.jsxs("span",{children:[t.profiler,D]}),e[17]=D,e[18]=t.profiler,e[19]=u):u=e[19];let m;e[20]!==t.server?(m=t.server&&s.jsxs("span",{children:["server ",t.server]}),e[20]=t.server,e[21]=m):m=e[21];let x;e[22]!==t.deploy?(x=t.deploy&&s.jsxs("span",{children:["deploy ",t.deploy.slice(0,12)]}),e[22]=t.deploy,e[23]=x):x=e[23];let v;e[24]!==l||e[25]!==r||e[26]!==t.execution_id||e[27]!==t.execution_source?(v=t.execution_id&&s.jsx(J,{className:"hover:underline",href:X({applicationId:l,environmentId:r,source:t.execution_source,executionId:t.execution_id}),children:"view execution"}),e[24]=l,e[25]=r,e[26]=t.execution_id,e[27]=t.execution_source,e[28]=v):v=e[28];let h;e[29]!==u||e[30]!==m||e[31]!==x||e[32]!==v||e[33]!==f?(h=s.jsxs("span",{className:"flex flex-wrap gap-x-3 text-xs",children:[f,u,m,x,v]}),e[29]=u,e[30]=m,e[31]=x,e[32]=v,e[33]=f,e[34]=h):h=e[34];let j;e[35]!==h||e[36]!==d?(j=s.jsx(M,{withWindow:!1,title:d,description:h}),e[35]=h,e[36]=d,e[37]=j):j=e[37];let _;e[38]!==t.samples?(_=Z(t.samples),e[38]=t.samples,e[39]=_):_=e[39];let w;e[40]!==_?(w=s.jsx(N,{label:"Samples",value:_}),e[40]=_,e[41]=w):w=e[41];let y;e[42]!==t.duration?(y=z(t.duration),e[42]=t.duration,e[43]=y):y=e[43];let P;e[44]!==t.interval?(P=t.interval?`every ${z(t.interval/1e3,2)}`:void 0,e[44]=t.interval,e[45]=P):P=e[45];let b;e[46]!==y||e[47]!==P?(b=s.jsx(N,{label:"Duration",value:y,hint:P}),e[46]=y,e[47]=P,e[48]=b):b=e[48];const H=t.mode??void 0;let S;e[49]!==H||e[50]!==t.profiler?(S=s.jsx(N,{label:"Profiler",value:t.profiler,hint:H}),e[49]=H,e[50]=t.profiler,e[51]=S):S=e[51];let g;e[52]!==t.stacks_bytes?(g=ee(t.stacks_bytes),e[52]=t.stacks_bytes,e[53]=g):g=e[53];const O=i.truncated?"truncated for display":"uncompressed",W=i.truncated?"warning":void 0;let k;e[54]!==g||e[55]!==O||e[56]!==W?(k=s.jsx(N,{label:"Stacks",value:g,hint:O,tone:W}),e[54]=g,e[55]=O,e[56]=W,e[57]=k):k=e[57];let E;e[58]!==w||e[59]!==b||e[60]!==S||e[61]!==k?(E=s.jsxs(T,{children:[w,b,S,k]}),e[58]=w,e[59]=b,e[60]=S,e[61]=k,e[62]=E):E=e[62];let $;e[63]!==i.collapsed?($=s.jsx(U,{children:s.jsx(V,{className:"pt-4",children:s.jsx(K,{collapsed:i.collapsed})})}),e[63]=i.collapsed,e[64]=$):$=e[64];let C;return e[65]!==L||e[66]!==j||e[67]!==E||e[68]!==$||e[69]!==c?(C=s.jsxs(Q,{title:L,crumbs:c,children:[j,E,$]}),e[65]=L,e[66]=j,e[67]=E,e[68]=$,e[69]=c,e[70]=C):C=e[70],C}export{me as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{x as Yt,c as Zt,o as vs,j as s,r as Q,v as bs,i as ft,L as zt,q as ts,y as Ns,d as Wt,z as ks,H as ws,F as Ss,s as $s}from"./inertia-
|
|
1
|
+
import{x as Yt,c as Zt,o as vs,j as s,r as Q,v as bs,i as ft,L as zt,q as ts,y as Ns,d as Wt,z as ks,H as ws,F as Ss,s as $s}from"./inertia-b7M33AzA.js";import{D as rt}from"./data-table-Bzj8zcao.js";import{S as Cs,E as Ls,B as Is,a as As,C as Ms}from"./frames-CkDFkUhi.js";import{J as ls}from"./json-viewer-C0RZwcC2.js";import{R as as}from"./relative-time-CJX4HXBB.js";import{S as ut,a as Ts}from"./stat-nY8iS5q9.js";import{I as cs}from"./status-badge-D40D8TiV.js";import{B as xt,b as O,v as zs,w as Rs,x as Ds,y as Fs,t as Es,z as Bs,q as Ps,F as Os,H as Ks,J as qs,K as Gs}from"./app-layout-CpEbDy93.js";import{C as c,b as d,c as m,a as o}from"./card-C4EFUWG1.js";import{C as os,X as ds,Y as ms,a as us,b as fs,B as xs,c as hs,d as ps,R as Hs}from"./chart-CD6EHDjG.js";import{S as ss,a as ns,b as is,c as rs,d as es}from"./select-vYjStP1q.js";import{u as Vs}from"./use-clipboard-T9kCBcs8.js";import{e as Xt}from"./execution-path-C7Up9w4e.js";import{c as Rt,a as Tt,w as at,b as Us}from"./format-B9SDkrWj.js";import"./chart-hover-B5cFOZ24.js";import"./source-link-B2183i2-.js";import"./use-live-rp6jfGac.js";import"./arrow-up-DAODKT5N.js";const Js=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],Qs=Yt("git-merge",Js);const Ws=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Xs=Yt("globe",Ws);const Ys=[["path",{d:"M16 3h5v5",key:"1806ms"}],["path",{d:"M8 3H3v5",key:"15dfkv"}],["path",{d:"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3",key:"1qrqzj"}],["path",{d:"m15 9 6-6",key:"ko1vev"}]],Zs=Yt("split",Ys);function en(t){const e=Zt.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let l;e[3]!==n?(l=vs("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),e[3]=n,e[4]=l):l=e[4];let u;return e[5]!==i||e[6]!==l?(u=s.jsx("textarea",{"data-slot":"textarea",className:l,...i}),e[5]=i,e[6]=l,e[7]=u):u=e[7],u}function tn(t,e){return t.filter(n=>n.at.slice(0,10)===e).map(n=>n.ref)}const sn={count:{label:"Occurrences",color:"var(--chart-5)"}},nn={value:{label:"Measured value",color:"var(--chart-2)"}},rn={report:"Fingerprint passed to Railwatch.report.",error:"Fingerprint from the error's own #railwatch_fingerprint.",resolver:"Fingerprint from the app's Railwatch.fingerprint block.",default:"Railwatch's default: exception class, top in-app frame, and the message with its variable data removed."};function ln(t,e){return e?e.kind==="query"?e.group_hash?$s(t.application.id,t.environment.id,e.group_hash):null:Xt({applicationId:t.application.id,environmentId:t.environment.id,source:e.kind,executionId:e.execution_id}):null}function an(t,e){const n=t.data;switch(t.kind){case"created":return"opened this issue";case"status":return`changed status ${n.from} → ${n.to}`;case"priority":return`changed priority ${n.from} → ${n.to}`;case"assignee":{const i=n.from_id?e.get(Number(n.from_id))??"someone":"unassigned",l=n.to_id?e.get(Number(n.to_id))??"someone":"unassigned";return`reassigned ${i} → ${l}`}case"merge":return`merged this issue into ${n.target_key}`;case"absorbed":return`merged ${n.source_key} into this issue (${n.occurrences} events)`;case"unmerge":return"unmerged this issue";case"split":{const i=Array.isArray(t.data.into)?t.data.into:[];return n.from_key?`split ${n.occurrences} events out of ${n.from_key}`:`split ${n.occurrences} events by message into ${i.join(", ")}`}case"regressed":return"regressed — a new occurrence reopened this issue";case"alert":return`sent a "${n.event}" alert via ${n.integration}`;case"agent":return`acted via ${String(n.agent??"an AI agent")} (MCP)`;case"comment":return"commented";default:return String(t.kind)}}function cn(t){const e=t.issue,n=[];if(n.push(`# ${e.key}: ${e.title}`),e.culprit&&n.push(`Culprit: ${e.culprit}`),n.push(`Environment: ${e.application.name} / ${e.environment.name}`),t.detection?.available&&(n.push(""),n.push("## Detector measurement"),n.push(`${t.detection.metric} for ${t.detection.target}: ${lt(t.detection.measurement?.value,t.detection.unit)}`),t.detection.measurement?.limit!=null&&n.push(`Limit: ${lt(t.detection.measurement.limit,t.detection.unit)}`),t.detection.baseline?.mean!=null&&n.push(`Baseline: ${lt(t.detection.baseline.mean,t.detection.unit)} (${t.detection.baseline.sigmas}σ)`),n.push(`Underlying telemetry: ${t.detection.telemetry_type} ${t.detection.telemetry_group_hash}`)),t.latest){n.push(""),n.push(`## ${t.latest.class_name}`),n.push(t.latest.message);const i=t.latest.frames.filter(l=>l.in_app);if(i.length>0){n.push(""),n.push("### Frames");for(const l of i)if(n.push(`${l.file}:${l.line} in \`${l.function}\``),l.code)for(const[u,T]of Object.entries(l.code))n.push(`${u}: ${T}`)}t.latest.context&&(n.push(""),n.push("### Context"),n.push(String(t.latest.context)))}return n.join(`
|
|
2
2
|
`)}function lt(t,e){return t==null?"–":e==="milliseconds"?`${t.toLocaleString()} ms`:e==="percent"?`${t.toLocaleString()}%`:e==="events_per_minute"?`${t.toLocaleString()} / min`:t.toLocaleString()}function on(t){const e=Zt.c(80),{issue:n,detail:i}=t;if(!i.available){let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(d,{children:s.jsx(m,{children:"Detector sample"})}),e[0]=v):v=e[0];let f;return e[1]!==n.sample?(f=s.jsxs(c,{children:[v,s.jsx(o,{children:s.jsx(ls,{data:n.sample})})]}),e[1]=n.sample,e[2]=f):f=e[2],f}let l;e[3]!==i.representative_records?(l=i.representative_records??[],e[3]=i.representative_records,e[4]=l):l=e[4];const u=l;let T;e[5]!==i.deploy_comparison?(T=i.deploy_comparison??[],e[5]=i.deploy_comparison,e[6]=T):T=e[6];const U=T;let N;e[7]!==i.trend?(N=i.trend??[],e[7]=i.trend,e[8]=N):N=e[8];const K=N,a=i.metric==="missed",W=a?"Missed scheduled task":i.kind==="anomaly"?"Anomaly measurement":"Threshold breach";let k;e[9]!==W?(k=s.jsx(d,{children:s.jsx(m,{children:W})}),e[9]=W,e[10]=k):k=e[10];let B;e[11]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx("p",{className:"text-muted-foreground text-xs",children:"Target"}),e[11]=B):B=e[11];let z;e[12]!==i.target?(z=s.jsxs("div",{children:[B,s.jsx("p",{className:"font-mono text-sm",children:i.target})]}),e[12]=i.target,e[13]=z):z=e[13];const ct=a?"Schedule":"Metric";let P;e[14]!==ct?(P=s.jsx("p",{className:"text-muted-foreground text-xs",children:ct}),e[14]=ct,e[15]=P):P=e[15];const ot=a?i.rule?.schedule:i.metric;let R;e[16]!==ot?(R=s.jsx("p",{className:"text-sm",children:ot}),e[16]=ot,e[17]=R):R=e[17];let q;e[18]!==R||e[19]!==P?(q=s.jsxs("div",{children:[P,R]}),e[18]=R,e[19]=P,e[20]=q):q=e[20];const dt=a?"Expected":"Measured";let w;e[21]!==dt?(w=s.jsx("p",{className:"text-muted-foreground text-xs",children:dt}),e[21]=dt,e[22]=w):w=e[22];let D;e[23]!==i.measurement?.value||e[24]!==i.rule||e[25]!==i.unit||e[26]!==a?(D=a&&i.rule?.expected?at(i.rule.expected):lt(i.measurement?.value,i.unit),e[23]=i.measurement?.value,e[24]=i.rule,e[25]=i.unit,e[26]=a,e[27]=D):D=e[27];let S;e[28]!==D?(S=s.jsx("p",{className:"text-sm font-semibold",children:D}),e[28]=D,e[29]=S):S=e[29];let $;e[30]!==w||e[31]!==S?($=s.jsxs("div",{children:[w,S]}),e[30]=w,e[31]=S,e[32]=$):$=e[32];const G=a?"Last run":i.kind==="anomaly"?"Baseline":"Limit";let C;e[33]!==G?(C=s.jsx("p",{className:"text-muted-foreground text-xs",children:G}),e[33]=G,e[34]=C):C=e[34];let F;e[35]!==i.baseline?.mean||e[36]!==i.kind||e[37]!==i.measurement?.limit||e[38]!==i.rule||e[39]!==i.unit||e[40]!==a?(F=a&&i.rule?.last_run?at(i.rule.last_run):i.kind==="anomaly"?lt(i.baseline?.mean,i.unit):lt(i.measurement?.limit,i.unit),e[35]=i.baseline?.mean,e[36]=i.kind,e[37]=i.measurement?.limit,e[38]=i.rule,e[39]=i.unit,e[40]=a,e[41]=F):F=e[41];let L;e[42]!==F?(L=s.jsx("p",{className:"text-sm",children:F}),e[42]=F,e[43]=L):L=e[43];let H;e[44]!==C||e[45]!==L?(H=s.jsxs("div",{children:[C,L]}),e[44]=C,e[45]=L,e[46]=H):H=e[46];let x;e[47]!==q||e[48]!==$||e[49]!==H||e[50]!==z?(x=s.jsxs("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[z,q,$,H]}),e[47]=q,e[48]=$,e[49]=H,e[50]=z,e[51]=x):x=e[51];const E=i.window?.minutes,J=i.baseline?.sigmas!=null&&` · ${i.baseline.sigmas}σ above a ${i.baseline.days}-day baseline`;let h;e[52]!==i.telemetry_group_hash||e[53]!==i.telemetry_type||e[54]!==E||e[55]!==J?(h=s.jsxs("p",{className:"text-muted-foreground text-xs",children:[i.telemetry_type," group ",i.telemetry_group_hash," ·"," ",E," minute window",J]}),e[52]=i.telemetry_group_hash,e[53]=i.telemetry_type,e[54]=E,e[55]=J,e[56]=h):h=e[56];let V;e[57]!==x||e[58]!==h?(V=s.jsxs(o,{className:"space-y-4",children:[x,h]}),e[57]=x,e[58]=h,e[59]=V):V=e[59];let p;e[60]!==V||e[61]!==k?(p=s.jsxs(c,{children:[k,V]}),e[60]=V,e[61]=k,e[62]=p):p=e[62];let g;e[63]!==i.metric||e[64]!==K?(g=K.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsxs(m,{children:[i.metric," trend (30d)"]})}),s.jsx(o,{children:s.jsx(hs,{config:nn,className:"h-48 w-full",children:s.jsxs(ps,{data:K,children:[s.jsx(os,{vertical:!1}),s.jsx(ds,{dataKey:"day",tickLine:!1,axisLine:!1,minTickGap:24,tickFormatter:_n}),s.jsx(ms,{width:45,tickLine:!1,axisLine:!1}),s.jsx(us,{content:s.jsx(fs,{})}),s.jsx(xs,{dataKey:"value",fill:"var(--color-value)",radius:2})]})})})]}),e[63]=i.metric,e[64]=K,e[65]=g):g=e[65];let I;e[66]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(d,{children:s.jsx(m,{children:"Representative telemetry"})}),e[66]=I):I=e[66];let j;e[67]!==n?(j=v=>{const f=ln(n,v.drilldown);f&&Wt.visit(f)},e[67]=n,e[68]=j):j=e[68];let A;e[69]===Symbol.for("react.memo_cache_sentinel")?(A=[{key:"when",header:"When",cell:jn},{key:"record",header:"Record",className:"max-w-0",cell:gn},{key:"duration",header:"Duration",align:"right",cell:pn},{key:"deploy",header:"Deploy",cell:hn}],e[69]=A):A=e[69];let y;e[70]!==u||e[71]!==j?(y=s.jsxs(c,{children:[I,s.jsx(o,{children:s.jsx(rt,{rows:u,rowKey:yn,empty:"Representative raw telemetry has been pruned.",onRowClick:j,columns:A})})]}),e[70]=u,e[71]=j,e[72]=y):y=e[72];let _;e[73]!==U?(_=U.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"Deploy comparison (30d)"})}),s.jsx(o,{children:s.jsx(rt,{rows:U,rowKey:xn,columns:[{key:"deploy",header:"Deploy",cell:fn},{key:"events",header:"Events",align:"right",cell:un},{key:"avg",header:"Avg",align:"right",cell:mn},{key:"max",header:"Max",align:"right",cell:dn}]})})]}),e[73]=U,e[74]=_):_=e[74];let M;return e[75]!==p||e[76]!==g||e[77]!==y||e[78]!==_?(M=s.jsxs(s.Fragment,{children:[p,g,y,_]}),e[75]=p,e[76]=g,e[77]=y,e[78]=_,e[79]=M):M=e[79],M}function dn(t){return`${t.max_ms} ms`}function mn(t){return`${t.avg_ms} ms`}function un(t){return Rt(t.events)}function fn(t){return s.jsx("span",{className:"font-mono text-xs",children:t.deploy.slice(0,12)})}function xn(t){return t.deploy}function hn(t){return s.jsx("span",{className:"font-mono text-xs",children:t.deploy?.slice(0,10)})}function pn(t){return`${t.duration_ms.toLocaleString()} ms`}function gn(t){return s.jsx("span",{className:"block truncate font-mono text-xs",children:t.name})}function jn(t){return s.jsx("span",{className:"text-xs",children:at(t.occurred_at)})}function yn(t){return`${t.record_type}-${t.record_id}`}function _n(t){return new Date(t).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function hi(t){const e=Zt.c(259),n=t.issue;let i;e[0]!==n.id?(i=(r,b)=>{const mt=b===void 0?{}:b;return Wt.patch(ft(n.id),{action_name:r,...mt},{preserveScroll:!0})},e[0]=n.id,e[1]=i):i=e[1];const l=i,[,u]=Vs(),[T,U]=Q.useState(!1),[N,K]=Q.useState(!1),[a,W]=Q.useState("");let k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k=[],e[2]=k):k=e[2];const[B,z]=Q.useState(k),[ct,P]=Q.useState(!1),[ot,R]=Q.useState(!1),q=new Map(t.members.map(Wn)),dt=Bs();let w;e[3]!==n.application.id||e[4]!==n.environment.id?(w=r=>Xt({applicationId:n.application.id,environmentId:n.environment.id,source:r.execution_source,executionId:r.execution_id}),e[3]=n.application.id,e[4]=n.environment.id,e[5]=w):w=e[5];const D=w;let S;e[6]!==n.application.id||e[7]!==n.environment.id||e[8]!==t.latest?(S=t.latest?Xt({applicationId:n.application.id,environmentId:n.environment.id,source:t.latest.execution_source,executionId:t.latest.execution_id}):null,e[6]=n.application.id,e[7]=n.environment.id,e[8]=t.latest,e[9]=S):S=e[9];const $=S;let G,C;e[10]!==n.id||e[11]!==N||e[12]!==a?(G=()=>{if(!N)return;const r=new AbortController,b=window.setTimeout(()=>{P(!0),R(!1),fetch(ks(n.id,{q:a}),{headers:{Accept:"application/json"},credentials:"same-origin",signal:r.signal}).then(Qn).then(mt=>{const{issues:Mt}=mt;return z(Mt)}).catch(()=>{r.signal.aborted||(z([]),R(!0))}).finally(()=>{r.signal.aborted||P(!1)})},150);return()=>{window.clearTimeout(b),r.abort()}},C=[n.id,N,a],e[10]=n.id,e[11]=N,e[12]=a,e[13]=G,e[14]=C):(G=e[13],C=e[14]),Q.useEffect(G,C);const F=Es;let L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L={title:"Issues",href:bs()},e[15]=L):L=e[15];const H=n.key;let x;e[16]!==n.id?(x=ft(n.id),e[16]=n.id,e[17]=x):x=e[17];let E;e[18]!==n.key||e[19]!==x?(E=[L,{title:H,href:x}],e[18]=n.key,e[19]=x,e[20]=E):E=e[20];const J=`${n.key} ${n.title}`;let h;e[21]!==J?(h=s.jsx(ws,{title:J}),e[21]=J,e[22]=h):h=e[22];const V="flex flex-1 flex-col gap-4 p-3 md:gap-5 md:px-6 md:pt-2 md:pb-6";let p;e[23]!==n.key?(p=s.jsx("span",{className:"font-mono text-sm font-semibold",children:n.key}),e[23]=n.key,e[24]=p):p=e[24];let g;e[25]!==n.status?(g=s.jsx(cs,{status:n.status}),e[25]=n.status,e[26]=g):g=e[26];let I;e[27]!==n.kind?(I=s.jsx(xt,{variant:"outline",children:n.kind}),e[27]=n.kind,e[28]=I):I=e[28];let j;e[29]!==n.source?(j=n.source==="browser"&&s.jsxs(xt,{variant:"outline",className:"gap-1",children:[s.jsx(Xs,{className:"size-3"}),"browser"]}),e[29]=n.source,e[30]=j):j=e[30];let A;e[31]!==n.application.name||e[32]!==n.environment.name?(A=s.jsxs("span",{className:"text-muted-foreground text-xs",children:[n.application.name," · ",n.environment.name]}),e[31]=n.application.name,e[32]=n.environment.name,e[33]=A):A=e[33];let y;e[34]!==p||e[35]!==g||e[36]!==I||e[37]!==j||e[38]!==A?(y=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[p,g,I,j,A]}),e[34]=p,e[35]=g,e[36]=I,e[37]=j,e[38]=A,e[39]=y):y=e[39];let _;e[40]!==n.title?(_=s.jsx("h1",{className:"mt-1 text-lg font-semibold break-words",children:n.title}),e[40]=n.title,e[41]=_):_=e[41];let M;e[42]!==n.culprit||e[43]!==n.sample?(M=n.culprit&&s.jsx("div",{className:"text-muted-foreground",children:s.jsx(Cs,{location:n.culprit,deploy:n.sample.deploy})}),e[42]=n.culprit,e[43]=n.sample,e[44]=M):M=e[44];let v;e[45]!==y||e[46]!==_||e[47]!==M?(v=s.jsxs("div",{className:"min-w-0",children:[y,_,M]}),e[45]=y,e[46]=_,e[47]=M,e[48]=v):v=e[48];let f;e[49]!==l?(f=r=>l("priority",{priority:r}),e[49]=l,e[50]=f):f=e[50];let ht;e[51]===Symbol.for("react.memo_cache_sentinel")?(ht=s.jsx(ns,{className:"w-28",children:s.jsx(is,{})}),e[51]=ht):ht=e[51];let pt;e[52]===Symbol.for("react.memo_cache_sentinel")?(pt=s.jsx(rs,{children:["low","normal","high","urgent"].map(Jn)}),e[52]=pt):pt=e[52];let X;e[53]!==n.priority||e[54]!==f?(X=s.jsxs(ss,{value:n.priority,onValueChange:f,children:[ht,pt]}),e[53]=n.priority,e[54]=f,e[55]=X):X=e[55];const Dt=n.assignee?String(n.assignee.id):"none";let Y;e[56]!==l?(Y=r=>l("assign",{assignee_id:r==="none"?null:r}),e[56]=l,e[57]=Y):Y=e[57];let gt;e[58]===Symbol.for("react.memo_cache_sentinel")?(gt=s.jsx(ns,{className:"w-40",children:s.jsx(is,{placeholder:"Assign"})}),e[58]=gt):gt=e[58];let jt;e[59]===Symbol.for("react.memo_cache_sentinel")?(jt=s.jsx(es,{value:"none",children:"Unassigned"}),e[59]=jt):jt=e[59];let Z;e[60]!==t.members?(Z=t.members.map(Un),e[60]=t.members,e[61]=Z):Z=e[61];let ee;e[62]!==Z?(ee=s.jsxs(rs,{children:[jt,Z]}),e[62]=Z,e[63]=ee):ee=e[63];let te;e[64]!==Dt||e[65]!==Y||e[66]!==ee?(te=s.jsxs(ss,{value:Dt,onValueChange:Y,children:[gt,ee]}),e[64]=Dt,e[65]=Y,e[66]=ee,e[67]=te):te=e[67];let se;e[68]!==l||e[69]!==n.status?(se=n.status==="merged"?s.jsx(O,{size:"sm",variant:"outline",onClick:()=>l("unmerge"),children:"Unmerge"}):n.status==="open"?s.jsxs(s.Fragment,{children:[s.jsx(O,{size:"sm",onClick:()=>l("resolve"),children:"Resolve"}),s.jsx(O,{size:"sm",variant:"outline",onClick:()=>l("ignore"),children:"Ignore"})]}):s.jsx(O,{size:"sm",variant:"outline",onClick:()=>l("reopen"),children:"Reopen"}),e[68]=l,e[69]=n.status,e[70]=se):se=e[70];let ne;e[71]!==n.status?(ne=n.status!=="merged"&&s.jsxs(O,{size:"sm",variant:"outline",onClick:()=>K(!0),children:[s.jsx(Qs,{"data-icon":"inline-start"}),"Merge into…"]}),e[71]=n.status,e[72]=ne):ne=e[72];let ie;e[73]!==u||e[74]!==t?(ie=()=>{(async()=>await u(cn(t))&&(U(!0),setTimeout(()=>U(!1),1200)))()},e[73]=u,e[74]=t,e[75]=ie):ie=e[75];let re;e[76]!==T?(re=T?s.jsx(Ps,{className:"size-3.5"}):s.jsx(Ms,{className:"size-3.5"}),e[76]=T,e[77]=re):re=e[77];let le;e[78]!==ie||e[79]!==re?(le=s.jsxs(O,{size:"sm",variant:"outline",onClick:ie,children:[re,"Copy for AI"]}),e[78]=ie,e[79]=re,e[80]=le):le=e[80];let ae;e[81]!==X||e[82]!==te||e[83]!==se||e[84]!==ne||e[85]!==le?(ae=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[X,te,se,ne,le]}),e[81]=X,e[82]=te,e[83]=se,e[84]=ne,e[85]=le,e[86]=ae):ae=e[86];let ce;e[87]!==v||e[88]!==ae?(ce=s.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[v,ae]}),e[87]=v,e[88]=ae,e[89]=ce):ce=e[89];let oe;e[90]!==l||e[91]!==t.merged_into?(oe=t.merged_into&&s.jsxs("div",{className:"bg-muted flex flex-wrap items-center justify-between gap-2 rounded-md border px-4 py-3 text-sm",children:[s.jsxs("span",{children:["Merged into"," ",s.jsx(zt,{href:ft(t.merged_into.id),className:"font-mono font-semibold underline",children:t.merged_into.key})," ",s.jsx("span",{className:"text-muted-foreground",children:t.merged_into.title})]}),s.jsx(O,{size:"sm",variant:"outline",onClick:()=>l("unmerge"),children:"Unmerge"})]}),e[90]=l,e[91]=t.merged_into,e[92]=oe):oe=e[92];let yt;e[93]===Symbol.for("react.memo_cache_sentinel")?(yt=r=>{K(r),r||(W(""),z([]),R(!1))},e[93]=yt):yt=e[93];let de;e[94]!==a?(de=s.jsx(Os,{placeholder:"Search issues by key or title…",value:a,onValueChange:W}),e[94]=a,e[95]=de):de=e[95];const Ft=ct?"Searching…":ot?"Search failed. Try again.":"No open issues found.";let me;e[96]!==Ft?(me=s.jsx(Ks,{children:Ft}),e[96]=Ft,e[97]=me):me=e[97];let ue;e[98]!==l||e[99]!==B?(ue=B.length>0&&s.jsx(zs,{children:B.map(r=>s.jsxs(Rs,{value:`${r.key} ${r.title}`,onSelect:()=>{l("merge",{target_id:r.id}),K(!1)},children:[s.jsx("span",{className:"font-mono font-semibold",children:r.key}),s.jsx("span",{className:"text-muted-foreground truncate",children:r.title})]},r.id))}),e[98]=l,e[99]=B,e[100]=ue):ue=e[100];let fe;e[101]!==me||e[102]!==ue?(fe=s.jsxs(qs,{children:[me,ue]}),e[101]=me,e[102]=ue,e[103]=fe):fe=e[103];let xe;e[104]!==N||e[105]!==de||e[106]!==fe?(xe=s.jsxs(Gs,{open:N,onOpenChange:yt,title:"Merge into…",description:"Search issues to merge this one into",children:[de,fe]}),e[104]=N,e[105]=de,e[106]=fe,e[107]=xe):xe=e[107];const Et=t.detection?.count_label??"Events",Bt=t.detection?.breached_windows??n.occurrences;let he;e[108]!==Bt?(he=Rt(Bt),e[108]=Bt,e[109]=he):he=e[109];let pe;e[110]!==Et||e[111]!==he?(pe=s.jsx(ut,{label:Et,value:he}),e[110]=Et,e[111]=he,e[112]=pe):pe=e[112];const Pt=t.detection?"Events in measured window":"Users affected";let ge;e[113]!==n.affected_users||e[114]!==t.detection?(ge=t.detection?t.detection.event_count==null?"–":Rt(t.detection.event_count):n.affected_users,e[113]=n.affected_users,e[114]=t.detection,e[115]=ge):ge=e[115];let je;e[116]!==Pt||e[117]!==ge?(je=s.jsx(ut,{label:Pt,value:ge}),e[116]=Pt,e[117]=ge,e[118]=je):je=e[118];let ye;e[119]!==n.first_seen_at?(ye=Tt(n.first_seen_at),e[119]=n.first_seen_at,e[120]=ye):ye=e[120];let _e;e[121]!==n.first_seen_at?(_e=at(n.first_seen_at),e[121]=n.first_seen_at,e[122]=_e):_e=e[122];let ve;e[123]!==ye||e[124]!==_e?(ve=s.jsx(ut,{label:"First seen",value:ye,hint:_e}),e[123]=ye,e[124]=_e,e[125]=ve):ve=e[125];let be;e[126]!==n.last_seen_at?(be=Tt(n.last_seen_at),e[126]=n.last_seen_at,e[127]=be):be=e[127];let Ne;e[128]!==n.last_seen_at?(Ne=at(n.last_seen_at),e[128]=n.last_seen_at,e[129]=Ne):Ne=e[129];let ke;e[130]!==be||e[131]!==Ne?(ke=s.jsx(ut,{label:"Last seen",value:be,hint:Ne}),e[130]=be,e[131]=Ne,e[132]=ke):ke=e[132];const Ot=n.regressed_at?"Regressed":"Resolved";let we;e[133]!==n.regressed_at||e[134]!==n.resolved_at?(we=n.regressed_at?Tt(n.regressed_at):n.resolved_at?Tt(n.resolved_at):"–",e[133]=n.regressed_at,e[134]=n.resolved_at,e[135]=we):we=e[135];let Se;e[136]!==n.resolved_in_deploy?(Se=n.resolved_in_deploy?`in ${n.resolved_in_deploy.slice(0,12)}`:void 0,e[136]=n.resolved_in_deploy,e[137]=Se):Se=e[137];const Kt=n.regressed_at?"destructive":void 0;let $e;e[138]!==Ot||e[139]!==we||e[140]!==Se||e[141]!==Kt?($e=s.jsx(ut,{label:Ot,value:we,hint:Se,tone:Kt}),e[138]=Ot,e[139]=we,e[140]=Se,e[141]=Kt,e[142]=$e):$e=e[142];let Ce;e[143]!==pe||e[144]!==je||e[145]!==ve||e[146]!==ke||e[147]!==$e?(Ce=s.jsxs(Ts,{children:[pe,je,ve,ke,$e]}),e[143]=pe,e[144]=je,e[145]=ve,e[146]=ke,e[147]=$e,e[148]=Ce):Ce=e[148];const gs="grid gap-6 lg:grid-cols-3";let Le;e[149]!==n||e[150]!==$||e[151]!==t.breadcrumbs||e[152]!==t.browser_breadcrumbs||e[153]!==t.detection||e[154]!==t.latest?(Le=t.detection?s.jsx(on,{issue:n,detail:t.detection}):t.latest?s.jsxs(c,{children:[s.jsxs(d,{className:"flex-row items-center justify-between",children:[s.jsx(m,{children:"Latest occurrence"}),$&&s.jsxs(zt,{className:"text-xs underline",href:$,children:["Open ",t.latest.execution_preview]})]}),s.jsxs(o,{children:[s.jsx(Ls,{exception:t.latest,deploy:t.latest.deploy}),s.jsxs("div",{className:"mt-4 space-y-4",children:[s.jsx(Is,{entries:t.breadcrumbs}),s.jsx(As,{crumbs:t.browser_breadcrumbs})]}),(t.latest.ruby_version??t.latest.rails_version)&&s.jsxs("p",{className:"text-muted-foreground mt-3 text-xs",children:["Ruby ",t.latest.ruby_version," · Rails"," ",t.latest.rails_version]})]})]}):s.jsx(c,{children:s.jsx(o,{children:s.jsx(ls,{data:n.sample})})}),e[149]=n,e[150]=$,e[151]=t.breadcrumbs,e[152]=t.browser_breadcrumbs,e[153]=t.detection,e[154]=t.latest,e[155]=Le):Le=e[155];const qt=t.detection?"hidden":void 0;let _t;e[156]===Symbol.for("react.memo_cache_sentinel")?(_t=s.jsx(d,{children:s.jsx(m,{children:"Occurrences (30d)"})}),e[156]=_t):_t=e[156];let Ie;e[157]!==D?(Ie=r=>{const b=D(r);b&&Wt.visit(b)},e[157]=D,e[158]=Ie):Ie=e[158];let vt;e[159]===Symbol.for("react.memo_cache_sentinel")?(vt=[{key:"when",header:"When",cell:Hn},{key:"in",header:"In",cell:Gn},{key:"u",header:"User",cell:qn},{key:"t",header:"Tenant",cell:Kn},{key:"d",header:"Deploy",cell:On},{key:"h",header:"",cell:Pn}],e[159]=vt):vt=e[159];let Ae;e[160]!==t.occurrences||e[161]!==Ie?(Ae=s.jsx(o,{children:s.jsx(rt,{rows:t.occurrences,rowKey:Vn,empty:"Raw occurrences have been pruned.",onRowClick:Ie,columns:vt})}),e[160]=t.occurrences,e[161]=Ie,e[162]=Ae):Ae=e[162];let Me;e[163]!==qt||e[164]!==Ae?(Me=s.jsxs(c,{className:qt,children:[_t,Ae]}),e[163]=qt,e[164]=Ae,e[165]=Me):Me=e[165];let Te;e[166]!==n.application.id||e[167]!==n.environment.id||e[168]!==t.attachments?(Te=t.attachments.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"Attachments"})}),s.jsx(o,{children:s.jsx(rt,{rows:t.attachments,rowKey:Bn,columns:[{key:"name",header:"Name",className:"max-w-0",cell:En},{key:"in",header:"In",cell:Fn},{key:"size",header:"Size",align:"right",cell:Dn},{key:"links",header:"",align:"right",cell:r=>s.jsxs("span",{className:"flex justify-end gap-3",children:[r.viewable&&s.jsx("a",{className:"text-primary hover:underline",href:ts(n.application.id,n.environment.id,r.id,{view:1}),children:"View"}),s.jsx("a",{className:"text-primary hover:underline",href:ts(n.application.id,n.environment.id,r.id),children:"Download"})]})}]})})]}),e[166]=n.application.id,e[167]=n.environment.id,e[168]=t.attachments,e[169]=Te):Te=e[169];let ze;e[170]!==Le||e[171]!==Me||e[172]!==Te?(ze=s.jsxs("div",{className:"space-y-6 lg:col-span-2",children:[Le,Me,Te]}),e[170]=Le,e[171]=Me,e[172]=Te,e[173]=ze):ze=e[173];const js="space-y-6",Gt=t.detection?"hidden":void 0;let bt;e[174]===Symbol.for("react.memo_cache_sentinel")?(bt=s.jsx(d,{children:s.jsx(m,{children:"Daily (30d)"})}),e[174]=bt):bt=e[174];const ys=t.daily;let Nt,kt,wt;e[175]===Symbol.for("react.memo_cache_sentinel")?(Nt=s.jsx(os,{vertical:!1}),kt=s.jsx(ds,{dataKey:"day",tickLine:!1,axisLine:!1,minTickGap:24,tickFormatter:Rn}),wt=s.jsx(ms,{width:28,tickLine:!1,axisLine:!1,allowDecimals:!1}),e[175]=Nt,e[176]=kt,e[177]=wt):(Nt=e[175],kt=e[176],wt=e[177]);let Re;e[178]!==t.deploys?(Re=s.jsx(us,{content:s.jsx(fs,{labelFormatter:r=>{const b=tn(t.deploys,String(r));return b.length>0?`${String(r)} · deployed ${b.join(", ")}`:String(r)}})}),e[178]=t.deploys,e[179]=Re):Re=e[179];let St;e[180]===Symbol.for("react.memo_cache_sentinel")?(St=s.jsx(xs,{dataKey:"count",fill:"var(--color-count)",radius:2}),e[180]=St):St=e[180];let De;e[181]!==t.deploys?(De=new Set(t.deploys.map(zn)),e[181]=t.deploys,e[182]=De):De=e[182];let Fe;e[183]!==De?(Fe=[...De].map(Tn),e[183]=De,e[184]=Fe):Fe=e[184];let Ee;e[185]!==t.daily||e[186]!==Re||e[187]!==Fe?(Ee=s.jsx(o,{children:s.jsx(hs,{config:sn,className:"h-40 w-full",children:s.jsxs(ps,{data:ys,children:[Nt,kt,wt,Re,St,Fe]})})}),e[185]=t.daily,e[186]=Re,e[187]=Fe,e[188]=Ee):Ee=e[188];let Be;e[189]!==Gt||e[190]!==Ee?(Be=s.jsxs(c,{className:Gt,children:[bt,Ee]}),e[189]=Gt,e[190]=Ee,e[191]=Be):Be=e[191];const Ht=t.detection?"hidden":void 0;let $t;e[192]===Symbol.for("react.memo_cache_sentinel")?($t=s.jsx(d,{children:s.jsx(m,{children:"Grouping"})}),e[192]=$t):$t=e[192];let Pe;e[193]!==t.fingerprint?(Pe=t.fingerprint.length>0&&s.jsx("div",{className:"flex flex-wrap gap-1",children:t.fingerprint.map(Mn)}),e[193]=t.fingerprint,e[194]=Pe):Pe=e[194];const Vt=rn[t.fingerprint_source??"default"]??`Fingerprint from ${t.fingerprint_source}.`;let Oe;e[195]!==Vt?(Oe=s.jsx("p",{className:"text-muted-foreground text-xs",children:Vt}),e[195]=Vt,e[196]=Oe):Oe=e[196];let Ke;e[197]!==l||e[198]!==t.distinct_messages||e[199]!==t.top_messages?(Ke=t.distinct_messages>1&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"space-y-1",children:t.top_messages.map(An)}),s.jsxs(O,{size:"sm",variant:"outline",onClick:()=>l("split",{by:"message"}),children:[s.jsx(Zs,{className:"size-3.5"}),"Split into ",t.distinct_messages," issues"]})]}),e[197]=l,e[198]=t.distinct_messages,e[199]=t.top_messages,e[200]=Ke):Ke=e[200];let qe;e[201]!==Pe||e[202]!==Oe||e[203]!==Ke?(qe=s.jsxs(o,{className:"space-y-3",children:[Pe,Oe,Ke]}),e[201]=Pe,e[202]=Oe,e[203]=Ke,e[204]=qe):qe=e[204];let Ge;e[205]!==Ht||e[206]!==qe?(Ge=s.jsxs(c,{className:Ht,children:[$t,qe]}),e[205]=Ht,e[206]=qe,e[207]=Ge):Ge=e[207];let He;e[208]!==t.related_issues?(He=t.related_issues.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"Related issues"})}),s.jsx(o,{className:"space-y-2",children:t.related_issues.map(In)})]}),e[208]=t.related_issues,e[209]=He):He=e[209];let Ve;e[210]!==t.merged_issues?(Ve=t.merged_issues.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"Merged issues"})}),s.jsx(o,{className:"space-y-2",children:t.merged_issues.map(Ln)})]}),e[210]=t.merged_issues,e[211]=Ve):Ve=e[211];let Ue;e[212]!==t.alerts?(Ue=t.alerts.length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"Alerts"})}),s.jsx(o,{className:"space-y-2",children:t.alerts.map(Cn)})]}),e[212]=t.alerts,e[213]=Ue):Ue=e[213];let Ct;e[214]===Symbol.for("react.memo_cache_sentinel")?(Ct=s.jsx(d,{children:s.jsx(m,{children:"By deploy"})}),e[214]=Ct):Ct=e[214];let Je;e[215]!==t.by_deploy?(Je=Object.entries(t.by_deploy),e[215]=t.by_deploy,e[216]=Je):Je=e[216];let Lt;e[217]===Symbol.for("react.memo_cache_sentinel")?(Lt=[{key:"d",header:"Deploy",cell:Sn},{key:"n",header:"Count",align:"right",cell:wn}],e[217]=Lt):Lt=e[217];let Qe;e[218]!==Je?(Qe=s.jsxs(c,{children:[Ct,s.jsx(o,{children:s.jsx(rt,{rows:Je,rowKey:$n,columns:Lt})})]}),e[218]=Je,e[219]=Qe):Qe=e[219];let We;e[220]!==t.by_tenant?(We=Object.keys(t.by_tenant).length>0&&s.jsxs(c,{children:[s.jsx(d,{children:s.jsx(m,{children:"By tenant"})}),s.jsx(o,{children:s.jsx(rt,{rows:Object.entries(t.by_tenant),rowKey:kn,columns:[{key:"t",header:"Tenant",cell:Nn},{key:"n",header:"Count",align:"right",cell:bn}]})})]}),e[220]=t.by_tenant,e[221]=We):We=e[221];const Ut=c;let Xe;e[222]===Symbol.for("react.memo_cache_sentinel")?(Xe=s.jsx(d,{children:s.jsx(m,{children:"Activity"})}),e[222]=Xe):Xe=e[222];const Jt=o,_s="space-y-3",Qt=t.activities.map(r=>{const b=r.data.source==="linear",mt=typeof r.data.author_name=="string"?r.data.author_name:"Linear",Mt=r.user?.name??(b?mt:"System");return s.jsxs("div",{className:"flex gap-2 text-sm",children:[s.jsx(Ds,{className:"size-6",children:s.jsx(Fs,{className:"text-[10px]",children:r.user||b?dt(Mt):"sys"})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"text-xs",children:[s.jsx("span",{className:"font-medium",children:Mt})," ",s.jsx("span",{className:"text-muted-foreground",children:an(r,q)})," ",s.jsx(as,{iso:r.created_at,className:"text-muted-foreground"})]}),r.kind==="comment"&&s.jsx("div",{className:"mt-0.5 whitespace-pre-wrap",children:String(r.data.body)})]})]},r.id)});let Ye;e[223]!==n.id?(Ye=Ns(n.id),e[223]=n.id,e[224]=Ye):Ye=e[224];let It;e[225]===Symbol.for("react.memo_cache_sentinel")?(It={preserveScroll:!0},e[225]=It):It=e[225];let Ze;e[226]!==Ye?(Ze=s.jsx(Ss,{method:"post",action:Ye,options:It,resetOnSuccess:!0,className:"space-y-2",children:vn}),e[226]=Ye,e[227]=Ze):Ze=e[227];let et;e[228]!==Jt||e[229]!==Qt||e[230]!==Ze?(et=s.jsxs(Jt,{className:_s,children:[Qt,Ze]}),e[228]=Jt,e[229]=Qt,e[230]=Ze,e[231]=et):et=e[231];let tt;e[232]!==Ut||e[233]!==Xe||e[234]!==et?(tt=s.jsxs(Ut,{children:[Xe,et]}),e[232]=Ut,e[233]=Xe,e[234]=et,e[235]=tt):tt=e[235];let st;e[236]!==Ue||e[237]!==Qe||e[238]!==We||e[239]!==tt||e[240]!==Be||e[241]!==Ge||e[242]!==He||e[243]!==Ve?(st=s.jsxs("div",{className:js,children:[Be,Ge,He,Ve,Ue,Qe,We,tt]}),e[236]=Ue,e[237]=Qe,e[238]=We,e[239]=tt,e[240]=Be,e[241]=Ge,e[242]=He,e[243]=Ve,e[244]=st):st=e[244];let nt;e[245]!==st||e[246]!==ze?(nt=s.jsxs("div",{className:gs,children:[ze,st]}),e[245]=st,e[246]=ze,e[247]=nt):nt=e[247];let it;e[248]!==nt||e[249]!==ce||e[250]!==oe||e[251]!==xe||e[252]!==Ce?(it=s.jsxs("div",{className:V,children:[ce,oe,xe,Ce,nt]}),e[248]=nt,e[249]=ce,e[250]=oe,e[251]=xe,e[252]=Ce,e[253]=it):it=e[253];let At;return e[254]!==F||e[255]!==h||e[256]!==it||e[257]!==E?(At=s.jsxs(F,{breadcrumbs:E,children:[h,it]}),e[254]=F,e[255]=h,e[256]=it,e[257]=E,e[258]=At):At=e[258],At}function vn(t){const{processing:e}=t;return s.jsxs(s.Fragment,{children:[s.jsx(en,{name:"body",placeholder:"Add a comment…",required:!0,rows:3}),s.jsx(O,{size:"sm",disabled:e,children:"Comment"})]})}function bn(t){const[,e]=t;return e}function Nn(t){const[e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e})}function kn(t){const[e]=t;return e}function wn(t){const[,e]=t;return e}function Sn(t){const[e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e??"unknown"})}function $n(t){const[e]=t;return e??"none"}function Cn(t){return s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",title:t.error??void 0,children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(xt,{variant:t.status==="failed"?"destructive":"outline",className:"capitalize",children:t.status}),s.jsxs("span",{children:[t.event," via ",t.integration.name]}),s.jsx(as,{iso:t.sent_at,className:"text-muted-foreground"})]}),t.error&&s.jsx("span",{className:"text-destructive",children:t.error})]},t.id)}function Ln(t){return s.jsxs(zt,{href:ft(t.id),className:"hover:bg-muted/60 -mx-2 flex flex-col rounded px-2 py-1 text-xs",children:[s.jsx("span",{className:"font-mono font-semibold",children:t.key}),s.jsx("span",{className:"text-muted-foreground line-clamp-1",children:t.title})]},t.id)}function In(t){return s.jsxs(zt,{href:ft(t.id),className:"hover:bg-muted/60 -mx-2 flex flex-col rounded px-2 py-1 text-xs",children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-mono font-semibold",children:t.key}),s.jsx(cs,{status:t.status})]}),s.jsx("span",{className:"text-muted-foreground line-clamp-1",children:t.title}),s.jsx("span",{className:"text-muted-foreground",children:t.environment.name})]},t.id)}function An(t){return s.jsxs("div",{className:"flex items-start justify-between gap-2 text-xs",children:[s.jsx("span",{className:"line-clamp-1 font-mono",children:t.message}),s.jsx("span",{className:"text-muted-foreground",children:Rt(t.count)})]},t.message)}function Mn(t,e){return s.jsx("span",{className:"bg-muted rounded px-1.5 py-0.5 font-mono text-[11px] break-all",children:t},`${e}-${t}`)}function Tn(t){return s.jsx(Hs,{x:t,stroke:"var(--muted-foreground)",strokeDasharray:"3 3"},t)}function zn(t){return t.at.slice(0,10)}function Rn(t){return new Date(t).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Dn(t){return Us(t.bytes)}function Fn(t){return s.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:t.execution_preview??"–"})}function En(t){return s.jsxs("span",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"truncate font-mono text-xs",children:t.name}),t.truncated&&s.jsx(xt,{variant:"secondary",children:"truncated"})]})}function Bn(t){return t.id}function Pn(t){return t.handled?s.jsx(xt,{variant:"secondary",children:"handled"}):null}function On(t){return s.jsx("span",{className:"font-mono text-xs",children:t.deploy?.slice(0,10)})}function Kn(t){return s.jsx("span",{className:"font-mono text-xs",children:t.tenant??""})}function qn(t){return s.jsx("span",{className:"font-mono text-xs",children:t.user_ref??""})}function Gn(t){return s.jsxs("span",{className:"font-mono text-xs",children:[t.execution_source," ",t.execution_preview]})}function Hn(t){return s.jsx("span",{className:"text-xs",children:at(t.occurred_at)})}function Vn(t){return t.id}function Un(t){return s.jsx(es,{value:String(t.id),children:t.name},t.id)}function Jn(t){return s.jsx(es,{value:t,children:t},t)}function Qn(t){if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.json()}function Wn(t){return[t.id,t.name]}export{hi as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,u as v,N,j as s,d as P,f as C,L as E,i as S}from"./inertia-
|
|
1
|
+
import{c as g,u as v,N,j as s,d as P,f as C,L as E,i as S}from"./inertia-b7M33AzA.js";import{D as y}from"./data-table-Bzj8zcao.js";import{P as $,E as b}from"./env-layout-Dic4A8Kn.js";import{I,S as R}from"./status-badge-D40D8TiV.js";import{C as D,b as H,c as K,a as L}from"./card-C4EFUWG1.js";import{a as w,w as T,m as B}from"./format-B9SDkrWj.js";import"./chart-hover-B5cFOZ24.js";import"./app-layout-CpEbDy93.js";import"./use-live-rp6jfGac.js";import"./segmented-CJq8WOHZ.js";function oe(t){const e=g.c(31),{environment:j,window:_}=v().props,r=j.application_id,i=j.id,n=t.person?.name??t.person_ref;let a;e[0]!==r||e[1]!==i||e[2]!==_?(a=N(r,i,{window:_}),e[0]=r,e[1]=i,e[2]=_,e[3]=a):a=e[3];let o;e[4]!==a?(o={title:"Users",href:a},e[4]=a,e[5]=o):o=e[5];let l;e[6]!==n?(l={title:n,href:"#"},e[6]=n,e[7]=l):l=e[7];let c;e[8]!==o||e[9]!==l?(c=[o,l],e[8]=o,e[9]=l,e[10]=c):c=e[10];let u;e[11]!==t.person?(u=t.person?`${t.person.email??""} ${t.person.tenant?`· tenant ${t.person.tenant}`:""} · first seen ${w(t.person.first_seen_at)} · last seen ${w(t.person.last_seen_at)}`:"Not yet identified.",e[11]=t.person,e[12]=u):u=e[12];let m;e[13]!==n||e[14]!==u?(m=s.jsx($,{title:n,description:u}),e[13]=n,e[14]=u,e[15]=m):m=e[15];let d;e[16]!==t.issues?(d=t.issues.length>0&&s.jsxs(D,{children:[s.jsx(H,{children:s.jsx(K,{children:"Issues affecting this user"})}),s.jsx(L,{children:s.jsx(y,{rows:t.issues,rowKey:V,columns:[{key:"k",header:"Issue",cell:Q},{key:"t",header:"Title",cell:O},{key:"s",header:"",cell:M},{key:"n",header:"Hits",align:"right",cell:J}]})})]}),e[16]=t.issues,e[17]=d):d=e[17];let f;e[18]!==r||e[19]!==i?(f=k=>k.execution_id&&P.visit(C(r,i,k.execution_id)),e[18]=r,e[19]=i,e[20]=f):f=e[20];let x;e[21]===Symbol.for("react.memo_cache_sentinel")?(x=[{key:"when",header:"When",cell:F},{key:"k",header:"Kind",cell:A},{key:"n",header:"Name",cell:z},{key:"st",header:"Status",cell:W},{key:"d",header:"Duration",align:"right",cell:U},{key:"ex",header:"Exception",cell:q}],e[21]=x):x=e[21];let p;e[22]!==t.executions||e[23]!==f?(p=s.jsx(y,{rows:t.executions,rowKey:G,onRowClick:f,columns:x}),e[22]=t.executions,e[23]=f,e[24]=p):p=e[24];let h;return e[25]!==n||e[26]!==c||e[27]!==m||e[28]!==d||e[29]!==p?(h=s.jsxs(b,{title:n,crumbs:c,children:[m,d,p]}),e[25]=n,e[26]=c,e[27]=m,e[28]=d,e[29]=p,e[30]=h):h=e[30],h}function q(t){return s.jsx("span",{className:"text-destructive line-clamp-1 text-xs",children:t.exception_preview??""})}function U(t){return B(t.duration)}function W(t){return s.jsx(R,{status:t.status,outcome:t.outcome})}function z(t){return s.jsx("span",{className:"font-mono text-xs",children:t.name})}function A(t){return t.kind}function F(t){return s.jsx("span",{className:"text-xs",children:T(t.occurred_at)})}function G(t){return t.execution_id}function J(t){return t.count}function M(t){return s.jsx(I,{status:t.status})}function O(t){return s.jsx("span",{className:"line-clamp-1 text-xs",children:t.title})}function Q(t){return s.jsx(E,{className:"font-mono text-xs hover:underline",href:S(t.id),children:t.key})}function V(t){return t.id}export{oe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as be,u as ke,r as ye,a9 as _e,j as n,L as Z,K as ve,C as we,f as he,d as xe,M as qe,i as Ne}from"./inertia-FoqYZAk8.js";import{V as Ee,D as Re}from"./chart-panel-CUdIzJvk.js";import{D as se}from"./data-table-DYi-N0hm.js";import{u as Me,E as Pe,P as Se}from"./env-layout-HdcOaPPX.js";import{a as De,S as Oe}from"./segmented-BWee8uc9.js";import{S as Y,a as Le}from"./stat-BTzNKTm2.js";import{S as Te}from"./status-badge-BDkOXa-C.js";import{c as m,p as Ce,m as ee,w as pe,a as Ke}from"./format-B9SDkrWj.js";import"./series-chart-C5nXIUc5.js";import"./chart-hover-CEH-DtXO.js";import"./chart-DJHv3R7W.js";import"./app-layout-LvxN9xSS.js";import"./use-live-CE_fN5_6.js";import"./arrow-up-DG01k9AL.js";function wt(t){const e=be.c(167),{environment:de,window:u}=ke().props,{window:fe,label:ge}=Me(),[i,je]=ye.useState("routes"),r=de.application_id,l=de.id,s=t.summary.current,o=t.summary.previous,c=fe==="custom"?"vs previous period":`vs previous ${ge}`;let f,g,j,b,k,y,d,h,x,p;if(e[0]!==r||e[1]!==c||e[2]!==l||e[3]!==t.exceptions.length||e[4]!==t.jobs.length||e[5]!==t.links.logs||e[6]!==t.links.people||e[7]!==t.people.length||e[8]!==t.recent_requests.length||e[9]!==t.routes.length||e[10]!==t.series||e[11]!==t.tenant||e[12]!==o.errors||e[13]!==o.exceptions||e[14]!==o.p95||e[15]!==o.requests||e[16]!==s.errors||e[17]!==s.exceptions||e[18]!==s.failed_jobs||e[19]!==s.jobs||e[20]!==s.logs||e[21]!==s.p95||e[22]!==s.requests||e[23]!==s.users||e[24]!==i||e[25]!==u){const a=[{key:"routes",label:"Routes",badge:t.routes.length},{key:"jobs",label:"Jobs",badge:t.jobs.length},{key:"exceptions",label:"Exceptions",badge:t.exceptions.length},{key:"people",label:"Users",badge:t.people.length},{key:"requests",label:"Recent requests",badge:t.recent_requests.length}];g=Pe,y=t.tenant;let M;e[36]!==r||e[37]!==l||e[38]!==u?(M=_e(r,l,{window:u}),e[36]=r,e[37]=l,e[38]=u,e[39]=M):M=e[39];let P;e[40]!==M?(P={title:"Tenants",href:M},e[40]=M,e[41]=P):P=e[41];let S;e[42]!==t.tenant?(S={title:t.tenant,href:"#"},e[42]=t.tenant,e[43]=S):S=e[43],e[44]!==S||e[45]!==P?(d=[P,S],e[44]=S,e[45]=P,e[46]=d):d=e[46];let D;e[47]!==t.tenant?(D=n.jsx("span",{className:"font-mono",children:t.tenant}),e[47]=t.tenant,e[48]=D):D=e[48];let O;e[49]!==t.links.logs?(O=n.jsx(Z,{className:"text-xs underline",href:t.links.logs,children:"Logs"}),e[49]=t.links.logs,e[50]=O):O=e[50];let L;e[51]!==t.links.people?(L=n.jsx(Z,{className:"text-xs underline",href:t.links.people,children:"Users"}),e[51]=t.links.people,e[52]=L):L=e[52];let T;e[53]!==O||e[54]!==L?(T=n.jsxs(n.Fragment,{children:[O,L]}),e[53]=O,e[54]=L,e[55]=T):T=e[55],e[56]!==D||e[57]!==T?(h=n.jsx(Se,{title:D,actions:T}),e[56]=D,e[57]=T,e[58]=h):h=e[58];let C;e[59]!==s.requests?(C=m(s.requests),e[59]=s.requests,e[60]=C):C=e[60];let K;e[61]!==o.requests||e[62]!==s.requests?(K={current:s.requests,previous:o.requests,goodDirection:"up"},e[61]=o.requests,e[62]=s.requests,e[63]=K):K=e[63];let $;e[64]!==c||e[65]!==C||e[66]!==K?($=n.jsx(Y,{label:"Requests",value:C,delta:K,deltaCaption:c}),e[64]=c,e[65]=C,e[66]=K,e[67]=$):$=e[67];let A;e[68]!==s.errors||e[69]!==s.requests?(A=Ce(s.errors,s.requests),e[68]=s.errors,e[69]=s.requests,e[70]=A):A=e[70];const le=s.errors?"destructive":"success",oe=`${s.errors} of ${s.requests}`,ie=s.requests?s.errors/s.requests*100:0,ae=o.requests?o.errors/o.requests*100:0;let U;e[71]!==ie||e[72]!==ae?(U={current:ie,previous:ae,goodDirection:"down"},e[71]=ie,e[72]=ae,e[73]=U):U=e[73];let J;e[74]!==c||e[75]!==A||e[76]!==le||e[77]!==oe||e[78]!==U?(J=n.jsx(Y,{label:"5xx",value:A,tone:le,hint:oe,delta:U,deltaCaption:c}),e[74]=c,e[75]=A,e[76]=le,e[77]=oe,e[78]=U,e[79]=J):J=e[79];let W;e[80]!==s.p95?(W=ee(s.p95),e[80]=s.p95,e[81]=W):W=e[81];let F;e[82]!==o.p95||e[83]!==s.p95?(F={current:s.p95,previous:o.p95,goodDirection:"down"},e[82]=o.p95,e[83]=s.p95,e[84]=F):F=e[84];let I;e[85]!==c||e[86]!==W||e[87]!==F?(I=n.jsx(Y,{label:"p95",value:W,delta:F,deltaCaption:c}),e[85]=c,e[86]=W,e[87]=F,e[88]=I):I=e[88];let V;e[89]!==s.jobs?(V=m(s.jobs),e[89]=s.jobs,e[90]=V):V=e[90];const ce=`${s.failed_jobs} failed`,ue=s.failed_jobs?"destructive":"default";let B;e[91]!==V||e[92]!==ce||e[93]!==ue?(B=n.jsx(Y,{label:"Jobs",value:V,hint:ce,tone:ue}),e[91]=V,e[92]=ce,e[93]=ue,e[94]=B):B=e[94];let H;e[95]!==s.exceptions?(H=m(s.exceptions),e[95]=s.exceptions,e[96]=H):H=e[96];let z;e[97]!==o.exceptions||e[98]!==s.exceptions?(z={current:s.exceptions,previous:o.exceptions,goodDirection:"down"},e[97]=o.exceptions,e[98]=s.exceptions,e[99]=z):z=e[99];let G;e[100]!==c||e[101]!==H||e[102]!==z?(G=n.jsx(Y,{label:"Exceptions",value:H,delta:z,deltaCaption:c}),e[100]=c,e[101]=H,e[102]=z,e[103]=G):G=e[103];let Q;e[104]!==s.users?(Q=m(s.users),e[104]=s.users,e[105]=Q):Q=e[105];let re;e[106]!==s.logs?(re=m(s.logs),e[106]=s.logs,e[107]=re):re=e[107];const me=`${re} log lines`;let X;e[108]!==Q||e[109]!==me?(X=n.jsx(Y,{label:"Users",value:Q,hint:me}),e[108]=Q,e[109]=me,e[110]=X):X=e[110],e[111]!==$||e[112]!==J||e[113]!==I||e[114]!==B||e[115]!==G||e[116]!==X?(x=n.jsxs(Le,{children:[$,J,I,B,G,X]}),e[111]=$,e[112]=J,e[113]=I,e[114]=B,e[115]=G,e[116]=X,e[117]=x):x=e[117],e[118]!==t.series?(p=n.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[n.jsx(Ee,{label:"Requests",data:t.series}),n.jsx(Re,{label:"Latency",data:t.series})]}),e[118]=t.series,e[119]=p):p=e[119],k="-mx-3 [scrollbar-width:none] overflow-x-auto px-3 md:mx-0 md:px-0 [&::-webkit-scrollbar]:hidden",f=Oe,j="w-max",b=a.map(te=>n.jsxs(De,{mono:!1,active:i===te.key,onClick:()=>je(te.key),className:"gap-1.5 px-3",children:[te.label,n.jsx("span",{className:"opacity-60",children:m(te.badge)})]},te.key)),e[0]=r,e[1]=c,e[2]=l,e[3]=t.exceptions.length,e[4]=t.jobs.length,e[5]=t.links.logs,e[6]=t.links.people,e[7]=t.people.length,e[8]=t.recent_requests.length,e[9]=t.routes.length,e[10]=t.series,e[11]=t.tenant,e[12]=o.errors,e[13]=o.exceptions,e[14]=o.p95,e[15]=o.requests,e[16]=s.errors,e[17]=s.exceptions,e[18]=s.failed_jobs,e[19]=s.jobs,e[20]=s.logs,e[21]=s.p95,e[22]=s.requests,e[23]=s.users,e[24]=i,e[25]=u,e[26]=f,e[27]=g,e[28]=j,e[29]=b,e[30]=k,e[31]=y,e[32]=d,e[33]=h,e[34]=x,e[35]=p}else f=e[26],g=e[27],j=e[28],b=e[29],k=e[30],y=e[31],d=e[32],h=e[33],x=e[34],p=e[35];let _;e[120]!==f||e[121]!==j||e[122]!==b?(_=n.jsx(f,{className:j,children:b}),e[120]=f,e[121]=j,e[122]=b,e[123]=_):_=e[123];let v;e[124]!==k||e[125]!==_?(v=n.jsx("div",{className:k,children:_}),e[124]=k,e[125]=_,e[126]=v):v=e[126];let w;e[127]!==r||e[128]!==l||e[129]!==t.routes||e[130]!==i||e[131]!==u?(w=i==="routes"&&n.jsx(se,{rows:t.routes,rowKey:ct,empty:"No requests from this tenant in this window.",columns:[{key:"name",header:"Route",cell:a=>n.jsx(Z,{className:"font-mono text-xs hover:underline",href:ve(r,l,a.group_hash,{window:u}),children:a.name})},{key:"count",header:"Requests",align:"right",cell:at},{key:"errors",header:"5xx",align:"right",cell:it},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:ot},{key:"max",hideOnMobile:!0,header:"Max",align:"right",cell:lt}]}),e[127]=r,e[128]=l,e[129]=t.routes,e[130]=i,e[131]=u,e[132]=w):w=e[132];let q;e[133]!==r||e[134]!==l||e[135]!==t.jobs||e[136]!==i||e[137]!==u?(q=i==="jobs"&&n.jsx(se,{rows:t.jobs,rowKey:rt,empty:"No job attempts from this tenant in this window.",columns:[{key:"name",header:"Job",cell:a=>n.jsx(Z,{className:"font-mono text-xs hover:underline",href:we(r,l,a.group_hash,{window:u}),children:a.name})},{key:"count",header:"Attempts",align:"right",cell:nt},{key:"failed",header:"Failed",align:"right",cell:st},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:tt},{key:"max",hideOnMobile:!0,header:"Max",align:"right",cell:et}]}),e[133]=r,e[134]=l,e[135]=t.jobs,e[136]=i,e[137]=u,e[138]=q):q=e[138];let N;e[139]!==r||e[140]!==l||e[141]!==t.exceptions||e[142]!==i?(N=i==="exceptions"&&n.jsx(se,{rows:t.exceptions,rowKey:Ze,empty:"No exceptions from this tenant in this window.",columns:[{key:"when",header:"When",cell:Ye},{key:"class",header:"Class",cell:Xe},{key:"message",header:"Message",cell:Qe},{key:"issue",header:"Issue",cell:Ge},{key:"exe",hideOnMobile:!0,header:"Execution",cell:a=>a.execution_id?n.jsx(Z,{className:"font-mono text-xs hover:underline",href:he(r,l,a.execution_id),children:a.execution_id.slice(0,8)}):n.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})}]}),e[139]=r,e[140]=l,e[141]=t.exceptions,e[142]=i,e[143]=N):N=e[143];let E;e[144]!==r||e[145]!==l||e[146]!==t.people||e[147]!==i?(E=i==="people"&&n.jsx(se,{rows:t.people,rowKey:ze,empty:"No users tagged with this tenant.",onRowClick:a=>xe.visit(qe(r,l,a.ref)),columns:[{key:"name",header:"User",cell:He},{key:"ref",hideOnMobile:!0,header:"Ref",cell:Be},{key:"seen",header:"Last seen",align:"right",cell:Ve}]}),e[144]=r,e[145]=l,e[146]=t.people,e[147]=i,e[148]=E):E=e[148];let R;e[149]!==r||e[150]!==l||e[151]!==t.recent_requests||e[152]!==i?(R=i==="requests"&&n.jsx(se,{rows:t.recent_requests,rowKey:Ie,empty:"No requests from this tenant in this window.",onRowClick:a=>xe.visit(he(r,l,a.execution_id)),columns:[{key:"when",header:"When",cell:Fe},{key:"name",header:"Route",cell:We},{key:"status",header:"Status",cell:Je},{key:"dur",header:"Duration",align:"right",cell:Ue},{key:"user",hideOnMobile:!0,header:"User",cell:Ae},{key:"ex",hideOnMobile:!0,header:"Exception",cell:$e}]}),e[149]=r,e[150]=l,e[151]=t.recent_requests,e[152]=i,e[153]=R):R=e[153];let ne;return e[154]!==g||e[155]!==w||e[156]!==q||e[157]!==N||e[158]!==E||e[159]!==R||e[160]!==y||e[161]!==d||e[162]!==h||e[163]!==x||e[164]!==p||e[165]!==v?(ne=n.jsxs(g,{title:y,crumbs:d,children:[h,x,p,v,w,q,N,E,R]}),e[154]=g,e[155]=w,e[156]=q,e[157]=N,e[158]=E,e[159]=R,e[160]=y,e[161]=d,e[162]=h,e[163]=x,e[164]=p,e[165]=v,e[166]=ne):ne=e[166],ne}function $e(t){return n.jsx("span",{className:"text-destructive line-clamp-1 text-xs",children:t.exception_preview??""})}function Ae(t){return n.jsx("span",{className:"font-mono text-xs",children:t.user_ref??"–"})}function Ue(t){return ee(t.duration)}function Je(t){return n.jsx(Te,{status:t.status})}function We(t){return n.jsx("span",{className:"font-mono text-xs",children:t.name})}function Fe(t){return n.jsx("span",{className:"text-xs tabular-nums",children:pe(t.occurred_at)})}function Ie(t){return t.execution_id}function Ve(t){return Ke(t.last_seen_at)}function Be(t){return n.jsx("span",{className:"font-mono text-xs",children:t.ref})}function He(t){return n.jsxs("span",{className:"text-xs",children:[n.jsx("span",{className:"font-medium",children:t.name}),t.email&&n.jsxs("span",{className:"text-muted-foreground",children:[" · ",t.email]})]})}function ze(t){return t.ref}function Ge(t){return t.issue_id?n.jsx(Z,{className:"font-mono text-xs hover:underline",href:Ne(t.issue_id),children:t.issue_key}):n.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})}function Qe(t){return n.jsx("span",{className:"line-clamp-1 text-xs",children:t.message})}function Xe(t){return n.jsx("span",{className:"font-mono text-xs",children:t.class_name})}function Ye(t){return n.jsx("span",{className:"text-xs tabular-nums",children:pe(t.occurred_at)})}function Ze(t){return t.id}function et(t){return ee(t.max)}function tt(t){return ee(t.avg)}function st(t){return n.jsx("span",{className:t.failed?"text-destructive":"",children:m(t.failed)})}function nt(t){return m(t.count)}function rt(t){return t.group_hash}function lt(t){return ee(t.max)}function ot(t){return ee(t.avg)}function it(t){return n.jsx("span",{className:t.errors?"text-destructive":"",children:m(t.errors)})}function at(t){return m(t.count)}function ct(t){return t.group_hash}export{wt as default};
|
|
1
|
+
import{c as be,u as ke,r as ye,a9 as _e,j as n,L as Z,K as ve,C as we,f as he,d as xe,M as qe,i as Ne}from"./inertia-b7M33AzA.js";import{V as Ee,D as Re}from"./chart-panel-XD8qJDmg.js";import{D as se}from"./data-table-Bzj8zcao.js";import{u as Me,E as Pe,P as Se}from"./env-layout-Dic4A8Kn.js";import{a as De,S as Oe}from"./segmented-CJq8WOHZ.js";import{S as Y,a as Le}from"./stat-nY8iS5q9.js";import{S as Te}from"./status-badge-D40D8TiV.js";import{c as m,p as Ce,m as ee,w as pe,a as Ke}from"./format-B9SDkrWj.js";import"./series-chart-FBOfRLhK.js";import"./chart-hover-B5cFOZ24.js";import"./chart-CD6EHDjG.js";import"./app-layout-CpEbDy93.js";import"./use-live-rp6jfGac.js";import"./arrow-up-DAODKT5N.js";function wt(t){const e=be.c(167),{environment:de,window:u}=ke().props,{window:fe,label:ge}=Me(),[i,je]=ye.useState("routes"),r=de.application_id,l=de.id,s=t.summary.current,o=t.summary.previous,c=fe==="custom"?"vs previous period":`vs previous ${ge}`;let f,g,j,b,k,y,d,h,x,p;if(e[0]!==r||e[1]!==c||e[2]!==l||e[3]!==t.exceptions.length||e[4]!==t.jobs.length||e[5]!==t.links.logs||e[6]!==t.links.people||e[7]!==t.people.length||e[8]!==t.recent_requests.length||e[9]!==t.routes.length||e[10]!==t.series||e[11]!==t.tenant||e[12]!==o.errors||e[13]!==o.exceptions||e[14]!==o.p95||e[15]!==o.requests||e[16]!==s.errors||e[17]!==s.exceptions||e[18]!==s.failed_jobs||e[19]!==s.jobs||e[20]!==s.logs||e[21]!==s.p95||e[22]!==s.requests||e[23]!==s.users||e[24]!==i||e[25]!==u){const a=[{key:"routes",label:"Routes",badge:t.routes.length},{key:"jobs",label:"Jobs",badge:t.jobs.length},{key:"exceptions",label:"Exceptions",badge:t.exceptions.length},{key:"people",label:"Users",badge:t.people.length},{key:"requests",label:"Recent requests",badge:t.recent_requests.length}];g=Pe,y=t.tenant;let M;e[36]!==r||e[37]!==l||e[38]!==u?(M=_e(r,l,{window:u}),e[36]=r,e[37]=l,e[38]=u,e[39]=M):M=e[39];let P;e[40]!==M?(P={title:"Tenants",href:M},e[40]=M,e[41]=P):P=e[41];let S;e[42]!==t.tenant?(S={title:t.tenant,href:"#"},e[42]=t.tenant,e[43]=S):S=e[43],e[44]!==S||e[45]!==P?(d=[P,S],e[44]=S,e[45]=P,e[46]=d):d=e[46];let D;e[47]!==t.tenant?(D=n.jsx("span",{className:"font-mono",children:t.tenant}),e[47]=t.tenant,e[48]=D):D=e[48];let O;e[49]!==t.links.logs?(O=n.jsx(Z,{className:"text-xs underline",href:t.links.logs,children:"Logs"}),e[49]=t.links.logs,e[50]=O):O=e[50];let L;e[51]!==t.links.people?(L=n.jsx(Z,{className:"text-xs underline",href:t.links.people,children:"Users"}),e[51]=t.links.people,e[52]=L):L=e[52];let T;e[53]!==O||e[54]!==L?(T=n.jsxs(n.Fragment,{children:[O,L]}),e[53]=O,e[54]=L,e[55]=T):T=e[55],e[56]!==D||e[57]!==T?(h=n.jsx(Se,{title:D,actions:T}),e[56]=D,e[57]=T,e[58]=h):h=e[58];let C;e[59]!==s.requests?(C=m(s.requests),e[59]=s.requests,e[60]=C):C=e[60];let K;e[61]!==o.requests||e[62]!==s.requests?(K={current:s.requests,previous:o.requests,goodDirection:"up"},e[61]=o.requests,e[62]=s.requests,e[63]=K):K=e[63];let $;e[64]!==c||e[65]!==C||e[66]!==K?($=n.jsx(Y,{label:"Requests",value:C,delta:K,deltaCaption:c}),e[64]=c,e[65]=C,e[66]=K,e[67]=$):$=e[67];let A;e[68]!==s.errors||e[69]!==s.requests?(A=Ce(s.errors,s.requests),e[68]=s.errors,e[69]=s.requests,e[70]=A):A=e[70];const le=s.errors?"destructive":"success",oe=`${s.errors} of ${s.requests}`,ie=s.requests?s.errors/s.requests*100:0,ae=o.requests?o.errors/o.requests*100:0;let U;e[71]!==ie||e[72]!==ae?(U={current:ie,previous:ae,goodDirection:"down"},e[71]=ie,e[72]=ae,e[73]=U):U=e[73];let J;e[74]!==c||e[75]!==A||e[76]!==le||e[77]!==oe||e[78]!==U?(J=n.jsx(Y,{label:"5xx",value:A,tone:le,hint:oe,delta:U,deltaCaption:c}),e[74]=c,e[75]=A,e[76]=le,e[77]=oe,e[78]=U,e[79]=J):J=e[79];let W;e[80]!==s.p95?(W=ee(s.p95),e[80]=s.p95,e[81]=W):W=e[81];let F;e[82]!==o.p95||e[83]!==s.p95?(F={current:s.p95,previous:o.p95,goodDirection:"down"},e[82]=o.p95,e[83]=s.p95,e[84]=F):F=e[84];let I;e[85]!==c||e[86]!==W||e[87]!==F?(I=n.jsx(Y,{label:"p95",value:W,delta:F,deltaCaption:c}),e[85]=c,e[86]=W,e[87]=F,e[88]=I):I=e[88];let V;e[89]!==s.jobs?(V=m(s.jobs),e[89]=s.jobs,e[90]=V):V=e[90];const ce=`${s.failed_jobs} failed`,ue=s.failed_jobs?"destructive":"default";let B;e[91]!==V||e[92]!==ce||e[93]!==ue?(B=n.jsx(Y,{label:"Jobs",value:V,hint:ce,tone:ue}),e[91]=V,e[92]=ce,e[93]=ue,e[94]=B):B=e[94];let H;e[95]!==s.exceptions?(H=m(s.exceptions),e[95]=s.exceptions,e[96]=H):H=e[96];let z;e[97]!==o.exceptions||e[98]!==s.exceptions?(z={current:s.exceptions,previous:o.exceptions,goodDirection:"down"},e[97]=o.exceptions,e[98]=s.exceptions,e[99]=z):z=e[99];let G;e[100]!==c||e[101]!==H||e[102]!==z?(G=n.jsx(Y,{label:"Exceptions",value:H,delta:z,deltaCaption:c}),e[100]=c,e[101]=H,e[102]=z,e[103]=G):G=e[103];let Q;e[104]!==s.users?(Q=m(s.users),e[104]=s.users,e[105]=Q):Q=e[105];let re;e[106]!==s.logs?(re=m(s.logs),e[106]=s.logs,e[107]=re):re=e[107];const me=`${re} log lines`;let X;e[108]!==Q||e[109]!==me?(X=n.jsx(Y,{label:"Users",value:Q,hint:me}),e[108]=Q,e[109]=me,e[110]=X):X=e[110],e[111]!==$||e[112]!==J||e[113]!==I||e[114]!==B||e[115]!==G||e[116]!==X?(x=n.jsxs(Le,{children:[$,J,I,B,G,X]}),e[111]=$,e[112]=J,e[113]=I,e[114]=B,e[115]=G,e[116]=X,e[117]=x):x=e[117],e[118]!==t.series?(p=n.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[n.jsx(Ee,{label:"Requests",data:t.series}),n.jsx(Re,{label:"Latency",data:t.series})]}),e[118]=t.series,e[119]=p):p=e[119],k="-mx-3 [scrollbar-width:none] overflow-x-auto px-3 md:mx-0 md:px-0 [&::-webkit-scrollbar]:hidden",f=Oe,j="w-max",b=a.map(te=>n.jsxs(De,{mono:!1,active:i===te.key,onClick:()=>je(te.key),className:"gap-1.5 px-3",children:[te.label,n.jsx("span",{className:"opacity-60",children:m(te.badge)})]},te.key)),e[0]=r,e[1]=c,e[2]=l,e[3]=t.exceptions.length,e[4]=t.jobs.length,e[5]=t.links.logs,e[6]=t.links.people,e[7]=t.people.length,e[8]=t.recent_requests.length,e[9]=t.routes.length,e[10]=t.series,e[11]=t.tenant,e[12]=o.errors,e[13]=o.exceptions,e[14]=o.p95,e[15]=o.requests,e[16]=s.errors,e[17]=s.exceptions,e[18]=s.failed_jobs,e[19]=s.jobs,e[20]=s.logs,e[21]=s.p95,e[22]=s.requests,e[23]=s.users,e[24]=i,e[25]=u,e[26]=f,e[27]=g,e[28]=j,e[29]=b,e[30]=k,e[31]=y,e[32]=d,e[33]=h,e[34]=x,e[35]=p}else f=e[26],g=e[27],j=e[28],b=e[29],k=e[30],y=e[31],d=e[32],h=e[33],x=e[34],p=e[35];let _;e[120]!==f||e[121]!==j||e[122]!==b?(_=n.jsx(f,{className:j,children:b}),e[120]=f,e[121]=j,e[122]=b,e[123]=_):_=e[123];let v;e[124]!==k||e[125]!==_?(v=n.jsx("div",{className:k,children:_}),e[124]=k,e[125]=_,e[126]=v):v=e[126];let w;e[127]!==r||e[128]!==l||e[129]!==t.routes||e[130]!==i||e[131]!==u?(w=i==="routes"&&n.jsx(se,{rows:t.routes,rowKey:ct,empty:"No requests from this tenant in this window.",columns:[{key:"name",header:"Route",cell:a=>n.jsx(Z,{className:"font-mono text-xs hover:underline",href:ve(r,l,a.group_hash,{window:u}),children:a.name})},{key:"count",header:"Requests",align:"right",cell:at},{key:"errors",header:"5xx",align:"right",cell:it},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:ot},{key:"max",hideOnMobile:!0,header:"Max",align:"right",cell:lt}]}),e[127]=r,e[128]=l,e[129]=t.routes,e[130]=i,e[131]=u,e[132]=w):w=e[132];let q;e[133]!==r||e[134]!==l||e[135]!==t.jobs||e[136]!==i||e[137]!==u?(q=i==="jobs"&&n.jsx(se,{rows:t.jobs,rowKey:rt,empty:"No job attempts from this tenant in this window.",columns:[{key:"name",header:"Job",cell:a=>n.jsx(Z,{className:"font-mono text-xs hover:underline",href:we(r,l,a.group_hash,{window:u}),children:a.name})},{key:"count",header:"Attempts",align:"right",cell:nt},{key:"failed",header:"Failed",align:"right",cell:st},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:tt},{key:"max",hideOnMobile:!0,header:"Max",align:"right",cell:et}]}),e[133]=r,e[134]=l,e[135]=t.jobs,e[136]=i,e[137]=u,e[138]=q):q=e[138];let N;e[139]!==r||e[140]!==l||e[141]!==t.exceptions||e[142]!==i?(N=i==="exceptions"&&n.jsx(se,{rows:t.exceptions,rowKey:Ze,empty:"No exceptions from this tenant in this window.",columns:[{key:"when",header:"When",cell:Ye},{key:"class",header:"Class",cell:Xe},{key:"message",header:"Message",cell:Qe},{key:"issue",header:"Issue",cell:Ge},{key:"exe",hideOnMobile:!0,header:"Execution",cell:a=>a.execution_id?n.jsx(Z,{className:"font-mono text-xs hover:underline",href:he(r,l,a.execution_id),children:a.execution_id.slice(0,8)}):n.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})}]}),e[139]=r,e[140]=l,e[141]=t.exceptions,e[142]=i,e[143]=N):N=e[143];let E;e[144]!==r||e[145]!==l||e[146]!==t.people||e[147]!==i?(E=i==="people"&&n.jsx(se,{rows:t.people,rowKey:ze,empty:"No users tagged with this tenant.",onRowClick:a=>xe.visit(qe(r,l,a.ref)),columns:[{key:"name",header:"User",cell:He},{key:"ref",hideOnMobile:!0,header:"Ref",cell:Be},{key:"seen",header:"Last seen",align:"right",cell:Ve}]}),e[144]=r,e[145]=l,e[146]=t.people,e[147]=i,e[148]=E):E=e[148];let R;e[149]!==r||e[150]!==l||e[151]!==t.recent_requests||e[152]!==i?(R=i==="requests"&&n.jsx(se,{rows:t.recent_requests,rowKey:Ie,empty:"No requests from this tenant in this window.",onRowClick:a=>xe.visit(he(r,l,a.execution_id)),columns:[{key:"when",header:"When",cell:Fe},{key:"name",header:"Route",cell:We},{key:"status",header:"Status",cell:Je},{key:"dur",header:"Duration",align:"right",cell:Ue},{key:"user",hideOnMobile:!0,header:"User",cell:Ae},{key:"ex",hideOnMobile:!0,header:"Exception",cell:$e}]}),e[149]=r,e[150]=l,e[151]=t.recent_requests,e[152]=i,e[153]=R):R=e[153];let ne;return e[154]!==g||e[155]!==w||e[156]!==q||e[157]!==N||e[158]!==E||e[159]!==R||e[160]!==y||e[161]!==d||e[162]!==h||e[163]!==x||e[164]!==p||e[165]!==v?(ne=n.jsxs(g,{title:y,crumbs:d,children:[h,x,p,v,w,q,N,E,R]}),e[154]=g,e[155]=w,e[156]=q,e[157]=N,e[158]=E,e[159]=R,e[160]=y,e[161]=d,e[162]=h,e[163]=x,e[164]=p,e[165]=v,e[166]=ne):ne=e[166],ne}function $e(t){return n.jsx("span",{className:"text-destructive line-clamp-1 text-xs",children:t.exception_preview??""})}function Ae(t){return n.jsx("span",{className:"font-mono text-xs",children:t.user_ref??"–"})}function Ue(t){return ee(t.duration)}function Je(t){return n.jsx(Te,{status:t.status})}function We(t){return n.jsx("span",{className:"font-mono text-xs",children:t.name})}function Fe(t){return n.jsx("span",{className:"text-xs tabular-nums",children:pe(t.occurred_at)})}function Ie(t){return t.execution_id}function Ve(t){return Ke(t.last_seen_at)}function Be(t){return n.jsx("span",{className:"font-mono text-xs",children:t.ref})}function He(t){return n.jsxs("span",{className:"text-xs",children:[n.jsx("span",{className:"font-medium",children:t.name}),t.email&&n.jsxs("span",{className:"text-muted-foreground",children:[" · ",t.email]})]})}function ze(t){return t.ref}function Ge(t){return t.issue_id?n.jsx(Z,{className:"font-mono text-xs hover:underline",href:Ne(t.issue_id),children:t.issue_key}):n.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})}function Qe(t){return n.jsx("span",{className:"line-clamp-1 text-xs",children:t.message})}function Xe(t){return n.jsx("span",{className:"font-mono text-xs",children:t.class_name})}function Ye(t){return n.jsx("span",{className:"text-xs tabular-nums",children:pe(t.occurred_at)})}function Ze(t){return t.id}function et(t){return ee(t.max)}function tt(t){return ee(t.avg)}function st(t){return n.jsx("span",{className:t.failed?"text-destructive":"",children:m(t.failed)})}function nt(t){return m(t.count)}function rt(t){return t.group_hash}function lt(t){return ee(t.max)}function ot(t){return ee(t.avg)}function it(t){return n.jsx("span",{className:t.errors?"text-destructive":"",children:m(t.errors)})}function at(t){return m(t.count)}function ct(t){return t.group_hash}export{wt as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c as ge,u as je,P as _e,j as s,L as me,f as de,o as ue}from"./inertia-
|
|
1
|
+
import{c as ge,u as je,P as _e,j as s,L as me,f as de,o as ue}from"./inertia-b7M33AzA.js";import{V as be,D as ye}from"./chart-panel-XD8qJDmg.js";import{M as xe}from"./code-CuTKEYtT.js";import{C as we}from"./copy-id-COM9oXfT.js";import{D as ne}from"./data-table-Bzj8zcao.js";import{E as ve,a9 as Ee}from"./app-layout-CpEbDy93.js";import{P as Se,E as Ne}from"./env-layout-Dic4A8Kn.js";import{S as X,a as Ce}from"./stat-nY8iS5q9.js";import{C as ie,a as re,b as oe,c as ae}from"./card-C4EFUWG1.js";import{c as fe,m as D,w as he}from"./format-B9SDkrWj.js";import"./series-chart-FBOfRLhK.js";import"./chart-hover-B5cFOZ24.js";import"./chart-CD6EHDjG.js";import"./use-clipboard-T9kCBcs8.js";import"./use-live-rp6jfGac.js";import"./segmented-CJq8WOHZ.js";import"./arrow-up-DAODKT5N.js";const Le=[{test:/\bSCAN\b/i,skip:/\bUSING\s+(?:COVERING\s+)?INDEX\b/i,message:"Reads every row of the table — no index covers this filter."},{test:/\bSeq Scan\b/i,message:"Sequential scan — Postgres reads the whole table; an index on the filtered column avoids it."},{test:/\bUSING TEMP B-TREE\b/i,message:"Builds a temporary B-tree to sort — an index matching the ORDER BY removes it."},{test:/filesort/i,message:"Filesort — MySQL sorts the rows itself; an index matching the ORDER BY removes it."},{test:/\btype:\s*ALL\b/i,message:"Join type ALL — MySQL has no usable index and scans the whole table."}];function Re(t){return t.split(`
|
|
2
2
|
`).flatMap((e,o)=>Le.filter(i=>i.test.test(e)&&!i.skip?.test(e)).map(i=>({line:o+1,message:i.message})))}function rt(t){const e=ge.c(86),{environment:o,window:i}=je().props,l=o.application_id,n=o.id,r=t.summary,a=t.explain?.plan??"";let q;e[0]!==a?(q=Re(a),e[0]=a,e[1]=q):q=e[1];const Y=q;let c;e[2]!==l||e[3]!==n||e[4]!==i?(c=_e(l,n,{window:i}),e[2]=l,e[3]=n,e[4]=i,e[5]=c):c=e[5];let m;e[6]!==c?(m={title:"Queries",href:c},e[6]=c,e[7]=m):m=e[7];let I;e[8]===Symbol.for("react.memo_cache_sentinel")?(I={title:"Query",href:"#"},e[8]=I):I=e[8];let d;e[9]!==m?(d=[m,I],e[9]=m,e[10]=d):d=e[10];let u;e[11]!==t.sql?(u=t.sql?s.jsx(we,{value:t.sql,label:"Copy SQL"}):void 0,e[11]=t.sql,e[12]=u):u=e[12];let x;e[13]!==u?(x=s.jsx(Se,{title:"Query",actions:u}),e[13]=u,e[14]=x):x=e[14];const J=t.sql??"No samples in this window.";let f;e[15]!==J?(f=s.jsx("pre",{className:"bg-muted/60 overflow-x-auto rounded-lg p-3 font-mono text-xs whitespace-pre-wrap",children:J}),e[15]=J,e[16]=f):f=e[16];let h;e[17]!==t.roles?(h=t.roles.length>0&&s.jsx("div",{className:"text-muted-foreground font-mono text-[11px]",children:t.roles.map(Ue).join(" · ")}),e[17]=t.roles,e[18]=h):h=e[18];let p;e[19]!==r.count?(p=fe(r.count),e[19]=r.count,e[20]=p):p=e[20];let g;e[21]!==p?(g=s.jsx(X,{label:"Executions",value:p}),e[21]=p,e[22]=g):g=e[22];const z=r.avg/1e3;let j;e[23]!==z?(j=D(z,2),e[23]=z,e[24]=j):j=e[24];let _;e[25]!==j?(_=s.jsx(X,{label:"Avg",value:j}),e[25]=j,e[26]=_):_=e[26];const Z=r.p95/1e3;let b;e[27]!==Z?(b=D(Z,2),e[27]=Z,e[28]=b):b=e[28];const ee=r.p99/1e3;let M;e[29]!==ee?(M=D(ee,2),e[29]=ee,e[30]=M):M=e[30];const te=`p99 ${M}`;let y;e[31]!==b||e[32]!==te?(y=s.jsx(X,{label:"p95",value:b,hint:te}),e[31]=b,e[32]=te,e[33]=y):y=e[33];const se=r.max/1e3;let w;e[34]!==se?(w=D(se,2),e[34]=se,e[35]=w):w=e[35];let v;e[36]!==w?(v=s.jsx(X,{label:"Max",value:w}),e[36]=w,e[37]=v):v=e[37];let E;e[38]!==g||e[39]!==_||e[40]!==y||e[41]!==v?(E=s.jsxs(Ce,{children:[g,_,y,v]}),e[38]=g,e[39]=_,e[40]=y,e[41]=v,e[42]=E):E=e[42];let T;e[43]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(oe,{children:s.jsx(ae,{children:"Query plan"})}),e[43]=T):T=e[43];let S;e[44]!==l||e[45]!==n||e[46]!==t.explain||e[47]!==a||e[48]!==Y?(S=s.jsxs(ie,{children:[T,s.jsx(re,{children:t.explain?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-muted-foreground mb-2 font-mono text-[11px]",children:[he(t.explain.occurred_at)," · ",D(t.explain.duration,2),t.explain.execution_id&&s.jsxs(s.Fragment,{children:[" · ",s.jsx(me,{className:"hover:underline",href:de(l,n,t.explain.execution_id),children:t.explain.execution_id})]})]}),s.jsx("div",{className:"bg-muted/60 overflow-x-auto rounded-lg p-3 font-mono text-xs",children:a.split(`
|
|
3
3
|
`).map((Q,ce)=>{const le=Y.filter(pe=>pe.line===ce+1);return s.jsxs("div",{className:ue("py-0.5",le.length>0&&"border-warning border-l-2 pl-2"),children:[s.jsx("div",{className:ue("whitespace-pre",le.length>0&&"text-warning"),children:Q}),le.map(Oe)]},ce)})})]}):s.jsxs("p",{className:"text-muted-foreground text-xs",children:["Enable plans for slow queries with"," ",s.jsx(xe,{children:"RAILWATCH_CAPTURE_QUERY_EXPLAIN=true"})," (threshold"," ",s.jsx(xe,{children:"RAILWATCH_EXPLAIN_THRESHOLD_MS"}),", default 100ms)"]})})]}),e[44]=l,e[45]=n,e[46]=t.explain,e[47]=a,e[48]=Y,e[49]=S):S=e[49];let N;e[50]!==t.series?(N=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[s.jsx(be,{legend:"outcome",label:"Executions",seriesLabel:"Executions",data:t.series}),s.jsx(ye,{label:"Duration",data:t.series})]}),e[50]=t.series,e[51]=N):N=e[51];let B;e[52]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(oe,{children:s.jsx(ae,{children:"Called from"})}),e[52]=B):B=e[52];let H,O;e[53]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(ve,{icon:Ee,title:"No source captured",description:"A backtrace location wasn't available for this query."}),O=[{key:"s",header:"Source",cell:Be},{key:"n",header:"Count",align:"right",cell:Te}],e[53]=H,e[54]=O):(H=e[53],O=e[54]);let C;e[55]!==t.sources?(C=s.jsxs(ie,{children:[B,s.jsx(re,{children:s.jsx(ne,{rows:t.sources,rowKey:He,empty:H,columns:O})})]}),e[55]=t.sources,e[56]=C):C=e[56];let U;e[57]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(oe,{children:s.jsx(ae,{children:"Executions"})}),e[57]=U):U=e[57];let W;e[58]===Symbol.for("react.memo_cache_sentinel")?(W=[{key:"c",header:"Execution",cell:Ie},{key:"n",header:"Count",align:"right",cell:qe}],e[58]=W):W=e[58];let L;e[59]!==t.callers?(L=s.jsxs(ie,{children:[U,s.jsx(re,{children:s.jsx(ne,{rows:t.callers,rowKey:Me,columns:W})})]}),e[59]=t.callers,e[60]=L):L=e[60];let R;e[61]!==C||e[62]!==L?(R=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[C,L]}),e[61]=C,e[62]=L,e[63]=R):R=e[63];let $;e[64]===Symbol.for("react.memo_cache_sentinel")?($={key:"when",header:"When",cell:De},e[64]=$):$=e[64];let k;e[65]!==l||e[66]!==n?(k={key:"in",header:"In",cell:Q=>Q.execution_id?s.jsx(me,{className:"font-mono text-xs hover:underline",href:de(l,n,Q.execution_id),children:Q.execution_preview}):s.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})},e[65]=l,e[66]=n,e[67]=k):k=e[67];let F,G,K;e[68]===Symbol.for("react.memo_cache_sentinel")?(F={key:"rows",hideOnMobile:!0,header:"Rows",align:"right",cell:Ae},G={key:"conn",hideOnMobile:!0,header:"DB",cell:Pe},K={key:"d",header:"Duration",align:"right",cell:ke},e[68]=F,e[69]=G,e[70]=K):(F=e[68],G=e[69],K=e[70]);let P;e[71]!==k?(P=[$,k,F,G,K],e[71]=k,e[72]=P):P=e[72];let A;e[73]!==t.samples||e[74]!==P?(A=s.jsx(ne,{rows:t.samples,rowKey:Qe,columns:P}),e[73]=t.samples,e[74]=P,e[75]=A):A=e[75];let V;return e[76]!==E||e[77]!==S||e[78]!==N||e[79]!==R||e[80]!==d||e[81]!==A||e[82]!==x||e[83]!==f||e[84]!==h?(V=s.jsxs(Ne,{title:"Query",crumbs:d,children:[x,f,h,E,S,N,R,A]}),e[76]=E,e[77]=S,e[78]=N,e[79]=R,e[80]=d,e[81]=A,e[82]=x,e[83]=f,e[84]=h,e[85]=V):V=e[85],V}function ke(t){return D(t.duration,2)}function Pe(t){return t.connection}function Ae(t){return t.row_count??"–"}function De(t){return s.jsx("span",{className:"text-xs",children:he(t.occurred_at)})}function Qe(t){return t.id}function qe(t){const[,e]=t;return e}function Ie(t){const[e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e})}function Me(t){const[e]=t;return e}function Te(t){const[,e]=t;return e}function Be(t){const[e]=t;return s.jsx("span",{className:"font-mono text-xs",children:e})}function He(t){const[e]=t;return e}function Oe(t){return s.jsx("div",{className:"text-warning/80 mt-0.5 text-[11px] whitespace-normal",children:t.message},t.message)}function Ue(t){const[e,o]=t;return`${e} ${fe(o)}`}export{rt as default};
|