railwatch 0.3.5 → 0.3.6
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 +9 -2
- data/app/channels/railwatch/environment_channel.rb +17 -4
- data/app/models/railwatch/ingest/batch.rb +1 -1
- data/app/models/railwatch/ingest/mapper.rb +1 -3
- data/docs/embedded.md +17 -6
- data/docs/getting-started.md +0 -2
- data/docs/source-maps.md +1 -3
- data/lib/generators/railwatch/install/install_generator.rb +0 -8
- data/lib/railwatch/backtrace.rb +12 -2
- data/lib/railwatch/configuration.rb +6 -5
- data/lib/railwatch/engine.rb +2 -2
- data/lib/railwatch/export/client.rb +10 -3
- data/lib/railwatch/reporter.rb +2 -12
- data/lib/railwatch/source_maps.rb +13 -1
- data/lib/railwatch/spec_helper.rb +1 -1
- data/lib/railwatch/transport/http.rb +14 -5
- data/lib/railwatch/version.rb +1 -1
- data/public/railwatch/assets/{app-layout-CdJ5Qjms.js → app-layout-B5Fcdwfz.js} +1 -1
- data/public/railwatch/assets/{app-wordmark-B-0yZiDb.js → app-wordmark-1SRllgHv.js} +1 -1
- data/public/railwatch/assets/{appearance-CU28GBf1.js → appearance-DbwahDrc.js} +1 -1
- data/public/railwatch/assets/{arrow-up-DY1fS0tD.js → arrow-up-DwKQcab4.js} +1 -1
- data/public/railwatch/assets/{auth-layout-C3FKuUJz.js → auth-layout-DXfxXAN_.js} +1 -1
- data/public/railwatch/assets/{badge-DKvItdlb.js → badge-CApjyWcg.js} +1 -1
- data/public/railwatch/assets/{braces-Bse5Gh3K.js → braces-kGSgxWnS.js} +1 -1
- data/public/railwatch/assets/{card-C9j_ffR9.js → card-BaJ8kNkp.js} +1 -1
- data/public/railwatch/assets/{chart-Cmh6JEww.js → chart-Xnrz1Nqw.js} +1 -1
- data/public/railwatch/assets/{chart-hover-B0SjyWFy.js → chart-hover-XYPNE2CX.js} +1 -1
- data/public/railwatch/assets/{chart-panel-DKNxoauI.js → chart-panel-BYk68mJJ.js} +1 -1
- data/public/railwatch/assets/{checkbox-BsBkRg5n.js → checkbox-Bf41R8W6.js} +1 -1
- data/public/railwatch/assets/{code-C879Qwgg.js → code-a-9sh36A.js} +1 -1
- data/public/railwatch/assets/{copy-block-DtO_3esq.js → copy-block-zykZWQym.js} +1 -1
- data/public/railwatch/assets/{copy-id-SeLCKsW2.js → copy-id-b6CW5ESL.js} +1 -1
- data/public/railwatch/assets/{cursor-load-more-OpHbe_kE.js → cursor-load-more-0cHzbTPT.js} +1 -1
- data/public/railwatch/assets/{data-table-Bc3ZRnpb.js → data-table-IvA7xvrK.js} +1 -1
- data/public/railwatch/assets/{edit-DDvf9mkq.js → edit-7lmf3k80.js} +1 -1
- data/public/railwatch/assets/{edit-BMpgcQhU.js → edit-DTtRV1fO.js} +1 -1
- data/public/railwatch/assets/{edit-CTD1jSWh.js → edit-ZKE15r-F.js} +1 -1
- data/public/railwatch/assets/{empty-state-CkPROZB0.js → empty-state-BFTnQ2oT.js} +1 -1
- data/public/railwatch/assets/{env-layout-aGQgTZRg.js → env-layout-erSDpIXg.js} +1 -1
- data/public/railwatch/assets/{execution-path-BX5NcXUZ.js → execution-path-Di5uUHi-.js} +1 -1
- data/public/railwatch/assets/{filter-bar-C0O2rJVr.js → filter-bar-Btm__gQi.js} +1 -1
- data/public/railwatch/assets/{flamegraph-Vj4QSAlT.js → flamegraph-C-mZdqa7.js} +1 -1
- data/public/railwatch/assets/{frames-CTiGwm4E.js → frames-KZBsjg6-.js} +1 -1
- data/public/railwatch/assets/{google-sign-in-button-BzogBGeF.js → google-sign-in-button-DJRoD72g.js} +1 -1
- data/public/railwatch/assets/{index-chS28dvS.js → index-9LL_C3eG.js} +1 -1
- data/public/railwatch/assets/{index-C__S10ze.js → index-B-bSm1jB.js} +1 -1
- data/public/railwatch/assets/{index-Dy7Wg880.js → index-B0VXzXYG.js} +1 -1
- data/public/railwatch/assets/{index-B-kuWp-m.js → index-BAkZNNEh.js} +1 -1
- data/public/railwatch/assets/{index-CPQKOQxV.js → index-BWSyQRZI.js} +1 -1
- data/public/railwatch/assets/{index-FgpFDA1Z.js → index-Bjw4sTXU.js} +1 -1
- data/public/railwatch/assets/{index-D9cV-IQr.js → index-Bo8hrjbs.js} +1 -1
- data/public/railwatch/assets/{index-BCLvKVhP.js → index-BoTOVM0v.js} +1 -1
- data/public/railwatch/assets/{index-y2c8xKzI.js → index-Bot7kHMA.js} +1 -1
- data/public/railwatch/assets/{index-DbyRgbzQ.js → index-BsrCnQqg.js} +1 -1
- data/public/railwatch/assets/{index-BKgAm-w2.js → index-BtSlLmkg.js} +1 -1
- data/public/railwatch/assets/{index-DigUOHQ8.js → index-CAzQkw-h.js} +1 -1
- data/public/railwatch/assets/{index-ChQ1_u8u.js → index-CBJZQgHA.js} +1 -1
- data/public/railwatch/assets/{index-uuKg6Zqn.js → index-CIUl9POV.js} +1 -1
- data/public/railwatch/assets/{index-DepurF6s.js → index-CP6jrrPT.js} +1 -1
- data/public/railwatch/assets/{index-Bvy021Vv.js → index-CU6yhEyt.js} +1 -1
- data/public/railwatch/assets/{index-B2_QluAw.js → index-CX8Br7m9.js} +1 -1
- data/public/railwatch/assets/{index-Dcxd_H-U.js → index-CYYmZpZu.js} +1 -1
- data/public/railwatch/assets/{index-DxuDLoTc.js → index-CeqMDByC.js} +1 -1
- data/public/railwatch/assets/{index-D3Axxkk2.js → index-Cj3_jD1E.js} +1 -1
- data/public/railwatch/assets/{index-D5YVcrqR.js → index-D4968-TC.js} +1 -1
- data/public/railwatch/assets/{index-DkgImCOg.js → index-DAEzO_vq.js} +1 -1
- data/public/railwatch/assets/{index-CtT4T6kp.js → index-DBTxQw77.js} +1 -1
- data/public/railwatch/assets/{index-CCLMaY9k.js → index-DCAho97K.js} +1 -1
- data/public/railwatch/assets/{index-jSEU_Yp7.js → index-DEfu_YvU.js} +1 -1
- data/public/railwatch/assets/{index-CY6lbwAC.js → index-DXUwhSCQ.js} +1 -1
- data/public/railwatch/assets/{index-Wb_U2_hz.js → index-DcItJxa5.js} +1 -1
- data/public/railwatch/assets/{index-CD4HIHq0.js → index-EGU__DOB.js} +1 -1
- data/public/railwatch/assets/{index-LaTKDe0-.js → index-HCJmFcZu.js} +1 -1
- data/public/railwatch/assets/{index-BRN_bXV_.js → index-P_e_cI0O.js} +1 -1
- data/public/railwatch/assets/{index-Ble4RoA3.js → index-QyHE9WsU.js} +1 -1
- data/public/railwatch/assets/{index-B69Iad2U.js → index-Z1c4nFL0.js} +1 -1
- data/public/railwatch/assets/{index-z2YfKBJl.js → index-kNhZPLVj.js} +1 -1
- data/public/railwatch/assets/{index-CxU1Jj35.js → index-uHBVO8Lh.js} +1 -1
- data/public/railwatch/assets/{index-Dep2XomH.js → index-wOj5j0KC.js} +1 -1
- data/public/railwatch/assets/{inertia-CgBdJDaE.js → inertia-Degv_G9N.js} +2 -2
- data/public/railwatch/assets/{input-error-DfpIawjl.js → input-error-C6SqO_iU.js} +1 -1
- data/public/railwatch/assets/{json-viewer-CH7nEIUs.js → json-viewer-DcQIxT86.js} +1 -1
- data/public/railwatch/assets/{klass-BTg1l2AO.js → klass-WgQEfWpo.js} +1 -1
- data/public/railwatch/assets/{label-BWgQzHCO.js → label-B_vK19tR.js} +1 -1
- data/public/railwatch/assets/{layout-neknbxn-.js → layout-C8q7GUlZ.js} +1 -1
- data/public/railwatch/assets/{live-dot-Bejk0a5o.js → live-dot-DaXEbkXo.js} +1 -1
- data/public/railwatch/assets/{nav-C1M8941-.js → nav-BnD5XArZ.js} +1 -1
- data/public/railwatch/assets/{new-BnGIYM37.js → new-BL9OqXHe.js} +1 -1
- data/public/railwatch/assets/{new-DGYPcz7w.js → new-BhRnQn4w.js} +1 -1
- data/public/railwatch/assets/{new-DElC-JCS.js → new-BqP0NhOF.js} +1 -1
- data/public/railwatch/assets/{new-bBwawsEg.js → new-CWP3wtwt.js} +1 -1
- data/public/railwatch/assets/{new-B8CzyoMu.js → new-DIjwu2jF.js} +1 -1
- data/public/railwatch/assets/{new-DLgCLBiW.js → new-uxMnBtoY.js} +1 -1
- data/public/railwatch/assets/{onboarding-CW0jUhHT.js → onboarding-C_Y3xTsH.js} +1 -1
- data/public/railwatch/assets/{origin-identity-bJMxeEHB.js → origin-identity-CNhOnfBa.js} +1 -1
- data/public/railwatch/assets/{percentile-picker-DLAnTKY3.js → percentile-picker-BujVEhP6.js} +1 -1
- data/public/railwatch/assets/{relative-time-BHbJh8HW.js → relative-time-6CoKr1lN.js} +1 -1
- data/public/railwatch/assets/{release-health-2O1GRclB.js → release-health-1Qzc_XhT.js} +1 -1
- data/public/railwatch/assets/{route-DSw8aIZa.js → route-xqgYjOwJ.js} +1 -1
- data/public/railwatch/assets/{segmented-Dg8CES94.js → segmented-CVKq2Xpa.js} +1 -1
- data/public/railwatch/assets/{select-CqKpvI98.js → select-CsmSXsJ4.js} +1 -1
- data/public/railwatch/assets/{separator-BOp2LHw3.js → separator-CrM10Oot.js} +1 -1
- data/public/railwatch/assets/{series-chart-COEtj3PY.js → series-chart-D33UhdG2.js} +1 -1
- data/public/railwatch/assets/{show-DrhEDGPn.js → show-8H9WAGav.js} +1 -1
- data/public/railwatch/assets/{show-dRDz8OVu.js → show-9jDeBNpc.js} +1 -1
- data/public/railwatch/assets/{show-C-xpDkoj.js → show-B0nHy31L.js} +1 -1
- data/public/railwatch/assets/{show-B7Zqjlqc.js → show-B3izvRdU.js} +1 -1
- data/public/railwatch/assets/{show-CGv85sRo.js → show-B7NhcWgp.js} +1 -1
- data/public/railwatch/assets/{show-Zr2xV4OD.js → show-BM-E2iYc.js} +1 -1
- data/public/railwatch/assets/{show-B40560ZT.js → show-BlNR3ZOZ.js} +1 -1
- data/public/railwatch/assets/{show-C9Y1To9_.js → show-CJMeX75E.js} +1 -1
- data/public/railwatch/assets/{show-BAxMoNvw.js → show-CMisHNAI.js} +1 -1
- data/public/railwatch/assets/{show-HjjzcKRq.js → show-CQ4Ze-Un.js} +1 -1
- data/public/railwatch/assets/{show-CPh-7VGL.js → show-CvNV23gH.js} +1 -1
- data/public/railwatch/assets/{show-DqtE0LI6.js → show-DMZlwzL_.js} +1 -1
- data/public/railwatch/assets/{show-C_9M2nLy.js → show-DUwQlohF.js} +1 -1
- data/public/railwatch/assets/{show-DFlP1ktM.js → show-DZwcZZrz.js} +1 -1
- data/public/railwatch/assets/{show-B_QVoqKE.js → show-ixK2r2f1.js} +1 -1
- data/public/railwatch/assets/{show-pbkvGRER.js → show-rysBbvt-.js} +1 -1
- data/public/railwatch/assets/{show-Bbs1i46N.js → show-zxVxhUel.js} +1 -1
- data/public/railwatch/assets/{sort-header-DBxQ_KFX.js → sort-header-CKj_7G3U.js} +1 -1
- data/public/railwatch/assets/{sparkline-cell-BbfXw3kA.js → sparkline-cell-Ckg29yVq.js} +1 -1
- data/public/railwatch/assets/{stat-Cd8QaTGw.js → stat-TxvoBiC8.js} +1 -1
- data/public/railwatch/assets/{status-badge-Ys4b0fcG.js → status-badge-5NCVJHjo.js} +1 -1
- data/public/railwatch/assets/{tenant-path-CQWzaNYR.js → tenant-path-B5ZRK4x3.js} +1 -1
- data/public/railwatch/assets/{text-link-BY8FY-CJ.js → text-link-BPllRj0F.js} +1 -1
- data/public/railwatch/assets/{textarea-Bq2jjOMC.js → textarea-DtD5yZp_.js} +1 -1
- data/public/railwatch/assets/{timeline-SxStCFO2.js → timeline-DZz5ZnHN.js} +1 -1
- data/public/railwatch/assets/{transition-CQ9yvfPa.js → transition-Ds6Cakuc.js} +1 -1
- data/public/railwatch/assets/{use-clipboard-3hTXU91g.js → use-clipboard-BLjjYH8V.js} +1 -1
- data/public/railwatch/assets/{use-live-LwJStJvD.js → use-live-GKze1mNC.js} +1 -1
- data/public/railwatch/manifest.json +1285 -1285
- metadata +115 -115
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as F,r as D,j as s,L as w,J as O,e as S,t as T,ae as Q,c as L}from"./inertia-
|
|
1
|
+
import{u as F,r as D,j as s,L as w,J as O,e as S,t as T,ae as Q,c as L}from"./inertia-Degv_G9N.js";import{S as _}from"./code-a-9sh36A.js";import{C as R}from"./cursor-load-more-0cHzbTPT.js";import{D as q}from"./data-table-IvA7xvrK.js";import{E as z}from"./empty-state-BFTnQ2oT.js";import{F as B}from"./filter-bar-Btm__gQi.js";import{u as K,E as $,P as A}from"./env-layout-erSDpIXg.js";import{u as H,P as I}from"./percentile-picker-BujVEhP6.js";import{S as k}from"./sort-header-CKj_7G3U.js";import{S as J}from"./sparkline-cell-Ckg29yVq.js";import{a as U,S as C}from"./stat-TxvoBiC8.js";import{B as W}from"./app-wordmark-1SRllgHv.js";import{C as G,b as V,c as X,a as Y}from"./card-BaJ8kNkp.js";import{u as Z,C as ee}from"./use-clipboard-BLjjYH8V.js";import{c as E,m as f}from"./format-B9SDkrWj.js";import{C as se,a as oe,D as re}from"./app-layout-B5Fcdwfz.js";import{C as te}from"./index-CX8Br7m9.js";import"./chart-hover-XYPNE2CX.js";import"./badge-CApjyWcg.js";import"./use-live-GKze1mNC.js";import"./live-dot-DaXEbkXo.js";import"./index-B0VXzXYG.js";import"./segmented-CVKq2Xpa.js";import"./label-B_vK19tR.js";import"./arrow-up-DwKQcab4.js";import"./series-chart-D33UhdG2.js";import"./chart-Xnrz1Nqw.js";import"./checkbox-Bf41R8W6.js";const ae=1500;function ie(r){const o=L.c(20),{suggestion:a}=r,[,d]=Z(),[u,v]=D.useState(!1);let m;o[0]!==d||o[1]!==a.code?(m=()=>{d(a.code).then(g=>{g&&(v(!0),window.setTimeout(()=>v(!1),ae))})},o[0]=d,o[1]=a.code,o[2]=m):m=o[2];const y=m;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(te,{className:"size-3 text-emerald-500"}):s.jsx(ee,{className:"size-3 opacity-60"}),o[7]=u,o[8]=c):c=o[8];let h;o[9]!==l||o[10]!==c?(h=s.jsxs(W,{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]=h):h=o[11];let p;o[12]!==n||o[13]!==h?(p=s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[n,h]}),o[12]=n,o[13]=h,o[14]=p):p=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]!==p||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:[p,t]}),o[17]=p,o[18]=t,o[19]=x):x=o[19],x}function Fe(r){const{environment:o,window:a,range:d}=F().props,{percentile:u}=H(),{label:v}=K(),[m,y]=D.useState(null),n=o.application_id,l=o.id,c=a==="custom"?{from:d?.from,to:d?.to}:{window:a},h=d?{from:d.from,to:d.to}:c,p=(e,i=r.q)=>Q(n,l,{...e?h: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}`,M=r.n_plus_ones.filter(e=>e.suggestion).length,P=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($,{title:"Queries",children:[s.jsx(A,{title:"Queries",description:"Every SQL shape your app ran, grouped by normalized statement.",actions:s.jsx(I,{})}),s.jsxs(U,{children:[s.jsx(C,{label:"Queries",value:E(t.count),delta:{current:t.count,previous:x.count,goodDirection:"down"},deltaCaption:g}),s.jsx(C,{label:"N+1 groups",value:E(r.n_plus_ones.length),tone:r.n_plus_ones.length>0?"warning":void 0,hint:r.n_plus_ones.length>0?`${M} 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(G,{className:"border-amber-500/40",children:[s.jsx(V,{children:s.jsx(X,{children:"N+1 queries detected"})}),s.jsx(Y,{children:s.jsx(q,{rows:r.n_plus_ones,rowKey:e=>e.group_hash,onRowClick:P,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})}),m===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":m===e.group_hash,"aria-label":`Suggested fix: ${e.suggestion.code}`,onClick:i=>{i.stopPropagation(),P(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:[m===e.group_hash?s.jsx(se,{className:"size-3"}):s.jsx(oe,{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(z,{icon:re,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(J,{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=>E(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(B,{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(p(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:p,only:["slowest","pagination"]})]})}export{Fe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as D,u as P,j as i,t as L,e as A,L as B}from"./inertia-
|
|
1
|
+
import{c as D,u as P,j as i,t as L,e as A,L as B}from"./inertia-Degv_G9N.js";import{D as M}from"./data-table-IvA7xvrK.js";import{E as O}from"./empty-state-BFTnQ2oT.js";import{P as F,E as H}from"./env-layout-erSDpIXg.js";import{c as R,m as j,w as K}from"./format-B9SDkrWj.js";import{B as S}from"./app-layout-B5Fcdwfz.js";import"./chart-hover-XYPNE2CX.js";import"./badge-CApjyWcg.js";import"./app-wordmark-1SRllgHv.js";import"./use-live-GKze1mNC.js";import"./live-dot-DaXEbkXo.js";import"./index-B0VXzXYG.js";import"./index-CX8Br7m9.js";import"./segmented-CVKq2Xpa.js";import"./label-B_vK19tR.js";import"./checkbox-Bf41R8W6.js";function pe(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(F,{title:"Notifications",description:"ActionMailer/Noticed deliveries, grouped by notifier and delivery method."}),e[3]=m):m=e[3];let u,f;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."}),f=[{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]=f):(u=e[4],f=e[5]);let o;e[6]!==t.groups?(o=i.jsx(M,{rows:t.groups,rowKey:V,empty:u,columns:f}),e[6]=t.groups,e[7]=o):o=e[7];let p;e[8]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx("h2",{className:"text-sm font-semibold",children:"Recent"}),e[8]=p):p=e[8];let d;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=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]=d):d=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 h,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},h={key:"dm",hideOnMobile:!0,header:"Delivery method",cell:C},y={key:"f",hideOnMobile:!0,header:"Failed",cell:q},_={key:"d",header:"Duration",align:"right",cell:T},e[12]=h,e[13]=y,e[14]=_,e[15]=x,e[16]=g):(h=e[12],y=e[13],_=e[14],x=e[15],g=e[16]);let s;e[17]!==r?(s=[x,g,h,y,_,{key:"in",hideOnMobile:!0,header:"In",cell:n=>{const v=r(n);return v?i.jsx(B,{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:d,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(H,{title:"Notifications",children:[m,o,p,a]}),e[23]=a,e[24]=o,e[25]=b):b=e[25],b}function T(t){return j(t.duration,3)}function q(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:K(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{pe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as M,u as H,ar as $,j as s,a_ as O,F as V,e as C,a$ as G,b0 as B}from"./inertia-
|
|
1
|
+
import{c as M,u as H,ar as $,j as s,a_ as O,F as V,e as C,a$ as G,b0 as B}from"./inertia-Degv_G9N.js";import{I as b}from"./input-error-C6SqO_iU.js";import{D as L}from"./data-table-IvA7xvrK.js";import{E as D}from"./empty-state-BFTnQ2oT.js";import{P as J,E as Q}from"./env-layout-erSDpIXg.js";import{R as U}from"./relative-time-6CoKr1lN.js";import{B as y}from"./app-wordmark-1SRllgHv.js";import{b as I,c as K,C as W,a as q}from"./card-BaJ8kNkp.js";import{L as i,I as l}from"./label-B_vK19tR.js";import{B as z}from"./live-dot-DaXEbkXo.js";import"./chart-hover-XYPNE2CX.js";import"./badge-CApjyWcg.js";import"./app-layout-B5Fcdwfz.js";import"./index-CX8Br7m9.js";import"./index-B0VXzXYG.js";import"./checkbox-Bf41R8W6.js";import"./use-live-GKze1mNC.js";import"./format-B9SDkrWj.js";import"./segmented-CVKq2Xpa.js";function Ee(t){const e=M.c(46),{environment:P}=H().props,a=P.application_id,r=P.id;let _;e[0]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(J,{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]=_):_=e[0];let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(I,{children:s.jsx(K,{children:"Add a threshold"})}),e[1]=v):v=e[1];let o;e[2]!==a||e[3]!==r?(o=$(a,r),e[2]=a,e[3]=r,e[4]=o):o=e[4];let d;e[5]!==t.jobs||e[6]!==t.kinds||e[7]!==t.metrics||e[8]!==t.routes?(d=n=>{const{errors:f,processing:A}=n;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid gap-1",children:[s.jsx(i,{htmlFor:"target_kind",children:"Kind"}),s.jsx("select",{id:"target_kind",name:"target_kind",className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",children:t.kinds.map(le)})]}),s.jsxs("div",{className:"grid gap-1 md:col-span-2",children:[s.jsx(i,{htmlFor:"target",children:"Target"}),s.jsx(l,{id:"target",name:"target",defaultValue:"*",list:"targets",placeholder:"* for all, or a route / job name"}),s.jsxs("datalist",{id:"targets",children:[s.jsx("option",{value:"*"}),s.jsx("option",{value:"unmatched"}),t.routes.map(ne),t.jobs.map(ie)]}),s.jsx(b,{messages:f.target})]}),s.jsxs("div",{className:"grid gap-1",children:[s.jsx(i,{htmlFor:"metric",children:"Metric"}),s.jsx("select",{id:"metric",name:"metric",className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",children:t.metrics.map(re)})]}),s.jsxs("div",{className:"grid gap-1",children:[s.jsx(i,{htmlFor:"limit",children:"Limit (ms or %)"}),s.jsx(l,{id:"limit",name:"limit",type:"number",step:"any",defaultValue:2e3}),s.jsx(b,{messages:f.limit})]}),s.jsxs("div",{className:"grid gap-1",children:[s.jsx(i,{htmlFor:"window_minutes",children:"Window (min)"}),s.jsx(l,{id:"window_minutes",name:"window_minutes",type:"number",defaultValue:5})]}),s.jsx("div",{className:"md:col-span-6",children:s.jsx(y,{disabled:A,children:"Add threshold"})})]})},e[5]=t.jobs,e[6]=t.kinds,e[7]=t.metrics,e[8]=t.routes,e[9]=d):d=e[9];let m;e[10]!==o||e[11]!==d?(m=s.jsxs(W,{children:[v,s.jsx(q,{children:s.jsx(V,{method:"post",action:o,className:"grid gap-3 md:grid-cols-6",children:d})})]}),e[10]=o,e[11]=d,e[12]=m):m=e[12];let N,w;e[13]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(D,{icon:z,title:"No thresholds yet",description:"Start with requests * p95 2000ms to get alerted on regressions."}),w={key:"d",header:"Rule",cell:te},e[13]=N,e[14]=w):(N=e[13],w=e[14]);let c;e[15]!==a||e[16]!==r?(c=[w,{key:"x",header:"",align:"right",cell:n=>s.jsx(y,{size:"sm",variant:"ghost",onClick:()=>C.delete(G(a,r,n.id)),children:"Remove"})}],e[15]=a,e[16]=r,e[17]=c):c=e[17];let h;e[18]!==t.thresholds||e[19]!==c?(h=s.jsx(L,{rows:t.thresholds,rowKey:ae,empty:N,columns:c}),e[18]=t.thresholds,e[19]=c,e[20]=h):h=e[20];let k;e[21]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsxs("div",{children:[s.jsx("h2",{className:"text-base font-semibold",children:"Anomaly rules"}),s.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[21]=k):k=e[21];let F;e[22]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(I,{children:s.jsx(K,{children:"Add an anomaly rule"})}),e[22]=F):F=e[22];let u;e[23]!==a||e[24]!==r?(u=O(a,r),e[23]=a,e[24]=r,e[25]=u):u=e[25];let x;e[26]!==t.anomaly_metrics||e[27]!==t.anomaly_target_kinds?(x=n=>{const{errors:f,processing:A}=n;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid gap-1",children:[s.jsx(i,{htmlFor:"anomaly_target_kind",children:"Kind"}),s.jsx("select",{id:"anomaly_target_kind",name:"target_kind",className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",children:t.anomaly_target_kinds.map(se)})]}),s.jsxs("div",{className:"grid gap-1 md:col-span-2",children:[s.jsx(i,{htmlFor:"anomaly_target",children:"Target"}),s.jsx(l,{id:"anomaly_target",name:"target",defaultValue:"*",list:"targets",placeholder:"* for all, or a route / job name"}),s.jsx(b,{messages:f.target})]}),s.jsxs("div",{className:"grid gap-1",children:[s.jsx(i,{htmlFor:"anomaly_metric",children:"Metric"}),s.jsx("select",{id:"anomaly_metric",name:"metric",className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",children:t.anomaly_metrics.map(ee)})]}),s.jsxs("div",{className:"grid gap-1",children:[s.jsx(i,{htmlFor:"deviation",children:"Deviation (σ)"}),s.jsx(l,{id:"deviation",name:"deviation",type:"number",step:"0.5",min:"0.5",defaultValue:3}),s.jsx(b,{messages:f.deviation})]}),s.jsxs("div",{className:"grid gap-1",children:[s.jsx(i,{htmlFor:"anomaly_window_minutes",children:"Window (min)"}),s.jsx(l,{id:"anomaly_window_minutes",name:"window_minutes",type:"number",defaultValue:15})]}),s.jsxs("div",{className:"grid gap-1",children:[s.jsx(i,{htmlFor:"baseline_days",children:"Baseline (days)"}),s.jsx(l,{id:"baseline_days",name:"baseline_days",type:"number",defaultValue:7}),s.jsx(b,{messages:f.baseline_days})]}),s.jsxs("div",{className:"grid gap-1",children:[s.jsx(i,{htmlFor:"enabled",children:"Status"}),s.jsxs("select",{id:"enabled",name:"enabled",className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",children:[s.jsx("option",{value:"true",children:"enabled"}),s.jsx("option",{value:"false",children:"disabled"})]})]}),s.jsx("div",{className:"md:col-span-6",children:s.jsx(y,{disabled:A,children:"Add anomaly rule"})})]})},e[26]=t.anomaly_metrics,e[27]=t.anomaly_target_kinds,e[28]=x):x=e[28];let p;e[29]!==u||e[30]!==x?(p=s.jsxs(W,{children:[F,s.jsx(q,{children:s.jsx(V,{method:"post",action:u,className:"grid gap-3 md:grid-cols-6",children:x})})]}),e[29]=u,e[30]=x,e[31]=p):p=e[31];let E,R,S;e[32]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(D,{icon:z,title:"No anomaly rules yet",description:"Start with requests * p95 at 3σ over a 7-day baseline."}),R={key:"d",header:"Rule",cell:Y},S={key:"f",header:"Last fired",hideOnMobile:!0,cell:X},e[32]=E,e[33]=R,e[34]=S):(E=e[32],R=e[33],S=e[34]);let j;e[35]!==a||e[36]!==r?(j=[R,S,{key:"x",header:"",align:"right",cell:n=>s.jsxs("span",{className:"flex justify-end gap-1",children:[s.jsx(y,{size:"sm",variant:"ghost",onClick:()=>C.patch(B(a,r,n.id),{enabled:!n.enabled}),children:n.enabled?"Disable":"Enable"}),s.jsx(y,{size:"sm",variant:"ghost",className:"text-destructive",onClick:()=>C.delete(B(a,r,n.id)),children:"Remove"})]})}],e[35]=a,e[36]=r,e[37]=j):j=e[37];let g;e[38]!==t.anomaly_rules||e[39]!==j?(g=s.jsx(L,{rows:t.anomaly_rules,rowKey:Z,empty:E,columns:j}),e[38]=t.anomaly_rules,e[39]=j,e[40]=g):g=e[40];let T;return e[41]!==p||e[42]!==g||e[43]!==m||e[44]!==h?(T=s.jsxs(Q,{title:"Thresholds",children:[_,m,h,k,p,g]}),e[41]=p,e[42]=g,e[43]=m,e[44]=h,e[45]=T):T=e[45],T}function X(t){return s.jsx(U,{iso:t.last_fired_at,className:"text-muted-foreground font-mono text-xs"})}function Y(t){return s.jsxs("span",{className:"text-sm",children:[t.description,t.enabled?null:s.jsx("span",{className:"text-muted-foreground label-caps ml-2",children:"disabled"})]})}function Z(t){return t.id}function ee(t){return s.jsx("option",{value:t,children:t},t)}function se(t){return s.jsx("option",{value:t,children:t},t)}function te(t){return s.jsx("span",{className:"text-sm",children:t.description})}function ae(t){return t.id}function re(t){return s.jsx("option",{value:t,children:t},t)}function ie(t){return s.jsx("option",{value:t},t)}function ne(t){return s.jsx("option",{value:t},t)}function le(t){return s.jsx("option",{value:t,children:t},t)}export{Ee as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as C,u as S,r as F,j as s,L as z,i as A,b as R,d as B,e as w,f as L}from"./inertia-
|
|
1
|
+
import{c as C,u as S,r as F,j as s,L as z,i as A,b as R,d as B,e as w,f as L}from"./inertia-Degv_G9N.js";import{E as J}from"./empty-state-BFTnQ2oT.js";import{p as O,F as D,s as H}from"./filter-bar-Btm__gQi.js";import{J as I}from"./json-viewer-DcQIxT86.js";import{P as T,E as V}from"./env-layout-erSDpIXg.js";import{R as W}from"./relative-time-6CoKr1lN.js";import{B as $}from"./badge-CApjyWcg.js";import{B as b}from"./app-wordmark-1SRllgHv.js";import{C as G,a as K}from"./app-layout-B5Fcdwfz.js";import"./use-clipboard-BLjjYH8V.js";import"./index-CX8Br7m9.js";import"./use-live-GKze1mNC.js";import"./live-dot-DaXEbkXo.js";import"./index-B0VXzXYG.js";import"./format-B9SDkrWj.js";import"./segmented-CVKq2Xpa.js";import"./label-B_vK19tR.js";import"./checkbox-Bf41R8W6.js";function xe(i){const e=C.c(30),{environment:c}=S().props,[y,E]=F.useState(null);let f;e[0]!==c?(f=t=>{const u=c?R(c.application_id,c.id,{q:t||void 0}):B({q:t||void 0});w.visit(u,{preserveState:!0,preserveScroll:!0})},e[0]=c,e[1]=f):f=e[1];const l=f,P=Q;let x;e[2]!==i.q?(x=O(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(H({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(T,{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 o;e[14]!==i.q||e[15]!==a||e[16]!==l?(o=s.jsx(D,{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]=o):o=e[17];const k=p?"default":"outline";let n;e[18]!==k||e[19]!==_?(n=s.jsx(b,{size:"sm",variant:k,className:"h-8",onClick:_,children:"Failed only"}),e[18]=k,e[19]=_,e[20]=n):n=e[20];let d;e[21]!==o||e[22]!==n?(d=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o,n]}),e[21]=o,e[22]=n,e[23]=d):d=e[23];let m;e[24]!==y||e[25]!==i.alerts?(m=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(G,{className:"text-muted-foreground size-4 shrink-0"}):s.jsx(K,{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($,{variant:t.status==="failed"?"destructive":"outline",className:"capitalize",title:t.error??void 0,children:t.status}),s.jsx(W,{iso:t.sent_at??t.created_at,className:"text-muted-foreground text-xs"}),t.status==="failed"&&s.jsx(b,{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(I,{data:t.payload})]})]},t.id)})}),e[24]=y,e[25]=i.alerts,e[26]=m):m=e[26];let N;return e[27]!==d||e[28]!==m?(N=s.jsxs(V,{title:"Alerts",crumbs:v,children:[j,d,m]}),e[27]=d,e[28]=m,e[29]=N):N=e[29],N}function M(i){return i.stopPropagation()}function Q(i){return w.post(L(i),{},{preserveScroll:!0})}export{xe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as te,u as se,j as s,e as X,am as Y}from"./inertia-
|
|
1
|
+
import{c as te,u as se,j as s,e as X,am as Y}from"./inertia-Degv_G9N.js";import{V as re,D as ie}from"./chart-panel-BYk68mJJ.js";import{D as Z}from"./data-table-IvA7xvrK.js";import{E as le}from"./empty-state-BFTnQ2oT.js";import{F as ne}from"./filter-bar-Btm__gQi.js";import{E as oe,P as ae}from"./env-layout-erSDpIXg.js";import{u as ce,P as me}from"./percentile-picker-BujVEhP6.js";import{S as J}from"./sort-header-CKj_7G3U.js";import{S as ue}from"./sparkline-cell-Ckg29yVq.js";import{a as de,S as pe}from"./stat-TxvoBiC8.js";import{S as fe}from"./status-badge-5NCVJHjo.js";import{c as ee,m as o,p as he,w as xe,b as ge}from"./format-B9SDkrWj.js";import{E as be}from"./app-layout-B5Fcdwfz.js";import"./series-chart-D33UhdG2.js";import"./chart-hover-XYPNE2CX.js";import"./chart-Xnrz1Nqw.js";import"./badge-CApjyWcg.js";import"./app-wordmark-1SRllgHv.js";import"./use-live-GKze1mNC.js";import"./live-dot-DaXEbkXo.js";import"./index-B0VXzXYG.js";import"./index-CX8Br7m9.js";import"./segmented-CVKq2Xpa.js";import"./label-B_vK19tR.js";import"./arrow-up-DwKQcab4.js";import"./checkbox-Bf41R8W6.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 dt(t){const e=te.c(80),{environment:Q,window:a}=se().props,{percentile:r}=ce(),c=Q.application_id,m=Q.id;let L;e[0]!==c||e[1]!==m||e[2]!==t.dir||e[3]!==t.sort||e[4]!==a?(L=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]=L):L=e[5];const i=L;let u,d,n,p;if(e[6]!==t.vitals){const l=ye.filter(E=>t.vitals[E]);u=oe,d="Visits",e[11]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ae,{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(me,{})}),e[11]=n):n=e[11],p=l.length>0?s.jsx(de,{children:l.map(E=>{const K=t.vitals[E];return s.jsx(pe,{label:je[E],value:_e(E,K.value),tone:ve[K.rating],hint:`${K.rating} · p75 of ${ee(K.samples)}`},E)})}):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]=u,e[8]=d,e[9]=n,e[10]=p}else u=e[7],d=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 M,O,D;e[20]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(le,{icon:be,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]=M,e[21]=O,e[22]=D):(M=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:Me},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:M,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(ne,{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:Ee},{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:Le,columns:q}),e[69]=t.recent,e[70]=V):V=e[70];let B;return e[71]!==u||e[72]!==d||e[73]!==n||e[74]!==w||e[75]!==p||e[76]!==N||e[77]!==V||e[78]!==x?(B=s.jsxs(u,{title:d,children:[n,p,x,w,I,N,V]}),e[71]=u,e[72]=d,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 ge(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(fe,{label:t.status,outcome:t.status==="error"?"failed":t.status==="success"?"processed":void 0})}function Ee(t){return s.jsx("span",{className:"text-xs",children:xe(t.occurred_at)})}function Le(t){return t.id}function Me(t){return o(t.inp)}function Oe(t){return o(t.lcp)}function De(t){return o(t.avg)}function Te(t){return he(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{dt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aC as te,c as ae,u as le,j as r,e as re,L as ie}from"./inertia-
|
|
1
|
+
import{aC as te,c as ae,u as le,j as r,e as re,L as ie}from"./inertia-Degv_G9N.js";import{C as oe}from"./chart-panel-BYk68mJJ.js";import{D as ne}from"./data-table-IvA7xvrK.js";import{E as me}from"./empty-state-BFTnQ2oT.js";import{E as ue,P as ce}from"./env-layout-erSDpIXg.js";import{b as fe}from"./series-chart-D33UhdG2.js";import{S as Y,a as he}from"./stat-TxvoBiC8.js";import{c as a,w as de,m as ye}from"./format-B9SDkrWj.js";import{rate as Z,crashFreeTone as se}from"./release-health-1Qzc_XhT.js";import{z as _e}from"./app-layout-B5Fcdwfz.js";import"./chart-hover-XYPNE2CX.js";import"./badge-CApjyWcg.js";import"./app-wordmark-1SRllgHv.js";import"./use-live-GKze1mNC.js";import"./live-dot-DaXEbkXo.js";import"./index-B0VXzXYG.js";import"./index-CX8Br7m9.js";import"./segmented-CVKq2Xpa.js";import"./label-B_vK19tR.js";import"./chart-Xnrz1Nqw.js";import"./arrow-up-DwKQcab4.js";import"./checkbox-Bf41R8W6.js";function pe(s,e,H,q){const z=String(te(s,e,H,q)),[F,u]=z.split("?");return`${F.replace(/\./g,"%2E")}${u?`?${u}`:""}`}function Ve(s){const e=ae.c(98),{environment:H,window:q}=le().props,z=H.application_id,F=H.id;let u;e[0]!==z||e[1]!==F||e[2]!==q?(u=t=>pe(z,F,t.deploy,{window:q}),e[0]=z,e[1]=F,e[2]=q,e[3]=u):u=e[3];const l=u;let c,f,h,i,d,y,_,p,x,o,k,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=ue,k="Releases",e[22]===Symbol.for("react.memo_cache_sentinel")?(n=r.jsx(ce,{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(he,{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,x="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)"},p={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]=p,e[18]=x,e[19]=o,e[20]=k,e[21]=n}else c=e[10],f=e[11],h=e[12],i=e[13],d=e[14],y=e[15],_=e[16],p=e[17],x=e[18],o=e[19],k=e[20],n=e[21];let v;e[55]!==h||e[56]!==d||e[57]!==y?(v={key:h,label:d,value:y,color:"var(--danger)"},e[55]=h,e[56]=d,e[57]=y,e[58]=v):v=e[58];let b;e[59]!==v||e[60]!==_||e[61]!==p?(b=[_,p,v],e[59]=v,e[60]=_,e[61]=p,e[62]=b):b=e[62];let g;e[63]!==s.series?(g=r.jsx(fe,{data:s.series}),e[63]=s.series,e[64]=g):g=e[64];let w;e[65]!==c||e[66]!==b||e[67]!==g||e[68]!==x||e[69]!==o?(w=r.jsx(c,{label:x,value:o,legend:b,children:g}),e[65]=c,e[66]=b,e[67]=g,e[68]=x,e[69]=o,e[70]=w):w=e[70];let K;e[71]===Symbol.for("react.memo_cache_sentinel")?(K=r.jsx(me,{icon:_e,title:"No releases in this window",description:"A release appears once a deploy is recorded and the app reports sessions for it."}),e[71]=K):K=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 B,G,I,J,Q,U,V;e[77]===Symbol.for("react.memo_cache_sentinel")?(B={key:"at",header:"Deployed",cell:je},G={key:"adoption",header:"Adoption",align:"right",cell:we},I={key:"sessions",header:"Sessions",align:"right",cell:ge},J={key:"cfs",header:"Crash-free sessions",align:"right",cell:be},Q={key:"cfu",hideOnMobile:!0,header:"Crash-free users",align:"right",cell:ve},U={key:"issues",hideOnMobile:!0,header:"New issues",align:"right",cell:ke},V={key:"duration",hideOnMobile:!0,header:"Duration",align:"right",cell:xe},e[77]=B,e[78]=G,e[79]=I,e[80]=J,e[81]=Q,e[82]=U,e[83]=V):(B=e[77],G=e[78],I=e[79],J=e[80],Q=e[81],U=e[82],V=e[83]);let E;e[84]!==C?(E=[C,B,G,I,J,Q,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:K,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]!==w||e[94]!==R||e[95]!==k||e[96]!==n?(W=r.jsxs(f,{title:k,children:[n,i,w,R]}),e[91]=f,e[92]=i,e[93]=w,e[94]=R,e[95]=k,e[96]=n,e[97]=W):W=e[97],W}function xe(s){return ye(s.avg_duration_ms)}function ke(s){return r.jsx("span",{className:s.new_issues?"text-destructive":"",children:a(s.new_issues)})}function ve(s){return Z(s.crash_free_users)}function be(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 ge(s){return a(s.sessions)}function we(s){return`${s.adoption}%`}function je(s){return r.jsx("span",{className:"text-xs",children:de(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{Ve as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as D,u as A,au as I,j as s,F as M,aR as G,H,e as p,aS as B,aT as L,aU as $,aV as K}from"./inertia-
|
|
1
|
+
import{c as D,u as A,au as I,j as s,F as M,aR as G,H,e as p,aS as B,aT as L,aU as $,aV as K}from"./inertia-Degv_G9N.js";import{G as O}from"./google-sign-in-button-DJRoD72g.js";import{I as k}from"./input-error-C6SqO_iU.js";import{D as T}from"./data-table-IvA7xvrK.js";import{B as z}from"./badge-CApjyWcg.js";import{B as x}from"./app-wordmark-1SRllgHv.js";import{C as P,b as S,c as F,a as R}from"./card-BaJ8kNkp.js";import{L as N,I as E}from"./label-B_vK19tR.js";import{A as q}from"./app-layout-B5Fcdwfz.js";import{a as U}from"./format-B9SDkrWj.js";import"./separator-CrM10Oot.js";import"./index-B0VXzXYG.js";import"./chart-hover-XYPNE2CX.js";import"./empty-state-BFTnQ2oT.js";import"./live-dot-DaXEbkXo.js";import"./index-CX8Br7m9.js";import"./checkbox-Bf41R8W6.js";function ve(t){const e=D.c(31),{account:a,auth:n}=A().props;let f,j;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=[{title:"Members",href:I()}],j=s.jsx(H,{title:"Members"}),e[0]=f,e[1]=j):(f=e[0],j=e[1]);let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-semibold",children:"Members"}),s.jsx("p",{className:"text-muted-foreground text-sm",children:"People who can see this account's applications and issues."})]}),e[2]=g):g=e[2];let w;e[3]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(S,{children:s.jsx(F,{className:"text-sm",children:"Add member"})}),e[3]=w):w=e[3];let b;e[4]===Symbol.for("react.memo_cache_sentinel")?(b=I(),e[4]=b):b=e[4];let i;e[5]!==t.roles?(i=s.jsxs(P,{className:"max-w-lg",children:[w,s.jsx(R,{children:s.jsx(M,{method:"post",action:b,className:"flex flex-wrap items-end gap-3",resetOnSuccess:!0,children:r=>{const{errors:u,processing:C}=r;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid flex-1 gap-1",children:[s.jsx(N,{htmlFor:"email",children:"Email"}),s.jsx(E,{id:"email",name:"email",type:"email",required:!0}),s.jsx(k,{messages:u.email})]}),s.jsxs("div",{className:"grid gap-1",children:[s.jsx(N,{htmlFor:"role",children:"Role"}),s.jsx("select",{id:"role",name:"role",className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",children:t.roles.filter(ne).map(re)})]}),s.jsx(x,{disabled:C,children:"Invite"})]})}})})]}),e[5]=t.roles,e[6]=i):i=e[6];let l;e[7]!==t.invitations?(l=t.invitations.length>0&&s.jsxs(P,{children:[s.jsx(S,{children:s.jsx(F,{children:"Pending invitations"})}),s.jsx(R,{children:s.jsx(T,{rows:t.invitations,rowKey:te,columns:[{key:"e",header:"Email",cell:se},{key:"r",header:"Role",cell:ee},{key:"x",header:"Expires",cell:Z},{key:"a",header:"",align:"right",cell:X}]})})]}),e[7]=t.invitations,e[8]=l):l=e[8];let _,v;e[9]===Symbol.for("react.memo_cache_sentinel")?(_={key:"n",header:"Name",cell:J},v={key:"e",header:"Email",cell:Y},e[9]=_,e[10]=v):(_=e[9],v=e[10]);let o;e[11]!==t.roles?(o={key:"r",header:"Role",cell:r=>r.role==="owner"?s.jsx(z,{variant:"outline",children:"owner"}):s.jsx("select",{value:r.role,"aria-label":`Role for ${r.name}`,onChange:u=>p.patch(B(r.id),{role:u.target.value}),className:"border-input bg-background h-7 rounded-md border px-2 text-xs",children:t.roles.filter(W).map(V)})},e[11]=t.roles,e[12]=o):o=e[12];let c;e[13]!==t.ownership.can_transfer||e[14]!==t.ownership.current_user_id?(c={key:"x",header:"",align:"right",cell:r=>s.jsxs("span",{className:"flex justify-end gap-1",children:[t.ownership.can_transfer&&r.user_id!==t.ownership.current_user_id&&s.jsx(x,{size:"sm",variant:"outline",onClick:()=>{window.confirm(`Transfer ownership to ${r.name}? Your role will become admin.`)&&p.post(L(r.id))},children:"Transfer ownership"}),r.role!=="owner"&&s.jsx(x,{size:"sm",variant:"ghost",className:"text-destructive",onClick:()=>p.delete(B(r.id)),children:"Remove"})]})},e[13]=t.ownership.can_transfer,e[14]=t.ownership.current_user_id,e[15]=c):c=e[15];let d;e[16]!==c||e[17]!==o?(d=[_,v,o,c],e[16]=c,e[17]=o,e[18]=d):d=e[18];let m;e[19]!==t.members||e[20]!==d?(m=s.jsx(T,{rows:t.members,rowKey:Q,columns:d}),e[19]=t.members,e[20]=d,e[21]=m):m=e[21];let h;e[22]!==a||e[23]!==n||e[24]!==t.ownership.can_delete_account?(h=t.ownership.can_delete_account&&a&&s.jsxs(P,{className:"border-destructive/30 max-w-lg",children:[s.jsx(S,{children:s.jsx(F,{className:"text-destructive text-sm",children:"Delete account"})}),s.jsxs(R,{className:"space-y-4",children:[s.jsxs("p",{className:"text-muted-foreground text-sm",children:["Permanently deletes ",a.name,", its applications, ingest tokens, alerts, and telemetry databases. This cannot be undone."]}),n.user.provider&&!n.session.recently_authenticated&&s.jsx(O,{label:"Confirm with Google",reauthenticateFor:"account",separated:!1}),s.jsx(M,{method:"delete",action:G(a.id),className:"grid gap-3",children:r=>{const{errors:u,processing:C}=r;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid gap-1",children:[s.jsxs(N,{htmlFor:"account-deletion-confirmation",children:["Enter ",a.name," to confirm"]}),s.jsx(E,{id:"account-deletion-confirmation",name:"confirmation",autoComplete:"off"}),s.jsx(k,{messages:u.confirmation})]}),!n.user.provider&&s.jsxs("div",{className:"grid gap-1",children:[s.jsx(N,{htmlFor:"account-password-challenge",children:"Current password"}),s.jsx(E,{id:"account-password-challenge",type:"password",name:"password_challenge",autoComplete:"current-password"}),s.jsx(k,{messages:u.password_challenge})]}),s.jsx(x,{variant:"destructive",className:"w-fit",disabled:C||!!n.user.provider&&!n.session.recently_authenticated,children:"Delete account and telemetry"})]})}})]})]}),e[22]=a,e[23]=n,e[24]=t.ownership.can_delete_account,e[25]=h):h=e[25];let y;return e[26]!==m||e[27]!==h||e[28]!==i||e[29]!==l?(y=s.jsxs(q,{breadcrumbs:f,children:[j,s.jsxs("div",{className:"flex flex-1 flex-col gap-6 p-4 md:p-6",children:[g,i,l,m,h]})]}),e[26]=m,e[27]=h,e[28]=i,e[29]=l,e[30]=y):y=e[30],y}function V(t){return s.jsx("option",{value:t,children:t},t)}function W(t){return t!=="owner"}function Y(t){return s.jsx("span",{className:"font-mono text-xs",children:t.email})}function J(t){return t.name}function Q(t){return t.id}function X(t){return s.jsxs("span",{className:"flex justify-end gap-1",children:[s.jsx(x,{size:"sm",variant:"ghost",onClick:()=>p.post($(t.id)),children:"Resend"}),s.jsx(x,{size:"sm",variant:"ghost",className:"text-destructive",onClick:()=>p.delete(K(t.id)),children:"Withdraw"})]})}function Z(t){return s.jsx("span",{className:"text-muted-foreground text-xs",children:U(t.expires_at)})}function ee(t){return s.jsx(z,{variant:"outline",children:t.role})}function se(t){return s.jsx("span",{className:"font-mono text-xs",children:t.email})}function te(t){return t.id}function re(t){return s.jsx("option",{value:t,children:t},t)}function ne(t){return t!=="owner"}export{ve as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as _,u as x,j as r,e as k,v as b}from"./inertia-
|
|
1
|
+
import{c as _,u as x,j as r,e as k,v as b}from"./inertia-Degv_G9N.js";import{V as v}from"./chart-panel-BYk68mJJ.js";import{D as j}from"./data-table-IvA7xvrK.js";import{E as S}from"./empty-state-BFTnQ2oT.js";import{F as C}from"./filter-bar-Btm__gQi.js";import{P as E,E as w}from"./env-layout-erSDpIXg.js";import{S as M}from"./sparkline-cell-Ckg29yVq.js";import{c as f,m as O}from"./format-B9SDkrWj.js";import{L as P}from"./app-layout-B5Fcdwfz.js";import"./series-chart-D33UhdG2.js";import"./chart-hover-XYPNE2CX.js";import"./chart-Xnrz1Nqw.js";import"./badge-CApjyWcg.js";import"./app-wordmark-1SRllgHv.js";import"./use-live-GKze1mNC.js";import"./live-dot-DaXEbkXo.js";import"./index-B0VXzXYG.js";import"./index-CX8Br7m9.js";import"./segmented-CVKq2Xpa.js";import"./label-B_vK19tR.js";import"./checkbox-Bf41R8W6.js";function oe(t){const e=_.c(19),{environment:y,window:h}=x().props,u=y.application_id,d=y.id;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=r.jsx(E,{title:"Cache",description:"Rails.cache reads, writes, and hit rates by key shape (ids collapsed)."}),e[0]=n):n=e[0];let i;e[1]!==t.series?(i=r.jsx(v,{legend:"cache",label:"Cache ops",seriesLabel:"Cache ops",data:t.series}),e[1]=t.series,e[2]=i):i=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=[{key:"store",label:"Store"}],e[3]=l):l=e[3];let s;e[4]!==u||e[5]!==d||e[6]!==h?(s=g=>k.visit(b(u,d,{window:h,q:g||void 0}),{preserveState:!0}),e[4]=u,e[5]=d,e[6]=h,e[7]=s):s=e[7];let a;e[8]!==t.q||e[9]!==s?(a=r.jsx(C,{value:t.q,fields:l,onChange:s,placeholder:"store:MemoryStore"}),e[8]=t.q,e[9]=s,e[10]=a):a=e[10];let m,c;e[11]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsx(S,{icon:P,title:"No cache activity in this window",description:"Cache reads and writes instrumented by the gem appear here."}),c=[{key:"k",header:"Store · key",cell:F},{key:"trend",hideOnMobile:!0,header:"Trend",cell:D},{key:"n",header:"Ops",align:"right",cell:R},{key:"h",header:"Hits",align:"right",cell:N},{key:"m",hideOnMobile:!0,header:"Misses",align:"right",cell:H},{key:"r",hideOnMobile:!0,header:"Hit rate",align:"right",cell:L},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:q}],e[11]=m,e[12]=c):(m=e[11],c=e[12]);let o;e[13]!==t.keys?(o=r.jsx(j,{rows:t.keys,rowKey:T,empty:m,columns:c}),e[13]=t.keys,e[14]=o):o=e[14];let p;return e[15]!==i||e[16]!==a||e[17]!==o?(p=r.jsxs(w,{title:"Cache",children:[n,i,a,o]}),e[15]=i,e[16]=a,e[17]=o,e[18]=p):p=e[18],p}function q(t){return O(t.avg,3)}function L(t){return t.hit_rate==null?"–":r.jsxs("span",{className:t.hit_rate<50?"text-amber-600":"",children:[t.hit_rate,"%"]})}function H(t){return f(t.misses)}function N(t){return f(t.hits)}function R(t){return f(t.count)}function D(t){return r.jsx(M,{data:t.sparkline})}function F(t){return r.jsx("span",{className:"font-mono text-xs",children:t.key})}function T(t){return t.group_hash}export{oe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as x,u as _,j as o,y as b,e as h}from"./inertia-
|
|
1
|
+
import{c as x,u as _,j as o,y as b,e as h}from"./inertia-Degv_G9N.js";import{D as k}from"./data-table-IvA7xvrK.js";import{E as w}from"./empty-state-BFTnQ2oT.js";import{E as j,P as v}from"./env-layout-erSDpIXg.js";import{w as N,c as R}from"./format-B9SDkrWj.js";import{R as D}from"./app-layout-B5Fcdwfz.js";import"./chart-hover-XYPNE2CX.js";import"./badge-CApjyWcg.js";import"./app-wordmark-1SRllgHv.js";import"./use-live-GKze1mNC.js";import"./live-dot-DaXEbkXo.js";import"./index-B0VXzXYG.js";import"./index-CX8Br7m9.js";import"./segmented-CVKq2Xpa.js";import"./label-B_vK19tR.js";import"./checkbox-Bf41R8W6.js";function X(t){const e=x.c(13),{environment:y}=_().props,d=y.application_id,f=y.id;let s;e[0]!==d||e[1]!==f?(s=i=>b(d,f,i.id),e[0]=d,e[1]=f,e[2]=s):s=e[2];const l=s;let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(v,{withWindow:!1,title:"Deploys",description:"Recorded by bin/rails railwatch:deploy or the Kamal post-deploy hook. Click one to compare the hour before and after."}),e[3]=a):a=e[3];let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(w,{icon:D,title:"No deploys recorded",description:"Run bin/rails railwatch:deploy or install the Kamal hook to track deploys."}),e[4]=m):m=e[4];let r,n;e[5]!==l?(r=i=>h.visit(l(i)),n={onOpen:(i,u)=>u?.newTab?window.open(l(i),"_blank"):h.visit(l(i))},e[5]=l,e[6]=r,e[7]=n):(r=e[6],n=e[7]);let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=[{key:"when",header:"When",cell:C},{key:"d",header:"Deploy",cell:P},{key:"r",hideOnMobile:!0,header:"Ref",cell:M},{key:"n",hideOnMobile:!0,header:"Name",cell:g},{key:"by",hideOnMobile:!0,header:"By",cell:S},{key:"c",hideOnMobile:!0,header:"Commits",align:"right",cell:O},{key:"s",header:"Server",cell:E}],e[8]=c):c=e[8];let p;return e[9]!==t.deploys||e[10]!==r||e[11]!==n?(p=o.jsxs(j,{title:"Deploys",children:[a,o.jsx(k,{rows:t.deploys,rowKey:K,empty:m,onRowClick:r,keyboardNav:n,columns:c})]}),e[9]=t.deploys,e[10]=r,e[11]=n,e[12]=p):p=e[12],p}function E(t){return o.jsx("span",{className:"font-mono text-xs",children:t.server})}function O(t){return R(t.commits_count)}function S(t){return o.jsx("span",{className:"text-xs",children:t.performer})}function g(t){return t.name}function M(t){return o.jsx("span",{className:"font-mono text-xs",children:t.ref})}function P(t){return o.jsx("span",{className:"font-mono text-xs",children:t.deploy})}function C(t){return o.jsx("span",{className:"text-xs",children:N(t.deployed_at)})}function K(t){return t.id}export{X as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as ee,u as ne,j as s,e as ie,_ as te,L as ae,t as re,r as ce,C as me}from"./inertia-
|
|
1
|
+
import{c as ee,u as ne,j as s,e as ie,_ as te,L as ae,t as re,r as ce,C as me}from"./inertia-Degv_G9N.js";import{C as fe}from"./cursor-load-more-0cHzbTPT.js";import{D as de}from"./data-table-IvA7xvrK.js";import{E as he}from"./empty-state-BFTnQ2oT.js";import{p as Z,F as ue,s as se}from"./filter-bar-Btm__gQi.js";import{P as ge,E as xe}from"./env-layout-erSDpIXg.js";import{S as pe,F as be}from"./app-layout-B5Fcdwfz.js";import{a as le,S as ve}from"./segmented-CVKq2Xpa.js";import{L as ye}from"./status-badge-5NCVJHjo.js";import{c as oe,w as je}from"./format-B9SDkrWj.js";import"./app-wordmark-1SRllgHv.js";import"./chart-hover-XYPNE2CX.js";import"./badge-CApjyWcg.js";import"./use-live-GKze1mNC.js";import"./live-dot-DaXEbkXo.js";import"./index-B0VXzXYG.js";import"./index-CX8Br7m9.js";import"./label-B_vK19tR.js";import"./checkbox-Bf41R8W6.js";const ke="",_e=160;function we(t){const e=ee.c(18),{message:a,highlight:i,tags:o}=t,[n,m]=ce.useState(!1);let d,c;e[0]!==a||e[1]!==n?(d=a.length>_e||a.includes(`
|
|
2
2
|
`),c=me("font-mono text-xs break-all whitespace-pre-wrap",d&&!n&&"line-clamp-3"),e[0]=a,e[1]=n,e[2]=d,e[3]=c):(d=e[2],c=e[3]);let f;e[4]!==i||e[5]!==a?(f=i?s.jsx(Se,{text:i}):a,e[4]=i,e[5]=a,e[6]=f):f=e[6];let h;e[7]!==o?(h=o.length>0&&s.jsxs("span",{className:"text-muted-foreground",children:[" [",o.join(", "),"]"]}),e[7]=o,e[8]=h):h=e[8];let u;e[9]!==c||e[10]!==f||e[11]!==h?(u=s.jsxs("span",{className:c,children:[f,h]}),e[9]=c,e[10]=f,e[11]=h,e[12]=u):u=e[12];const r=u;if(!d)return r;let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=()=>m(qe),e[13]=g):g=e[13];const p=n?"Collapse":"Expand";let x;return e[14]!==r||e[15]!==n||e[16]!==p?(x=s.jsx("button",{type:"button",onClick:g,"aria-expanded":n,className:"block w-full cursor-pointer text-left",title:p,children:r}),e[14]=r,e[15]=n,e[16]=p,e[17]=x):x=e[17],x}function qe(t){return!t}function Se(t){const e=ee.c(4),{text:a}=t;let i;e[0]!==a?(i=a.split(ke).map(Le),e[0]=a,e[1]=i):i=e[1];let o;return e[2]!==i?(o=s.jsx(s.Fragment,{children:i}),e[2]=i,e[3]=o):o=e[3],o}function Le(t,e){return e%2===1?s.jsx("mark",{className:"fts-mark",children:t},e):s.jsx("span",{children:t},e)}function Qe(t){const e=ee.c(81),{environment:a,window:i,range:o}=ne().props,n=a.application_id,m=a.id;let d;e[0]!==o?.from||e[1]!==o?.to||e[2]!==i?(d=i==="custom"?{from:o?.from,to:o?.to}:{window:i},e[0]=o?.from,e[1]=o?.to,e[2]=i,e[3]=d):d=e[3];const c=d;let f;e[4]!==o||e[5]!==c?(f=o?{from:o.from,to:o.to}:c,e[4]=o,e[5]=c,e[6]=f):f=e[6];const h=f;let u;e[7]!==n||e[8]!==m||e[9]!==c?(u=l=>ie.visit(te(n,m,{...c,q:l||void 0}),{only:["logs","pagination","highlights","counts","q"],preserveState:!0,preserveScroll:!0,reset:["logs","highlights"]}),e[7]=n,e[8]=m,e[9]=c,e[10]=u):u=e[10];const r=u;let g;e[11]!==n||e[12]!==h||e[13]!==m||e[14]!==t.pagination.limit||e[15]!==t.q?(g=l=>te(n,m,{...h,q:t.q||void 0,cursor:l,limit:t.pagination.limit}),e[11]=n,e[12]=h,e[13]=m,e[14]=t.pagination.limit,e[15]=t.q,e[16]=g):g=e[16];const p=g;let x;e[17]!==t.q?(x=Z(t.q),e[17]=t.q,e[18]=x):x=e[18];const R=x.fields.level;let T;e[19]!==t.q||e[20]!==r?(T=l=>{const M=Z(t.q),Y={...M.fields};l?Y.level=l:delete Y.level,r(se({text:M.text,fields:Y}))},e[19]=t.q,e[20]=r,e[21]=T):T=e[21];const b=T;let A;e[22]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(ge,{title:"Logs",description:"Rails.logger lines and Rails.event structured events, linked to the request or job that wrote them.",actions:s.jsx(pe,{page:"logs"})}),e[22]=A):A=e[22];const Q=!R;let v;e[23]!==b?(v=()=>b(void 0),e[23]=b,e[24]=v):v=e[24];let y;e[25]!==Q||e[26]!==v?(y=s.jsx(le,{active:Q,onClick:v,children:"All"}),e[25]=Q,e[26]=v,e[27]=y):y=e[27];let B;e[28]===Symbol.for("react.memo_cache_sentinel")?(B=["debug","info","warn","error","fatal","event"],e[28]=B):B=e[28];let j;e[29]!==R||e[30]!==t.counts||e[31]!==b?(j=B.map(l=>s.jsxs(le,{active:R===l,onClick:()=>b(l),className:"gap-1.5",children:[l,s.jsx("span",{className:"opacity-60",children:oe(t.counts[l]??0)})]},l)),e[29]=R,e[30]=t.counts,e[31]=b,e[32]=j):j=e[32];let k;e[33]!==j||e[34]!==y?(k=s.jsx("div",{className:"-mx-3 [scrollbar-width:none] overflow-x-auto px-3 md:mx-0 md:px-0 [&::-webkit-scrollbar]:hidden",children:s.jsxs(ve,{className:"w-max",children:[y,j]})}),e[33]=j,e[34]=y,e[35]=k):k=e[35];let D,O,$,I;e[36]===Symbol.for("react.memo_cache_sentinel")?(D={key:"after",label:"After"},O={key:"before",label:"Before"},$={key:"user",label:"User"},I={key:"deploy",label:"Deploy"},e[36]=D,e[37]=O,e[38]=$,e[39]=I):(D=e[36],O=e[37],$=e[38],I=e[39]);let K;e[40]===Symbol.for("react.memo_cache_sentinel")?(K={key:"level",label:"Level",options:["debug","info","warn","error","fatal","event","unknown"]},e[40]=K):K=e[40];let z;e[41]===Symbol.for("react.memo_cache_sentinel")?(z=[D,O,$,I,K,{key:"kind",label:"Execution kind",options:["request","job","scheduled_task","command"]},{key:"source",label:"Source"},{key:"tenant",label:"Tenant"}],e[41]=z):z=e[41];let _;e[42]!==t.q||e[43]!==r?(_=s.jsx(ue,{value:t.q,fields:z,onChange:r,placeholder:"level:error kind:job source:app/jobs/sync_job.rb:12"}),e[42]=t.q,e[43]=r,e[44]=_):_=e[44];let w;e[45]!==t.logs.length?(w=oe(t.logs.length),e[45]=t.logs.length,e[46]=w):w=e[46];const X=t.logs.length===1?"line":"lines";let q;e[47]!==w||e[48]!==X?(q=s.jsxs("span",{className:"font-mono tabular-nums",children:[w," ",X]}),e[47]=w,e[48]=X,e[49]=q):q=e[49];let H;e[50]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx("span",{children:"Full-text search: quotes for phrases, -word to exclude, prefixes match"}),e[50]=H):H=e[50];let S;e[51]!==q?(S=s.jsxs("div",{className:"text-muted-foreground flex flex-wrap items-baseline gap-x-3 gap-y-1 text-xs",children:[q,H]}),e[51]=q,e[52]=S):S=e[52];let U,V,W;e[53]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(he,{icon:be,title:"No log lines match",signal:"caution",description:"Log lines are captured from your app's Rails logger."}),V={key:"when",header:"When",className:"w-40",cell:Ee},W={key:"lvl",header:"Level",cell:Ne},e[53]=U,e[54]=V,e[55]=W):(U=e[53],V=e[54],W=e[55]);let L;e[56]!==t.highlights?(L={key:"msg",header:"Message",grow:!0,className:"whitespace-normal",cell:l=>s.jsx(we,{message:l.message,highlight:t.highlights[l.id],tags:l.tags})},e[56]=t.highlights,e[57]=L):L=e[57];let N;e[58]!==n||e[59]!==m?(N={key:"in",hideOnMobile:!0,header:"In",cell:l=>l.execution_id?s.jsx(ae,{className:"font-mono text-xs hover:underline",href:re(n,m,l.execution_id),children:l.execution_preview}):null},e[58]=n,e[59]=m,e[60]=N):N=e[60];let E;e[61]!==t.q||e[62]!==r?(E={key:"t",hideOnMobile:!0,header:"Tenant",cell:l=>l.tenant?s.jsx("button",{className:"font-mono text-xs hover:underline",onClick:()=>{const M=Z(t.q);r(se({text:M.text,fields:{...M.fields,tenant:l.tenant}}))},children:l.tenant}):null},e[61]=t.q,e[62]=r,e[63]=E):E=e[63];let C;e[64]!==L||e[65]!==N||e[66]!==E?(C=[V,W,L,N,E],e[64]=L,e[65]=N,e[66]=E,e[67]=C):C=e[67];let P;e[68]!==t.logs||e[69]!==C?(P=s.jsx(de,{rows:t.logs,rowKey:Ce,empty:U,columns:C}),e[68]=t.logs,e[69]=C,e[70]=P):P=e[70];let G;e[71]===Symbol.for("react.memo_cache_sentinel")?(G=["logs","pagination","highlights"],e[71]=G):G=e[71];let F;e[72]!==p||e[73]!==t.pagination?(F=s.jsx(fe,{meta:t.pagination,href:p,only:G}),e[72]=p,e[73]=t.pagination,e[74]=F):F=e[74];let J;return e[75]!==k||e[76]!==_||e[77]!==S||e[78]!==P||e[79]!==F?(J=s.jsxs(xe,{title:"Logs",children:[A,k,_,S,P,F]}),e[75]=k,e[76]=_,e[77]=S,e[78]=P,e[79]=F,e[80]=J):J=e[80],J}function Ne(t){return s.jsx(ye,{level:t.level})}function Ee(t){return s.jsx("span",{className:"text-xs tabular-nums",children:je(t.occurred_at)})}function Ce(t){return t.id}export{Qe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as le,u as ce,j as s,e as ie,ao as me,L as de}from"./inertia-
|
|
1
|
+
import{c as le,u as ce,j as s,e as ie,ao as me,L as de}from"./inertia-Degv_G9N.js";import{C as ue}from"./chart-hover-XYPNE2CX.js";import{D as fe}from"./data-table-IvA7xvrK.js";import{E as he}from"./empty-state-BFTnQ2oT.js";import{F as ye}from"./filter-bar-Btm__gQi.js";import{P as ge,E as pe}from"./env-layout-erSDpIXg.js";import{S as W}from"./sort-header-CKj_7G3U.js";import{S as xe}from"./sparkline-cell-Ckg29yVq.js";import{S as Y,a as _e}from"./stat-TxvoBiC8.js";import{c as a,m as ve,a as be}from"./format-B9SDkrWj.js";import{t as je}from"./tenant-path-B5ZRK4x3.js";import{K as ke}from"./app-layout-B5Fcdwfz.js";import"./badge-CApjyWcg.js";import"./app-wordmark-1SRllgHv.js";import"./use-live-GKze1mNC.js";import"./live-dot-DaXEbkXo.js";import"./index-B0VXzXYG.js";import"./index-CX8Br7m9.js";import"./segmented-CVKq2Xpa.js";import"./label-B_vK19tR.js";import"./arrow-up-DwKQcab4.js";import"./series-chart-D33UhdG2.js";import"./chart-Xnrz1Nqw.js";import"./checkbox-Bf41R8W6.js";function it(t){const e=le.c(91),{environment:ae,window:o}=ce().props,l=ae.application_id,c=ae.id;let P;e[0]!==l||e[1]!==c||e[2]!==t.dir||e[3]!==t.q||e[4]!==t.sort||e[5]!==o?(P=r=>ie.visit(me(l,c,{window:o,sort:t.sort,dir:t.dir,q:t.q||void 0,...r}),{preserveState:!0}),e[0]=l,e[1]=c,e[2]=t.dir,e[3]=t.q,e[4]=t.sort,e[5]=o,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]!==l||e[12]!==c||e[13]!==o?(F=r=>je(l,c,r.tenant,{window:o}),e[11]=l,e[12]=c,e[13]=o,e[14]=F):F=e[14];const i=F;let K;e[15]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(ge,{title:"Tenants",description:"Your application's own tenants, aggregated from the tenant tag on every record."}),e[15]=K):K=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 p;e[30]!==y||e[31]!==g||e[32]!==u||e[33]!==f?(p=s.jsxs(_e,{children:[u,f,y,g]}),e[30]=y,e[31]=g,e[32]=u,e[33]=f,e[34]=p):p=e[34];let L;e[35]===Symbol.for("react.memo_cache_sentinel")?(L=[],e[35]=L):L=e[35];let x;e[36]!==m?(x=r=>m({q:r||void 0}),e[36]=m,e[37]=x):x=e[37];let _;e[38]!==t.q||e[39]!==x?(_=s.jsx(ye,{value:t.q,fields:L,onChange:x,placeholder:"Filter tenants"}),e[38]=t.q,e[39]=x,e[40]=_):_=e[40];let B;e[41]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(he,{icon:ke,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]=B):B=e[41];let v,b;e[42]!==i?(v=r=>ie.visit(i(r)),b={onOpen:(r,oe)=>oe?.newTab?globalThis.window.open(i(r),"_blank"):ie.visit(i(r))},e[42]=i,e[43]=v,e[44]=b):(v=e[43],b=e[44]);let j;e[45]!==i?(j={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]=j):j=e[46];let H;e[47]===Symbol.for("react.memo_cache_sentinel")?(H={key:"trend",hideOnMobile:!0,header:"Trend",cell:Oe},e[47]=H):H=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]!==j||e[77]!==w||e[78]!==q||e[79]!==C||e[80]!==R?(N=[j,H,w,q,C,$,D,U,R,A],e[76]=j,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]!==v||e[84]!==b||e[85]!==N?(O=s.jsx(fe,{rows:t.tenants,rowKey:Me,empty:B,hoverKey:Pe,onRowClick:v,keyboardNav:b,columns:N}),e[82]=t.tenants,e[83]=v,e[84]=b,e[85]=N,e[86]=O):O=e[86];let J;return e[87]!==p||e[88]!==_||e[89]!==O?(J=s.jsx(pe,{title:"Tenants",children:s.jsxs(ue,{children:[K,p,_,O]})}),e[87]=p,e[88]=_,e[89]=O,e[90]=J):J=e[90],J}function we(t){return be(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:ve(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(xe,{data:t.sparkline,hoverKey:t.tenant})}function Pe(t){return t.tenant}function Me(t){return t.tenant}export{it as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as H,r as c,j as T,a3 as x}from"./inertia-
|
|
1
|
+
import{B as H,r as c,j as T,a3 as x}from"./inertia-Degv_G9N.js";const V=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ae=H("check",V);var Y=Object.defineProperty,w=(e,t)=>Y(e,"name",{value:t,configurable:!0}),I=!!(typeof window<"u"&&window.document&&window.document.createElement);function X(e,t,{checkForDefaultPrevented:n=!0}={}){return w(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},"handleEvent")}w(X,"composeEventHandlers");function q(e){if(!I)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}w(q,"getOwnerWindow");function R(e){if(!I)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}w(R,"getOwnerDocument");function $(e,t=!1){const{activeElement:n}=R(e);if(!n?.nodeName)return null;if(j(n)&&n.contentDocument)return $(n.contentDocument.body,t);if(t){const o=n.getAttribute("aria-activedescendant");if(o){const r=R(n).getElementById(o);if(r)return r}}return n}w($,"getActiveElement");function j(e){return e.tagName==="IFRAME"}w(j,"isFrame");var G=Object.defineProperty,S=(e,t)=>G(e,"name",{value:t,configurable:!0});function J(e,t){const n=c.createContext(t);n.displayName=e+"Context";const o=S(i=>{const{children:s,...u}=i,a=c.useMemo(()=>u,Object.values(u));return T.jsx(n.Provider,{value:a,children:s})},"Provider");o.displayName=e+"Provider";function r(i,s={}){const{optional:u=!1}=s,a=c.useContext(n);if(a)return a;if(t!==void 0)return t;if(!u)throw new Error(`\`${i}\` must be used within \`${e}\``)}return S(r,"useContext"),[o,r]}S(J,"createContext");function K(e,t=[]){let n=[];function o(i,s){const u=c.createContext(s);u.displayName=i+"Context";const a=n.length;n=[...n,s];const d=S(f=>{const{scope:v,children:p,...m}=f,E=v?.[e]?.[a]||u,g=c.useMemo(()=>m,Object.values(m));return T.jsx(E.Provider,{value:g,children:p})},"Provider");d.displayName=i+"Provider";function l(f,v,p={}){const{optional:m=!1}=p,E=v?.[e]?.[a]||u,g=c.useContext(E);if(g)return g;if(s!==void 0)return s;if(!m)throw new Error(`\`${f}\` must be used within \`${i}\``)}return S(l,"useContext"),[d,l]}S(o,"createContext");const r=S(()=>{const i=n.map(s=>c.createContext(s));return S(function(u){const a=u?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...u,[e]:a}}),[u,a])},"useScope")},"createScope");return r.scopeName=e,[o,D(r,...t)]}S(K,"createContextScope");function D(...e){const t=e[0];if(e.length===1)return t;const n=S(()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return S(function(i){const s=o.reduce((u,{useScope:a,scopeName:d})=>{const f=a(i)[`__scope${d}`];return{...u,...f}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}S(D,"composeContextScopes");var b=globalThis?.document?c.useLayoutEffect:()=>{},Q=Object.defineProperty,Z=(e,t)=>Q(e,"name",{value:t,configurable:!0}),A=x[" useEffectEvent ".trim().toString()],O=x[" useInsertionEffect ".trim().toString()];function U(e){if(typeof A=="function")return A(e);const t=c.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof O=="function"?O(()=>{t.current=e}):b(()=>{t.current=e}),c.useMemo(()=>((...n)=>t.current?.(...n)),[])}Z(U,"useEffectEvent");var ee=Object.defineProperty,P=(e,t)=>ee(e,"name",{value:t,configurable:!0}),te=x[" useInsertionEffect ".trim().toString()]||b;function ne({prop:e,defaultProp:t,onChange:n=P(()=>{},"onChange"),caller:o}){const[r,i,s]=z({defaultProp:t,onChange:n}),u=e!==void 0,a=u?e:r,d=c.useCallback(l=>{if(u){const f=F(l)?l(e):l;f!==e&&s.current?.(f)}else i(l)},[u,e,i,s]);return[a,d]}P(ne,"useControllableState");function z({defaultProp:e,onChange:t}){const[n,o]=c.useState(e),r=c.useRef(n),i=c.useRef(t);return te(()=>{i.current=t},[t]),c.useEffect(()=>{r.current!==n&&(i.current?.(n),r.current=n)},[n,r]),[n,o,i]}P(z,"useUncontrolledState");function F(e){return typeof e=="function"}P(F,"isFunction");var M=Symbol("RADIX:SYNC_STATE");function re(e,t,n,o){const{prop:r,defaultProp:i,onChange:s,caller:u}=t,a=r!==void 0,d=U(s),l=[{...n,state:i}];o&&l.push(o);const[f,v]=c.useReducer((g,y)=>{if(y.type===M)return{...g,state:y.state};const N=e(g,y);return a&&!Object.is(N.state,g.state)&&d(N.state),N},...l),p=f.state,m=c.useRef(p);c.useEffect(()=>{m.current!==p&&(m.current=p,a||d(p))},[p,m,a]);const E=c.useMemo(()=>r!==void 0?{...f,state:r}:f,[f,r]);return c.useEffect(()=>{a&&!Object.is(r,f.state)&&v({type:M,state:r})},[r,f.state,a]),[E,v]}P(re,"useControllableStateReducer");var oe=Object.defineProperty,h=(e,t)=>oe(e,"name",{value:t,configurable:!0});function W(e,t){return c.useReducer((n,o)=>t[n][o]??n,e)}h(W,"useStateMachine");var fe=h(e=>{const{present:t,children:n}=e,o=L(t),r=typeof n=="function"?n({present:o.isPresent}):c.Children.only(n),i=k(o.ref,B(r));return typeof n=="function"||o.isPresent?c.cloneElement(r,{ref:i}):null},"Presence");function L(e){const[t,n]=c.useState(),o=c.useRef(null),r=c.useRef(e),i=c.useRef("none"),s=c.useRef(void 0),u=e?"mounted":"unmounted",[a,d]=W(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{a==="mounted"?(i.current=s.current??C(o.current),s.current=void 0):i.current="none"},[a]),b(()=>{const l=o.current,f=r.current;if(f!==e){const p=i.current,m=C(l);e?(s.current=m,d("MOUNT")):m==="none"||l?.display==="none"?d("UNMOUNT"):d(f&&p!==m?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,d]),b(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,v=h(m=>{const g=C(o.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(d("ANIMATION_END"),!r.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},"handleAnimationEnd"),p=h(m=>{m.target===t&&(i.current=C(o.current))},"handleAnimationStart");return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(l=>{if(l){const f=getComputedStyle(l);o.current=f,s.current=C(f)}else o.current=null;n(l)},[])}}h(L,"usePresence");function _(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}h(_,"setRef");function k(...e){const t=c.useRef(e);return t.current=e,c.useCallback(n=>{const o=t.current;let r=!1;const i=o.map(s=>{const u=_(s,n);return!r&&typeof u=="function"&&(r=!0),u});if(r)return()=>{for(let s=0;s<i.length;s++){const u=i[s];typeof u=="function"?u():_(o[s],null)}}},[])}h(k,"useStableComposedRefs");function C(e){return e?.animationName||"none"}h(C,"getAnimationName");function B(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}h(B,"getElementRef");var se=Object.defineProperty,ce=(e,t)=>se(e,"name",{value:t,configurable:!0});function ie(e){const[t,n]=c.useState(void 0);return b(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let s,u;if("borderBoxSize"in i){const a=i.borderBoxSize,d=Array.isArray(a)?a[0]:a;s=d.inlineSize,u=d.blockSize}else s=e.offsetWidth,u=e.offsetHeight;n({width:s,height:u})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}ce(ie,"useSize");export{ae as C,fe as P,X as a,b,K as c,ie as d,ne as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as N,j as s,r as v,C as z,L as ae,M as ue,N as pe,u as fe,H as xe}from"./inertia-CgBdJDaE.js";import{C as oe,a as ie,b as ge}from"./card-C9j_ffR9.js";import{D as be,a as je,b as ye,c as we,L as ve,B as Ne}from"./live-dot-Bejk0a5o.js";import{R as _e,M as Se,a as ke}from"./nav-C1M8941-.js";import{B as ne}from"./app-wordmark-B-0yZiDb.js";import{H as Ce,a as Ee,b as $e}from"./copy-DaQMJWoT.js";import{S as Ae}from"./empty-state-CkPROZB0.js";import{S as J,a as Re}from"./stat-Cd8QaTGw.js";import{I as Te}from"./status-badge-Ys4b0fcG.js";import{T as Ie}from"./timeline-SxStCFO2.js";import{C as Le}from"./index-B2_QluAw.js";import"./index-Dy7Wg880.js";import"./use-live-LwJStJvD.js";import"./arrow-up-DY1fS0tD.js";import"./badge-DKvItdlb.js";import"./format-B9SDkrWj.js";const Me='claude mcp add railwatch --transport http https://railwatch.rebulk.com/mcp --header "Authorization: Bearer $RAILWATCH_MCP_TOKEN"';function Pe(){const e=N.c(4);let t,o,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("p",{className:"text-primary mb-2 font-mono text-[11px] tracking-[0.2em] uppercase",children:"MCP"}),o=s.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Works with your AI assistant"}),n=s.jsx("p",{className:"text-muted-foreground mt-2",children:"Railwatch speaks MCP, so Claude Code, Cursor, VS Code, and Zed can read your production data directly — issues, slow routes, query plans, stack profiles, logs, deploys. It ships prompts too: point one at an issue key and it pulls the occurrence, the timeline around it, and the deploy it started after. Writes are attributed to you, so a comment or a status change an assistant makes is signed in the issue's activity feed."}),e[0]=t,e[1]=o,e[2]=n):(t=e[0],o=e[1],n=e[2]);let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("section",{className:"mx-auto max-w-2xl px-6 pb-16 text-center",children:[t,o,n,s.jsx(oe,{className:"mt-6 text-left",children:s.jsxs(ie,{children:[s.jsx("p",{className:"text-muted-foreground font-mono text-sm",children:"# one line, then ask it what broke today"}),s.jsx("p",{className:"mt-1 font-mono text-sm break-all",children:Me})]})})]}),e[3]=a):a=e[3],a}const De=[{title:"Requests",description:"Every route's throughput, latency percentiles, and status codes, down to a single request's waterfall.",image:"requests",alt:"The Requests page: throughput and latency charts over a table of every route with its 2xx, 4xx, 5xx counts, error rate, and p95"},{title:"Jobs & scheduled tasks",description:"Queue depth, retries, and run history for Active Job and your recurring tasks.",image:"jobs",alt:"The Jobs page: attempts per hour split into processed and failed, a queue table with average wait, and the most recent runs"},{title:"Queries & N+1s",description:"Slow queries and N+1 patterns grouped by source location, not buried in a log line.",image:"queries",alt:"The Queries page: two N+1 patterns with a suggested fix and the source line, above every SQL shape ranked by count and p95"},{title:"Exceptions → Issues",description:"Exceptions are grouped into Issues that track occurrences, assignees, and status over time.",image:"issues",alt:"An issue page: a resolved NoMethodError with the raising line of source highlighted, its breadcrumbs, and the alerts it sent"},{title:"Inertia visits",description:"Page-by-page render and payload size, so a slow visit is obvious before support tickets show up.",image:"visits",alt:"The Inertia visits page: p75 web vitals, visits per hour, and a table of components with visit count, LCP, INP, and p95"},{title:"Deploy comparison",description:"Every chart is annotated with deploys, so a regression points straight at the change that caused it.",image:"deploys",alt:"A deploy page: the commits it shipped, its crash-free rate, and request p95, error rate, and job failures for the hour before and after"},{title:"Alerts",description:"Threshold and issue alerts delivered where your team already works.",image:"alerts",alt:"The Alerts page: new, resolved, and threshold alerts delivered to Slack and email, newest first"},{title:"MCP / API",description:"A JSON-RPC MCP endpoint and a token-authenticated API, so your AI assistant can query production directly.",image:"mcp",alt:"A request page with its Copy as Markdown button: the same timeline an assistant reads over MCP"}];function Oe(){const e=N.c(9),[t,o]=v.useState(null);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",children:De.map(l=>{const{title:m,description:f,image:h,alt:g}=l;return s.jsxs("div",{className:"bg-card flex flex-col overflow-hidden rounded-lg border",children:[s.jsx("button",{type:"button",onClick:()=>o(l),className:"group relative aspect-[4/3] w-full cursor-zoom-in overflow-hidden border-b bg-[#020618] text-left","aria-label":`Open a full screenshot of ${m}`,children:s.jsx("img",{src:`/marketing/${h}.webp`,alt:g,loading:"lazy",width:1200,height:900,className:"h-full w-full object-cover object-top transition-transform duration-500 ease-out group-hover:scale-[1.03] motion-reduce:transition-none"})}),s.jsxs("div",{className:"space-y-1 px-4 py-3",children:[s.jsx("h3",{className:"text-sm font-semibold",children:m}),s.jsx("p",{className:"text-muted-foreground text-[13px] leading-snug",children:f})]})]},m)})}),e[0]=n):n=e[0];const a=t!==null;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=l=>!l&&o(null),e[1]=c):c=e[1];let i;e[2]!==t?(i=t&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"border-b px-5 py-3",children:[s.jsx(be,{className:"text-base",children:t.title}),s.jsx(je,{children:t.description})]}),s.jsx("img",{src:`/marketing/${t.image}-full.webp`,alt:t.alt,width:1920,height:1200,className:"block max-h-[calc(92vh-4.5rem)] w-full object-contain object-top"})]}),e[2]=t,e[3]=i):i=e[3];let d;e[4]!==i?(d=s.jsx(ye,{className:"bg-background max-h-[92vh] w-[min(96vw,1400px)] gap-0 overflow-hidden p-0 sm:max-w-none",children:i}),e[4]=i,e[5]=d):d=e[5];let r;return e[6]!==a||e[7]!==d?(r=s.jsxs("section",{className:"mx-auto max-w-5xl px-6 pb-16",children:[n,s.jsx(we,{open:a,onOpenChange:c,children:d})]}),e[6]=a,e[7]=d,e[8]=r):r=e[8],r}const de=v.createContext("departed"),me=()=>v.useContext(de),qe=[["approaching",100],["braking",2300],["held",3300],["caution",6400],["clear",7200],["departed",8300]],ze=3200,Fe=1800,He={arriving:"clear",approaching:"clear",braking:"clear",held:"stop",caution:"caution",clear:"clear",departed:"clear"};function he(){const[e]=v.useState(Be);return e}function Be(){return typeof window<"u"&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches}function We(){const e=he(),[t,o]=v.useState(e?"arriving":"departed");return v.useEffect(()=>{if(!e)return;const n=qe.map(([a,c])=>setTimeout(()=>o(a),c));return()=>n.forEach(clearTimeout)},[]),{stage:t,animated:e}}const Ge=72,le=13.5,re=112,Ue=14;function Je(e,t,o,n){let a=0,[c,i]=e;for(let d=1;d<=64;d++){const r=d/64,l=1-r,m=l*l*l*e[0]+3*l*l*r*t[0]+3*l*r*r*o[0]+r*r*r*n[0],f=l*l*l*e[1]+3*l*l*r*t[1]+3*l*r*r*o[1]+r*r*r*n[1];a+=Math.hypot(m-c,f-i),c=m,i=f}return a}function Qe(e){const t=e.querySelector("h1"),o=e.querySelector("[data-hero-strip]");if(!t||!o)return null;const n=e.getBoundingClientRect(),a=t.getBoundingClientRect(),c=o.getBoundingClientRect(),i=n.width,d=n.height,r=i<768,l=i/2,m=r?10:Math.max(16,l-520),f=c.top-n.top+60,h=Ge,g=l+(r?120:220),u=[l-(r?30:60),a.top-n.top+a.height+4],b=[m,f-h],x=b[1]-u[1],y=[u[0]-x*.55,u[1]+x*.32],p=[m,b[1]-x*.42],w=Je(u,y,p,b),j=Math.PI*h/2,_=g-Ue-re/2,S=w+j+(_-(m+h)),C=w+j+(i+re+40-(m+h));return{w:i,h:d,p0:u,c1:y,c2:p,p3:b,xL:m,yL:f,r:h,cx:l,xSignal:g,yFadeTop:u[1],yFadeFull:u[1]+x*.7,stop:S,total:C}}function Q(e,t){const[o,n]=e.p0,a=e.r+t,c=t;return[`M ${o+c*.5} ${n-c*.85}`,`C ${e.c1[0]+c*.5} ${e.c1[1]-c*.85}, ${e.c2[0]-t} ${e.c2[1]}, ${e.p3[0]-t} ${e.p3[1]}`,`A ${a} ${a} 0 0 0 ${e.xL+e.r} ${e.yL+t}`,`L ${e.w+re+40} ${e.yL+t}`].join(" ")}const K=[{at:-41,w:30},{at:-4,w:34},{at:37,w:38}],Ke=K.length-1,Ve=1;function Xe(e){const t=N.c(14),{index:o,held:n,style:a}=e,c=K[o],i=-c.w/2;let d;t[0]!==c.w||t[1]!==i?(d=s.jsx("rect",{x:i,y:"-7",width:c.w,height:"14",rx:"3",fill:"currentColor"}),t[0]=c.w,t[1]=i,t[2]=d):d=t[2];let r;t[3]!==c.w||t[4]!==o?(r=o===Ke&&s.jsx("rect",{x:c.w/2-6,y:"-4",width:"4",height:"8",rx:"1",className:"text-primary",fill:"currentColor"}),t[3]=c.w,t[4]=o,t[5]=r):r=t[5];let l;t[6]!==n||t[7]!==o?(l=o===Ve&&s.jsx("rect",{x:"-5",y:"-25",width:"10",height:"10",transform:"rotate(45 0 -20)",className:z("transition-opacity duration-300",n?"opacity-100":"opacity-0"),fill:"rgb(239 68 68)"}),t[6]=n,t[7]=o,t[8]=l):l=t[8];let m;return t[9]!==a||t[10]!==d||t[11]!==r||t[12]!==l?(m=s.jsxs("g",{className:"text-foreground/85",style:a,children:[d,r,l]}),t[9]=a,t[10]=d,t[11]=r,t[12]=l,t[13]=m):m=t[13],m}function Ye(e){const t=N.c(3),{children:o}=e,{stage:n}=We();let a;return t[0]!==o||t[1]!==n?(a=s.jsx(de.Provider,{value:n,children:o}),t[0]=o,t[1]=n,t[2]=a):a=t[2],a}function Ze(e){const t=N.c(21),{children:o}=e,n=v.useRef(null),[a,c]=v.useState(null),i=me(),d=he(),r=v.useId();let l,m;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{const p=n.current;if(!p)return;const w=()=>c(Qe(p));w();const j=new ResizeObserver(w);return j.observe(p),()=>j.disconnect()},m=[],t[0]=l,t[1]=m):(l=t[0],m=t[1]),v.useEffect(l,m);const f=i==="held";let h,g,u;if(t[2]!==d||t[3]!==f||t[4]!==a||t[5]!==r||t[6]!==i){let p;if(a)e:switch(i){case"arriving":{p={distance:0};break e}case"approaching":case"braking":case"held":case"caution":{p={distance:a.stop,transition:`offset-distance ${ze}ms cubic-bezier(.45,.05,.25,1)`};break e}case"clear":{p={distance:a.stop+120,transition:"offset-distance 900ms ease-in-out"};break e}case"departed":p={distance:a.total,transition:`offset-distance ${Fe}ms cubic-bezier(.4,0,.8,.6)`}}const w=j=>a&&p?{offsetPath:`path("${Q(a,0)}")`,offsetRotate:"auto",offsetDistance:`${p.distance+K[j].at}px`,transition:p.transition}:void 0;h=n,g="relative overflow-hidden",u=a&&s.jsxs("svg",{"aria-hidden":!0,className:"text-foreground/30 pointer-events-none absolute inset-0 z-0 h-full w-full [mask-image:linear-gradient(to_right,black_86%,transparent)]",width:a.w,height:a.h,viewBox:`0 0 ${a.w} ${a.h}`,children:[s.jsxs("defs",{children:[s.jsxs("linearGradient",{id:`${r}-fade`,gradientUnits:"userSpaceOnUse",x1:"0",y1:a.yFadeTop,x2:"0",y2:a.yFadeFull,children:[s.jsx("stop",{offset:"0",stopColor:"white",stopOpacity:"0"}),s.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"1"})]}),s.jsx("mask",{id:r,maskUnits:"userSpaceOnUse",x:"0",y:"0",width:a.w,height:a.h,children:s.jsx("rect",{width:a.w,height:a.h,fill:`url(#${r}-fade)`})})]}),s.jsxs("g",{mask:`url(#${r})`,children:[s.jsx("path",{d:Q(a,0),fill:"none",stroke:"currentColor",strokeWidth:"30",strokeDasharray:"4 18"}),s.jsx("path",{d:Q(a,le/2),fill:"none",stroke:"currentColor",strokeWidth:"2.5"}),s.jsx("path",{d:Q(a,-le/2),fill:"none",stroke:"currentColor",strokeWidth:"2.5"}),d&&K.map((j,_)=>s.jsx(Xe,{index:_,held:f,style:w(_)},_))]})]}),t[2]=d,t[3]=f,t[4]=a,t[5]=r,t[6]=i,t[7]=h,t[8]=g,t[9]=u}else h=t[7],g=t[8],u=t[9];let b;t[10]!==o?(b=s.jsx("div",{className:"relative z-10",children:o}),t[10]=o,t[11]=b):b=t[11];let x;t[12]!==a||t[13]!==i?(x=a&&s.jsx(s.Fragment,{children:s.jsx("div",{className:"pointer-events-none absolute z-10 h-0 w-0",style:{left:a.xSignal,top:a.yL},"aria-hidden":!0,children:s.jsx(Ae,{aspect:He[i],className:"left-0 md:left-0"})})}),t[12]=a,t[13]=i,t[14]=x):x=t[14];let y;return t[15]!==h||t[16]!==g||t[17]!==u||t[18]!==b||t[19]!==x?(y=s.jsxs("div",{ref:h,className:g,children:[u,b,x]}),t[15]=h,t[16]=g,t[17]=u,t[18]=b,t[19]=x,t[20]=y):y=t[20],y}function et(e){const t=N.c(11),{signedIn:o}=e;let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("p",{className:"text-primary mb-5 flex items-baseline justify-center gap-3 font-mono text-[11px] tracking-[0.2em] uppercase",children:["Built by",s.jsx("a",{href:"https://rebulk.com",className:"text-foreground hover:text-primary transition-colors",children:s.jsx(_e,{className:"h-2.5 w-auto"})})]}),t[0]=n):n=t[0];let a,c;t[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("h1",{className:"text-5xl font-black tracking-tight text-balance sm:text-6xl",children:[Ce,s.jsx("span",{className:"text-primary",children:Ee})]}),c=s.jsx("p",{className:"text-muted-foreground mx-auto mt-5 max-w-xl text-lg text-balance",children:$e}),t[1]=a,t[2]=c):(a=t[1],c=t[2]);let i;t[3]!==o?(i=o?s.jsx(ne,{asChild:!0,size:"lg",children:s.jsx(ae,{href:"/dashboard",children:"Open dashboard"})}):s.jsx(ne,{asChild:!0,size:"lg",children:s.jsx(ae,{href:ue(),children:"Get started"})}),t[3]=o,t[4]=i):i=t[4];let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ne,{asChild:!0,variant:"outline",size:"lg",children:s.jsx(ae,{href:pe(),children:"Read the docs"})}),t[5]=d):d=t[5];let r;t[6]!==i?(r=s.jsxs("div",{className:"mt-8 flex items-center justify-center gap-3",children:[i,d]}),t[6]=i,t[7]=r):r=t[7];let l;t[8]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"mt-6 h-32","data-hero-strip":!0}),t[8]=l):l=t[8];let m;return t[9]!==r?(m=s.jsx(Ze,{children:s.jsxs("section",{className:"relative mx-auto max-w-3xl px-6 pt-14 pb-0 text-center",children:[n,a,c,r,l]})}),t[9]=r,t[10]=m):m=t[10],m}const tt=[{comment:"# 1. add the gem",lines:["bundle add railwatch"]},{comment:"# 2. initializer, routes, Kamal hook, browser client, matchers",lines:["bin/rails generate railwatch:install --token=rw_… --kamal-secrets"]},{comment:"# 3. check every piece is wired up",lines:["bin/rails railwatch:doctor"]},{comment:"# 4. connect your editor's assistant",lines:["bin/rails railwatch:mcp"]}];function st(){const e=N.c(4);let t,o,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("p",{className:"text-primary mb-2 font-mono text-[11px] tracking-[0.2em] uppercase",children:"Install"}),o=s.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Five-minute install"}),n=s.jsx("p",{className:"text-muted-foreground mt-2",children:"One gem, one generator, no dashboard to build. The generator finishes by running the doctor, so you see a ✓ or a ✗ per check before you deploy."}),e[0]=t,e[1]=o,e[2]=n):(t=e[0],o=e[1],n=e[2]);let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("section",{className:"mx-auto max-w-2xl px-6 pb-16 text-center",children:[t,o,n,s.jsx(oe,{className:"mt-6 text-left",children:s.jsx(ie,{className:"space-y-1 font-mono text-sm",children:tt.map(at)})})]}),e[3]=a):a=e[3],a}function at(e,t){return s.jsxs("div",{className:t>0?"pt-3":void 0,children:[s.jsx("p",{className:"text-muted-foreground",children:e.comment}),e.lines.map(nt)]},e.comment)}function nt(e){return s.jsx("p",{className:"break-all",children:e},e)}const ce=[{type:"query",id:1,offset:2,duration:4.2,label:"SELECT users",stage:"action",sql:'SELECT "users".* FROM "users" WHERE "users"."id" = ?'},{type:"cache_event",id:2,offset:8,duration:.4,label:"read widgets/42",stage:"action",detail:{op:"read",key:"widgets/42"}},{type:"query",id:3,offset:11,duration:12.8,label:"SELECT widgets",stage:"action",sql:'SELECT "widgets".* FROM "widgets" WHERE "widgets"."account_id" = ?'},{type:"outgoing_request",id:4,offset:26,duration:40.1,label:"GET api.stripe.com",stage:"action",detail:{method:"GET",url:"https://api.stripe.com/v1/charges",status:200}},{type:"view_render",id:5,offset:68,duration:6.5,label:"widgets/index.html.erb",stage:"render"},{type:"enqueued_job",id:6,offset:70,duration:null,label:"WidgetSyncJob",stage:"render"}],rt={type:"exception",id:7,offset:66.4,duration:null,label:"NoMethodError: undefined method `total' for nil",stage:"action",source:"app/controllers/widgets_controller.rb:31"};function ot(){const e=N.c(68),t=me(),o=t==="braking"||t==="held",n=t==="held";let a;e[0]!==n?(a=n?[...ce,rt]:ce,e[0]=n,e[1]=a):a=e[1];const c=a,i=t==="held"?"new":t==="caution"||t==="clear"?"resolved":null;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=new Date().toISOString(),e[2]=d):d=e[2];let r;e[3]!==o?(r=s.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[s.jsx(ve,{lastSeenAt:d,erroring:o}),"storefront · production"]}),e[3]=o,e[4]=r):r=e[4];const l=n?"bg-danger/15 text-danger":"bg-live/15 text-live";let m;e[5]!==l?(m=z("rounded px-1.5 py-0.5 font-semibold transition-colors duration-500",l),e[5]=l,e[6]=m):m=e[6];const f=n?"500":"200";let h;e[7]!==m||e[8]!==f?(h=s.jsxs("span",{className:"text-muted-foreground flex items-center gap-2 font-mono text-xs",children:["GET /widgets",s.jsx("span",{className:m,children:f})]}),e[7]=m,e[8]=f,e[9]=h):h=e[9];const g=i?"translate-x-0":"translate-x-[calc(100%+2px)]";let u;e[10]!==g?(u=z("bg-popover absolute right-0 flex items-center gap-2 border-l px-3 text-xs shadow-[-12px_0_16px_-8px_rgba(0,0,0,.5)] transition-transform duration-500 ease-out motion-reduce:transition-none","max-md:bottom-2.5 max-md:gap-1.5 max-md:rounded-l-md max-md:border-y max-md:px-2.5 max-md:py-1.5 max-md:text-[11px] md:inset-y-0",g),e[10]=g,e[11]=u):u=e[11];const b=i==="resolved"?"bg-live/15 text-live":"bg-danger/15 text-danger";let x;e[12]!==b?(x=z("flex size-6 shrink-0 items-center justify-center rounded-full",b),e[12]=b,e[13]=x):x=e[13];let y;e[14]!==i?(y=i==="resolved"?s.jsx(Le,{className:"size-3.5"}):s.jsx(Ne,{className:"size-3.5"}),e[14]=i,e[15]=y):y=e[15];let p;e[16]!==x||e[17]!==y?(p=s.jsx("span",{className:x,children:y}),e[16]=x,e[17]=y,e[18]=p):p=e[18];const w=i==="resolved"?"SF-142 resolved":"New issue SF-142";let j;e[19]!==w?(j=s.jsx("span",{className:"block leading-tight font-medium",children:w}),e[19]=w,e[20]=j):j=e[20];const _=i==="resolved"?"Slack #storefront-alerts · just now":"Sent to Slack #storefront-alerts";let S;e[21]!==_?(S=s.jsx("span",{className:"max-md:hidden",children:_}),e[21]=_,e[22]=S):S=e[22];let C;e[23]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("span",{className:"md:hidden",children:"Slack #storefront-alerts"}),e[23]=C):C=e[23];let E;e[24]!==S?(E=s.jsxs("span",{className:"text-muted-foreground block leading-tight",children:[S,C]}),e[24]=S,e[25]=E):E=e[25];let $;e[26]!==j||e[27]!==E?($=s.jsxs("span",{className:"min-w-0",children:[j,E]}),e[26]=j,e[27]=E,e[28]=$):$=e[28];let A;e[29]!==p||e[30]!==$||e[31]!==u?(A=s.jsxs("div",{"aria-live":"polite",className:u,children:[p,$]}),e[29]=p,e[30]=$,e[31]=u,e[32]=A):A=e[32];let R;e[33]!==r||e[34]!==A||e[35]!==h?(R=s.jsxs(ge,{className:"relative flex-row items-center justify-between overflow-hidden border-b pb-6 max-md:flex-wrap max-md:gap-y-3",children:[r,h,A]}),e[33]=r,e[34]=A,e[35]=h,e[36]=R):R=e[36];let F;e[37]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(J,{label:"p50 latency",value:"42ms",hint:"last 24h"}),e[37]=F):F=e[37];const V=n?"2.1%":"0.4%",X=n?"destructive":"success",Y=n?"3 of 143 requests":"last 24h";let T;e[38]!==V||e[39]!==X||e[40]!==Y?(T=s.jsx(J,{label:"error rate",value:V,tone:X,hint:Y}),e[38]=V,e[39]=X,e[40]=Y,e[41]=T):T=e[41];let H;e[42]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(J,{label:"requests/min",value:"1.2k"}),e[42]=H):H=e[42];const Z=n?"1":"0",ee=n?"destructive":"success";let I;e[43]!==Z||e[44]!==ee?(I=s.jsx(J,{label:"open issues",value:Z,tone:ee}),e[43]=Z,e[44]=ee,e[45]=I):I=e[45];let L;e[46]!==T||e[47]!==I?(L=s.jsxs(Re,{children:[F,T,H,I]}),e[46]=T,e[47]=I,e[48]=L):L=e[48];const te=n?"border-danger/40 bg-danger/5":"bg-muted/30";let M;e[49]!==te?(M=z("flex items-center justify-between gap-3 rounded-md border px-3 py-2 text-xs transition-colors duration-500",te),e[49]=te,e[50]=M):M=e[50];let B;e[51]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[s.jsx("span",{className:"shrink-0 font-mono font-semibold",children:"SF-142"}),s.jsx("span",{className:"truncate",children:"NoMethodError in WidgetsController#index"})]}),e[51]=B):B=e[51];let W;e[52]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx("span",{className:"hidden sm:inline",children:"3 events"}),e[52]=W):W=e[52];const se=n?"open":"resolved";let P;e[53]!==se?(P=s.jsxs("div",{className:"text-muted-foreground flex shrink-0 items-center gap-3 font-mono",children:[W,s.jsx(Te,{status:se})]}),e[53]=se,e[54]=P):P=e[54];let D;e[55]!==M||e[56]!==P?(D=s.jsxs("div",{className:M,children:[B,P]}),e[55]=M,e[56]=P,e[57]=D):D=e[57];let G;e[58]===Symbol.for("react.memo_cache_sentinel")?(G={action:66,render:24},e[58]=G):G=e[58];let O;e[59]!==c?(O=s.jsx(Ie,{entries:c,total:90,stages:G}),e[59]=c,e[60]=O):O=e[60];let q;e[61]!==L||e[62]!==D||e[63]!==O?(q=s.jsxs(ie,{className:"grid gap-6",children:[L,D,O]}),e[61]=L,e[62]=D,e[63]=O,e[64]=q):q=e[64];let U;return e[65]!==R||e[66]!==q?(U=s.jsx("section",{className:"relative z-20 mx-auto -mt-8 max-w-5xl px-6 pb-16 md:-mt-4",children:s.jsxs(oe,{className:"overflow-hidden",children:[R,q]})}),e[65]=R,e[66]=q,e[67]=U):U=e[67],U}const it=110;function k(e){const t=N.c(8),{step:o,className:n,children:a}=e,c=o===void 0?0:o;let i;t[0]!==n?(i=z("motion-safe:animate-in motion-safe:fade-in motion-safe:slide-in-from-bottom-2 motion-safe:fill-mode-both motion-safe:duration-700 motion-safe:ease-out",n),t[0]=n,t[1]=i):i=t[1];const d=`${c*it}ms`;let r;t[2]!==d?(r={animationDelay:d},t[2]=d,t[3]=r):r=t[3];let l;return t[4]!==a||t[5]!==i||t[6]!==r?(l=s.jsx("div",{className:i,style:r,children:a}),t[4]=a,t[5]=i,t[6]=r,t[7]=l):l=t[7],l}function _t(){const e=N.c(15),{auth:t}=fe().props,o=!!t.user;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(xe,{title:"Railwatch — monitoring for Rails apps"}),e[0]=n):n=e[0];let a;e[1]!==o?(a=s.jsx(k,{step:0,children:s.jsx(Se,{signedIn:o})}),e[1]=o,e[2]=a):a=e[2];let c;e[3]!==o?(c=s.jsx(k,{step:1,children:s.jsx(et,{signedIn:o})}),e[3]=o,e[4]=c):c=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(k,{step:2,children:s.jsx(ot,{})}),e[5]=i):i=e[5];let d;e[6]!==c?(d=s.jsxs(Ye,{children:[c,i]}),e[6]=c,e[7]=d):d=e[7];let r;e[8]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(k,{step:3,children:s.jsx(Oe,{})}),e[8]=r):r=e[8];let l;e[9]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(k,{step:4,children:s.jsx(Pe,{})}),e[9]=l):l=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(k,{step:4,children:s.jsx(st,{})}),e[10]=m):m=e[10];let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(k,{step:5,children:s.jsx(ke,{})}),e[11]=f):f=e[11];let h;return e[12]!==a||e[13]!==d?(h=s.jsxs(s.Fragment,{children:[n,s.jsxs("div",{className:"dark bg-background text-foreground min-h-screen",children:[a,d,r,l,m,f]})]}),e[12]=a,e[13]=d,e[14]=h):h=e[14],h}export{_t as default};
|
|
1
|
+
import{c as N,j as s,r as v,C as z,L as ae,M as ue,N as pe,u as fe,H as xe}from"./inertia-Degv_G9N.js";import{C as oe,a as ie,b as ge}from"./card-BaJ8kNkp.js";import{D as be,a as je,b as ye,c as we,L as ve,B as Ne}from"./live-dot-DaXEbkXo.js";import{R as Se,M as _e,a as ke}from"./nav-BnD5XArZ.js";import{B as ne}from"./app-wordmark-1SRllgHv.js";import{H as Ce,a as Ee,b as $e}from"./copy-DaQMJWoT.js";import{S as Ae}from"./empty-state-BFTnQ2oT.js";import{S as J,a as Re}from"./stat-TxvoBiC8.js";import{I as Te}from"./status-badge-5NCVJHjo.js";import{T as Ie}from"./timeline-DZz5ZnHN.js";import{C as Le}from"./index-CX8Br7m9.js";import"./index-B0VXzXYG.js";import"./use-live-GKze1mNC.js";import"./arrow-up-DwKQcab4.js";import"./badge-CApjyWcg.js";import"./format-B9SDkrWj.js";const Me='claude mcp add railwatch --transport http https://railwatch.rebulk.com/mcp --header "Authorization: Bearer $RAILWATCH_MCP_TOKEN"';function Pe(){const e=N.c(4);let t,o,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("p",{className:"text-primary mb-2 font-mono text-[11px] tracking-[0.2em] uppercase",children:"MCP"}),o=s.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Works with your AI assistant"}),n=s.jsx("p",{className:"text-muted-foreground mt-2",children:"Railwatch speaks MCP, so Claude Code, Cursor, VS Code, and Zed can read your production data directly — issues, slow routes, query plans, stack profiles, logs, deploys. It ships prompts too: point one at an issue key and it pulls the occurrence, the timeline around it, and the deploy it started after. Writes are attributed to you, so a comment or a status change an assistant makes is signed in the issue's activity feed."}),e[0]=t,e[1]=o,e[2]=n):(t=e[0],o=e[1],n=e[2]);let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("section",{className:"mx-auto max-w-2xl px-6 pb-16 text-center",children:[t,o,n,s.jsx(oe,{className:"mt-6 text-left",children:s.jsxs(ie,{children:[s.jsx("p",{className:"text-muted-foreground font-mono text-sm",children:"# one line, then ask it what broke today"}),s.jsx("p",{className:"mt-1 font-mono text-sm break-all",children:Me})]})})]}),e[3]=a):a=e[3],a}const De=[{title:"Requests",description:"Every route's throughput, latency percentiles, and status codes, down to a single request's waterfall.",image:"requests",alt:"The Requests page: throughput and latency charts over a table of every route with its 2xx, 4xx, 5xx counts, error rate, and p95"},{title:"Jobs & scheduled tasks",description:"Queue depth, retries, and run history for Active Job and your recurring tasks.",image:"jobs",alt:"The Jobs page: attempts per hour split into processed and failed, a queue table with average wait, and the most recent runs"},{title:"Queries & N+1s",description:"Slow queries and N+1 patterns grouped by source location, not buried in a log line.",image:"queries",alt:"The Queries page: two N+1 patterns with a suggested fix and the source line, above every SQL shape ranked by count and p95"},{title:"Exceptions → Issues",description:"Exceptions are grouped into Issues that track occurrences, assignees, and status over time.",image:"issues",alt:"An issue page: a resolved NoMethodError with the raising line of source highlighted, its breadcrumbs, and the alerts it sent"},{title:"Inertia visits",description:"Page-by-page render and payload size, so a slow visit is obvious before support tickets show up.",image:"visits",alt:"The Inertia visits page: p75 web vitals, visits per hour, and a table of components with visit count, LCP, INP, and p95"},{title:"Deploy comparison",description:"Every chart is annotated with deploys, so a regression points straight at the change that caused it.",image:"deploys",alt:"A deploy page: the commits it shipped, its crash-free rate, and request p95, error rate, and job failures for the hour before and after"},{title:"Alerts",description:"Threshold and issue alerts delivered where your team already works.",image:"alerts",alt:"The Alerts page: new, resolved, and threshold alerts delivered to Slack and email, newest first"},{title:"MCP / API",description:"A JSON-RPC MCP endpoint and a token-authenticated API, so your AI assistant can query production directly.",image:"mcp",alt:"A request page with its Copy as Markdown button: the same timeline an assistant reads over MCP"}];function Oe(){const e=N.c(9),[t,o]=v.useState(null);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",children:De.map(l=>{const{title:m,description:f,image:h,alt:g}=l;return s.jsxs("div",{className:"bg-card flex flex-col overflow-hidden rounded-lg border",children:[s.jsx("button",{type:"button",onClick:()=>o(l),className:"group relative aspect-[4/3] w-full cursor-zoom-in overflow-hidden border-b bg-[#020618] text-left","aria-label":`Open a full screenshot of ${m}`,children:s.jsx("img",{src:`/marketing/${h}.webp`,alt:g,loading:"lazy",width:1200,height:900,className:"h-full w-full object-cover object-top transition-transform duration-500 ease-out group-hover:scale-[1.03] motion-reduce:transition-none"})}),s.jsxs("div",{className:"space-y-1 px-4 py-3",children:[s.jsx("h3",{className:"text-sm font-semibold",children:m}),s.jsx("p",{className:"text-muted-foreground text-[13px] leading-snug",children:f})]})]},m)})}),e[0]=n):n=e[0];const a=t!==null;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=l=>!l&&o(null),e[1]=c):c=e[1];let i;e[2]!==t?(i=t&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"border-b px-5 py-3",children:[s.jsx(be,{className:"text-base",children:t.title}),s.jsx(je,{children:t.description})]}),s.jsx("img",{src:`/marketing/${t.image}-full.webp`,alt:t.alt,width:1920,height:1200,className:"block max-h-[calc(92vh-4.5rem)] w-full object-contain object-top"})]}),e[2]=t,e[3]=i):i=e[3];let d;e[4]!==i?(d=s.jsx(ye,{className:"bg-background max-h-[92vh] w-[min(96vw,1400px)] gap-0 overflow-hidden p-0 sm:max-w-none",children:i}),e[4]=i,e[5]=d):d=e[5];let r;return e[6]!==a||e[7]!==d?(r=s.jsxs("section",{className:"mx-auto max-w-5xl px-6 pb-16",children:[n,s.jsx(we,{open:a,onOpenChange:c,children:d})]}),e[6]=a,e[7]=d,e[8]=r):r=e[8],r}const de=v.createContext("departed"),me=()=>v.useContext(de),qe=[["approaching",100],["braking",2300],["held",3300],["caution",6400],["clear",7200],["departed",8300]],ze=3200,Fe=1800,He={arriving:"clear",approaching:"clear",braking:"clear",held:"stop",caution:"caution",clear:"clear",departed:"clear"};function he(){const[e]=v.useState(Be);return e}function Be(){return typeof window<"u"&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches}function We(){const e=he(),[t,o]=v.useState(e?"arriving":"departed");return v.useEffect(()=>{if(!e)return;const n=qe.map(([a,c])=>setTimeout(()=>o(a),c));return()=>n.forEach(clearTimeout)},[]),{stage:t,animated:e}}const Ge=72,le=13.5,re=112,Ue=14;function Je(e,t,o,n){let a=0,[c,i]=e;for(let d=1;d<=64;d++){const r=d/64,l=1-r,m=l*l*l*e[0]+3*l*l*r*t[0]+3*l*r*r*o[0]+r*r*r*n[0],f=l*l*l*e[1]+3*l*l*r*t[1]+3*l*r*r*o[1]+r*r*r*n[1];a+=Math.hypot(m-c,f-i),c=m,i=f}return a}function Qe(e){const t=e.querySelector("h1"),o=e.querySelector("[data-hero-strip]");if(!t||!o)return null;const n=e.getBoundingClientRect(),a=t.getBoundingClientRect(),c=o.getBoundingClientRect(),i=n.width,d=n.height,r=i<768,l=i/2,m=r?10:Math.max(16,l-520),f=c.top-n.top+60,h=Ge,g=l+(r?120:220),u=[l-(r?30:60),a.top-n.top+a.height+4],b=[m,f-h],x=b[1]-u[1],y=[u[0]-x*.55,u[1]+x*.32],p=[m,b[1]-x*.42],w=Je(u,y,p,b),j=Math.PI*h/2,S=g-Ue-re/2,_=w+j+(S-(m+h)),C=w+j+(i+re+40-(m+h));return{w:i,h:d,p0:u,c1:y,c2:p,p3:b,xL:m,yL:f,r:h,cx:l,xSignal:g,yFadeTop:u[1],yFadeFull:u[1]+x*.7,stop:_,total:C}}function Q(e,t){const[o,n]=e.p0,a=e.r+t,c=t;return[`M ${o+c*.5} ${n-c*.85}`,`C ${e.c1[0]+c*.5} ${e.c1[1]-c*.85}, ${e.c2[0]-t} ${e.c2[1]}, ${e.p3[0]-t} ${e.p3[1]}`,`A ${a} ${a} 0 0 0 ${e.xL+e.r} ${e.yL+t}`,`L ${e.w+re+40} ${e.yL+t}`].join(" ")}const K=[{at:-41,w:30},{at:-4,w:34},{at:37,w:38}],Ke=K.length-1,Ve=1;function Xe(e){const t=N.c(14),{index:o,held:n,style:a}=e,c=K[o],i=-c.w/2;let d;t[0]!==c.w||t[1]!==i?(d=s.jsx("rect",{x:i,y:"-7",width:c.w,height:"14",rx:"3",fill:"currentColor"}),t[0]=c.w,t[1]=i,t[2]=d):d=t[2];let r;t[3]!==c.w||t[4]!==o?(r=o===Ke&&s.jsx("rect",{x:c.w/2-6,y:"-4",width:"4",height:"8",rx:"1",className:"text-primary",fill:"currentColor"}),t[3]=c.w,t[4]=o,t[5]=r):r=t[5];let l;t[6]!==n||t[7]!==o?(l=o===Ve&&s.jsx("rect",{x:"-5",y:"-25",width:"10",height:"10",transform:"rotate(45 0 -20)",className:z("transition-opacity duration-300",n?"opacity-100":"opacity-0"),fill:"rgb(239 68 68)"}),t[6]=n,t[7]=o,t[8]=l):l=t[8];let m;return t[9]!==a||t[10]!==d||t[11]!==r||t[12]!==l?(m=s.jsxs("g",{className:"text-foreground/85",style:a,children:[d,r,l]}),t[9]=a,t[10]=d,t[11]=r,t[12]=l,t[13]=m):m=t[13],m}function Ye(e){const t=N.c(3),{children:o}=e,{stage:n}=We();let a;return t[0]!==o||t[1]!==n?(a=s.jsx(de.Provider,{value:n,children:o}),t[0]=o,t[1]=n,t[2]=a):a=t[2],a}function Ze(e){const t=N.c(21),{children:o}=e,n=v.useRef(null),[a,c]=v.useState(null),i=me(),d=he(),r=v.useId();let l,m;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{const p=n.current;if(!p)return;const w=()=>c(Qe(p));w();const j=new ResizeObserver(w);return j.observe(p),()=>j.disconnect()},m=[],t[0]=l,t[1]=m):(l=t[0],m=t[1]),v.useEffect(l,m);const f=i==="held";let h,g,u;if(t[2]!==d||t[3]!==f||t[4]!==a||t[5]!==r||t[6]!==i){let p;if(a)e:switch(i){case"arriving":{p={distance:0};break e}case"approaching":case"braking":case"held":case"caution":{p={distance:a.stop,transition:`offset-distance ${ze}ms cubic-bezier(.45,.05,.25,1)`};break e}case"clear":{p={distance:a.stop+120,transition:"offset-distance 900ms ease-in-out"};break e}case"departed":p={distance:a.total,transition:`offset-distance ${Fe}ms cubic-bezier(.4,0,.8,.6)`}}const w=j=>a&&p?{offsetPath:`path("${Q(a,0)}")`,offsetRotate:"auto",offsetDistance:`${p.distance+K[j].at}px`,transition:p.transition}:void 0;h=n,g="relative overflow-hidden",u=a&&s.jsxs("svg",{"aria-hidden":!0,className:"text-foreground/30 pointer-events-none absolute inset-0 z-0 h-full w-full [mask-image:linear-gradient(to_right,black_86%,transparent)]",width:a.w,height:a.h,viewBox:`0 0 ${a.w} ${a.h}`,children:[s.jsxs("defs",{children:[s.jsxs("linearGradient",{id:`${r}-fade`,gradientUnits:"userSpaceOnUse",x1:"0",y1:a.yFadeTop,x2:"0",y2:a.yFadeFull,children:[s.jsx("stop",{offset:"0",stopColor:"white",stopOpacity:"0"}),s.jsx("stop",{offset:"1",stopColor:"white",stopOpacity:"1"})]}),s.jsx("mask",{id:r,maskUnits:"userSpaceOnUse",x:"0",y:"0",width:a.w,height:a.h,children:s.jsx("rect",{width:a.w,height:a.h,fill:`url(#${r}-fade)`})})]}),s.jsxs("g",{mask:`url(#${r})`,children:[s.jsx("path",{d:Q(a,0),fill:"none",stroke:"currentColor",strokeWidth:"30",strokeDasharray:"4 18"}),s.jsx("path",{d:Q(a,le/2),fill:"none",stroke:"currentColor",strokeWidth:"2.5"}),s.jsx("path",{d:Q(a,-le/2),fill:"none",stroke:"currentColor",strokeWidth:"2.5"}),d&&K.map((j,S)=>s.jsx(Xe,{index:S,held:f,style:w(S)},S))]})]}),t[2]=d,t[3]=f,t[4]=a,t[5]=r,t[6]=i,t[7]=h,t[8]=g,t[9]=u}else h=t[7],g=t[8],u=t[9];let b;t[10]!==o?(b=s.jsx("div",{className:"relative z-10",children:o}),t[10]=o,t[11]=b):b=t[11];let x;t[12]!==a||t[13]!==i?(x=a&&s.jsx(s.Fragment,{children:s.jsx("div",{className:"pointer-events-none absolute z-10 h-0 w-0",style:{left:a.xSignal,top:a.yL},"aria-hidden":!0,children:s.jsx(Ae,{aspect:He[i],className:"left-0 md:left-0"})})}),t[12]=a,t[13]=i,t[14]=x):x=t[14];let y;return t[15]!==h||t[16]!==g||t[17]!==u||t[18]!==b||t[19]!==x?(y=s.jsxs("div",{ref:h,className:g,children:[u,b,x]}),t[15]=h,t[16]=g,t[17]=u,t[18]=b,t[19]=x,t[20]=y):y=t[20],y}function et(e){const t=N.c(11),{signedIn:o}=e;let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("p",{className:"text-primary mb-5 flex items-baseline justify-center gap-3 font-mono text-[11px] tracking-[0.2em] uppercase",children:["Built by",s.jsx("a",{href:"https://rebulk.com",className:"text-foreground hover:text-primary transition-colors",children:s.jsx(Se,{className:"h-2.5 w-auto"})})]}),t[0]=n):n=t[0];let a,c;t[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("h1",{className:"text-5xl font-black tracking-tight text-balance sm:text-6xl",children:[Ce,s.jsx("span",{className:"text-primary",children:Ee})]}),c=s.jsx("p",{className:"text-muted-foreground mx-auto mt-5 max-w-xl text-lg text-balance",children:$e}),t[1]=a,t[2]=c):(a=t[1],c=t[2]);let i;t[3]!==o?(i=o?s.jsx(ne,{asChild:!0,size:"lg",children:s.jsx(ae,{href:"/dashboard",children:"Open dashboard"})}):s.jsx(ne,{asChild:!0,size:"lg",children:s.jsx(ae,{href:ue(),children:"Get started"})}),t[3]=o,t[4]=i):i=t[4];let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ne,{asChild:!0,variant:"outline",size:"lg",children:s.jsx(ae,{href:pe(),children:"Read the docs"})}),t[5]=d):d=t[5];let r;t[6]!==i?(r=s.jsxs("div",{className:"mt-8 flex items-center justify-center gap-3",children:[i,d]}),t[6]=i,t[7]=r):r=t[7];let l;t[8]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"mt-6 h-32","data-hero-strip":!0}),t[8]=l):l=t[8];let m;return t[9]!==r?(m=s.jsx(Ze,{children:s.jsxs("section",{className:"relative mx-auto max-w-3xl px-6 pt-14 pb-0 text-center",children:[n,a,c,r,l]})}),t[9]=r,t[10]=m):m=t[10],m}const tt=[{comment:"# 1. add the gem",lines:["bundle add railwatch"]},{comment:"# 2. initializer, routes, Kamal hook, browser client, matchers",lines:["bin/rails generate railwatch:install --prompt-token --kamal-secrets"]},{comment:"# 3. check every piece is wired up",lines:["bin/rails railwatch:doctor"]},{comment:"# 4. connect your editor's assistant",lines:["bin/rails railwatch:mcp"]}];function st(){const e=N.c(4);let t,o,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("p",{className:"text-primary mb-2 font-mono text-[11px] tracking-[0.2em] uppercase",children:"Install"}),o=s.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Five-minute install"}),n=s.jsx("p",{className:"text-muted-foreground mt-2",children:"One gem, one generator, no dashboard to build. The generator finishes by running the doctor, so you see a ✓ or a ✗ per check before you deploy."}),e[0]=t,e[1]=o,e[2]=n):(t=e[0],o=e[1],n=e[2]);let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("section",{className:"mx-auto max-w-2xl px-6 pb-16 text-center",children:[t,o,n,s.jsx(oe,{className:"mt-6 text-left",children:s.jsx(ie,{className:"space-y-1 font-mono text-sm",children:tt.map(at)})})]}),e[3]=a):a=e[3],a}function at(e,t){return s.jsxs("div",{className:t>0?"pt-3":void 0,children:[s.jsx("p",{className:"text-muted-foreground",children:e.comment}),e.lines.map(nt)]},e.comment)}function nt(e){return s.jsx("p",{className:"break-all",children:e},e)}const ce=[{type:"query",id:1,offset:2,duration:4.2,label:"SELECT users",stage:"action",sql:'SELECT "users".* FROM "users" WHERE "users"."id" = ?'},{type:"cache_event",id:2,offset:8,duration:.4,label:"read widgets/42",stage:"action",detail:{op:"read",key:"widgets/42"}},{type:"query",id:3,offset:11,duration:12.8,label:"SELECT widgets",stage:"action",sql:'SELECT "widgets".* FROM "widgets" WHERE "widgets"."account_id" = ?'},{type:"outgoing_request",id:4,offset:26,duration:40.1,label:"GET api.stripe.com",stage:"action",detail:{method:"GET",url:"https://api.stripe.com/v1/charges",status:200}},{type:"view_render",id:5,offset:68,duration:6.5,label:"widgets/index.html.erb",stage:"render"},{type:"enqueued_job",id:6,offset:70,duration:null,label:"WidgetSyncJob",stage:"render"}],rt={type:"exception",id:7,offset:66.4,duration:null,label:"NoMethodError: undefined method `total' for nil",stage:"action",source:"app/controllers/widgets_controller.rb:31"};function ot(){const e=N.c(68),t=me(),o=t==="braking"||t==="held",n=t==="held";let a;e[0]!==n?(a=n?[...ce,rt]:ce,e[0]=n,e[1]=a):a=e[1];const c=a,i=t==="held"?"new":t==="caution"||t==="clear"?"resolved":null;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=new Date().toISOString(),e[2]=d):d=e[2];let r;e[3]!==o?(r=s.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[s.jsx(ve,{lastSeenAt:d,erroring:o}),"storefront · production"]}),e[3]=o,e[4]=r):r=e[4];const l=n?"bg-danger/15 text-danger":"bg-live/15 text-live";let m;e[5]!==l?(m=z("rounded px-1.5 py-0.5 font-semibold transition-colors duration-500",l),e[5]=l,e[6]=m):m=e[6];const f=n?"500":"200";let h;e[7]!==m||e[8]!==f?(h=s.jsxs("span",{className:"text-muted-foreground flex items-center gap-2 font-mono text-xs",children:["GET /widgets",s.jsx("span",{className:m,children:f})]}),e[7]=m,e[8]=f,e[9]=h):h=e[9];const g=i?"translate-x-0":"translate-x-[calc(100%+2px)]";let u;e[10]!==g?(u=z("bg-popover absolute right-0 flex items-center gap-2 border-l px-3 text-xs shadow-[-12px_0_16px_-8px_rgba(0,0,0,.5)] transition-transform duration-500 ease-out motion-reduce:transition-none","max-md:bottom-2.5 max-md:gap-1.5 max-md:rounded-l-md max-md:border-y max-md:px-2.5 max-md:py-1.5 max-md:text-[11px] md:inset-y-0",g),e[10]=g,e[11]=u):u=e[11];const b=i==="resolved"?"bg-live/15 text-live":"bg-danger/15 text-danger";let x;e[12]!==b?(x=z("flex size-6 shrink-0 items-center justify-center rounded-full",b),e[12]=b,e[13]=x):x=e[13];let y;e[14]!==i?(y=i==="resolved"?s.jsx(Le,{className:"size-3.5"}):s.jsx(Ne,{className:"size-3.5"}),e[14]=i,e[15]=y):y=e[15];let p;e[16]!==x||e[17]!==y?(p=s.jsx("span",{className:x,children:y}),e[16]=x,e[17]=y,e[18]=p):p=e[18];const w=i==="resolved"?"SF-142 resolved":"New issue SF-142";let j;e[19]!==w?(j=s.jsx("span",{className:"block leading-tight font-medium",children:w}),e[19]=w,e[20]=j):j=e[20];const S=i==="resolved"?"Slack #storefront-alerts · just now":"Sent to Slack #storefront-alerts";let _;e[21]!==S?(_=s.jsx("span",{className:"max-md:hidden",children:S}),e[21]=S,e[22]=_):_=e[22];let C;e[23]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("span",{className:"md:hidden",children:"Slack #storefront-alerts"}),e[23]=C):C=e[23];let E;e[24]!==_?(E=s.jsxs("span",{className:"text-muted-foreground block leading-tight",children:[_,C]}),e[24]=_,e[25]=E):E=e[25];let $;e[26]!==j||e[27]!==E?($=s.jsxs("span",{className:"min-w-0",children:[j,E]}),e[26]=j,e[27]=E,e[28]=$):$=e[28];let A;e[29]!==p||e[30]!==$||e[31]!==u?(A=s.jsxs("div",{"aria-live":"polite",className:u,children:[p,$]}),e[29]=p,e[30]=$,e[31]=u,e[32]=A):A=e[32];let R;e[33]!==r||e[34]!==A||e[35]!==h?(R=s.jsxs(ge,{className:"relative flex-row items-center justify-between overflow-hidden border-b pb-6 max-md:flex-wrap max-md:gap-y-3",children:[r,h,A]}),e[33]=r,e[34]=A,e[35]=h,e[36]=R):R=e[36];let F;e[37]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(J,{label:"p50 latency",value:"42ms",hint:"last 24h"}),e[37]=F):F=e[37];const V=n?"2.1%":"0.4%",X=n?"destructive":"success",Y=n?"3 of 143 requests":"last 24h";let T;e[38]!==V||e[39]!==X||e[40]!==Y?(T=s.jsx(J,{label:"error rate",value:V,tone:X,hint:Y}),e[38]=V,e[39]=X,e[40]=Y,e[41]=T):T=e[41];let H;e[42]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(J,{label:"requests/min",value:"1.2k"}),e[42]=H):H=e[42];const Z=n?"1":"0",ee=n?"destructive":"success";let I;e[43]!==Z||e[44]!==ee?(I=s.jsx(J,{label:"open issues",value:Z,tone:ee}),e[43]=Z,e[44]=ee,e[45]=I):I=e[45];let L;e[46]!==T||e[47]!==I?(L=s.jsxs(Re,{children:[F,T,H,I]}),e[46]=T,e[47]=I,e[48]=L):L=e[48];const te=n?"border-danger/40 bg-danger/5":"bg-muted/30";let M;e[49]!==te?(M=z("flex items-center justify-between gap-3 rounded-md border px-3 py-2 text-xs transition-colors duration-500",te),e[49]=te,e[50]=M):M=e[50];let B;e[51]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[s.jsx("span",{className:"shrink-0 font-mono font-semibold",children:"SF-142"}),s.jsx("span",{className:"truncate",children:"NoMethodError in WidgetsController#index"})]}),e[51]=B):B=e[51];let W;e[52]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx("span",{className:"hidden sm:inline",children:"3 events"}),e[52]=W):W=e[52];const se=n?"open":"resolved";let P;e[53]!==se?(P=s.jsxs("div",{className:"text-muted-foreground flex shrink-0 items-center gap-3 font-mono",children:[W,s.jsx(Te,{status:se})]}),e[53]=se,e[54]=P):P=e[54];let D;e[55]!==M||e[56]!==P?(D=s.jsxs("div",{className:M,children:[B,P]}),e[55]=M,e[56]=P,e[57]=D):D=e[57];let G;e[58]===Symbol.for("react.memo_cache_sentinel")?(G={action:66,render:24},e[58]=G):G=e[58];let O;e[59]!==c?(O=s.jsx(Ie,{entries:c,total:90,stages:G}),e[59]=c,e[60]=O):O=e[60];let q;e[61]!==L||e[62]!==D||e[63]!==O?(q=s.jsxs(ie,{className:"grid gap-6",children:[L,D,O]}),e[61]=L,e[62]=D,e[63]=O,e[64]=q):q=e[64];let U;return e[65]!==R||e[66]!==q?(U=s.jsx("section",{className:"relative z-20 mx-auto -mt-8 max-w-5xl px-6 pb-16 md:-mt-4",children:s.jsxs(oe,{className:"overflow-hidden",children:[R,q]})}),e[65]=R,e[66]=q,e[67]=U):U=e[67],U}const it=110;function k(e){const t=N.c(8),{step:o,className:n,children:a}=e,c=o===void 0?0:o;let i;t[0]!==n?(i=z("motion-safe:animate-in motion-safe:fade-in motion-safe:slide-in-from-bottom-2 motion-safe:fill-mode-both motion-safe:duration-700 motion-safe:ease-out",n),t[0]=n,t[1]=i):i=t[1];const d=`${c*it}ms`;let r;t[2]!==d?(r={animationDelay:d},t[2]=d,t[3]=r):r=t[3];let l;return t[4]!==a||t[5]!==i||t[6]!==r?(l=s.jsx("div",{className:i,style:r,children:a}),t[4]=a,t[5]=i,t[6]=r,t[7]=l):l=t[7],l}function St(){const e=N.c(15),{auth:t}=fe().props,o=!!t.user;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(xe,{title:"Railwatch — monitoring for Rails apps"}),e[0]=n):n=e[0];let a;e[1]!==o?(a=s.jsx(k,{step:0,children:s.jsx(_e,{signedIn:o})}),e[1]=o,e[2]=a):a=e[2];let c;e[3]!==o?(c=s.jsx(k,{step:1,children:s.jsx(et,{signedIn:o})}),e[3]=o,e[4]=c):c=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(k,{step:2,children:s.jsx(ot,{})}),e[5]=i):i=e[5];let d;e[6]!==c?(d=s.jsxs(Ye,{children:[c,i]}),e[6]=c,e[7]=d):d=e[7];let r;e[8]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(k,{step:3,children:s.jsx(Oe,{})}),e[8]=r):r=e[8];let l;e[9]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(k,{step:4,children:s.jsx(Pe,{})}),e[9]=l):l=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(k,{step:4,children:s.jsx(st,{})}),e[10]=m):m=e[10];let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(k,{step:5,children:s.jsx(ke,{})}),e[11]=f):f=e[11];let h;return e[12]!==a||e[13]!==d?(h=s.jsxs(s.Fragment,{children:[n,s.jsxs("div",{className:"dark bg-background text-foreground min-h-screen",children:[a,d,r,l,m,f]})]}),e[12]=a,e[13]=d,e[14]=h):h=e[14],h}export{St as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,u,j as s,H as x,L as f,a7 as h,aI as j}from"./inertia-
|
|
1
|
+
import{c as p,u,j as s,H as x,L as f,a7 as h,aI as j}from"./inertia-Degv_G9N.js";import{H as g,S as v}from"./layout-C8q7GUlZ.js";import{B as y}from"./badge-CApjyWcg.js";import{B as S}from"./app-wordmark-1SRllgHv.js";import{A as N}from"./app-layout-B5Fcdwfz.js";import"./separator-CrM10Oot.js";import"./index-B0VXzXYG.js";import"./live-dot-DaXEbkXo.js";import"./index-CX8Br7m9.js";import"./checkbox-Bf41R8W6.js";import"./label-B_vK19tR.js";const d=[{title:"Sessions",href:j()}];function R(m){const e=p.c(9),{sessions:n}=m,{auth:a}=u().props;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(x,{title:d[d.length-1].title}),e[0]=r):r=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(g,{title:"Sessions",description:"Manage your active sessions across devices"}),e[1]=l):l=e[1];let i;if(e[2]!==a||e[3]!==n){let c;e[5]!==a?(c=t=>s.jsx("div",{className:"flex flex-col space-y-2 rounded-lg border p-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsxs("p",{className:"font-medium",children:[t.user_agent,t.id===a.session.id&&s.jsx(y,{variant:"secondary",className:"ml-2",children:"Current"})]}),s.jsxs("p",{className:"text-muted-foreground text-sm",children:["IP: ",t.ip_address]}),s.jsxs("p",{className:"text-muted-foreground text-sm",children:["Active since:"," ",new Date(t.created_at).toLocaleString()]})]}),t.id!==a.session.id&&s.jsx(S,{variant:"destructive",asChild:!0,children:s.jsx(f,{method:"delete",href:h({id:t.id}),as:"button",children:"Log out"})})]})},t.id),e[5]=a,e[6]=c):c=e[6],i=n.map(c),e[2]=a,e[3]=n,e[4]=i}else i=e[4];let o;return e[7]!==i?(o=s.jsxs(N,{breadcrumbs:d,children:[r,s.jsx(v,{children:s.jsxs("div",{className:"space-y-6",children:[l,s.jsx("div",{className:"space-y-4",children:i})]})})]}),e[7]=i,e[8]=o):o=e[8],o}export{R as default};
|