railwatch 0.9.1 → 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 +11 -0
- data/app/frontend/components/railwatch/stat.tsx +13 -1
- data/app/frontend/hooks/use-live.ts +26 -0
- data/lib/railwatch/version.rb +1 -1
- 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{c as C,u as S,r as F,j as s,L as z,i as A,a as R,b as B,d as w,e as L}from"./inertia-
|
|
1
|
+
import{c as C,u as S,r as F,j as s,L as z,i as A,a as R,b as B,d as w,e as L}from"./inertia-b7M33AzA.js";import{E as J,C as O,a as D,B as H,b as k}from"./app-layout-CpEbDy93.js";import{p as I,F as T,s as V}from"./filter-bar-B5wbix1y.js";import{J as W}from"./json-viewer-C0RZwcC2.js";import{P as $,E as G}from"./env-layout-Dic4A8Kn.js";import{R as K}from"./relative-time-CJX4HXBB.js";import"./use-clipboard-T9kCBcs8.js";import"./use-live-rp6jfGac.js";import"./format-B9SDkrWj.js";import"./segmented-CJq8WOHZ.js";function ae(i){const e=C.c(30),{environment:m}=S().props,[y,E]=F.useState(null);let f;e[0]!==m?(f=t=>{const u=m?R(m.application_id,m.id,{q:t||void 0}):B({q:t||void 0});w.visit(u,{preserveState:!0,preserveScroll:!0})},e[0]=m,e[1]=f):f=e[1];const l=f,P=Q;let x;e[2]!==i.q?(x=I(i.q),e[2]=i.q,e[3]=x):x=e[3];const r=x,p=r.fields.status==="failed";let h;e[4]!==p||e[5]!==r.fields||e[6]!==r.text||e[7]!==l?(h=()=>{const t={...r.fields};p?delete t.status:t.status="failed",l(V({text:r.text,fields:t}))},e[4]=p,e[5]=r.fields,e[6]=r.text,e[7]=l,e[8]=h):h=e[8];const _=h;let v,j;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=[{title:"Alerts",href:"#"}],j=s.jsx($,{withWindow:!1,title:"Alerts",description:"Fired alerts across your integrations, newest first."}),e[9]=v,e[10]=j):(v=e[9],j=e[10]);let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g={key:"event",label:"Event",options:["new_issue","regressed_issue","threshold","quota"]},e[11]=g):g=e[11];let a;e[12]!==i.statuses?(a=[g,{key:"status",label:"Status",options:i.statuses}],e[12]=i.statuses,e[13]=a):a=e[13];let n;e[14]!==i.q||e[15]!==a||e[16]!==l?(n=s.jsx(T,{value:i.q,fields:a,onChange:l,placeholder:"event:new_issue status:failed"}),e[14]=i.q,e[15]=a,e[16]=l,e[17]=n):n=e[17];const b=p?"default":"outline";let o;e[18]!==b||e[19]!==_?(o=s.jsx(k,{size:"sm",variant:b,className:"h-8",onClick:_,children:"Failed only"}),e[18]=b,e[19]=_,e[20]=o):o=e[20];let d;e[21]!==n||e[22]!==o?(d=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n,o]}),e[21]=n,e[22]=o,e[23]=d):d=e[23];let c;e[24]!==y||e[25]!==i.alerts?(c=i.alerts.length===0?s.jsx(J,{title:"No alerts have fired."}):s.jsx("div",{className:"divide-y rounded-md border",children:i.alerts.map(t=>{const u=y===t.id;return s.jsxs("div",{className:"p-3",children:[s.jsxs("button",{type:"button",className:"flex w-full flex-wrap items-center gap-3 text-left text-sm",onClick:()=>E(u?null:t.id),children:[u?s.jsx(O,{className:"text-muted-foreground size-4 shrink-0"}):s.jsx(D,{className:"text-muted-foreground size-4 shrink-0"}),s.jsx("span",{className:"font-mono text-xs",children:t.event}),s.jsxs("span",{className:"text-muted-foreground text-xs",children:[t.integration.name," (",t.integration.kind,")"]}),t.issue&&s.jsxs(z,{href:A(t.issue.id),onClick:M,className:"text-xs hover:underline",children:[s.jsx("span",{className:"font-mono font-semibold",children:t.issue.key})," ",s.jsx("span",{className:"text-muted-foreground",children:t.issue.title})]}),s.jsxs("span",{className:"ml-auto flex items-center gap-2",children:[s.jsx(H,{variant:t.status==="failed"?"destructive":"outline",className:"capitalize",title:t.error??void 0,children:t.status}),s.jsx(K,{iso:t.sent_at??t.created_at,className:"text-muted-foreground text-xs"}),t.status==="failed"&&s.jsx(k,{size:"sm",variant:"outline",onClick:q=>{q.stopPropagation(),P(t.id)},children:"Retry"})]})]}),u&&s.jsxs("div",{className:"mt-3 space-y-2 pl-7",children:[t.error&&s.jsx("p",{className:"text-destructive text-xs",children:t.error}),s.jsx(W,{data:t.payload})]})]},t.id)})}),e[24]=y,e[25]=i.alerts,e[26]=c):c=e[26];let N;return e[27]!==d||e[28]!==c?(N=s.jsxs(G,{title:"Alerts",crumbs:v,children:[j,d,c]}),e[27]=d,e[28]=c,e[29]=N):N=e[29],N}function M(i){return i.stopPropagation()}function Q(i){return w.post(L(i),{},{preserveScroll:!0})}export{ae as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as F,r as M,j as s,L as w,s as O,d as S,f as T,P as Q,c as L}from"./inertia-
|
|
1
|
+
import{u as F,r as M,j as s,L as w,s as O,d as S,f as T,P as Q,c as L}from"./inertia-b7M33AzA.js";import{S as _}from"./code-CuTKEYtT.js";import{C as R}from"./cursor-load-more-CleS4nD4.js";import{D as q}from"./data-table-Bzj8zcao.js";import{C as z,a as K,E as $,a9 as A,q as B,b as H}from"./app-layout-CpEbDy93.js";import{F as I}from"./filter-bar-B5wbix1y.js";import{u as U,E as W,P as G}from"./env-layout-Dic4A8Kn.js";import{u as J,P as V}from"./percentile-picker-BYFo11OE.js";import{S as k}from"./sort-header-dslBMND2.js";import{S as X}from"./sparkline-cell-C7fhjJby.js";import{a as Y,S as C}from"./stat-nY8iS5q9.js";import{C as Z,b as ee,c as se,a as oe}from"./card-C4EFUWG1.js";import{u as re,C as te}from"./use-clipboard-T9kCBcs8.js";import{c as P,m as f}from"./format-B9SDkrWj.js";import"./chart-hover-B5cFOZ24.js";import"./use-live-rp6jfGac.js";import"./segmented-CJq8WOHZ.js";import"./arrow-up-DAODKT5N.js";import"./series-chart-FBOfRLhK.js";import"./chart-CD6EHDjG.js";const ae=1500;function ie(r){const o=L.c(20),{suggestion:a}=r,[,d]=re(),[u,v]=M.useState(!1);let p;o[0]!==d||o[1]!==a.code?(p=()=>{d(a.code).then(g=>{g&&(v(!0),window.setTimeout(()=>v(!1),ae))})},o[0]=d,o[1]=a.code,o[2]=p):p=o[2];const y=p;let n;o[3]!==a.code?(n=s.jsx("pre",{className:"overflow-x-auto font-mono text-xs whitespace-pre-wrap",children:a.code}),o[3]=a.code,o[4]=n):n=o[4];let l;o[5]!==y?(l=g=>{g.stopPropagation(),y()},o[5]=y,o[6]=l):l=o[6];let c;o[7]!==u?(c=u?s.jsx(B,{className:"size-3 text-emerald-500"}):s.jsx(te,{className:"size-3 opacity-60"}),o[7]=u,o[8]=c):c=o[8];let m;o[9]!==l||o[10]!==c?(m=s.jsxs(H,{type:"button",variant:"ghost",size:"sm",className:"h-6 shrink-0 gap-1 px-1.5 text-xs",onClick:l,children:[c,"Copy"]}),o[9]=l,o[10]=c,o[11]=m):m=o[11];let h;o[12]!==n||o[13]!==m?(h=s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[n,m]}),o[12]=n,o[13]=m,o[14]=h):h=o[14];let t;o[15]!==a.explanation?(t=s.jsx("p",{className:"text-muted-foreground text-xs whitespace-normal",children:a.explanation}),o[15]=a.explanation,o[16]=t):t=o[16];let x;return o[17]!==h||o[18]!==t?(x=s.jsxs("div",{className:"border-warning/40 bg-muted/40 mt-2 space-y-2 rounded-lg border p-2",children:[h,t]}),o[17]=h,o[18]=t,o[19]=x):x=o[19],x}function _e(r){const{environment:o,window:a,range:d}=F().props,{percentile:u}=J(),{label:v}=U(),[p,y]=M.useState(null),n=o.application_id,l=o.id,c=a==="custom"?{from:d?.from,to:d?.to}:{window:a},m=d?{from:d.from,to:d.to}:c,h=(e,i=r.q)=>Q(n,l,{...e?m:c,q:i||void 0,cursor:e,limit:r.pagination.limit,sort:r.sort,dir:r.dir}),t=r.summary.current,x=r.summary.previous,g=a==="custom"?"vs previous period":`vs previous ${v}`,D=r.n_plus_ones.filter(e=>e.suggestion).length,E=e=>{e.suggestion&&y(i=>i===e.group_hash?null:e.group_hash)},b=e=>S.visit(Q(n,l,{...c,q:r.q||void 0,sort:e,dir:r.sort===e&&r.dir==="desc"?"asc":"desc"}),{preserveState:!0}),j=e=>O(n,l,e,c),N=(e,i)=>i?.newTab?globalThis.window.open(j(e),"_blank"):S.visit(j(e));return s.jsxs(W,{title:"Queries",children:[s.jsx(G,{title:"Queries",description:"Every SQL shape your app ran, grouped by normalized statement.",actions:s.jsx(V,{})}),s.jsxs(Y,{children:[s.jsx(C,{label:"Queries",value:P(t.count),delta:{current:t.count,previous:x.count,goodDirection:"down"},deltaCaption:g}),s.jsx(C,{label:"N+1 groups",value:P(r.n_plus_ones.length),tone:r.n_plus_ones.length>0?"warning":void 0,hint:r.n_plus_ones.length>0?`${D} with a suggested fix`:void 0}),s.jsx(C,{label:"Avg",value:f(t.avg/1e3,2),delta:{current:t.avg,previous:x.avg,goodDirection:"down"},deltaCaption:g}),s.jsx(C,{label:"p95",value:f(t.p95/1e3,2),hint:`p99 ${f(t.p99/1e3,2)}`,delta:{current:t.p95,previous:x.p95,goodDirection:"down"},deltaCaption:g})]}),r.n_plus_ones.length>0&&s.jsxs(Z,{className:"border-amber-500/40",children:[s.jsx(ee,{children:s.jsx(se,{children:"N+1 queries detected"})}),s.jsx(oe,{children:s.jsx(q,{rows:r.n_plus_ones,rowKey:e=>e.group_hash,onRowClick:E,keyboardNav:{onOpen:(e,i)=>N(e.group_hash,i)},columns:[{key:"sql",header:"Query shape",grow:!0,cell:e=>s.jsxs(s.Fragment,{children:[s.jsx(w,{href:O(n,l,e.group_hash),children:s.jsx(_,{className:"hover:underline",children:e.sql})}),p===e.group_hash&&e.suggestion&&s.jsx(ie,{suggestion:e.suggestion})]})},{key:"fix",header:"Fix",cell:e=>e.suggestion?s.jsxs("button",{type:"button","aria-expanded":p===e.group_hash,"aria-label":`Suggested fix: ${e.suggestion.code}`,onClick:i=>{i.stopPropagation(),E(e)},className:"border-warning/50 text-warning hover:bg-warning/10 inline-flex items-center gap-0.5 rounded-md border py-0.5 pr-1.5 pl-0.5 font-mono text-[11px] uppercase",children:[p===e.group_hash?s.jsx(z,{className:"size-3"}):s.jsx(K,{className:"size-3"}),"Fix"]}):null},{key:"src",hideOnMobile:!0,header:"Source",cell:e=>s.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:e.source??""})},{key:"occ",header:"Executions affected",align:"right",cell:e=>e.occurrences},{key:"mx",hideOnMobile:!0,header:"Max repeats",align:"right",cell:e=>e.max_count}]})})]}),s.jsx(q,{rows:r.queries,rowKey:e=>e.group_hash,empty:s.jsx($,{icon:A,title:"No queries in this window",description:"SQL queries executed by your app appear here as they're reported."}),hoverKey:e=>e.group_hash,keyboardNav:{onOpen:(e,i)=>N(e.group_hash,i)},columns:[{key:"sql",header:"Query",grow:!0,cell:e=>s.jsx(w,{href:j(e.group_hash),children:s.jsx(_,{className:"hover:underline",children:e.name})})},{key:"trend",hideOnMobile:!0,header:"Trend",cell:e=>s.jsx(X,{data:e.sparkline,hoverKey:e.group_hash})},{key:"n",header:s.jsx(k,{label:"Count",active:r.sort==="count",dir:r.dir==="asc"?"asc":"desc",onClick:()=>b("count")}),align:"right",cell:e=>P(e.count)},{key:"avg",hideOnMobile:!0,header:s.jsx(k,{label:"Avg",active:r.sort==="avg",dir:r.dir==="asc"?"asc":"desc",onClick:()=>b("avg")}),align:"right",cell:e=>f(e.avg,2)},{key:u,header:s.jsx(k,{label:u,active:r.sort===u,dir:r.dir==="asc"?"asc":"desc",onClick:()=>b(u)}),align:"right",cell:e=>s.jsx("span",{className:"font-semibold",children:f(e[u],2)})},{key:"max",hideOnMobile:!0,header:s.jsx(k,{label:"Max",active:r.sort==="max",dir:r.dir==="asc"?"asc":"desc",onClick:()=>b("max")}),align:"right",cell:e=>f(e.max,2)}]}),s.jsx("h2",{className:"text-sm font-semibold",children:"Slowest individual queries"}),s.jsx(I,{value:r.q,fields:[{key:"after",label:"After"},{key:"before",label:"Before"},{key:"user",label:"User"},{key:"tenant",label:"Tenant"},{key:"deploy",label:"Deploy"},{key:"source",label:"Source"},{key:"kind",label:"Execution kind",options:["request","job","scheduled_task","command"]},{key:"connection",label:"Connection"},{key:"role",label:"Role"},{key:"adapter",label:"Adapter"}],onChange:e=>S.visit(h(void 0,e),{only:["slowest","pagination","q"],preserveState:!0,reset:["slowest"]}),placeholder:"connection:primary role:reading source:app/models"}),s.jsx(q,{rows:r.slowest,rowKey:e=>e.id,keyboardNav:{onOpen:(e,i)=>N(e.group_hash,i)},columns:[{key:"sql",header:"SQL",grow:!0,cell:e=>s.jsx(w,{href:j(e.group_hash),children:s.jsx(_,{className:"hover:underline",children:e.sql})})},{key:"exe",hideOnMobile:!0,header:"In",cell:e=>e.execution_id?s.jsx(w,{className:"font-mono text-xs hover:underline",href:T(n,l,e.execution_id),children:e.execution_preview}):s.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})},{key:"src",hideOnMobile:!0,header:"Source",cell:e=>s.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:e.source??""})},{key:"d",header:"Duration",align:"right",cell:e=>f(e.duration,2)}]}),s.jsx(R,{meta:r.pagination,href:h,only:["slowest","pagination"]})]})}export{_e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as M,u as A,j as n,f as K,d as P,L as R}from"./inertia-
|
|
1
|
+
import{c as M,u as A,j as n,f as K,d as P,L as R}from"./inertia-b7M33AzA.js";import{D as S}from"./data-table-Bzj8zcao.js";import{E as B,c as E,B as $}from"./app-layout-CpEbDy93.js";import{P as D,E as L}from"./env-layout-Dic4A8Kn.js";import{c as T,b as O,m as C,w as H}from"./format-B9SDkrWj.js";import"./chart-hover-B5cFOZ24.js";import"./use-live-rp6jfGac.js";import"./segmented-CJq8WOHZ.js";function oe(t){const e=M.c(26),{environment:N}=A().props,j=N.application_id,w=N.id;let c;e[0]!==j||e[1]!==w?(c=a=>a.execution_id?K(j,w,a.execution_id):null,e[0]=j,e[1]=w,e[2]=c):c=e[2];const s=c;let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(D,{title:"Broadcasts",description:"Action Cable broadcasts, transmits, and channel actions (covers inertia_cable and Turbo Streams)."}),e[3]=m):m=e[3];let d,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(B,{icon:E,title:"No broadcasts in this window",description:"Action Cable broadcasts appear here as your app sends them."}),u=[{key:"k",header:"Kind",cell:X},{key:"n",header:"Stream / channel",cell:V},{key:"c",hideOnMobile:!0,header:"Count",align:"right",cell:U},{key:"b",hideOnMobile:!0,header:"Bytes",align:"right",cell:Q},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:J}],e[4]=d,e[5]=u):(d=e[4],u=e[5]);let r;e[6]!==t.streams?(r=n.jsx(S,{rows:t.streams,rowKey:Y,empty:d,columns:u}),e[6]=t.streams,e[7]=r):r=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx("h2",{className:"text-sm font-semibold",children:"Recent"}),e[8]=h):h=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(B,{icon:E,title:"No broadcasts in this window",description:"Action Cable broadcasts appear here as your app sends them."}),e[9]=f):f=e[9];let i;e[10]!==s?(i={onOpen:(a,g)=>{const v=s(a);v&&(g?.newTab?window.open(v,"_blank"):P.visit(v))}},e[10]=s,e[11]=i):i=e[11];let p,b,x,y,_;e[12]===Symbol.for("react.memo_cache_sentinel")?(y={key:"when",header:"When",cell:F},_={key:"k",header:"Kind",cell:z},p={key:"s",header:"Stream / channel",cell:W},b={key:"b",hideOnMobile:!0,header:"Bytes",align:"right",cell:I},x={key:"d",header:"Duration",align:"right",cell:q},e[12]=p,e[13]=b,e[14]=x,e[15]=y,e[16]=_):(p=e[12],b=e[13],x=e[14],y=e[15],_=e[16]);let o;e[17]!==s?(o=[y,_,p,b,x,{key:"in",hideOnMobile:!0,header:"In",cell:a=>{const g=s(a);return g?n.jsx(R,{className:"font-mono text-xs hover:underline",href:g,children:a.execution_preview}):null}}],e[17]=s,e[18]=o):o=e[18];let l;e[19]!==t.recent||e[20]!==o||e[21]!==i?(l=n.jsx(S,{rows:t.recent,rowKey:G,empty:f,keyboardNav:i,columns:o}),e[19]=t.recent,e[20]=o,e[21]=i,e[22]=l):l=e[22];let k;return e[23]!==l||e[24]!==r?(k=n.jsxs(L,{title:"Broadcasts",children:[m,r,h,l]}),e[23]=l,e[24]=r,e[25]=k):k=e[25],k}function q(t){return C(t.duration,3)}function I(t){return O(t.bytes)}function W(t){return n.jsxs("span",{className:"font-mono text-xs",children:[t.stream??t.channel,t.action?`#${t.action}`:""]})}function z(t){return t.failed?n.jsxs("span",{className:"flex items-center gap-1.5",children:[t.kind,n.jsx($,{variant:"destructive",children:"failed"})]}):t.kind}function F(t){return n.jsx("span",{className:"text-xs",children:H(t.occurred_at)})}function G(t){return t.id}function J(t){return C(t.avg,3)}function Q(t){return O(t.bytes)}function U(t){return T(t.count)}function V(t){return n.jsx("span",{className:"font-mono text-xs",children:t.name})}function X(t){return t.kind}function Y(t){return`${t.group_hash}-${t.kind}`}export{oe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as B,u as C,j as n,al as D,d as R,L as H,i as K}from"./inertia-
|
|
1
|
+
import{c as B,u as C,j as n,al as D,d as R,L as H,i as K}from"./inertia-b7M33AzA.js";import{D as T}from"./data-table-Bzj8zcao.js";import{E as W,aq as q,B as A}from"./app-layout-CpEbDy93.js";import{O as I}from"./origin-identity-ouOEvOlq.js";import{P as F,E as J}from"./env-layout-Dic4A8Kn.js";import{R as Q}from"./relative-time-CJX4HXBB.js";import{S as $}from"./status-badge-D40D8TiV.js";import{m as P,a as z,w as G}from"./format-B9SDkrWj.js";import"./chart-hover-B5cFOZ24.js";import"./tenant-path-UhieazCc.js";import"./use-live-rp6jfGac.js";import"./segmented-CJq8WOHZ.js";function be(t){const e=B.c(42),{environment:M,range:a,window:l}=C().props,i=M.application_id,r=M.id;let k;e[0]!==i||e[1]!==r?(k=s=>D(i,r,s.execution_id),e[0]=i,e[1]=r,e[2]=k):k=e[2];const x=k;let _;e[3]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(F,{title:"Scheduled tasks",description:"Solid Queue recurring tasks from config/recurring.yml: runs, failures, and missed schedules."}),e[3]=_):_=e[3];let o;e[4]!==t.missed?(o=t.missed.length>0&&n.jsx("div",{className:"flex flex-wrap gap-2",children:t.missed.map(de)}),e[4]=t.missed,e[5]=o):o=e[5];let y,g;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(W,{icon:q,title:"No scheduled task has run in this window",description:"Recurring and scheduled job runs appear here as they execute."}),g=[{key:"k",header:"Task",cell:oe},{key:"s",header:"Schedule",cell:le},{key:"next",hideOnMobile:!0,header:"Next run",cell:ae},{key:"n",header:"Runs",align:"right",cell:re},{key:"f",hideOnMobile:!0,header:"Failed",align:"right",cell:ie},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:se},{key:"last",header:"Last run",align:"right",cell:ne}],e[6]=y,e[7]=g):(y=e[6],g=e[7]);let c;e[8]!==t.tasks?(c=n.jsx(T,{rows:t.tasks,rowKey:ce,empty:y,columns:g}),e[8]=t.tasks,e[9]=c):c=e[9];let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx("h2",{className:"text-sm font-semibold",children:"Recent runs"}),e[10]=j):j=e[10];let d,u;e[11]!==x?(d=s=>R.visit(x(s)),u={onOpen:(s,L)=>L?.newTab?window.open(x(s),"_blank"):R.visit(x(s))},e[11]=x,e[12]=d,e[13]=u):(d=e[12],u=e[13]);let w,b,v,O;e[14]===Symbol.for("react.memo_cache_sentinel")?(O={key:"when",header:"When",cell:ee},w={key:"k",header:"Task",cell:Z},b={key:"job",hideOnMobile:!0,header:"Job",cell:Y},v={key:"o",header:"Outcome",cell:X},e[14]=w,e[15]=b,e[16]=v,e[17]=O):(w=e[14],b=e[15],v=e[16],O=e[17]);let m;e[18]!==i||e[19]!==r||e[20]!==a||e[21]!==l?(m={key:"user",hideOnMobile:!0,header:"Origin user",cell:s=>n.jsx(I,{...s,applicationId:i,environmentId:r,kind:"user",range:a,window:l})},e[18]=i,e[19]=r,e[20]=a,e[21]=l,e[22]=m):m=e[22];let h;e[23]!==i||e[24]!==r||e[25]!==a||e[26]!==l?(h={key:"tenant",hideOnMobile:!0,header:"Origin tenant",cell:s=>n.jsx(I,{...s,applicationId:i,environmentId:r,kind:"tenant",range:a,window:l})},e[23]=i,e[24]=r,e[25]=a,e[26]=l,e[27]=h):h=e[27];let S,N;e[28]===Symbol.for("react.memo_cache_sentinel")?(S={key:"d",hideOnMobile:!0,header:"Duration",align:"right",cell:V},N={key:"ex",hideOnMobile:!0,header:"Exception",cell:U},e[28]=S,e[29]=N):(S=e[28],N=e[29]);let f;e[30]!==m||e[31]!==h?(f=[O,w,b,v,m,h,S,N],e[30]=m,e[31]=h,e[32]=f):f=e[32];let p;e[33]!==t.runs||e[34]!==f||e[35]!==d||e[36]!==u?(p=n.jsx(T,{rows:t.runs,rowKey:te,onRowClick:d,keyboardNav:u,columns:f}),e[33]=t.runs,e[34]=f,e[35]=d,e[36]=u,e[37]=p):p=e[37];let E;return e[38]!==p||e[39]!==o||e[40]!==c?(E=n.jsxs(J,{title:"Scheduled tasks",children:[_,o,c,j,p]}),e[38]=p,e[39]=o,e[40]=c,e[41]=E):E=e[41],E}function U(t){return n.jsx("span",{className:"text-destructive line-clamp-1 text-xs",children:t.exception_preview??""})}function V(t){return P(t.duration)}function X(t){return n.jsx($,{outcome:t.outcome})}function Y(t){return n.jsx("span",{className:"font-mono text-xs",children:t.name})}function Z(t){return n.jsx("span",{className:"font-mono text-xs",children:t.task_key})}function ee(t){return n.jsx("span",{className:"text-xs",children:G(t.occurred_at)})}function te(t){return t.execution_id}function ne(t){return z(t.last_run_at)}function se(t){return P(t.avg)}function ie(t){return n.jsx("span",{className:t.failed?"text-destructive":"",children:t.failed})}function re(t){return t.runs}function ae(t){return n.jsx("span",{className:"text-muted-foreground text-xs",children:t.next_run_at?n.jsx(Q,{iso:t.next_run_at}):"–"})}function le(t){return n.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:t.schedule??"–"})}function oe(t){return n.jsx("span",{className:"font-mono text-xs",children:t.task_key})}function ce(t){return t.task_key}function de(t){return n.jsx(H,{href:K(t.id),children:n.jsxs(A,{variant:"destructive",children:[t.key," · ",t.title]})},t.id)}export{be as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as ee,u as ne,j as s,n as se,d as ae,L as le,i as ie}from"./inertia-
|
|
1
|
+
import{c as ee,u as ne,j as s,n as se,d as ae,L as le,i as ie}from"./inertia-b7M33AzA.js";import{V as oe}from"./chart-panel-XD8qJDmg.js";import{C as re}from"./cursor-load-more-CleS4nD4.js";import{D as ce}from"./data-table-Bzj8zcao.js";import{F as me}from"./filter-bar-B5wbix1y.js";import{P as de,E as fe}from"./env-layout-Dic4A8Kn.js";import{S as ue,B as te}from"./app-layout-CpEbDy93.js";import{C as X,a as Y}from"./card-C4EFUWG1.js";import{e as xe}from"./execution-path-C7Up9w4e.js";import{c as Z,w as he}from"./format-B9SDkrWj.js";import"./series-chart-FBOfRLhK.js";import"./chart-hover-B5cFOZ24.js";import"./chart-CD6EHDjG.js";import"./use-live-rp6jfGac.js";import"./segmented-CJq8WOHZ.js";function pe(t){const e=ee.c(3),{handled:n}=t,i=n?"secondary":"destructive",l=n?"handled":"unhandled";let a;return e[0]!==i||e[1]!==l?(a=s.jsx(te,{variant:i,children:l}),e[0]=i,e[1]=l,e[2]=a):a=e[2],a}function ye(t){const e=ee.c(3),{severity:n}=t;if(!n)return null;const i=n==="fatal"||n==="error"?"destructive":n==="warning"?"secondary":"outline";let l;return e[0]!==n||e[1]!==i?(l=s.jsx(te,{variant:i,className:"capitalize",children:n}),e[0]=n,e[1]=i,e[2]=l):l=e[2],l}function Ue(t){const e=ee.c(76),{environment:n,window:i,range:l}=ne().props,a=n.application_id,o=n.id;let N;e[0]!==l?.from||e[1]!==l?.to||e[2]!==i?(N=i==="custom"?{from:l?.from,to:l?.to}:{window:i},e[0]=l?.from,e[1]=l?.to,e[2]=i,e[3]=N):N=e[3];const c=N;let w;e[4]!==l||e[5]!==c?(w=l?{from:l.from,to:l.to}:c,e[4]=l,e[5]=c,e[6]=w):w=e[6];const J=w;let S;e[7]!==a||e[8]!==J||e[9]!==o||e[10]!==t.pagination.limit||e[11]!==t.q?(S=r=>se(a,o,{...J,q:t.q||void 0,cursor:r,limit:t.pagination.limit}),e[7]=a,e[8]=J,e[9]=o,e[10]=t.pagination.limit,e[11]=t.q,e[12]=S):S=e[12];const Q=S;let E;e[13]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(de,{title:"Exceptions",description:"Every exception raised, handled or not -- distinct from Issues, which group and track these over time.",actions:s.jsx(ue,{page:"exceptions"})}),e[13]=E):E=e[13];let m;e[14]!==t.series?(m=s.jsx(oe,{legend:"exception",label:"Exceptions",seriesLabel:"Exceptions",data:t.series}),e[14]=t.series,e[15]=m):m=e[15];let q;e[16]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx("div",{className:"text-muted-foreground text-xs font-medium tracking-wide uppercase",children:"Total"}),e[16]=q):q=e[16];let d;e[17]!==t.total?(d=Z(t.total),e[17]=t.total,e[18]=d):d=e[18];let f;e[19]!==d?(f=s.jsx(X,{className:"gap-1 py-4",children:s.jsxs(Y,{className:"px-4",children:[q,s.jsx("div",{className:"mt-1 text-2xl font-semibold tabular-nums",children:d})]})}),e[19]=d,e[20]=f):f=e[20];let P;e[21]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx("div",{className:"text-muted-foreground text-xs font-medium tracking-wide uppercase",children:"Unhandled"}),e[21]=P):P=e[21];let u;e[22]!==t.unhandled?(u=Z(t.unhandled),e[22]=t.unhandled,e[23]=u):u=e[23];let x;e[24]!==u?(x=s.jsx(X,{className:"gap-1 py-4",children:s.jsxs(Y,{className:"px-4",children:[P,s.jsx("div",{className:"text-destructive mt-1 text-2xl font-semibold tabular-nums",children:u})]})}),e[24]=u,e[25]=x):x=e[25];let C;e[26]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"text-muted-foreground text-xs font-medium tracking-wide uppercase",children:"Top classes"}),e[26]=C):C=e[26];let h;e[27]!==t.classes?(h=t.classes.slice(0,5).map(we),e[27]=t.classes,e[28]=h):h=e[28];let p;e[29]!==h?(p=s.jsx(X,{className:"gap-1 py-4",children:s.jsxs(Y,{className:"px-4",children:[C,s.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:h})]})}),e[29]=h,e[30]=p):p=e[30];let y;e[31]!==x||e[32]!==p||e[33]!==f?(y=s.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[f,x,p]}),e[31]=x,e[32]=p,e[33]=f,e[34]=y):y=e[34];let B,M,I,L,T,H;e[35]===Symbol.for("react.memo_cache_sentinel")?(B={key:"after",label:"After"},M={key:"before",label:"Before"},I={key:"user",label:"User"},L={key:"tenant",label:"Tenant"},T={key:"deploy",label:"Deploy"},H={key:"source",label:"Source"},e[35]=B,e[36]=M,e[37]=I,e[38]=L,e[39]=T,e[40]=H):(B=e[35],M=e[36],I=e[37],L=e[38],T=e[39],H=e[40]);let O,R;e[41]===Symbol.for("react.memo_cache_sentinel")?(O={key:"kind",label:"Execution kind",options:["request","job","scheduled_task","command"]},R={key:"class",label:"Class"},e[41]=O,e[42]=R):(O=e[41],R=e[42]);let D;e[43]===Symbol.for("react.memo_cache_sentinel")?(D={key:"handled",label:"Handled",options:["true","false"]},e[43]=D):D=e[43];let F;e[44]===Symbol.for("react.memo_cache_sentinel")?(F=[B,M,I,L,T,H,O,R,D,{key:"severity",label:"Severity",options:["fatal","error","warning","info"]}],e[44]=F):F=e[44];let g;e[45]!==a||e[46]!==o||e[47]!==c?(g=r=>ae.visit(se(a,o,{...c,q:r||void 0}),{only:["exceptions","pagination","q"],preserveState:!0,reset:["exceptions"]}),e[45]=a,e[46]=o,e[47]=c,e[48]=g):g=e[48];let v;e[49]!==t.q||e[50]!==g?(v=s.jsx(me,{value:t.q,fields:F,onChange:g,placeholder:"class:ActiveRecord::RecordNotFound handled:false"}),e[49]=t.q,e[50]=g,e[51]=v):v=e[51];let U,V,$,A,z;e[52]===Symbol.for("react.memo_cache_sentinel")?(U={key:"when",header:"When",className:"w-40",cell:ke},V={key:"class",header:"Class",grow:!0,cell:_e},$={key:"handled",header:"Handled",cell:je},A={key:"sev",hideOnMobile:!0,header:"Severity",cell:be},z={key:"source",hideOnMobile:!0,header:"Source",cell:ve},e[52]=U,e[53]=V,e[54]=$,e[55]=A,e[56]=z):(U=e[52],V=e[53],$=e[54],A=e[55],z=e[56]);let b;e[57]!==a||e[58]!==o?(b={key:"in",hideOnMobile:!0,header:"In",cell:r=>r.execution_id?s.jsx(le,{className:"font-mono text-xs hover:underline",href:xe({applicationId:a,environmentId:o,source:r.execution_source,executionId:r.execution_id}),children:r.execution_preview}):s.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})},e[57]=a,e[58]=o,e[59]=b):b=e[59];let K;e[60]===Symbol.for("react.memo_cache_sentinel")?(K={key:"user",hideOnMobile:!0,header:"User",cell:ge},e[60]=K):K=e[60];let j;e[61]!==b?(j=[U,V,$,A,z,b,K],e[61]=b,e[62]=j):j=e[62];let _;e[63]!==t.exceptions||e[64]!==j?(_=s.jsx(ce,{rows:t.exceptions,rowKey:Ne,empty:"No exceptions in this window.",columns:j}),e[63]=t.exceptions,e[64]=j,e[65]=_):_=e[65];let W;e[66]===Symbol.for("react.memo_cache_sentinel")?(W=["exceptions","pagination"],e[66]=W):W=e[66];let k;e[67]!==Q||e[68]!==t.pagination?(k=s.jsx(re,{meta:t.pagination,href:Q,only:W}),e[67]=Q,e[68]=t.pagination,e[69]=k):k=e[69];let G;return e[70]!==y||e[71]!==v||e[72]!==_||e[73]!==k||e[74]!==m?(G=s.jsxs(fe,{title:"Exceptions",children:[E,m,y,v,_,k]}),e[70]=y,e[71]=v,e[72]=_,e[73]=k,e[74]=m,e[75]=G):G=e[75],G}function ge(t){return s.jsx("span",{className:"font-mono text-xs",children:t.user_ref??""})}function ve(t){return s.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:t.source??""})}function be(t){return s.jsx(ye,{severity:t.severity})}function je(t){return s.jsx(pe,{handled:t.handled})}function _e(t){return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.issue_key?s.jsx(le,{className:"font-mono text-xs font-semibold hover:underline",href:ie(t.issue_id),children:t.class_name}):s.jsx("span",{className:"font-mono text-xs font-semibold",children:t.class_name}),s.jsx("span",{className:"text-muted-foreground line-clamp-1 text-xs",children:t.message})]})}function ke(t){return s.jsx("span",{className:"text-xs tabular-nums",children:he(t.occurred_at)})}function Ne(t){return t.id}function we(t){const[e,n]=t;return s.jsxs(te,{variant:"outline",className:"font-mono",children:[e," (",Z(n),")"]},e)}export{Ue as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as L,j as s,o as R,T as Y}from"./inertia-FoqYZAk8.js";import{C as S}from"./chart-panel-CUdIzJvk.js";import{D}from"./data-table-DYi-N0hm.js";import{E as T,a5 as P}from"./app-layout-LvxN9xSS.js";import{C as G,X as I,Y as W,a as X,b as J,c as V}from"./chart-DJHv3R7W.js";import{A as Z,a as ee}from"./series-chart-C5nXIUc5.js";import{E as te,P as se}from"./env-layout-HdcOaPPX.js";import{a as re,S as k}from"./stat-BTzNKTm2.js";import{C as $,b as B,c as F,a as E}from"./card-Dpwlr0uY.js";import{c as j,m as O,b as ae,a as z,w as H}from"./format-B9SDkrWj.js";import"./chart-hover-CEH-DtXO.js";import"./use-live-CE_fN5_6.js";import"./segmented-BWee8uc9.js";import"./arrow-up-DG01k9AL.js";const K={fontSize:10,fontFamily:"var(--font-mono)"},ne=1440*60*1e3;function le(t){return(t.length>1?new Date(t[t.length-1].t).getTime()-new Date(t[0].t).getTime():0)>2*ne?a=>new Date(a).toLocaleDateString(void 0,{month:"short",day:"numeric"}):a=>new Date(a).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function A(t){return new Date(t).toLocaleString(void 0,{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit"})}function C(t){const e=L.c(28),{label:a,data:r,format:l,color:p,className:n}=t,i=p===void 0?"var(--primary)":p,b=n===void 0?"h-32":n;let c;e[0]!==i||e[1]!==a?(c={value:{label:a,color:i}},e[0]=i,e[1]=a,e[2]=c):c=e[2];const g=c;let m;e[3]!==r?(m=le(r),e[3]=r,e[4]=m):m=e[4];const o=m,d=`${b} w-full`;let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(G,{vertical:!1,strokeDasharray:"2 4"}),e[5]=h):h=e[5];let u;e[6]!==o?(u=s.jsx(I,{dataKey:"t",tickFormatter:o,tickLine:!1,axisLine:!1,minTickGap:40,tick:K}),e[6]=o,e[7]=u):u=e[7];let f;e[8]!==l?(f=s.jsx(W,{width:44,tickLine:!1,axisLine:!1,tick:K,tickFormatter:q=>l(Number(q))}),e[8]=l,e[9]=f):f=e[9];let x;e[10]!==l||e[11]!==a?(x=s.jsx(X,{content:s.jsx(J,{labelFormatter:oe,formatter:q=>[l(Number(q)),a]})}),e[10]=l,e[11]=a,e[12]=x):x=e[12];let w;e[13]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(Z,{dataKey:"value",stroke:"var(--color-value)",fill:"var(--color-value)",fillOpacity:.15,strokeWidth:1.75,isAnimationActive:!1}),e[13]=w):w=e[13];let v;e[14]!==r||e[15]!==u||e[16]!==f||e[17]!==x?(v=s.jsxs(ee,{data:r,children:[h,u,f,x,w]}),e[14]=r,e[15]=u,e[16]=f,e[17]=x,e[18]=v):v=e[18];let y;e[19]!==g||e[20]!==v||e[21]!==d?(y=s.jsx(V,{config:g,className:d,children:v}),e[19]=g,e[20]=v,e[21]=d,e[22]=y):y=e[22];let _;e[23]!==r?(_=r.length>0&&s.jsxs("div",{className:"text-muted-foreground mt-1 flex justify-between font-mono text-[10px]",children:[s.jsx("span",{children:A(r[0].t)}),s.jsx("span",{children:A(r[r.length-1].t)})]}),e[23]=r,e[24]=_):_=e[24];let N;return e[25]!==y||e[26]!==_?(N=s.jsxs("div",{children:[y,_]}),e[25]=y,e[26]=_,e[27]=N):N=e[27],N}function oe(t){return A(String(t))}function U(t){const e=L.c(21),{busy:a,max:r,className:l}=t;if(!r){let x;return e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("span",{className:"text-muted-foreground",children:"–"}),e[0]=x):x=e[0],x}const p=Math.min(1,(a??0)/r);let n;e[1]!==l?(n=R("flex items-center gap-1.5",l),e[1]=l,e[2]=n):n=e[2];const i=a??0,b=p>=.9?"bg-danger":p>=.7?"bg-warning":"bg-live";let c;e[3]!==b?(c=R("absolute inset-y-0 left-0 rounded-full",b),e[3]=b,e[4]=c):c=e[4];const g=`${Math.max(4,p*100)}%`;let m;e[5]!==g?(m={width:g},e[5]=g,e[6]=m):m=e[6];let o;e[7]!==c||e[8]!==m?(o=s.jsx("span",{className:c,style:m}),e[7]=c,e[8]=m,e[9]=o):o=e[9];let d;e[10]!==r||e[11]!==i||e[12]!==o?(d=s.jsx("span",{role:"meter","aria-label":"Utilisation","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":r,className:"bg-muted-foreground/25 relative h-1.5 w-10 shrink-0 overflow-hidden rounded-full",children:o}),e[10]=r,e[11]=i,e[12]=o,e[13]=d):d=e[13];const h=a??0;let u;e[14]!==r||e[15]!==h?(u=s.jsxs("span",{className:"font-mono tabular-nums",children:[h,"/",r]}),e[14]=r,e[15]=h,e[16]=u):u=e[16];let f;return e[17]!==n||e[18]!==u||e[19]!==d?(f=s.jsxs("span",{className:n,children:[d,u]}),e[17]=n,e[18]=u,e[19]=d,e[20]=f):f=e[20],f}const M=t=>`${t.toFixed(0)}%`;function ie(t){return t.reduce((e,a)=>e+(a??0),0)}function Q(t){return t.reduce((e,a)=>Math.max(e,a??0),0)}function et(t){const e=L.c(27);let a;if(e[0]!==t.samples){const h=t.samples.flatMap(Fe);a=h.length?h.reduce(Be,0)/h.length:0,e[0]=t.samples,e[1]=a}else a=e[1];const r=a;let l,p,n,i,b;if(e[2]!==t.queues||e[3]!==t.samples||e[4]!==t.series||e[5]!==t.silent_servers||e[6]!==r){const h=ie(t.samples.map($e)),u=Q(t.samples.map(Pe)),f=Q(t.samples.map(Re)),x=t.samples.length>0||t.series.length>0;l=te,p="Processes",e[12]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(se,{title:"Processes",description:"What every web and worker process is doing right now: thread pools, socket backlog, queue depth, and the boots behind them."}),e[12]=n):n=e[12],e[13]!==t.silent_servers?(i=t.silent_servers.length>0&&s.jsxs($,{className:"border-warning/40",children:[s.jsx(B,{children:s.jsxs(F,{className:"flex items-center gap-2",children:[s.jsx(Y,{className:"text-warning size-4"}),t.silent_servers.length===1?"1 expected host is silent":`${t.silent_servers.length} expected hosts are silent`]})}),s.jsxs(E,{className:"space-y-2",children:[s.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.silent_servers.map(Le)}),s.jsx("p",{className:"text-muted-foreground text-xs",children:"No health sample or execution from these hosts in the last 10 minutes. Expected hosts come from your Kamal post-deploy hook, or from the environment settings if you set them by hand."})]})]}),e[13]=t.silent_servers,e[14]=i):i=e[14],b=x?s.jsxs(s.Fragment,{children:[s.jsxs(re,{children:[s.jsx(k,{label:"Live processes",value:t.samples.length}),s.jsx(k,{label:"Thread utilisation",value:M(r),tone:r>=90?"destructive":r>=70?"warning":void 0,hint:"averaged across live processes"}),s.jsx(k,{label:"Backlog",value:j(h)}),s.jsx(k,{label:"Queue depth",value:j(u)}),s.jsx(k,{label:"Oldest job",value:O(f)})]}),s.jsx(D,{rows:t.samples,rowKey:Ae,empty:s.jsx(T,{title:"No process reported in the last 10 minutes",description:"Health samples are older than the live window."}),columns:[{key:"server",header:"Server",cell:Oe},{key:"role",header:"Role",cell:Me},{key:"pid",hideOnMobile:!0,header:"PID",align:"right",cell:Te},{key:"threads",header:"Threads",cell:De},{key:"pool",hideOnMobile:!0,header:"DB pool",cell:qe},{key:"mem",hideOnMobile:!0,header:"Memory",align:"right",cell:Ce},{key:"seen",header:"Last sample",align:"right",cell:Se}]}),t.queues.length>0&&s.jsxs($,{children:[s.jsx(B,{children:s.jsx(F,{children:"Queue depth"})}),s.jsx(E,{children:s.jsx(D,{rows:t.queues,rowKey:Ne,columns:[{key:"q",header:"Queue",cell:we},{key:"d",header:"Ready jobs",align:"right",cell:ke}]})})]}),s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[s.jsx(S,{label:"Thread utilisation",value:M(r),children:s.jsx(C,{label:"Utilisation",format:M,data:t.series.map(_e)})}),s.jsx(S,{label:"Backlog",value:j(h),children:s.jsx(C,{label:"Backlog",color:"var(--warning)",format:j,data:t.series.map(ye)})}),s.jsx(S,{label:"Queue depth",value:j(u),children:s.jsx(C,{label:"Ready jobs",format:j,data:t.series.map(ve)})}),s.jsx(S,{label:"Oldest job",value:O(f),children:s.jsx(C,{label:"Oldest job",color:"var(--danger)",format:je,data:t.series.map(ge)})})]})]}):s.jsx(T,{icon:P,title:"No health samples yet",description:"The gem reports thread pool, backlog and queue health every 15s from each web and worker process."}),e[2]=t.queues,e[3]=t.samples,e[4]=t.series,e[5]=t.silent_servers,e[6]=r,e[7]=l,e[8]=p,e[9]=n,e[10]=i,e[11]=b}else l=e[7],p=e[8],n=e[9],i=e[10],b=e[11];let c;e[15]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("h2",{className:"text-sm font-semibold",children:"Process boots"}),e[15]=c):c=e[15];let g,m;e[16]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(T,{icon:P,title:"No process has booted with Railwatch yet",description:"Server processes report here once they boot with the gem installed."}),m=[{key:"b",header:"Booted",cell:xe},{key:"s",header:"Server",cell:pe},{key:"r",header:"Role",cell:fe},{key:"pid",hideOnMobile:!0,header:"PID",align:"right",cell:he},{key:"d",header:"Deploy",cell:de},{key:"v",hideOnMobile:!0,header:"Ruby / Rails / Railwatch",cell:ue},{key:"ad",hideOnMobile:!0,header:"DB / queue / cache",cell:me},{key:"boot",hideOnMobile:!0,header:"Boot",align:"right",cell:ce}],e[16]=g,e[17]=m):(g=e[16],m=e[17]);let o;e[18]!==t.processes?(o=s.jsx(D,{rows:t.processes,rowKey:be,empty:g,columns:m}),e[18]=t.processes,e[19]=o):o=e[19];let d;return e[20]!==l||e[21]!==p||e[22]!==n||e[23]!==i||e[24]!==b||e[25]!==o?(d=s.jsxs(l,{title:p,children:[n,i,b,c,o]}),e[20]=l,e[21]=p,e[22]=n,e[23]=i,e[24]=b,e[25]=o,e[26]=d):d=e[26],d}function ce(t){return t.boot_seconds?`${t.boot_seconds.toFixed(1)}s`:"–"}function me(t){return s.jsxs("span",{className:"font-mono text-xs",children:[t.detail.database_adapter," / ",t.detail.queue_adapter," /"," ",t.detail.cache_store?.replace("ActiveSupport::Cache::","")]})}function ue(t){return s.jsxs("span",{className:"font-mono text-xs",children:[t.ruby_version," / ",t.rails_version," / ",t.railwatch_version]})}function de(t){return s.jsx("span",{className:"font-mono text-xs",children:t.deploy?.slice(0,12)})}function he(t){return t.pid}function fe(t){return t.role}function pe(t){return s.jsx("span",{className:"font-mono text-xs",children:t.server})}function xe(t){return s.jsx("span",{className:"text-xs",title:H(t.booted_at),children:z(t.booted_at)})}function be(t){return t.id}function ge(t){return{t:t.t,value:t.queue_latency}}function je(t){return O(t)}function ve(t){return{t:t.t,value:t.queue_depth}}function ye(t){return{t:t.t,value:t.backlog}}function _e(t){return{t:t.t,value:t.utilisation}}function ke(t){return j(t.depth)}function we(t){return t.queue}function Ne(t){return t.queue}function Se(t){return s.jsx("span",{title:H(t.sampled_at),children:z(t.sampled_at)})}function Ce(t){return ae(t.memory)}function qe(t){return s.jsx(U,{busy:t.pool_busy,max:t.pool_size})}function De(t){return s.jsx(U,{busy:t.threads_busy,max:t.threads_max})}function Te(t){return t.pid}function Me(t){return t.role}function Oe(t){return s.jsx("span",{className:"font-mono text-xs",children:t.server})}function Ae(t){return t.id}function Le(t){return s.jsx("span",{className:"border-warning/40 bg-warning/10 text-warning rounded-sm border px-1.5 font-mono text-[11px]",children:t},t)}function Re(t){return t.queue_latency}function Pe(t){return t.queue_depth}function $e(t){return t.backlog}function Be(t,e){return t+e}function Fe(t){return t.threads_max?[(t.threads_busy??0)/t.threads_max*100]:[]}export{et as default};
|
|
1
|
+
import{c as L,j as s,o as R,T as Y}from"./inertia-b7M33AzA.js";import{C as S}from"./chart-panel-XD8qJDmg.js";import{D}from"./data-table-Bzj8zcao.js";import{E as T,a5 as P}from"./app-layout-CpEbDy93.js";import{C as G,X as I,Y as W,a as X,b as J,c as V}from"./chart-CD6EHDjG.js";import{A as Z,a as ee}from"./series-chart-FBOfRLhK.js";import{E as te,P as se}from"./env-layout-Dic4A8Kn.js";import{a as re,S as k}from"./stat-nY8iS5q9.js";import{C as $,b as B,c as F,a as E}from"./card-C4EFUWG1.js";import{c as j,m as O,b as ae,a as z,w as H}from"./format-B9SDkrWj.js";import"./chart-hover-B5cFOZ24.js";import"./use-live-rp6jfGac.js";import"./segmented-CJq8WOHZ.js";import"./arrow-up-DAODKT5N.js";const K={fontSize:10,fontFamily:"var(--font-mono)"},ne=1440*60*1e3;function le(t){return(t.length>1?new Date(t[t.length-1].t).getTime()-new Date(t[0].t).getTime():0)>2*ne?a=>new Date(a).toLocaleDateString(void 0,{month:"short",day:"numeric"}):a=>new Date(a).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function A(t){return new Date(t).toLocaleString(void 0,{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit"})}function C(t){const e=L.c(28),{label:a,data:r,format:l,color:p,className:n}=t,i=p===void 0?"var(--primary)":p,b=n===void 0?"h-32":n;let c;e[0]!==i||e[1]!==a?(c={value:{label:a,color:i}},e[0]=i,e[1]=a,e[2]=c):c=e[2];const g=c;let m;e[3]!==r?(m=le(r),e[3]=r,e[4]=m):m=e[4];const o=m,d=`${b} w-full`;let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(G,{vertical:!1,strokeDasharray:"2 4"}),e[5]=h):h=e[5];let u;e[6]!==o?(u=s.jsx(I,{dataKey:"t",tickFormatter:o,tickLine:!1,axisLine:!1,minTickGap:40,tick:K}),e[6]=o,e[7]=u):u=e[7];let f;e[8]!==l?(f=s.jsx(W,{width:44,tickLine:!1,axisLine:!1,tick:K,tickFormatter:q=>l(Number(q))}),e[8]=l,e[9]=f):f=e[9];let x;e[10]!==l||e[11]!==a?(x=s.jsx(X,{content:s.jsx(J,{labelFormatter:oe,formatter:q=>[l(Number(q)),a]})}),e[10]=l,e[11]=a,e[12]=x):x=e[12];let w;e[13]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(Z,{dataKey:"value",stroke:"var(--color-value)",fill:"var(--color-value)",fillOpacity:.15,strokeWidth:1.75,isAnimationActive:!1}),e[13]=w):w=e[13];let v;e[14]!==r||e[15]!==u||e[16]!==f||e[17]!==x?(v=s.jsxs(ee,{data:r,children:[h,u,f,x,w]}),e[14]=r,e[15]=u,e[16]=f,e[17]=x,e[18]=v):v=e[18];let y;e[19]!==g||e[20]!==v||e[21]!==d?(y=s.jsx(V,{config:g,className:d,children:v}),e[19]=g,e[20]=v,e[21]=d,e[22]=y):y=e[22];let _;e[23]!==r?(_=r.length>0&&s.jsxs("div",{className:"text-muted-foreground mt-1 flex justify-between font-mono text-[10px]",children:[s.jsx("span",{children:A(r[0].t)}),s.jsx("span",{children:A(r[r.length-1].t)})]}),e[23]=r,e[24]=_):_=e[24];let N;return e[25]!==y||e[26]!==_?(N=s.jsxs("div",{children:[y,_]}),e[25]=y,e[26]=_,e[27]=N):N=e[27],N}function oe(t){return A(String(t))}function U(t){const e=L.c(21),{busy:a,max:r,className:l}=t;if(!r){let x;return e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("span",{className:"text-muted-foreground",children:"–"}),e[0]=x):x=e[0],x}const p=Math.min(1,(a??0)/r);let n;e[1]!==l?(n=R("flex items-center gap-1.5",l),e[1]=l,e[2]=n):n=e[2];const i=a??0,b=p>=.9?"bg-danger":p>=.7?"bg-warning":"bg-live";let c;e[3]!==b?(c=R("absolute inset-y-0 left-0 rounded-full",b),e[3]=b,e[4]=c):c=e[4];const g=`${Math.max(4,p*100)}%`;let m;e[5]!==g?(m={width:g},e[5]=g,e[6]=m):m=e[6];let o;e[7]!==c||e[8]!==m?(o=s.jsx("span",{className:c,style:m}),e[7]=c,e[8]=m,e[9]=o):o=e[9];let d;e[10]!==r||e[11]!==i||e[12]!==o?(d=s.jsx("span",{role:"meter","aria-label":"Utilisation","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":r,className:"bg-muted-foreground/25 relative h-1.5 w-10 shrink-0 overflow-hidden rounded-full",children:o}),e[10]=r,e[11]=i,e[12]=o,e[13]=d):d=e[13];const h=a??0;let u;e[14]!==r||e[15]!==h?(u=s.jsxs("span",{className:"font-mono tabular-nums",children:[h,"/",r]}),e[14]=r,e[15]=h,e[16]=u):u=e[16];let f;return e[17]!==n||e[18]!==u||e[19]!==d?(f=s.jsxs("span",{className:n,children:[d,u]}),e[17]=n,e[18]=u,e[19]=d,e[20]=f):f=e[20],f}const M=t=>`${t.toFixed(0)}%`;function ie(t){return t.reduce((e,a)=>e+(a??0),0)}function Q(t){return t.reduce((e,a)=>Math.max(e,a??0),0)}function et(t){const e=L.c(27);let a;if(e[0]!==t.samples){const h=t.samples.flatMap(Fe);a=h.length?h.reduce(Be,0)/h.length:0,e[0]=t.samples,e[1]=a}else a=e[1];const r=a;let l,p,n,i,b;if(e[2]!==t.queues||e[3]!==t.samples||e[4]!==t.series||e[5]!==t.silent_servers||e[6]!==r){const h=ie(t.samples.map($e)),u=Q(t.samples.map(Pe)),f=Q(t.samples.map(Re)),x=t.samples.length>0||t.series.length>0;l=te,p="Processes",e[12]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(se,{title:"Processes",description:"What every web and worker process is doing right now: thread pools, socket backlog, queue depth, and the boots behind them."}),e[12]=n):n=e[12],e[13]!==t.silent_servers?(i=t.silent_servers.length>0&&s.jsxs($,{className:"border-warning/40",children:[s.jsx(B,{children:s.jsxs(F,{className:"flex items-center gap-2",children:[s.jsx(Y,{className:"text-warning size-4"}),t.silent_servers.length===1?"1 expected host is silent":`${t.silent_servers.length} expected hosts are silent`]})}),s.jsxs(E,{className:"space-y-2",children:[s.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.silent_servers.map(Le)}),s.jsx("p",{className:"text-muted-foreground text-xs",children:"No health sample or execution from these hosts in the last 10 minutes. Expected hosts come from your Kamal post-deploy hook, or from the environment settings if you set them by hand."})]})]}),e[13]=t.silent_servers,e[14]=i):i=e[14],b=x?s.jsxs(s.Fragment,{children:[s.jsxs(re,{children:[s.jsx(k,{label:"Live processes",value:t.samples.length}),s.jsx(k,{label:"Thread utilisation",value:M(r),tone:r>=90?"destructive":r>=70?"warning":void 0,hint:"averaged across live processes"}),s.jsx(k,{label:"Backlog",value:j(h)}),s.jsx(k,{label:"Queue depth",value:j(u)}),s.jsx(k,{label:"Oldest job",value:O(f)})]}),s.jsx(D,{rows:t.samples,rowKey:Ae,empty:s.jsx(T,{title:"No process reported in the last 10 minutes",description:"Health samples are older than the live window."}),columns:[{key:"server",header:"Server",cell:Oe},{key:"role",header:"Role",cell:Me},{key:"pid",hideOnMobile:!0,header:"PID",align:"right",cell:Te},{key:"threads",header:"Threads",cell:De},{key:"pool",hideOnMobile:!0,header:"DB pool",cell:qe},{key:"mem",hideOnMobile:!0,header:"Memory",align:"right",cell:Ce},{key:"seen",header:"Last sample",align:"right",cell:Se}]}),t.queues.length>0&&s.jsxs($,{children:[s.jsx(B,{children:s.jsx(F,{children:"Queue depth"})}),s.jsx(E,{children:s.jsx(D,{rows:t.queues,rowKey:Ne,columns:[{key:"q",header:"Queue",cell:we},{key:"d",header:"Ready jobs",align:"right",cell:ke}]})})]}),s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[s.jsx(S,{label:"Thread utilisation",value:M(r),children:s.jsx(C,{label:"Utilisation",format:M,data:t.series.map(_e)})}),s.jsx(S,{label:"Backlog",value:j(h),children:s.jsx(C,{label:"Backlog",color:"var(--warning)",format:j,data:t.series.map(ye)})}),s.jsx(S,{label:"Queue depth",value:j(u),children:s.jsx(C,{label:"Ready jobs",format:j,data:t.series.map(ve)})}),s.jsx(S,{label:"Oldest job",value:O(f),children:s.jsx(C,{label:"Oldest job",color:"var(--danger)",format:je,data:t.series.map(ge)})})]})]}):s.jsx(T,{icon:P,title:"No health samples yet",description:"The gem reports thread pool, backlog and queue health every 15s from each web and worker process."}),e[2]=t.queues,e[3]=t.samples,e[4]=t.series,e[5]=t.silent_servers,e[6]=r,e[7]=l,e[8]=p,e[9]=n,e[10]=i,e[11]=b}else l=e[7],p=e[8],n=e[9],i=e[10],b=e[11];let c;e[15]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("h2",{className:"text-sm font-semibold",children:"Process boots"}),e[15]=c):c=e[15];let g,m;e[16]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(T,{icon:P,title:"No process has booted with Railwatch yet",description:"Server processes report here once they boot with the gem installed."}),m=[{key:"b",header:"Booted",cell:xe},{key:"s",header:"Server",cell:pe},{key:"r",header:"Role",cell:fe},{key:"pid",hideOnMobile:!0,header:"PID",align:"right",cell:he},{key:"d",header:"Deploy",cell:de},{key:"v",hideOnMobile:!0,header:"Ruby / Rails / Railwatch",cell:ue},{key:"ad",hideOnMobile:!0,header:"DB / queue / cache",cell:me},{key:"boot",hideOnMobile:!0,header:"Boot",align:"right",cell:ce}],e[16]=g,e[17]=m):(g=e[16],m=e[17]);let o;e[18]!==t.processes?(o=s.jsx(D,{rows:t.processes,rowKey:be,empty:g,columns:m}),e[18]=t.processes,e[19]=o):o=e[19];let d;return e[20]!==l||e[21]!==p||e[22]!==n||e[23]!==i||e[24]!==b||e[25]!==o?(d=s.jsxs(l,{title:p,children:[n,i,b,c,o]}),e[20]=l,e[21]=p,e[22]=n,e[23]=i,e[24]=b,e[25]=o,e[26]=d):d=e[26],d}function ce(t){return t.boot_seconds?`${t.boot_seconds.toFixed(1)}s`:"–"}function me(t){return s.jsxs("span",{className:"font-mono text-xs",children:[t.detail.database_adapter," / ",t.detail.queue_adapter," /"," ",t.detail.cache_store?.replace("ActiveSupport::Cache::","")]})}function ue(t){return s.jsxs("span",{className:"font-mono text-xs",children:[t.ruby_version," / ",t.rails_version," / ",t.railwatch_version]})}function de(t){return s.jsx("span",{className:"font-mono text-xs",children:t.deploy?.slice(0,12)})}function he(t){return t.pid}function fe(t){return t.role}function pe(t){return s.jsx("span",{className:"font-mono text-xs",children:t.server})}function xe(t){return s.jsx("span",{className:"text-xs",title:H(t.booted_at),children:z(t.booted_at)})}function be(t){return t.id}function ge(t){return{t:t.t,value:t.queue_latency}}function je(t){return O(t)}function ve(t){return{t:t.t,value:t.queue_depth}}function ye(t){return{t:t.t,value:t.backlog}}function _e(t){return{t:t.t,value:t.utilisation}}function ke(t){return j(t.depth)}function we(t){return t.queue}function Ne(t){return t.queue}function Se(t){return s.jsx("span",{title:H(t.sampled_at),children:z(t.sampled_at)})}function Ce(t){return ae(t.memory)}function qe(t){return s.jsx(U,{busy:t.pool_busy,max:t.pool_size})}function De(t){return s.jsx(U,{busy:t.threads_busy,max:t.threads_max})}function Te(t){return t.pid}function Me(t){return t.role}function Oe(t){return s.jsx("span",{className:"font-mono text-xs",children:t.server})}function Ae(t){return t.id}function Le(t){return s.jsx("span",{className:"border-warning/40 bg-warning/10 text-warning rounded-sm border px-1.5 font-mono text-[11px]",children:t},t)}function Re(t){return t.queue_latency}function Pe(t){return t.queue_depth}function $e(t){return t.backlog}function Be(t,e){return t+e}function Fe(t){return t.threads_max?[(t.threads_busy??0)/t.threads_max*100]:[]}export{et as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as D,u as P,j as i,f as L,d as A,L as F}from"./inertia-
|
|
1
|
+
import{c as D,u as P,j as i,f as L,d as A,L as F}from"./inertia-b7M33AzA.js";import{D as M}from"./data-table-Bzj8zcao.js";import{E as O,a2 as S}from"./app-layout-CpEbDy93.js";import{P as H,E as K}from"./env-layout-Dic4A8Kn.js";import{c as R,m as j,w as T}from"./format-B9SDkrWj.js";import"./chart-hover-B5cFOZ24.js";import"./use-live-rp6jfGac.js";import"./segmented-CJq8WOHZ.js";function oe(t){const e=D.c(26),{environment:E}=P().props,N=E.application_id,w=E.id;let c;e[0]!==N||e[1]!==w?(c=n=>n.execution_id?L(N,w,n.execution_id):null,e[0]=N,e[1]=w,e[2]=c):c=e[2];const r=c;let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(H,{title:"Notifications",description:"ActionMailer/Noticed deliveries, grouped by notifier and delivery method."}),e[3]=m):m=e[3];let u,d;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(O,{icon:S,title:"No notifications in this window",description:"Notifications delivered by your app appear here as they're sent."}),d=[{key:"n",header:"Notifier",cell:U},{key:"c",hideOnMobile:!0,header:"Count",align:"right",cell:Q},{key:"f",hideOnMobile:!0,header:"Failed",align:"right",cell:J},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:G},{key:"p95",header:"p95",align:"right",cell:z}],e[4]=u,e[5]=d):(u=e[4],d=e[5]);let o;e[6]!==t.groups?(o=i.jsx(M,{rows:t.groups,rowKey:V,empty:u,columns:d}),e[6]=t.groups,e[7]=o):o=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx("h2",{className:"text-sm font-semibold",children:"Recent"}),e[8]=f):f=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=i.jsx(O,{icon:S,title:"No notifications in this window",description:"Notifications delivered by your app appear here as they're sent."}),e[9]=h):h=e[9];let l;e[10]!==r?(l={onOpen:(n,v)=>{const k=r(n);k&&(v?.newTab?window.open(k,"_blank"):A.visit(k))}},e[10]=r,e[11]=l):l=e[11];let p,y,_,x,g;e[12]===Symbol.for("react.memo_cache_sentinel")?(x={key:"when",header:"When",cell:W},g={key:"n",header:"Notifier",cell:I},p={key:"dm",hideOnMobile:!0,header:"Delivery method",cell:C},y={key:"f",hideOnMobile:!0,header:"Failed",cell:B},_={key:"d",header:"Duration",align:"right",cell:q},e[12]=p,e[13]=y,e[14]=_,e[15]=x,e[16]=g):(p=e[12],y=e[13],_=e[14],x=e[15],g=e[16]);let s;e[17]!==r?(s=[x,g,p,y,_,{key:"in",hideOnMobile:!0,header:"In",cell:n=>{const v=r(n);return v?i.jsx(F,{className:"font-mono text-xs hover:underline",href:v,children:n.execution_preview}):null}}],e[17]=r,e[18]=s):s=e[18];let a;e[19]!==t.recent||e[20]!==s||e[21]!==l?(a=i.jsx(M,{rows:t.recent,rowKey:$,empty:h,keyboardNav:l,columns:s}),e[19]=t.recent,e[20]=s,e[21]=l,e[22]=a):a=e[22];let b;return e[23]!==a||e[24]!==o?(b=i.jsxs(K,{title:"Notifications",children:[m,o,f,a]}),e[23]=a,e[24]=o,e[25]=b):b=e[25],b}function q(t){return j(t.duration,3)}function B(t){return t.failed?"yes":""}function C(t){return t.delivery_method}function I(t){return i.jsx("span",{className:"font-mono text-xs",children:t.notifier})}function W(t){return i.jsx("span",{className:"text-xs",children:T(t.occurred_at)})}function $(t){return t.id}function z(t){return j(t.p95,3)}function G(t){return j(t.avg,3)}function J(t){return R(t.errors)}function Q(t){return R(t.count)}function U(t){return i.jsx("span",{className:"font-mono text-xs",children:t.name})}function V(t){return t.group_hash}export{oe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as ye,u as Se,j as s,d as ve,a2 as ge,an as je,L as _e}from"./inertia-
|
|
1
|
+
import{c as ye,u as Se,j as s,d as ve,a2 as ge,an as je,L as _e}from"./inertia-b7M33AzA.js";import{V as ke,D as we}from"./chart-panel-XD8qJDmg.js";import{D as Pe}from"./data-table-Bzj8zcao.js";import{E as Ce}from"./app-layout-CpEbDy93.js";import{F as qe}from"./filter-bar-B5wbix1y.js";import{P as Ee,E as Ne}from"./env-layout-Dic4A8Kn.js";import{u as De,P as Me}from"./percentile-picker-BYFo11OE.js";import{S as V}from"./sort-header-dslBMND2.js";import{S as Be}from"./sparkline-cell-C7fhjJby.js";import{S as Y,a as Fe}from"./stat-nY8iS5q9.js";import{c as Z,m as H}from"./format-B9SDkrWj.js";import{B as Le}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 nt(t){const e=ye.c(115),{environment:be,window:l}=Se().props,{percentile:c}=De(),o=be.application_id,n=be.id,a=t.summary.current;let $;e[0]!==o||e[1]!==n||e[2]!==t.dir||e[3]!==t.q||e[4]!==t.sort||e[5]!==l?($=i=>ve.visit(ge(o,n,{window:l,q:t.q||void 0,sort:i,dir:t.sort===i&&t.dir==="desc"?"asc":"desc"}),{preserveState:!0}),e[0]=o,e[1]=n,e[2]=t.dir,e[3]=t.q,e[4]=t.sort,e[5]=l,e[6]=$):$=e[6];const r=$;let W;e[7]!==o||e[8]!==n||e[9]!==l?(W=i=>je(o,n,i,{window:l}),e[7]=o,e[8]=n,e[9]=l,e[10]=W):W=e[10];const m=W;let z;e[11]!==m?(z=(i,xe)=>xe?.newTab?globalThis.window.open(m(i),"_blank"):ve.visit(m(i)),e[11]=m,e[12]=z):z=e[12];const ee=z;let A;e[13]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Ee,{title:"Spans",description:"Custom spans your app recorded with Railwatch.span, grouped by name.",actions:s.jsx(Me,{})}),e[13]=A):A=e[13];let d;e[14]!==a.count?(d=Z(a.count),e[14]=a.count,e[15]=d):d=e[15];let u;e[16]!==a.count||e[17]!==t.summary.previous.count?(u={current:a.count,previous:t.summary.previous.count,goodDirection:"up"},e[16]=a.count,e[17]=t.summary.previous.count,e[18]=u):u=e[18];let f;e[19]!==d||e[20]!==u?(f=s.jsx(Y,{label:"Spans",value:d,delta:u,deltaCaption:"vs previous period"}),e[19]=d,e[20]=u,e[21]=f):f=e[21];let p;e[22]!==a.errors?(p=Z(a.errors),e[22]=a.errors,e[23]=p):p=e[23];const te=a.errors?"destructive":void 0;let h;e[24]!==p||e[25]!==te?(h=s.jsx(Y,{label:"Failed",value:p,tone:te}),e[24]=p,e[25]=te,e[26]=h):h=e[26];const se=a[c]/1e3;let x;e[27]!==se?(x=H(se,2),e[27]=se,e[28]=x):x=e[28];const re=a.avg/1e3;let G;e[29]!==re?(G=H(re,2),e[29]=re,e[30]=G):G=e[30];const ie=`avg ${G}`;let v;e[31]!==c||e[32]!==x||e[33]!==ie?(v=s.jsx(Y,{label:c,value:x,hint:ie}),e[31]=c,e[32]=x,e[33]=ie,e[34]=v):v=e[34];const ae=a.max/1e3;let b;e[35]!==ae?(b=H(ae,2),e[35]=ae,e[36]=b):b=e[36];let g;e[37]!==b?(g=s.jsx(Y,{label:"Max",value:b}),e[37]=b,e[38]=g):g=e[38];let y;e[39]!==v||e[40]!==g||e[41]!==f||e[42]!==h?(y=s.jsxs(Fe,{children:[f,h,v,g]}),e[39]=v,e[40]=g,e[41]=f,e[42]=h,e[43]=y):y=e[43];let S;e[44]!==t.series?(S=s.jsx(ke,{legend:"outcome",label:"Spans",seriesLabel:"Spans",data:t.series}),e[44]=t.series,e[45]=S):S=e[45];let j;e[46]!==t.series||e[47]!==c?(j=s.jsx(we,{label:"Duration",data:t.series,percentile:c}),e[46]=t.series,e[47]=c,e[48]=j):j=e[48];let _;e[49]!==S||e[50]!==j?(_=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[S,j]}),e[49]=S,e[50]=j,e[51]=_):_=e[51];let I;e[52]===Symbol.for("react.memo_cache_sentinel")?(I={key:"name",label:"Name"},e[52]=I):I=e[52];let J;e[53]===Symbol.for("react.memo_cache_sentinel")?(J=[I,{key:"status",label:"Status",options:["failed"]}],e[53]=J):J=e[53];let k;e[54]!==o||e[55]!==n||e[56]!==t.dir||e[57]!==t.sort||e[58]!==l?(k=i=>ve.visit(ge(o,n,{window:l,q:i||void 0,sort:t.sort,dir:t.dir}),{preserveState:!0}),e[54]=o,e[55]=n,e[56]=t.dir,e[57]=t.sort,e[58]=l,e[59]=k):k=e[59];let w;e[60]!==t.q||e[61]!==k?(w=s.jsx(qe,{value:t.q,fields:J,onChange:k,placeholder:"name:geocode status:failed"}),e[60]=t.q,e[61]=k,e[62]=w):w=e[62];let Q;e[63]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(Ce,{icon:Le,title:"No spans in this window",description:"Wrap any code in Railwatch.span('name') { } and it shows up here."}),e[63]=Q):Q=e[63];let P;e[64]!==ee?(P={onOpen:(i,xe)=>ee(i.group_hash,xe)},e[64]=ee,e[65]=P):P=e[65];let C;e[66]!==m?(C={key:"name",header:"Span",grow:!0,cell:i=>s.jsx(_e,{href:m(i.group_hash),className:"truncate font-mono text-xs hover:underline",children:i.name})},e[66]=m,e[67]=C):C=e[67];let U;e[68]===Symbol.for("react.memo_cache_sentinel")?(U={key:"trend",hideOnMobile:!0,header:"Trend",cell:Ve},e[68]=U):U=e[68];const le=t.sort==="count",oe=t.dir==="asc"?"asc":"desc";let q;e[69]!==r?(q=()=>r("count"),e[69]=r,e[70]=q):q=e[70];let E;e[71]!==le||e[72]!==oe||e[73]!==q?(E={key:"n",header:s.jsx(V,{label:"Count",active:le,dir:oe,onClick:q}),align:"right",cell:He},e[71]=le,e[72]=oe,e[73]=q,e[74]=E):E=e[74];const ne=t.sort==="errors",ce=t.dir==="asc"?"asc":"desc";let N;e[75]!==r?(N=()=>r("errors"),e[75]=r,e[76]=N):N=e[76];let D;e[77]!==ne||e[78]!==ce||e[79]!==N?(D={key:"failed",header:s.jsx(V,{label:"Failed",active:ne,dir:ce,onClick:N}),align:"right",cell:Ke},e[77]=ne,e[78]=ce,e[79]=N,e[80]=D):D=e[80];const me=t.sort==="p50",de=t.dir==="asc"?"asc":"desc";let M;e[81]!==r?(M=()=>r("p50"),e[81]=r,e[82]=M):M=e[82];let B;e[83]!==me||e[84]!==de||e[85]!==M?(B={key:"p50",hideOnMobile:!0,header:s.jsx(V,{label:"p50",active:me,dir:de,onClick:M}),align:"right",cell:Te},e[83]=me,e[84]=de,e[85]=M,e[86]=B):B=e[86];const ue=t.sort==="p95",fe=t.dir==="asc"?"asc":"desc";let F;e[87]!==r?(F=()=>r("p95"),e[87]=r,e[88]=F):F=e[88];let L;e[89]!==ue||e[90]!==fe||e[91]!==F?(L={key:"p95",header:s.jsx(V,{label:"p95",active:ue,dir:fe,onClick:F}),align:"right",cell:Re},e[89]=ue,e[90]=fe,e[91]=F,e[92]=L):L=e[92];const pe=t.sort==="max",he=t.dir==="asc"?"asc":"desc";let O;e[93]!==r?(O=()=>r("max"),e[93]=r,e[94]=O):O=e[94];let R;e[95]!==pe||e[96]!==he||e[97]!==O?(R={key:"max",hideOnMobile:!0,header:s.jsx(V,{label:"Max",active:pe,dir:he,onClick:O}),align:"right",cell:Oe},e[95]=pe,e[96]=he,e[97]=O,e[98]=R):R=e[98];let T;e[99]!==C||e[100]!==E||e[101]!==D||e[102]!==B||e[103]!==L||e[104]!==R?(T=[C,U,E,D,B,L,R],e[99]=C,e[100]=E,e[101]=D,e[102]=B,e[103]=L,e[104]=R,e[105]=T):T=e[105];let K;e[106]!==t.spans||e[107]!==P||e[108]!==T?(K=s.jsx(Pe,{rows:t.spans,rowKey:We,empty:Q,hoverKey:$e,keyboardNav:P,columns:T}),e[106]=t.spans,e[107]=P,e[108]=T,e[109]=K):K=e[109];let X;return e[110]!==y||e[111]!==_||e[112]!==w||e[113]!==K?(X=s.jsxs(Ne,{title:"Spans",children:[A,y,_,w,K]}),e[110]=y,e[111]=_,e[112]=w,e[113]=K,e[114]=X):X=e[114],X}function Oe(t){return H(t.max,2)}function Re(t){return s.jsx("span",{className:"font-semibold",children:H(t.p95,2)})}function Te(t){return H(t.p50,2)}function Ke(t){return s.jsx("span",{className:t.errors?"text-danger font-semibold":"",children:Z(t.errors)})}function He(t){return Z(t.count)}function Ve(t){return s.jsx(Be,{data:t.sparkline,hoverKey:t.group_hash})}function $e(t){return t.group_hash}function We(t){return t.group_hash}export{nt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as oe,u as ce,j as s,d as ie,a9 as me,L as de}from"./inertia-
|
|
1
|
+
import{c as oe,u as ce,j as s,d as ie,a9 as me,L as de}from"./inertia-b7M33AzA.js";import{C as ue}from"./chart-hover-B5cFOZ24.js";import{D as fe}from"./data-table-Bzj8zcao.js";import{E as he,at as ye}from"./app-layout-CpEbDy93.js";import{F as ge}from"./filter-bar-B5wbix1y.js";import{P as xe,E as _e}from"./env-layout-Dic4A8Kn.js";import{S as W}from"./sort-header-dslBMND2.js";import{S as ve}from"./sparkline-cell-C7fhjJby.js";import{S as Y,a as be}from"./stat-nY8iS5q9.js";import{c as a,m as je,a as pe}from"./format-B9SDkrWj.js";import{t as ke}from"./tenant-path-UhieazCc.js";import"./use-live-rp6jfGac.js";import"./segmented-CJq8WOHZ.js";import"./arrow-up-DAODKT5N.js";import"./series-chart-FBOfRLhK.js";import"./chart-CD6EHDjG.js";function Ve(t){const e=oe.c(91),{environment:ae,window:l}=ce().props,o=ae.application_id,c=ae.id;let P;e[0]!==o||e[1]!==c||e[2]!==t.dir||e[3]!==t.q||e[4]!==t.sort||e[5]!==l?(P=r=>ie.visit(me(o,c,{window:l,sort:t.sort,dir:t.dir,q:t.q||void 0,...r}),{preserveState:!0}),e[0]=o,e[1]=c,e[2]=t.dir,e[3]=t.q,e[4]=t.sort,e[5]=l,e[6]=P):P=e[6];const m=P;let M;e[7]!==t.dir||e[8]!==t.sort||e[9]!==m?(M=r=>m({sort:r,dir:t.sort===r&&t.dir==="desc"?"asc":"desc"}),e[7]=t.dir,e[8]=t.sort,e[9]=m,e[10]=M):M=e[10];const n=M;let F;e[11]!==o||e[12]!==c||e[13]!==l?(F=r=>ke(o,c,r.tenant,{window:l}),e[11]=o,e[12]=c,e[13]=l,e[14]=F):F=e[14];const i=F;let L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(xe,{title:"Tenants",description:"Your application's own tenants, aggregated from the tenant tag on every record."}),e[15]=L):L=e[15];let d;e[16]!==t.summary.tenants?(d=a(t.summary.tenants),e[16]=t.summary.tenants,e[17]=d):d=e[17];let u;e[18]!==d?(u=s.jsx(Y,{label:"Tenants active",value:d}),e[18]=d,e[19]=u):u=e[19];const z=`${t.summary.top_share}%`,G=t.summary.top_tenant??"none";let f;e[20]!==z||e[21]!==G?(f=s.jsx(Y,{label:"Top tenant",value:z,hint:G}),e[20]=z,e[21]=G,e[22]=f):f=e[22];let h;e[23]!==t.summary.with_errors?(h=a(t.summary.with_errors),e[23]=t.summary.with_errors,e[24]=h):h=e[24];const I=t.summary.with_errors?"destructive":"success";let y;e[25]!==I||e[26]!==h?(y=s.jsx(Y,{label:"With 5xx",value:h,tone:I}),e[25]=I,e[26]=h,e[27]=y):y=e[27];const Q=`${t.summary.untagged_share}%`;let g;e[28]!==Q?(g=s.jsx(Y,{label:"Untagged",value:Q,hint:"requests with no tenant"}),e[28]=Q,e[29]=g):g=e[29];let x;e[30]!==y||e[31]!==g||e[32]!==u||e[33]!==f?(x=s.jsxs(be,{children:[u,f,y,g]}),e[30]=y,e[31]=g,e[32]=u,e[33]=f,e[34]=x):x=e[34];let B;e[35]===Symbol.for("react.memo_cache_sentinel")?(B=[],e[35]=B):B=e[35];let _;e[36]!==m?(_=r=>m({q:r||void 0}),e[36]=m,e[37]=_):_=e[37];let v;e[38]!==t.q||e[39]!==_?(v=s.jsx(ge,{value:t.q,fields:B,onChange:_,placeholder:"Filter tenants"}),e[38]=t.q,e[39]=_,e[40]=v):v=e[40];let H;e[41]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(he,{icon:ye,title:"No tenant-tagged records in this window",description:"Records carry the tenant from ActiveRecord::Tenanted / TenantRecord.current_tenant, or call Railwatch.context(tenant: org.slug)"}),e[41]=H):H=e[41];let b,j;e[42]!==i?(b=r=>ie.visit(i(r)),j={onOpen:(r,le)=>le?.newTab?globalThis.window.open(i(r),"_blank"):ie.visit(i(r))},e[42]=i,e[43]=b,e[44]=j):(b=e[43],j=e[44]);let p;e[45]!==i?(p={key:"tenant",header:"Tenant",cell:r=>s.jsx(de,{className:"font-mono text-xs hover:underline",href:i(r),children:r.tenant})},e[45]=i,e[46]=p):p=e[46];let K;e[47]===Symbol.for("react.memo_cache_sentinel")?(K={key:"trend",hideOnMobile:!0,header:"Trend",cell:Oe},e[47]=K):K=e[47];const V=t.sort==="requests",X=t.dir==="asc"?"asc":"desc";let k;e[48]!==n?(k=()=>n("requests"),e[48]=n,e[49]=k):k=e[49];let w;e[50]!==V||e[51]!==X||e[52]!==k?(w={key:"requests",header:s.jsx(W,{label:"Requests",active:V,dir:X,onClick:k}),align:"right",cell:Ne},e[50]=V,e[51]=X,e[52]=k,e[53]=w):w=e[53];const Z=t.sort==="errors",ee=t.dir==="asc"?"asc":"desc";let S;e[54]!==n?(S=()=>n("errors"),e[54]=n,e[55]=S):S=e[55];let q;e[56]!==Z||e[57]!==ee||e[58]!==S?(q={key:"5xx",header:s.jsx(W,{label:"5xx",active:Z,dir:ee,onClick:S}),align:"right",cell:Re},e[56]=Z,e[57]=ee,e[58]=S,e[59]=q):q=e[59];const te=t.sort==="p95",se=t.dir==="asc"?"asc":"desc";let T;e[60]!==n?(T=()=>n("p95"),e[60]=n,e[61]=T):T=e[61];let C;e[62]!==te||e[63]!==se||e[64]!==T?(C={key:"p95",header:s.jsx(W,{label:"p95",active:te,dir:se,onClick:T}),align:"right",cell:Ee},e[62]=te,e[63]=se,e[64]=T,e[65]=C):C=e[65];let $,D,U;e[66]===Symbol.for("react.memo_cache_sentinel")?($={key:"jobs",hideOnMobile:!0,header:"Jobs",align:"right",cell:Ce},D={key:"failed",hideOnMobile:!0,header:"Failed",align:"right",cell:Te},U={key:"exceptions",hideOnMobile:!0,header:"Exceptions",align:"right",cell:qe},e[66]=$,e[67]=D,e[68]=U):($=e[66],D=e[67],U=e[68]);const re=t.sort==="users",ne=t.dir==="asc"?"asc":"desc";let E;e[69]!==n?(E=()=>n("users"),e[69]=n,e[70]=E):E=e[70];let R;e[71]!==re||e[72]!==ne||e[73]!==E?(R={key:"users",hideOnMobile:!0,header:s.jsx(W,{label:"Users",active:re,dir:ne,onClick:E}),align:"right",cell:Se},e[71]=re,e[72]=ne,e[73]=E,e[74]=R):R=e[74];let A;e[75]===Symbol.for("react.memo_cache_sentinel")?(A={key:"seen",header:"Last seen",align:"right",cell:we},e[75]=A):A=e[75];let N;e[76]!==p||e[77]!==w||e[78]!==q||e[79]!==C||e[80]!==R?(N=[p,K,w,q,C,$,D,U,R,A],e[76]=p,e[77]=w,e[78]=q,e[79]=C,e[80]=R,e[81]=N):N=e[81];let O;e[82]!==t.tenants||e[83]!==b||e[84]!==j||e[85]!==N?(O=s.jsx(fe,{rows:t.tenants,rowKey:Me,empty:H,hoverKey:Pe,onRowClick:b,keyboardNav:j,columns:N}),e[82]=t.tenants,e[83]=b,e[84]=j,e[85]=N,e[86]=O):O=e[86];let J;return e[87]!==x||e[88]!==v||e[89]!==O?(J=s.jsx(_e,{title:"Tenants",children:s.jsxs(ue,{children:[L,x,v,O]})}),e[87]=x,e[88]=v,e[89]=O,e[90]=J):J=e[90],J}function we(t){return pe(t.last_seen_at)}function Se(t){return a(t.users)}function qe(t){return a(t.exceptions)}function Te(t){return s.jsx("span",{className:t.failed_jobs?"text-destructive":"",children:a(t.failed_jobs)})}function Ce(t){return a(t.jobs)}function Ee(t){return s.jsx("span",{className:"font-semibold",children:je(t.p95)})}function Re(t){return s.jsx("span",{className:t.errors?"text-destructive":"",children:a(t.errors)})}function Ne(t){return a(t.requests)}function Oe(t){return s.jsx(ve,{data:t.sparkline,hoverKey:t.tenant})}function Pe(t){return t.tenant}function Me(t){return t.tenant}export{Ve as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as te,u as se,j as s,d as X,a8 as Y}from"./inertia-
|
|
1
|
+
import{c as te,u as se,j as s,d as X,a8 as Y}from"./inertia-b7M33AzA.js";import{V as re,D as ie}from"./chart-panel-XD8qJDmg.js";import{D as Z}from"./data-table-Bzj8zcao.js";import{E as le,ab as ne}from"./app-layout-CpEbDy93.js";import{F as oe}from"./filter-bar-B5wbix1y.js";import{E as ae,P as ce}from"./env-layout-Dic4A8Kn.js";import{u as me,P as de}from"./percentile-picker-BYFo11OE.js";import{S as J}from"./sort-header-dslBMND2.js";import{S as ue}from"./sparkline-cell-C7fhjJby.js";import{a as pe,S as fe}from"./stat-nY8iS5q9.js";import{S as he}from"./status-badge-D40D8TiV.js";import{c as ee,m as o,p as xe,w as ge,b as be}from"./format-B9SDkrWj.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";const ye=["lcp","cls","inp","ttfb"],je={lcp:"LCP",cls:"CLS",inp:"INP",ttfb:"TTFB"},ve={good:"success","needs-improvement":"warning",poor:"destructive"},_e=(t,e)=>t==="cls"?e.toFixed(2):o(e),Se=t=>[t.lcp===null?null:`LCP ${o(t.lcp)}`,t.inp===null?null:`INP ${o(t.inp)}`,t.cls===null?null:`CLS ${t.cls.toFixed(2)}`].filter(e=>e!==null).join(" · ");function it(t){const e=te.c(80),{environment:Q,window:a}=se().props,{percentile:r}=me(),c=Q.application_id,m=Q.id;let M;e[0]!==c||e[1]!==m||e[2]!==t.dir||e[3]!==t.sort||e[4]!==a?(M=l=>X.visit(Y(c,m,{window:a,sort:l,dir:t.sort===l&&t.dir==="desc"?"asc":"desc"}),{preserveState:!0}),e[0]=c,e[1]=m,e[2]=t.dir,e[3]=t.sort,e[4]=a,e[5]=M):M=e[5];const i=M;let d,u,n,p;if(e[6]!==t.vitals){const l=ye.filter(L=>t.vitals[L]);d=ae,u="Visits",e[11]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ce,{title:"Inertia visits",description:"Page-load timing measured in the browser: from router start to finish, per component, with prop payload size.",actions:s.jsx(de,{})}),e[11]=n):n=e[11],p=l.length>0?s.jsx(pe,{children:l.map(L=>{const K=t.vitals[L];return s.jsx(fe,{label:je[L],value:_e(L,K.value),tone:ve[K.rating],hint:`${K.rating} · p75 of ${ee(K.samples)}`},L)})}):s.jsxs("p",{className:"text-muted-foreground text-xs",children:["Web vitals are reported by the browser client from the initial page load; update app/frontend/lib/railwatch.ts from"," ",s.jsx("span",{className:"font-mono",children:"bin/rails generate railwatch:install"}),"."]}),e[6]=t.vitals,e[7]=d,e[8]=u,e[9]=n,e[10]=p}else d=e[7],u=e[8],n=e[9],p=e[10];let f;e[12]!==t.series?(f=s.jsx(re,{legend:"outcome",label:"Visits",seriesLabel:"Visits",data:t.series}),e[12]=t.series,e[13]=f):f=e[13];let h;e[14]!==t.series||e[15]!==r?(h=s.jsx(ie,{label:"Duration",data:t.series,percentile:r}),e[14]=t.series,e[15]=r,e[16]=h):h=e[16];let x;e[17]!==f||e[18]!==h?(x=s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[f,h]}),e[17]=f,e[18]=h,e[19]=x):x=e[19];let E,O,D;e[20]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(le,{icon:ne,title:"No visits yet",description:"Call startRailwatch() from your Inertia entrypoint to track page visits."}),O={key:"c",header:"Component",cell:Ie},D={key:"trend",hideOnMobile:!0,header:"Trend",cell:Fe},e[20]=E,e[21]=O,e[22]=D):(E=e[20],O=e[21],D=e[22]);const W=t.sort==="count",H=t.dir==="asc"?"asc":"desc";let g;e[23]!==i?(g=()=>i("count"),e[23]=i,e[24]=g):g=e[24];let b;e[25]!==W||e[26]!==H||e[27]!==g?(b={key:"n",header:s.jsx(J,{label:"Visits",active:W,dir:H,onClick:g}),align:"right",cell:$e},e[25]=W,e[26]=H,e[27]=g,e[28]=b):b=e[28];let T;e[29]===Symbol.for("react.memo_cache_sentinel")?(T={key:"e",hideOnMobile:!0,header:"Errors",align:"right",cell:Te},e[29]=T):T=e[29];const U=t.sort==="avg",z=t.dir==="asc"?"asc":"desc";let y;e[30]!==i?(y=()=>i("avg"),e[30]=i,e[31]=y):y=e[31];let j;e[32]!==U||e[33]!==z||e[34]!==y?(j={key:"avg",hideOnMobile:!0,header:s.jsx(J,{label:"Avg",active:U,dir:z,onClick:y}),align:"right",cell:De},e[32]=U,e[33]=z,e[34]=y,e[35]=j):j=e[35];let $,F;e[36]===Symbol.for("react.memo_cache_sentinel")?($={key:"lcp",hideOnMobile:!0,header:"LCP",align:"right",cell:Oe},F={key:"inp",hideOnMobile:!0,header:"INP",align:"right",cell:Ee},e[36]=$,e[37]=F):($=e[36],F=e[37]);const A=t.sort===r,G=t.dir==="asc"?"asc":"desc";let v;e[38]!==r||e[39]!==i?(v=()=>i(r),e[38]=r,e[39]=i,e[40]=v):v=e[40];let _;e[41]!==r||e[42]!==A||e[43]!==G||e[44]!==v?(_=s.jsx(J,{label:r,active:A,dir:G,onClick:v}),e[41]=r,e[42]=A,e[43]=G,e[44]=v,e[45]=_):_=e[45];let S;e[46]!==r?(S=l=>s.jsx("span",{className:"font-semibold",children:o(l[r])}),e[46]=r,e[47]=S):S=e[47];let k;e[48]!==r||e[49]!==_||e[50]!==S?(k={key:r,header:_,align:"right",cell:S},e[48]=r,e[49]=_,e[50]=S,e[51]=k):k=e[51];let P;e[52]!==b||e[53]!==j||e[54]!==k?(P=[O,D,b,T,j,$,F,k],e[52]=b,e[53]=j,e[54]=k,e[55]=P):P=e[55];let w;e[56]!==t.components||e[57]!==P?(w=s.jsx(Z,{rows:t.components,rowKey:Re,empty:E,columns:P}),e[56]=t.components,e[57]=P,e[58]=w):w=e[58];let I;e[59]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx("h2",{className:"text-sm font-semibold",children:"Recent"}),e[59]=I):I=e[59];let R;e[60]===Symbol.for("react.memo_cache_sentinel")?(R=[{key:"component",label:"Component"}],e[60]=R):R=e[60];let C;e[61]!==c||e[62]!==m||e[63]!==a?(C=l=>X.visit(Y(c,m,{window:a,q:l||void 0}),{preserveState:!0}),e[61]=c,e[62]=m,e[63]=a,e[64]=C):C=e[64];let N;e[65]!==t.q||e[66]!==C?(N=s.jsx(oe,{value:t.q,fields:R,onChange:C,placeholder:"component:Widgets/Show"}),e[65]=t.q,e[66]=C,e[67]=N):N=e[67];let q;e[68]===Symbol.for("react.memo_cache_sentinel")?(q=[{key:"when",header:"When",cell:Le},{key:"st",header:"",cell:Ve},{key:"c",header:"Component",cell:Ne},{key:"u",hideOnMobile:!0,header:"URL",cell:Ce},{key:"v",hideOnMobile:!0,header:"Vitals",cell:we},{key:"b",hideOnMobile:!0,header:"Props",align:"right",cell:Pe},{key:"d",header:"Duration",align:"right",cell:ke}],e[68]=q):q=e[68];let V;e[69]!==t.recent?(V=s.jsx(Z,{rows:t.recent,rowKey:Me,columns:q}),e[69]=t.recent,e[70]=V):V=e[70];let B;return e[71]!==d||e[72]!==u||e[73]!==n||e[74]!==w||e[75]!==p||e[76]!==N||e[77]!==V||e[78]!==x?(B=s.jsxs(d,{title:u,children:[n,p,x,w,I,N,V]}),e[71]=d,e[72]=u,e[73]=n,e[74]=w,e[75]=p,e[76]=N,e[77]=V,e[78]=x,e[79]=B):B=e[79],B}function ke(t){return o(t.duration)}function Pe(t){return be(t.props_bytes)}function we(t){return s.jsx("span",{className:"text-muted-foreground font-mono text-[11px] tabular-nums",children:Se(t)})}function Ce(t){return s.jsxs("span",{className:"font-mono text-xs",children:[t.method.toUpperCase()," ",t.url]})}function Ne(t){return s.jsxs("span",{className:"font-mono text-xs",children:[t.component,t.partial&&s.jsxs("span",{className:"text-muted-foreground",children:[" ","(partial: ",t.only.join(", "),")"]})]})}function Ve(t){return s.jsx(he,{label:t.status,outcome:t.status==="error"?"failed":t.status==="success"?"processed":void 0})}function Le(t){return s.jsx("span",{className:"text-xs",children:ge(t.occurred_at)})}function Me(t){return t.id}function Ee(t){return o(t.inp)}function Oe(t){return o(t.lcp)}function De(t){return o(t.avg)}function Te(t){return xe(t.errors,t.count)}function $e(t){return ee(t.count)}function Fe(t){return s.jsx(ue,{data:t.sparkline})}function Ie(t){return s.jsx("span",{className:"font-mono text-xs",children:t.name})}function Re(t){return t.group_hash}export{it as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as le,u as ae,j as r,d as oe,S as ne,K as ce,L as de}from"./inertia-
|
|
1
|
+
import{c as le,u as ae,j as r,d as oe,S as ne,K as ce,L as de}from"./inertia-b7M33AzA.js";import{C as me}from"./chart-hover-B5cFOZ24.js";import{V as ue,D as fe}from"./chart-panel-XD8qJDmg.js";import{D as he}from"./data-table-Bzj8zcao.js";import{S as xe,E as ye,ac as ge}from"./app-layout-CpEbDy93.js";import{F as pe}from"./filter-bar-B5wbix1y.js";import{P as ve,E as be}from"./env-layout-Dic4A8Kn.js";import{u as ke,P as je}from"./percentile-picker-BYFo11OE.js";import{S as M}from"./sort-header-dslBMND2.js";import{S as _e}from"./sparkline-cell-C7fhjJby.js";import{m as re,c as $,p as qe}from"./format-B9SDkrWj.js";import"./series-chart-FBOfRLhK.js";import"./chart-CD6EHDjG.js";import"./use-live-rp6jfGac.js";import"./segmented-CJq8WOHZ.js";import"./arrow-up-DAODKT5N.js";function Xe(t){const e=le.c(95),{environment:se,window:a}=ae().props,{percentile:o}=ke(),n=se.application_id,c=se.id;let O;e[0]!==n||e[1]!==c||e[2]!==t.dir||e[3]!==t.q||e[4]!==t.sort||e[5]!==a?(O=s=>oe.visit(ne(n,c,{window:a,sort:t.sort,dir:t.dir,q:t.q||void 0,...s}),{preserveState:!0}),e[0]=n,e[1]=c,e[2]=t.dir,e[3]=t.q,e[4]=t.sort,e[5]=a,e[6]=O):O=e[6];const d=O;let H;e[7]!==t.dir||e[8]!==t.sort||e[9]!==d?(H=s=>d({sort:s,dir:t.sort===s&&t.dir==="desc"?"asc":"desc"}),e[7]=t.dir,e[8]=t.sort,e[9]=d,e[10]=H):H=e[10];const i=H;let N;e[11]!==n||e[12]!==c||e[13]!==a?(N=s=>ce(n,c,s.group_hash,{window:a}),e[11]=n,e[12]=c,e[13]=a,e[14]=N):N=e[14];const l=N;let D;e[15]===Symbol.for("react.memo_cache_sentinel")?(D=r.jsx(ve,{title:"Requests",description:"Every route your app served, with error rates and percentiles.",actions:r.jsxs(r.Fragment,{children:[r.jsx(xe,{page:"requests"}),r.jsx(je,{})]})}),e[15]=D):D=e[15];let L;e[16]===Symbol.for("react.memo_cache_sentinel")?(L={key:"method",label:"Method",options:["GET","POST","PUT","PATCH","DELETE"]},e[16]=L):L=e[16];let A;e[17]===Symbol.for("react.memo_cache_sentinel")?(A=[L,{key:"status",label:"Status",options:["2xx","3xx","4xx","5xx"]},{key:"route",label:"Route"}],e[17]=A):A=e[17];let m;e[18]!==d?(m=s=>d({q:s||void 0}),e[18]=d,e[19]=m):m=e[19];let u;e[20]!==t.q||e[21]!==m?(u=r.jsx(pe,{value:t.q,fields:A,onChange:m,placeholder:"method:GET status:5xx route:/widgets"}),e[20]=t.q,e[21]=m,e[22]=u):u=e[22];let f;e[23]!==t.deploys||e[24]!==t.series?(f=r.jsx(ue,{label:"Requests",data:t.series,deploys:t.deploys}),e[23]=t.deploys,e[24]=t.series,e[25]=f):f=e[25];let h;e[26]!==t.deploys||e[27]!==t.series||e[28]!==o?(h=r.jsx(fe,{label:"Latency",data:t.series,deploys:t.deploys,percentile:o}),e[26]=t.deploys,e[27]=t.series,e[28]=o,e[29]=h):h=e[29];let x;e[30]!==f||e[31]!==h?(x=r.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[f,h]}),e[30]=f,e[31]=h,e[32]=x):x=e[32];let K;e[33]===Symbol.for("react.memo_cache_sentinel")?(K=r.jsx(ye,{icon:ge,title:"No requests in this window",description:"HTTP requests to your app appear here as they're reported."}),e[33]=K):K=e[33];let y;e[34]!==l?(y={onOpen:(s,ie)=>ie?.newTab?globalThis.window.open(l(s),"_blank"):oe.visit(l(s))},e[34]=l,e[35]=y):y=e[35];let g;e[36]!==l?(g={key:"name",header:"Route",grow:!0,cell:s=>r.jsx(de,{className:"font-mono text-xs hover:underline",href:l(s),title:s.name,children:s.name})},e[36]=l,e[37]=g):g=e[37];let F,V,B;e[38]===Symbol.for("react.memo_cache_sentinel")?(F={key:"trend",hideOnMobile:!0,header:"Trend",cell:Me},V={key:"ok",hideOnMobile:!0,header:"2xx",align:"right",cell:Re},B={key:"4xx",hideOnMobile:!0,header:"4xx",align:"right",cell:Ce},e[38]=F,e[39]=V,e[40]=B):(F=e[38],V=e[39],B=e[40]);const z=t.sort==="errors",I=t.dir==="asc"?"asc":"desc";let p;e[41]!==i?(p=()=>i("errors"),e[41]=i,e[42]=p):p=e[42];let v;e[43]!==z||e[44]!==I||e[45]!==p?(v={key:"5xx",header:r.jsx(M,{label:"5xx",active:z,dir:I,onClick:p}),align:"right",cell:Te},e[43]=z,e[44]=I,e[45]=p,e[46]=v):v=e[46];const J=t.sort==="count",Q=t.dir==="asc"?"asc":"desc";let b;e[47]!==i?(b=()=>i("count"),e[47]=i,e[48]=b):b=e[48];let k;e[49]!==J||e[50]!==Q||e[51]!==b?(k={key:"total",header:r.jsx(M,{label:"Total",active:J,dir:Q,onClick:b}),align:"right",cell:we},e[49]=J,e[50]=Q,e[51]=b,e[52]=k):k=e[52];let G;e[53]===Symbol.for("react.memo_cache_sentinel")?(G={key:"err",hideOnMobile:!0,header:"Error %",align:"right",cell:Ee},e[53]=G):G=e[53];const W=t.sort==="avg",X=t.dir==="asc"?"asc":"desc";let j;e[54]!==i?(j=()=>i("avg"),e[54]=i,e[55]=j):j=e[55];let _;e[56]!==W||e[57]!==X||e[58]!==j?(_={key:"avg",hideOnMobile:!0,header:r.jsx(M,{label:"Avg",active:W,dir:X,onClick:j}),align:"right",cell:Pe},e[56]=W,e[57]=X,e[58]=j,e[59]=_):_=e[59];const Y=t.sort===o,Z=t.dir==="asc"?"asc":"desc";let q;e[60]!==o||e[61]!==i?(q=()=>i(o),e[60]=o,e[61]=i,e[62]=q):q=e[62];let S;e[63]!==o||e[64]!==Y||e[65]!==Z||e[66]!==q?(S=r.jsx(M,{label:o,active:Y,dir:Z,onClick:q}),e[63]=o,e[64]=Y,e[65]=Z,e[66]=q,e[67]=S):S=e[67];let P;e[68]!==o?(P=s=>r.jsx("span",{className:"font-semibold",children:re(s[o])}),e[68]=o,e[69]=P):P=e[69];let E;e[70]!==o||e[71]!==S||e[72]!==P?(E={key:o,header:S,align:"right",cell:P},e[70]=o,e[71]=S,e[72]=P,e[73]=E):E=e[73];const ee=t.sort==="max",te=t.dir==="asc"?"asc":"desc";let w;e[74]!==i?(w=()=>i("max"),e[74]=i,e[75]=w):w=e[75];let T;e[76]!==ee||e[77]!==te||e[78]!==w?(T={key:"max",hideOnMobile:!0,header:r.jsx(M,{label:"Max",active:ee,dir:te,onClick:w}),align:"right",cell:Se},e[76]=ee,e[77]=te,e[78]=w,e[79]=T):T=e[79];let C;e[80]!==g||e[81]!==v||e[82]!==k||e[83]!==_||e[84]!==E||e[85]!==T?(C=[g,F,V,B,v,k,G,_,E,T],e[80]=g,e[81]=v,e[82]=k,e[83]=_,e[84]=E,e[85]=T,e[86]=C):C=e[86];let R;e[87]!==t.routes||e[88]!==y||e[89]!==C?(R=r.jsx(he,{rows:t.routes,rowKey:He,empty:K,hoverKey:Oe,keyboardNav:y,columns:C}),e[87]=t.routes,e[88]=y,e[89]=C,e[90]=R):R=e[90];let U;return e[91]!==x||e[92]!==R||e[93]!==u?(U=r.jsx(be,{title:"Requests",children:r.jsxs(me,{children:[D,u,x,R]})}),e[91]=x,e[92]=R,e[93]=u,e[94]=U):U=e[94],U}function Se(t){return re(t.max)}function Pe(t){return re(t.avg)}function Ee(t){return qe(t.errors,t.count)}function we(t){return $(t.count)}function Te(t){return r.jsx("span",{className:t.errors?"text-destructive":"",children:$(t.errors)})}function Ce(t){return $(t.client_errors)}function Re(t){return $(t.count-t.errors-t.client_errors)}function Me(t){return r.jsx(_e,{data:t.sparkline,hoverKey:t.group_hash})}function Oe(t){return t.group_hash}function He(t){return t.group_hash}export{Xe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as te,c as ae,u as le,j as r,d as re,L as ie}from"./inertia-
|
|
1
|
+
import{Q as te,c as ae,u as le,j as r,d as re,L as ie}from"./inertia-b7M33AzA.js";import{C as oe}from"./chart-panel-XD8qJDmg.js";import{D as ne}from"./data-table-Bzj8zcao.js";import{E as me,aa as ue}from"./app-layout-CpEbDy93.js";import{E as ce,P as fe}from"./env-layout-Dic4A8Kn.js";import{b as he}from"./series-chart-FBOfRLhK.js";import{S as Y,a as de}from"./stat-nY8iS5q9.js";import{c as a,w as ye,m as _e}from"./format-B9SDkrWj.js";import{rate as Z,crashFreeTone as se}from"./release-health-CIxeXQ_e.js";import"./chart-hover-B5cFOZ24.js";import"./use-live-rp6jfGac.js";import"./segmented-CJq8WOHZ.js";import"./chart-CD6EHDjG.js";import"./arrow-up-DAODKT5N.js";function xe(s,e,K,q){const F=String(te(s,e,K,q)),[H,u]=F.split("?");return`${H.replace(/\./g,"%2E")}${u?`?${u}`:""}`}function Ke(s){const e=ae.c(98),{environment:K,window:q}=le().props,F=K.application_id,H=K.id;let u;e[0]!==F||e[1]!==H||e[2]!==q?(u=t=>xe(F,H,t.deploy,{window:q}),e[0]=F,e[1]=H,e[2]=q,e[3]=u):u=e[3];const l=u;let c,f,h,i,d,y,_,x,k,o,v,n;if(e[4]!==s.series||e[5]!==s.summary.crash_free_sessions||e[6]!==s.summary.crash_free_users||e[7]!==s.summary.releases||e[8]!==s.summary.sessions||e[9]!==s.summary.users){const t=s.series.reduce(Ce,{ok:0,errored:0,crashed:0});f=ce,v="Releases",e[22]===Symbol.for("react.memo_cache_sentinel")?(n=r.jsx(fe,{title:"Releases",description:"Sessions per deploy, and how many of them ended without a crash. A release is the deploy stamped on every record the gem ships."}),e[22]=n):n=e[22];let m;e[23]!==s.summary.crash_free_sessions?(m=Z(s.summary.crash_free_sessions),e[23]=s.summary.crash_free_sessions,e[24]=m):m=e[24];let N;e[25]!==s.summary.crash_free_sessions?(N=se(s.summary.crash_free_sessions),e[25]=s.summary.crash_free_sessions,e[26]=N):N=e[26];let P;e[27]!==m||e[28]!==N?(P=r.jsx(Y,{label:"Crash-free sessions",value:m,tone:N}),e[27]=m,e[28]=N,e[29]=P):P=e[29];let T;e[30]!==s.summary.crash_free_users?(T=Z(s.summary.crash_free_users),e[30]=s.summary.crash_free_users,e[31]=T):T=e[31];let $;e[32]!==s.summary.crash_free_users?($=se(s.summary.crash_free_users),e[32]=s.summary.crash_free_users,e[33]=$):$=e[33];let A;e[34]!==T||e[35]!==$?(A=r.jsx(Y,{label:"Crash-free users",value:T,tone:$}),e[34]=T,e[35]=$,e[36]=A):A=e[36];let D;e[37]!==s.summary.sessions?(D=a(s.summary.sessions),e[37]=s.summary.sessions,e[38]=D):D=e[38];let X;e[39]!==s.summary.users?(X=a(s.summary.users),e[39]=s.summary.users,e[40]=X):X=e[40];const ee=`${X} users`;let O;e[41]!==D||e[42]!==ee?(O=r.jsx(Y,{label:"Sessions",value:D,hint:ee}),e[41]=D,e[42]=ee,e[43]=O):O=e[43];let L;e[44]!==s.summary.releases?(L=a(s.summary.releases),e[44]=s.summary.releases,e[45]=L):L=e[45];let M;e[46]!==L?(M=r.jsx(Y,{label:"Active releases",value:L}),e[46]=L,e[47]=M):M=e[47],e[48]!==P||e[49]!==A||e[50]!==O||e[51]!==M?(i=r.jsxs(de,{children:[P,A,O,M]}),e[48]=P,e[49]=A,e[50]=O,e[51]=M,e[52]=i):i=e[52],c=oe,k="Sessions by status",e[53]!==s.summary.sessions?(o=a(s.summary.sessions),e[53]=s.summary.sessions,e[54]=o):o=e[54],_={key:"ok",label:"ok",value:a(t.ok),color:"var(--ok)"},x={key:"errored",label:"errored",value:a(t.errored),color:"var(--warning)"},h="crashed",d="crashed",y=a(t.crashed),e[4]=s.series,e[5]=s.summary.crash_free_sessions,e[6]=s.summary.crash_free_users,e[7]=s.summary.releases,e[8]=s.summary.sessions,e[9]=s.summary.users,e[10]=c,e[11]=f,e[12]=h,e[13]=i,e[14]=d,e[15]=y,e[16]=_,e[17]=x,e[18]=k,e[19]=o,e[20]=v,e[21]=n}else c=e[10],f=e[11],h=e[12],i=e[13],d=e[14],y=e[15],_=e[16],x=e[17],k=e[18],o=e[19],v=e[20],n=e[21];let b;e[55]!==h||e[56]!==d||e[57]!==y?(b={key:h,label:d,value:y,color:"var(--danger)"},e[55]=h,e[56]=d,e[57]=y,e[58]=b):b=e[58];let g;e[59]!==b||e[60]!==_||e[61]!==x?(g=[_,x,b],e[59]=b,e[60]=_,e[61]=x,e[62]=g):g=e[62];let w;e[63]!==s.series?(w=r.jsx(he,{data:s.series}),e[63]=s.series,e[64]=w):w=e[64];let p;e[65]!==c||e[66]!==g||e[67]!==w||e[68]!==k||e[69]!==o?(p=r.jsx(c,{label:k,value:o,legend:g,children:w}),e[65]=c,e[66]=g,e[67]=w,e[68]=k,e[69]=o,e[70]=p):p=e[70];let Q;e[71]===Symbol.for("react.memo_cache_sentinel")?(Q=r.jsx(me,{icon:ue,title:"No releases in this window",description:"A release appears once a deploy is recorded and the app reports sessions for it."}),e[71]=Q):Q=e[71];let j,S;e[72]!==l?(j=t=>re.visit(l(t)),S={onOpen:(t,m)=>m?.newTab?globalThis.window.open(l(t),"_blank"):re.visit(l(t))},e[72]=l,e[73]=j,e[74]=S):(j=e[73],S=e[74]);let C;e[75]!==l?(C={key:"ref",header:"Release",cell:t=>r.jsx(ie,{className:"font-mono text-xs hover:underline",href:l(t),children:t.ref})},e[75]=l,e[76]=C):C=e[76];let z,B,G,I,J,U,V;e[77]===Symbol.for("react.memo_cache_sentinel")?(z={key:"at",header:"Deployed",cell:je},B={key:"adoption",header:"Adoption",align:"right",cell:pe},G={key:"sessions",header:"Sessions",align:"right",cell:we},I={key:"cfs",header:"Crash-free sessions",align:"right",cell:ge},J={key:"cfu",hideOnMobile:!0,header:"Crash-free users",align:"right",cell:be},U={key:"issues",hideOnMobile:!0,header:"New issues",align:"right",cell:ve},V={key:"duration",hideOnMobile:!0,header:"Duration",align:"right",cell:ke},e[77]=z,e[78]=B,e[79]=G,e[80]=I,e[81]=J,e[82]=U,e[83]=V):(z=e[77],B=e[78],G=e[79],I=e[80],J=e[81],U=e[82],V=e[83]);let E;e[84]!==C?(E=[C,z,B,G,I,J,U,V],e[84]=C,e[85]=E):E=e[85];let R;e[86]!==s.releases||e[87]!==j||e[88]!==S||e[89]!==E?(R=r.jsx(ne,{rows:s.releases,rowKey:Se,empty:Q,onRowClick:j,keyboardNav:S,columns:E}),e[86]=s.releases,e[87]=j,e[88]=S,e[89]=E,e[90]=R):R=e[90];let W;return e[91]!==f||e[92]!==i||e[93]!==p||e[94]!==R||e[95]!==v||e[96]!==n?(W=r.jsxs(f,{title:v,children:[n,i,p,R]}),e[91]=f,e[92]=i,e[93]=p,e[94]=R,e[95]=v,e[96]=n,e[97]=W):W=e[97],W}function ke(s){return _e(s.avg_duration_ms)}function ve(s){return r.jsx("span",{className:s.new_issues?"text-destructive":"",children:a(s.new_issues)})}function be(s){return Z(s.crash_free_users)}function ge(s){return r.jsx("span",{className:se(s.crash_free_sessions)==="destructive"?"text-destructive font-semibold":"font-semibold",children:Z(s.crash_free_sessions)})}function we(s){return a(s.sessions)}function pe(s){return`${s.adoption}%`}function je(s){return r.jsx("span",{className:"text-xs",children:ye(s.deployed_at)})}function Se(s){return s.deploy}function Ce(s,e){return{ok:s.ok+e.ok,errored:s.errored+e.errored,crashed:s.crashed+e.crashed}}export{Ke as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as ae,j as t,o as ie,u as re,r as W,ab as le,ao as oe,F as G,d as O,ap as de,aq as J}from"./inertia-
|
|
1
|
+
import{c as ae,j as t,o as ie,u as re,r as W,ab as le,ao as oe,F as G,d as O,ap as de,aq as J}from"./inertia-b7M33AzA.js";import{D as Q}from"./data-table-Bzj8zcao.js";import{ar as i,a8 as h,b as F,E as X,au as Y}from"./app-layout-CpEbDy93.js";import{P as me,E as ce}from"./env-layout-Dic4A8Kn.js";import{R as ue}from"./relative-time-CJX4HXBB.js";import{b as Z,c as ee,C as te,a as se}from"./card-C4EFUWG1.js";import"./chart-hover-B5cFOZ24.js";import"./use-live-rp6jfGac.js";import"./format-B9SDkrWj.js";import"./segmented-CJq8WOHZ.js";function S(s){const e=ae.c(8);let l,r,c;e[0]!==s?({messages:l,className:c,...r}=s,e[0]=s,e[1]=l,e[2]=r,e[3]=c):(l=e[1],r=e[2],c=e[3]);const d=c===void 0?"":c;let u;return e[4]!==d||e[5]!==l||e[6]!==r?(u=l?t.jsx("p",{...r,className:ie("text-sm text-red-600 dark:text-red-400",d),children:l.join(", ")}):null,e[4]=d,e[5]=l,e[6]=r,e[7]=u):u=e[7],u}function Ke(s){const e=ae.c(56),{environment:l}=re().props,[r,c]=W.useState(s.kinds[0]),[d,u]=W.useState(s.metrics[0]),[C,ne]=W.useState(s.anomaly_target_kinds[0]),[E,U]=W.useState(s.anomaly_metrics[0]),$=s.anomaly_metrics_for_kind[C]??s.anomaly_metrics,z=s.metrics_for_kind[r]??s.metrics,B=s.units[d]??"ms",H=B==="$"?"Limit (US$)":B==="%"?"Limit (%)":B===""?"Limit (count)":"Limit (ms)",a=l.application_id,n=l.id;let A;e[0]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(me,{withWindow:!1,title:"Thresholds",description:"Performance rules. When a route, job, or query crosses one, Railwatch opens a performance issue and alerts the rules subscribed to thresholds."}),e[0]=A):A=e[0];let R;e[1]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(Z,{children:t.jsx(ee,{children:"Add a threshold"})}),e[1]=R):R=e[1];let x;e[2]!==a||e[3]!==n?(x=le(a,n),e[2]=a,e[3]=n,e[4]=x):x=e[4];let g;e[5]!==z||e[6]!==r||e[7]!==H||e[8]!==d||e[9]!==s.jobs||e[10]!==s.kinds||e[11]!==s.llm_models||e[12]!==s.metrics||e[13]!==s.metrics_for_kind||e[14]!==s.routes?(g=o=>{const{errors:k,processing:I}=o;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid gap-1",children:[t.jsx(i,{htmlFor:"target_kind",children:"Kind"}),t.jsx("select",{id:"target_kind",name:"target_kind",value:r,onChange:m=>{c(m.target.value);const w=s.metrics_for_kind[m.target.value]??s.metrics;w.includes(d)||u(w[0])},className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",children:s.kinds.map(ke)})]}),t.jsxs("div",{className:"grid gap-1 md:col-span-2",children:[t.jsx(i,{htmlFor:"target",children:"Target"}),t.jsx(h,{id:"target",name:"target",defaultValue:"*",list:"targets",placeholder:"* for all, or a route / job name"}),t.jsxs("datalist",{id:"targets",children:[t.jsx("option",{value:"*"}),t.jsx("option",{value:"unmatched"}),s.routes.map(Ne),s.jobs.map(ve),s.llm_models.map(be)]}),t.jsx(S,{messages:k.target})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(i,{htmlFor:"metric",children:"Metric"}),t.jsx("select",{id:"metric",name:"metric",className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",value:d,onChange:m=>u(m.target.value),children:z.map(ye)})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(i,{htmlFor:"limit",children:H}),t.jsx(h,{id:"limit",name:"limit",type:"number",step:"any",defaultValue:2e3}),t.jsx(S,{messages:k.limit})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(i,{htmlFor:"window_minutes",children:"Window (min)"}),t.jsx(h,{id:"window_minutes",name:"window_minutes",type:"number",defaultValue:5})]}),t.jsx("div",{className:"md:col-span-6",children:t.jsx(F,{disabled:I,children:"Add threshold"})})]})},e[5]=z,e[6]=r,e[7]=H,e[8]=d,e[9]=s.jobs,e[10]=s.kinds,e[11]=s.llm_models,e[12]=s.metrics,e[13]=s.metrics_for_kind,e[14]=s.routes,e[15]=g):g=e[15];let j;e[16]!==x||e[17]!==g?(j=t.jsxs(te,{children:[R,t.jsx(se,{children:t.jsx(G,{method:"post",action:x,className:"grid gap-3 md:grid-cols-6",children:g})})]}),e[16]=x,e[17]=g,e[18]=j):j=e[18];let T,L;e[19]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(X,{icon:Y,title:"No thresholds yet",description:"Start with requests * p95 2000ms to get alerted on regressions."}),L={key:"d",header:"Rule",cell:fe},e[19]=T,e[20]=L):(T=e[19],L=e[20]);let p;e[21]!==a||e[22]!==n?(p=[L,{key:"x",header:"",align:"right",cell:o=>t.jsx(F,{size:"sm",variant:"ghost",onClick:()=>O.delete(de(a,n,o.id)),children:"Remove"})}],e[21]=a,e[22]=n,e[23]=p):p=e[23];let f;e[24]!==s.thresholds||e[25]!==p?(f=t.jsx(Q,{rows:s.thresholds,rowKey:_e,empty:T,columns:p}),e[24]=s.thresholds,e[25]=p,e[26]=f):f=e[26];let P;e[27]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsxs("div",{children:[t.jsx("h2",{className:"text-base font-semibold",children:"Anomaly rules"}),t.jsx("p",{className:"text-muted-foreground text-sm",children:"A threshold needs a number you already know. An anomaly rule learns one: it compares the last few minutes against the same clock window on each of the previous days and opens an issue when today sits more than the given number of standard deviations above that baseline."})]}),e[27]=P):P=e[27];let K;e[28]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(Z,{children:t.jsx(ee,{children:"Add an anomaly rule"})}),e[28]=K):K=e[28];let _;e[29]!==a||e[30]!==n?(_=oe(a,n),e[29]=a,e[30]=n,e[31]=_):_=e[31];let y;e[32]!==$||e[33]!==C||e[34]!==E||e[35]!==s.anomaly_metrics||e[36]!==s.anomaly_metrics_for_kind||e[37]!==s.anomaly_target_kinds?(y=o=>{const{errors:k,processing:I}=o;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid gap-1",children:[t.jsx(i,{htmlFor:"anomaly_target_kind",children:"Kind"}),t.jsx("select",{id:"anomaly_target_kind",name:"target_kind",className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",value:C,onChange:m=>{ne(m.target.value);const w=s.anomaly_metrics_for_kind[m.target.value]??s.anomaly_metrics;w.includes(E)||U(w[0])},children:s.anomaly_target_kinds.map(pe)})]}),t.jsxs("div",{className:"grid gap-1 md:col-span-2",children:[t.jsx(i,{htmlFor:"anomaly_target",children:"Target"}),t.jsx(h,{id:"anomaly_target",name:"target",defaultValue:"*",list:"targets",placeholder:"* for all, or a route / job name"}),t.jsx(S,{messages:k.target})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(i,{htmlFor:"anomaly_metric",children:"Metric"}),t.jsx("select",{id:"anomaly_metric",name:"metric",className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",value:E,onChange:m=>U(m.target.value),children:$.map(je)})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(i,{htmlFor:"deviation",children:"Deviation (σ)"}),t.jsx(h,{id:"deviation",name:"deviation",type:"number",step:"0.5",min:"0.5",defaultValue:3}),t.jsx(S,{messages:k.deviation})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(i,{htmlFor:"anomaly_window_minutes",children:"Window (min)"}),t.jsx(h,{id:"anomaly_window_minutes",name:"window_minutes",type:"number",defaultValue:15})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(i,{htmlFor:"baseline_days",children:"Baseline (days)"}),t.jsx(h,{id:"baseline_days",name:"baseline_days",type:"number",defaultValue:7}),t.jsx(S,{messages:k.baseline_days})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(i,{htmlFor:"enabled",children:"Status"}),t.jsxs("select",{id:"enabled",name:"enabled",className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",children:[t.jsx("option",{value:"true",children:"enabled"}),t.jsx("option",{value:"false",children:"disabled"})]})]}),t.jsx("div",{className:"md:col-span-6",children:t.jsx(F,{disabled:I,children:"Add anomaly rule"})})]})},e[32]=$,e[33]=C,e[34]=E,e[35]=s.anomaly_metrics,e[36]=s.anomaly_metrics_for_kind,e[37]=s.anomaly_target_kinds,e[38]=y):y=e[38];let b;e[39]!==_||e[40]!==y?(b=t.jsxs(te,{children:[K,t.jsx(se,{children:t.jsx(G,{method:"post",action:_,className:"grid gap-3 md:grid-cols-6",children:y})})]}),e[39]=_,e[40]=y,e[41]=b):b=e[41];let V,M,q;e[42]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(X,{icon:Y,title:"No anomaly rules yet",description:"Start with requests * p95 at 3σ over a 7-day baseline."}),M={key:"d",header:"Rule",cell:xe},q={key:"f",header:"Last fired",hideOnMobile:!0,cell:he},e[42]=V,e[43]=M,e[44]=q):(V=e[42],M=e[43],q=e[44]);let v;e[45]!==a||e[46]!==n?(v=[M,q,{key:"x",header:"",align:"right",cell:o=>t.jsxs("span",{className:"flex justify-end gap-1",children:[t.jsx(F,{size:"sm",variant:"ghost",onClick:()=>O.patch(J(a,n,o.id),{enabled:!o.enabled}),children:o.enabled?"Disable":"Enable"}),t.jsx(F,{size:"sm",variant:"ghost",className:"text-destructive",onClick:()=>O.delete(J(a,n,o.id)),children:"Remove"})]})}],e[45]=a,e[46]=n,e[47]=v):v=e[47];let N;e[48]!==s.anomaly_rules||e[49]!==v?(N=t.jsx(Q,{rows:s.anomaly_rules,rowKey:ge,empty:V,columns:v}),e[48]=s.anomaly_rules,e[49]=v,e[50]=N):N=e[50];let D;return e[51]!==b||e[52]!==N||e[53]!==j||e[54]!==f?(D=t.jsxs(ce,{title:"Thresholds",children:[A,j,f,P,b,N]}),e[51]=b,e[52]=N,e[53]=j,e[54]=f,e[55]=D):D=e[55],D}function he(s){return t.jsx(ue,{iso:s.last_fired_at,className:"text-muted-foreground font-mono text-xs"})}function xe(s){return t.jsxs("span",{className:"text-sm",children:[s.description,s.enabled?null:t.jsx("span",{className:"text-muted-foreground label-caps ml-2",children:"disabled"})]})}function ge(s){return s.id}function je(s){return t.jsx("option",{value:s,children:s},s)}function pe(s){return t.jsx("option",{value:s,children:s},s)}function fe(s){return t.jsx("span",{className:"text-sm",children:s.description})}function _e(s){return s.id}function ye(s){return t.jsx("option",{value:s,children:s},s)}function be(s){return t.jsx("option",{value:s},s)}function ve(s){return t.jsx("option",{value:s},s)}function Ne(s){return t.jsx("option",{value:s},s)}function ke(s){return t.jsx("option",{value:s,children:s},s)}export{Ke as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as M,u as R,j as n,f as A,d as D,L}from"./inertia-
|
|
1
|
+
import{c as M,u as R,j as n,f as A,d as D,L}from"./inertia-b7M33AzA.js";import{D as N}from"./data-table-Bzj8zcao.js";import{E as O,as as E}from"./app-layout-CpEbDy93.js";import{P,E as H}from"./env-layout-Dic4A8Kn.js";import{c as K,m as j,w as $}from"./format-B9SDkrWj.js";import"./chart-hover-B5cFOZ24.js";import"./use-live-rp6jfGac.js";import"./segmented-CJq8WOHZ.js";function re(t){const e=M.c(25),{environment:S}=R().props,w=S.application_id,b=S.id;let c;e[0]!==w||e[1]!==b?(c=r=>r.execution_id?A(w,b,r.execution_id):null,e[0]=w,e[1]=b,e[2]=c):c=e[2];const o=c;let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(P,{title:"Storage",description:"Active Storage service operations: uploads, downloads, deletes, URL generation, analysis, and transforms."}),e[3]=m):m=e[3];let u,d;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(O,{icon:E,title:"No storage operations in this window",description:"Active Storage reads and writes instrumented by the gem appear here."}),d=[{key:"s",header:"Service",cell:G},{key:"o",header:"Operation",cell:F},{key:"n",header:"Count",align:"right",cell:B},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:z},{key:"max",hideOnMobile:!0,header:"Max",align:"right",cell:W}],e[4]=u,e[5]=d):(u=e[4],d=e[5]);let i;e[6]!==t.ops?(i=n.jsx(N,{rows:t.ops,rowKey:J,empty:u,columns:d}),e[6]=t.ops,e[7]=i):i=e[7];let p;e[8]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx("h2",{className:"text-sm font-semibold",children:"Recent"}),e[8]=p):p=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(O,{icon:E,title:"No storage operations in this window",description:"Active Storage reads and writes instrumented by the gem appear here."}),e[9]=f):f=e[9];let s;e[10]!==o?(s={onOpen:(r,v)=>{const k=o(r);k&&(v?.newTab?window.open(k,"_blank"):D.visit(k))}},e[10]=o,e[11]=s):s=e[11];let h,x,y,_;e[12]===Symbol.for("react.memo_cache_sentinel")?(y={key:"when",header:"When",cell:I},_={key:"o",header:"Op",cell:C},h={key:"k",hideOnMobile:!0,header:"Key",cell:q},x={key:"d",header:"Duration",align:"right",cell:T},e[12]=h,e[13]=x,e[14]=y,e[15]=_):(h=e[12],x=e[13],y=e[14],_=e[15]);let a;e[16]!==o?(a=[y,_,h,x,{key:"in",hideOnMobile:!0,header:"In",cell:r=>{const v=o(r);return v?n.jsx(L,{className:"font-mono text-xs hover:underline",href:v,children:r.execution_preview}):null}}],e[16]=o,e[17]=a):a=e[17];let l;e[18]!==t.recent||e[19]!==a||e[20]!==s?(l=n.jsx(N,{rows:t.recent,rowKey:U,empty:f,keyboardNav:s,columns:a}),e[18]=t.recent,e[19]=a,e[20]=s,e[21]=l):l=e[21];let g;return e[22]!==l||e[23]!==i?(g=n.jsxs(H,{title:"Storage",children:[m,i,p,l]}),e[22]=l,e[23]=i,e[24]=g):g=e[24],g}function T(t){return j(t.duration)}function q(t){return n.jsx("span",{className:"font-mono text-xs",children:t.key})}function C(t){return n.jsxs("span",{className:"font-mono text-xs",children:[t.service," ",t.op]})}function I(t){return n.jsx("span",{className:"text-xs",children:$(t.occurred_at)})}function U(t){return t.id}function W(t){return j(t.max)}function z(t){return j(t.avg)}function B(t){return K(t.count)}function F(t){return n.jsx("span",{className:"font-mono text-xs",children:t.op})}function G(t){return t.service}function J(t){return`${t.service}-${t.op}`}export{re as default};
|