railwatch 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -0
- data/app/jobs/railwatch/prune_telemetry_job.rb +20 -1
- data/app/models/railwatch/telemetry_record.rb +48 -0
- data/db/railwatch_telemetry_migrate/20260903000000_enable_incremental_vacuum.rb +62 -0
- data/docs/embedded.md +47 -1
- data/lib/railwatch/version.rb +1 -1
- data/lib/tasks/railwatch_tasks.rake +161 -0
- data/public/railwatch/assets/{app-layout-yh-sPWgK.js → app-layout-CdJ5Qjms.js} +1 -1
- data/public/railwatch/assets/{app-wordmark-nbjkzxwQ.js → app-wordmark-B-0yZiDb.js} +1 -1
- data/public/railwatch/assets/{appearance-CDuRvQTB.js → appearance-CU28GBf1.js} +1 -1
- data/public/railwatch/assets/application-CwshqwM6.css +1 -0
- data/public/railwatch/assets/{arrow-up-DVtOGdVA.js → arrow-up-DY1fS0tD.js} +1 -1
- data/public/railwatch/assets/{auth-layout-TCwPpS1K.js → auth-layout-C3FKuUJz.js} +1 -1
- data/public/railwatch/assets/{badge-Daw4Hvr8.js → badge-DKvItdlb.js} +1 -1
- data/public/railwatch/assets/{braces-DhFbHPsz.js → braces-Bse5Gh3K.js} +1 -1
- data/public/railwatch/assets/{card-BX_3HXcJ.js → card-C9j_ffR9.js} +1 -1
- data/public/railwatch/assets/{chart-B14-N9g7.js → chart-Cmh6JEww.js} +1 -1
- data/public/railwatch/assets/{chart-hover-Vy52H4uD.js → chart-hover-B0SjyWFy.js} +1 -1
- data/public/railwatch/assets/{chart-panel-Cb4S_ej_.js → chart-panel-DKNxoauI.js} +1 -1
- data/public/railwatch/assets/{checkbox-D3aRSsBj.js → checkbox-BsBkRg5n.js} +1 -1
- data/public/railwatch/assets/{code-KvW8k7Jr.js → code-C879Qwgg.js} +1 -1
- data/public/railwatch/assets/{copy-block-BKFGd11J.js → copy-block-DtO_3esq.js} +1 -1
- data/public/railwatch/assets/{copy-id-Djks1fXB.js → copy-id-SeLCKsW2.js} +1 -1
- data/public/railwatch/assets/{cursor-load-more-BXV0f1D_.js → cursor-load-more-OpHbe_kE.js} +1 -1
- data/public/railwatch/assets/{data-table-iv1bdF6u.js → data-table-Bc3ZRnpb.js} +1 -1
- data/public/railwatch/assets/{edit-__9yJlO3.js → edit-BMpgcQhU.js} +1 -1
- data/public/railwatch/assets/{edit-DMKUF8Zi.js → edit-CTD1jSWh.js} +1 -1
- data/public/railwatch/assets/{edit-BZc_Iawe.js → edit-DDvf9mkq.js} +1 -1
- data/public/railwatch/assets/{empty-state-6j_0AaQQ.js → empty-state-CkPROZB0.js} +1 -1
- data/public/railwatch/assets/env-layout-aGQgTZRg.js +1 -0
- data/public/railwatch/assets/{execution-path-CzgBUi5e.js → execution-path-BX5NcXUZ.js} +1 -1
- data/public/railwatch/assets/{filter-bar-9SU5NrzX.js → filter-bar-C0O2rJVr.js} +1 -1
- data/public/railwatch/assets/{flamegraph-qcekju8V.js → flamegraph-Vj4QSAlT.js} +1 -1
- data/public/railwatch/assets/{frames-Cyu7KMxZ.js → frames-CTiGwm4E.js} +1 -1
- data/public/railwatch/assets/{google-sign-in-button-DsTSfmzY.js → google-sign-in-button-BzogBGeF.js} +1 -1
- data/public/railwatch/assets/index-B-kuWp-m.js +1 -0
- data/public/railwatch/assets/{index-1ol1-QWI.js → index-B2_QluAw.js} +1 -1
- data/public/railwatch/assets/index-B69Iad2U.js +1 -0
- data/public/railwatch/assets/index-BCLvKVhP.js +1 -0
- data/public/railwatch/assets/index-BKgAm-w2.js +1 -0
- data/public/railwatch/assets/index-BRN_bXV_.js +1 -0
- data/public/railwatch/assets/index-Ble4RoA3.js +1 -0
- data/public/railwatch/assets/index-Bvy021Vv.js +1 -0
- data/public/railwatch/assets/index-CCLMaY9k.js +1 -0
- data/public/railwatch/assets/index-CD4HIHq0.js +1 -0
- data/public/railwatch/assets/{index-Cmlwy1-V.js → index-CPQKOQxV.js} +1 -1
- data/public/railwatch/assets/{index-CeYKnapu.js → index-CY6lbwAC.js} +1 -1
- data/public/railwatch/assets/index-C__S10ze.js +1 -0
- data/public/railwatch/assets/index-ChQ1_u8u.js +1 -0
- data/public/railwatch/assets/index-CtT4T6kp.js +1 -0
- data/public/railwatch/assets/index-CxU1Jj35.js +1 -0
- data/public/railwatch/assets/index-D3Axxkk2.js +1 -0
- data/public/railwatch/assets/index-D5YVcrqR.js +1 -0
- data/public/railwatch/assets/index-D9cV-IQr.js +1 -0
- data/public/railwatch/assets/index-DbyRgbzQ.js +1 -0
- data/public/railwatch/assets/index-Dcxd_H-U.js +1 -0
- data/public/railwatch/assets/index-Dep2XomH.js +1 -0
- data/public/railwatch/assets/{index-DlumCsWY.js → index-DepurF6s.js} +2 -2
- data/public/railwatch/assets/{index-BRiq3SNR.js → index-DigUOHQ8.js} +1 -1
- data/public/railwatch/assets/index-DkgImCOg.js +1 -0
- data/public/railwatch/assets/{index-DU9F5b5d.js → index-DxuDLoTc.js} +1 -1
- data/public/railwatch/assets/{index-OqI59zPb.js → index-Dy7Wg880.js} +1 -1
- data/public/railwatch/assets/index-FgpFDA1Z.js +1 -0
- data/public/railwatch/assets/index-LaTKDe0-.js +1 -0
- data/public/railwatch/assets/index-Wb_U2_hz.js +1 -0
- data/public/railwatch/assets/index-chS28dvS.js +1 -0
- data/public/railwatch/assets/index-jSEU_Yp7.js +1 -0
- data/public/railwatch/assets/index-uuKg6Zqn.js +1 -0
- data/public/railwatch/assets/index-y2c8xKzI.js +1 -0
- data/public/railwatch/assets/index-z2YfKBJl.js +1 -0
- data/public/railwatch/assets/{inertia-TViv6kNv.js → inertia-CgBdJDaE.js} +2 -2
- data/public/railwatch/assets/{input-error-LxImUkxv.js → input-error-DfpIawjl.js} +1 -1
- data/public/railwatch/assets/{json-viewer-Ar4cjPDW.js → json-viewer-CH7nEIUs.js} +1 -1
- data/public/railwatch/assets/klass-BTg1l2AO.js +1 -0
- data/public/railwatch/assets/{label-COUKWqE_.js → label-BWgQzHCO.js} +1 -1
- data/public/railwatch/assets/{layout-DNSLAkw_.js → layout-neknbxn-.js} +1 -1
- data/public/railwatch/assets/{live-dot-ChfUtY3p.js → live-dot-Bejk0a5o.js} +1 -1
- data/public/railwatch/assets/{nav-CNnDqPlm.js → nav-C1M8941-.js} +1 -1
- data/public/railwatch/assets/{new-D4uewYC8.js → new-B8CzyoMu.js} +1 -1
- data/public/railwatch/assets/{new-Be55nmt9.js → new-BnGIYM37.js} +1 -1
- data/public/railwatch/assets/{new-Bi_xQiIb.js → new-DElC-JCS.js} +1 -1
- data/public/railwatch/assets/{new-D05SajFR.js → new-DGYPcz7w.js} +1 -1
- data/public/railwatch/assets/{new-84S8ZJq9.js → new-DLgCLBiW.js} +1 -1
- data/public/railwatch/assets/{new-BvCT8TMg.js → new-bBwawsEg.js} +1 -1
- data/public/railwatch/assets/{onboarding-CYZi5Cqc.js → onboarding-CW0jUhHT.js} +1 -1
- data/public/railwatch/assets/{origin-identity-6q1-CBts.js → origin-identity-bJMxeEHB.js} +1 -1
- data/public/railwatch/assets/{percentile-picker-gFZCXtdb.js → percentile-picker-DLAnTKY3.js} +1 -1
- data/public/railwatch/assets/{relative-time-IOOgl5n2.js → relative-time-BHbJh8HW.js} +1 -1
- data/public/railwatch/assets/release-health-2O1GRclB.js +1 -0
- data/public/railwatch/assets/route-DSw8aIZa.js +1 -0
- data/public/railwatch/assets/{segmented-h1VdDTqE.js → segmented-Dg8CES94.js} +1 -1
- data/public/railwatch/assets/{select-_AJsUa7X.js → select-CqKpvI98.js} +1 -1
- data/public/railwatch/assets/{separator-BwwTYtCF.js → separator-BOp2LHw3.js} +1 -1
- data/public/railwatch/assets/{series-chart-DaFPefku.js → series-chart-COEtj3PY.js} +1 -1
- data/public/railwatch/assets/show-B40560ZT.js +1 -0
- data/public/railwatch/assets/{show-C4Ltf5i9.js → show-B7Zqjlqc.js} +1 -1
- data/public/railwatch/assets/{show-CeTL4B37.js → show-BAxMoNvw.js} +2 -2
- data/public/railwatch/assets/show-B_QVoqKE.js +1 -0
- data/public/railwatch/assets/show-Bbs1i46N.js +1 -0
- data/public/railwatch/assets/{show-DACku6AD.js → show-C-xpDkoj.js} +3 -3
- data/public/railwatch/assets/{show-DgSIoRvA.js → show-C9Y1To9_.js} +1 -1
- data/public/railwatch/assets/show-CGv85sRo.js +1 -0
- data/public/railwatch/assets/{show-BM6X2Mpo.js → show-CPh-7VGL.js} +1 -1
- data/public/railwatch/assets/show-C_9M2nLy.js +1 -0
- data/public/railwatch/assets/{show-DIOSGcXV.js → show-DFlP1ktM.js} +2 -2
- data/public/railwatch/assets/show-DqtE0LI6.js +1 -0
- data/public/railwatch/assets/{show-C8sHalnw.js → show-DrhEDGPn.js} +1 -1
- data/public/railwatch/assets/{show-JxFtB4eK.js → show-HjjzcKRq.js} +2 -2
- data/public/railwatch/assets/show-Zr2xV4OD.js +1 -0
- data/public/railwatch/assets/show-dRDz8OVu.js +1 -0
- data/public/railwatch/assets/{show-DYteoYWW.js → show-pbkvGRER.js} +1 -1
- data/public/railwatch/assets/{sort-header-DpFzXblu.js → sort-header-DBxQ_KFX.js} +1 -1
- data/public/railwatch/assets/{sparkline-cell-C3-5vFkP.js → sparkline-cell-BbfXw3kA.js} +1 -1
- data/public/railwatch/assets/stat-Cd8QaTGw.js +1 -0
- data/public/railwatch/assets/{status-badge-8jVV-LA4.js → status-badge-Ys4b0fcG.js} +1 -1
- data/public/railwatch/assets/{tenant-path-G-6u9A-o.js → tenant-path-CQWzaNYR.js} +1 -1
- data/public/railwatch/assets/{text-link-DfsiaCcP.js → text-link-BY8FY-CJ.js} +1 -1
- data/public/railwatch/assets/{textarea-Dye72uP7.js → textarea-Bq2jjOMC.js} +1 -1
- data/public/railwatch/assets/{timeline-CD7WHnbo.js → timeline-SxStCFO2.js} +1 -1
- data/public/railwatch/assets/{transition-B_AW8rMK.js → transition-CQ9yvfPa.js} +1 -1
- data/public/railwatch/assets/{use-clipboard-ColgLyQ2.js → use-clipboard-3hTXU91g.js} +1 -1
- data/public/railwatch/assets/use-live-LwJStJvD.js +1 -0
- data/public/railwatch/manifest.json +1289 -1236
- metadata +117 -115
- data/public/railwatch/assets/application-DD4nJA5I.css +0 -1
- data/public/railwatch/assets/env-layout-DrT8rO6P.js +0 -1
- data/public/railwatch/assets/index-5jI4aFzC.js +0 -1
- data/public/railwatch/assets/index-9KTrVnrc.js +0 -1
- data/public/railwatch/assets/index-B0-8lcTp.js +0 -1
- data/public/railwatch/assets/index-B7jjfNfO.js +0 -1
- data/public/railwatch/assets/index-BBchRy0M.js +0 -1
- data/public/railwatch/assets/index-BgKj9xhr.js +0 -1
- data/public/railwatch/assets/index-BkTZqqOu.js +0 -1
- data/public/railwatch/assets/index-BprKx8QO.js +0 -1
- data/public/railwatch/assets/index-C3jzvPs3.js +0 -1
- data/public/railwatch/assets/index-Cbs6gGyQ.js +0 -1
- data/public/railwatch/assets/index-CdRZ6AWF.js +0 -1
- data/public/railwatch/assets/index-Cwx6058d.js +0 -1
- data/public/railwatch/assets/index-D4CSdbHv.js +0 -1
- data/public/railwatch/assets/index-DEFMSkdG.js +0 -1
- data/public/railwatch/assets/index-DFiHEBSh.js +0 -1
- data/public/railwatch/assets/index-DL4vWdWJ.js +0 -1
- data/public/railwatch/assets/index-DaXgPcGL.js +0 -1
- data/public/railwatch/assets/index-DbtaU-EE.js +0 -1
- data/public/railwatch/assets/index-DeOe83F4.js +0 -1
- data/public/railwatch/assets/index-DiucHN4B.js +0 -1
- data/public/railwatch/assets/index-DlnR_l9o.js +0 -1
- data/public/railwatch/assets/index-DmRd7aIG.js +0 -1
- data/public/railwatch/assets/index-DxSh2UpM.js +0 -1
- data/public/railwatch/assets/index-MIMGuFNt.js +0 -1
- data/public/railwatch/assets/index-P4rC7IlX.js +0 -1
- data/public/railwatch/assets/index-gpPOcFWq.js +0 -1
- data/public/railwatch/assets/index-oVkururr.js +0 -1
- data/public/railwatch/assets/index-p9puqVge.js +0 -1
- data/public/railwatch/assets/klass-CJ-J4INB.js +0 -1
- data/public/railwatch/assets/release-health-DC8oc7uw.js +0 -1
- data/public/railwatch/assets/route-Dv6LAWvT.js +0 -1
- data/public/railwatch/assets/show-B7NCgkEo.js +0 -1
- data/public/railwatch/assets/show-BKqyKjBK.js +0 -1
- data/public/railwatch/assets/show-BNw4tN5q.js +0 -1
- data/public/railwatch/assets/show-BO3bnG5h.js +0 -1
- data/public/railwatch/assets/show-BhrAVAEA.js +0 -1
- data/public/railwatch/assets/show-CpfgV1jP.js +0 -1
- data/public/railwatch/assets/show-DQp_1n-B.js +0 -1
- data/public/railwatch/assets/show-DVNz46RI.js +0 -1
- data/public/railwatch/assets/stat-s4RpOS9w.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Ie,u as Oe,r as re,S as fe,j as s,e as I,T as ze,H as Ee,L as Pe,i as ye}from"./inertia-TViv6kNv.js";import{D as Me,i as Ae}from"./data-table-iv1bdF6u.js";import{E as Le}from"./empty-state-6j_0AaQQ.js";import{S as he,a as xe}from"./segmented-h1VdDTqE.js";import{I as Se}from"./status-badge-8jVV-LA4.js";import{B as _e}from"./badge-Daw4Hvr8.js";import{B as me}from"./app-wordmark-nbjkzxwQ.js";import{C as pe}from"./checkbox-D3aRSsBj.js";import{S as ge,a as ke,b as be,c as je,d as ue}from"./select-_AJsUa7X.js";import{e as Re,O as Be,A as De}from"./app-layout-yh-sPWgK.js";import{c as de,a as Te}from"./format-B9SDkrWj.js";import"./chart-hover-Vy52H4uD.js";import"./index-1ol1-QWI.js";import"./index-OqI59zPb.js";import"./live-dot-ChfUtY3p.js";import"./label-COUKWqE_.js";const He=["low","normal","high","urgent"];function bt(t){const e=Ie.c(82),{applications:O}=Oe().props,[m,ve]=re.useState(t.filters.q??""),[c,we]=re.useState(null);let z;e[0]===Symbol.for("react.memo_cache_sentinel")?(z=new Set,e[0]=z):z=e[0];const[a,E]=re.useState(z),ae=t.filters.status??"open";let P;e[1]!==t.filters?(P=n=>I.visit(fe({...t.filters,...n}),{preserveState:!0}),e[1]=t.filters,e[2]=P):P=e[2];const r=P,M=st;let A;e[3]===Symbol.for("react.memo_cache_sentinel")?(A={onOpen:(n,i)=>i?.newTab?window.open(M(n),"_blank"):I.visit(M(n)),onHighlightChange:n=>we(n?.id??null)},e[3]=A):A=e[3];const Ne=A;let L,R;e[4]!==c||e[5]!==t.issues?(L=()=>{const n=function(l){if(Ae(l)||l.key!=="r"&&l.key!=="i"&&l.key!=="a")return;const o=t.issues.findIndex(ce=>ce.id===c);if(o<0)return;l.preventDefault();const C=l.key==="r"?"resolve":l.key==="i"?"ignore":"assign_me";I.patch(ye(t.issues[o].id),{action_name:C},{preserveScroll:!0})};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},R=[c,t.issues],e[4]=c,e[5]=t.issues,e[6]=L,e[7]=R):(L=e[6],R=e[7]),re.useEffect(L,R);let B;e[8]===Symbol.for("react.memo_cache_sentinel")?(B=function(i){E(l=>{const o=new Set(l);return o.has(i)?o.delete(i):o.add(i),o})},e[8]=B):B=e[8];const Ce=B;let D;e[9]!==a?(D=function(i,l){I.post(ze(),{ids:[...a],action_name:i,value:l},{preserveScroll:!0,onSuccess:()=>E(new Set)})},e[9]=a,e[10]=D):D=e[10];const N=D;let T,H;e[11]===Symbol.for("react.memo_cache_sentinel")?(T=[{title:"Issues",href:fe()}],H=s.jsx(Ee,{title:"Issues"}),e[11]=T,e[12]=H):(T=e[11],H=e[12]);let K;e[13]===Symbol.for("react.memo_cache_sentinel")?(K=[["exception","Exceptions"],["performance","Performance"],["anomaly","Anomalies"]],e[13]=K):K=e[13];let d;e[14]!==r||e[15]!==t.filters.kind||e[16]!==t.kindCounts?(d=s.jsx(he,{children:K.map(n=>{const[i,l]=n;return s.jsxs(xe,{mono:!1,active:(t.filters.kind??"")===i,onClick:()=>r({kind:t.filters.kind===i?void 0:i}),className:"gap-2 px-3",children:[l,s.jsx("span",{className:"bg-muted text-muted-foreground rounded px-1.5 font-mono text-[10px]",children:de(t.kindCounts?.[i]??0)})]},i)})}),e[14]=r,e[15]=t.filters.kind,e[16]=t.kindCounts,e[17]=d):d=e[17];let u;e[18]!==r||e[19]!==m?(u=n=>{n.preventDefault(),r({q:m})},e[18]=r,e[19]=m,e[20]=u):u=e[20];let q;e[21]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(Re,{className:"text-muted-foreground size-3.5 shrink-0"}),e[21]=q):q=e[21];let V;e[22]===Symbol.for("react.memo_cache_sentinel")?(V=n=>ve(n.target.value),e[22]=V):V=e[22];let f;e[23]!==m?(f=s.jsx("input",{value:m,onChange:V,placeholder:"Search or source:browser",className:"placeholder:text-muted-foreground min-w-0 flex-1 bg-transparent text-sm outline-none"}),e[23]=m,e[24]=f):f=e[24];let h;e[25]!==u||e[26]!==f?(h=s.jsxs("form",{className:"bg-card flex h-8 min-w-0 flex-1 items-center gap-1.5 rounded-md border px-2 md:max-w-xs",onSubmit:u,children:[q,f]}),e[25]=u,e[26]=f,e[27]=h):h=e[27];let U;e[28]===Symbol.for("react.memo_cache_sentinel")?(U=["open","Open",{}],e[28]=U):U=e[28];let $;e[29]===Symbol.for("react.memo_cache_sentinel")?($=["mine","Mine",{mine:"1"}],e[29]=$):$=e[29];let Q;e[30]===Symbol.for("react.memo_cache_sentinel")?(Q=["resolved","Resolved",{}],e[30]=Q):Q=e[30];let W;e[31]===Symbol.for("react.memo_cache_sentinel")?(W=[U,$,Q,["ignored","Ignored",{}]],e[31]=W):W=e[31];let x;e[32]!==r||e[33]!==t.counts||e[34]!==t.filters.mine||e[35]!==ae?(x=s.jsx("div",{className:"-mx-3 [scrollbar-width:none] overflow-x-auto px-3 md:mx-0 md:ml-auto md:overflow-visible md:px-0 [&::-webkit-scrollbar]:hidden",children:s.jsx(he,{children:W.map(n=>{const[i,l,o]=n,C=i==="mine",ce=C?t.filters.mine==="1":ae===i&&t.filters.mine!=="1";return s.jsxs(xe,{mono:!1,active:ce,onClick:()=>r(C?{mine:"1",status:"open"}:{status:i,mine:void 0,...o}),className:"px-3",children:[l,!C&&s.jsx("span",{className:"text-muted-foreground font-mono text-[10px]",children:de(t.counts[i]??0)})]},i)})})}),e[32]=r,e[33]=t.counts,e[34]=t.filters.mine,e[35]=ae,e[36]=x):x=e[36];let p;e[37]!==O||e[38]!==r||e[39]!==t.filters.application_id?(p=O.length>1&&s.jsxs(ge,{value:t.filters.application_id??"all",onValueChange:n=>r({application_id:n==="all"?void 0:n,environment_id:void 0}),children:[s.jsx(ke,{className:"h-8 w-44 text-xs",children:s.jsx(be,{placeholder:"Application"})}),s.jsxs(je,{children:[s.jsx(ue,{value:"all",children:"All applications"}),O.map(tt)]})]}),e[37]=O,e[38]=r,e[39]=t.filters.application_id,e[40]=p):p=e[40];let g;e[41]!==d||e[42]!==h||e[43]!==x||e[44]!==p?(g=s.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:flex-wrap md:items-center",children:[d,h,x,p]}),e[41]=d,e[42]=h,e[43]=x,e[44]=p,e[45]=g):g=e[45];let F,G;e[46]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(Le,{icon:Be,title:"No issues match",signal:"caution",description:"Issues are grouped from repeated request, job, and exception errors."}),G=n=>I.visit(M(n)),e[46]=F,e[47]=G):(F=e[46],G=e[47]);const oe=t.issues.length>0&&a.size===t.issues.length;let k;e[48]!==t.issues?(k=n=>E(n?new Set(t.issues.map(Ze)):new Set),e[48]=t.issues,e[49]=k):k=e[49];let b;e[50]!==oe||e[51]!==k?(b=s.jsx(pe,{checked:oe,onCheckedChange:k,"aria-label":"Select all",onClick:Ye}),e[50]=oe,e[51]=k,e[52]=b):b=e[52];let j;e[53]!==a?(j=n=>s.jsx(pe,{checked:a.has(n.id),onCheckedChange:()=>Ce(n.id),"aria-label":`Select ${n.key}`,onClick:Xe}),e[53]=a,e[54]=j):j=e[54];let y;e[55]!==b||e[56]!==j?(y={key:"sel",hideOnMobile:!0,header:b,cell:j},e[55]=b,e[56]=j,e[57]=y):y=e[57];let S;e[58]!==c?(S={key:"k",header:"Issue",cell:n=>s.jsxs("div",{className:"flex items-center gap-1",children:[n.id===c&&s.jsx("span",{className:"text-primary","aria-hidden":!0,children:"›"}),s.jsx(Pe,{className:"font-mono text-xs font-semibold hover:underline",href:M(n),children:n.key})]})},e[58]=c,e[59]=S):S=e[59];let J,X,Y,Z,ee,te,se,ne,ie;e[60]===Symbol.for("react.memo_cache_sentinel")?(J={key:"t",header:"Title",grow:!0,cell:Je},X={key:"env",hideOnMobile:!0,header:"Where",cell:Ge},Y={key:"kind",hideOnMobile:!0,header:"Kind",cell:Fe},Z={key:"s",hideOnMobile:!0,header:"Status",cell:We},ee={key:"p",hideOnMobile:!0,header:"Priority",cell:Qe},te={key:"a",hideOnMobile:!0,header:"Assignee",cell:$e},se={key:"n",header:"Events",align:"right",cell:Ue},ne={key:"u",hideOnMobile:!0,header:"Users",align:"right",cell:Ve},ie={key:"l",hideOnMobile:!0,header:"Last seen",align:"right",cell:qe},e[60]=J,e[61]=X,e[62]=Y,e[63]=Z,e[64]=ee,e[65]=te,e[66]=se,e[67]=ne,e[68]=ie):(J=e[60],X=e[61],Y=e[62],Z=e[63],ee=e[64],te=e[65],se=e[66],ne=e[67],ie=e[68]);let _;e[69]!==y||e[70]!==S?(_=[y,S,J,X,Y,Z,ee,te,se,ne,ie],e[69]=y,e[70]=S,e[71]=_):_=e[71];let v;e[72]!==t.issues||e[73]!==_?(v=s.jsx(Me,{rows:t.issues,rowKey:et,empty:F,onRowClick:G,keyboardNav:Ne,columns:_}),e[72]=t.issues,e[73]=_,e[74]=v):v=e[74];let w;e[75]!==N||e[76]!==a.size?(w=a.size>0&&s.jsxs("div",{className:"bg-background sticky bottom-4 z-10 flex w-fit items-center gap-2 self-start rounded-lg border p-2 shadow-md",children:[s.jsxs("span",{className:"px-1 text-sm",children:[a.size," selected"]}),s.jsx(me,{size:"sm",variant:"outline",onClick:()=>N("resolve"),children:"Resolve"}),s.jsx(me,{size:"sm",variant:"outline",onClick:()=>N("ignore"),children:"Ignore"}),s.jsxs(ge,{onValueChange:n=>N("priority",n),children:[s.jsx(ke,{className:"h-8 w-32",children:s.jsx(be,{placeholder:"Priority"})}),s.jsx(je,{children:He.map(Ke)})]}),s.jsx(me,{size:"sm",variant:"ghost",onClick:()=>E(new Set),children:"Clear"})]}),e[75]=N,e[76]=a.size,e[77]=w):w=e[77];let le;return e[78]!==g||e[79]!==v||e[80]!==w?(le=s.jsxs(De,{breadcrumbs:T,children:[H,s.jsxs("div",{className:"flex flex-1 flex-col gap-4 p-3 md:gap-5 md:px-6 md:pt-2 md:pb-6",children:[g,v,w]})]}),e[78]=g,e[79]=v,e[80]=w,e[81]=le):le=e[81],le}function Ke(t){return s.jsx(ue,{value:t,className:"capitalize",children:t},t)}function qe(t){return s.jsx("span",{title:t.last_seen_at,children:Te(t.last_seen_at)})}function Ve(t){return t.affected_users}function Ue(t){return de(t.occurrences)}function $e(t){return t.assignee?.name??s.jsx("span",{className:"text-muted-foreground",children:"–"})}function Qe(t){return s.jsx("span",{className:t.priority==="urgent"?"text-destructive font-semibold":t.priority==="high"?"text-amber-600":"text-muted-foreground",children:t.priority})}function We(t){return s.jsx(Se,{status:t.status})}function Fe(t){return s.jsx(_e,{variant:"outline",children:t.kind})}function Ge(t){return s.jsxs("span",{className:"text-xs",children:[t.application?.name," · ",t.environment?.name]})}function Je(t){return s.jsxs("div",{className:"text-xs",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"line-clamp-1 font-medium",children:t.title}),t.fingerprint_source&&t.fingerprint_source!=="default"&&s.jsxs(_e,{variant:"secondary",className:"shrink-0",children:["grouped by ",t.fingerprint_source]}),s.jsx("span",{className:"md:hidden",children:s.jsx(Se,{status:t.status})})]}),s.jsx("div",{className:"text-muted-foreground font-mono",children:t.culprit})]})}function Xe(t){return t.stopPropagation()}function Ye(t){return t.stopPropagation()}function Ze(t){return t.id}function et(t){return t.id}function tt(t){return s.jsx(ue,{value:String(t.id),children:t.name},t.id)}function st(t){return ye(t.id)}export{bt as default};
|
|
1
|
+
import{c as Ie,u as Oe,r as re,S as fe,j as s,e as I,T as ze,H as Ee,L as Pe,i as ye}from"./inertia-CgBdJDaE.js";import{D as Me,i as Ae}from"./data-table-Bc3ZRnpb.js";import{E as Le}from"./empty-state-CkPROZB0.js";import{S as he,a as xe}from"./segmented-Dg8CES94.js";import{I as Se}from"./status-badge-Ys4b0fcG.js";import{B as _e}from"./badge-DKvItdlb.js";import{B as me}from"./app-wordmark-B-0yZiDb.js";import{C as pe}from"./checkbox-BsBkRg5n.js";import{S as ge,a as ke,b as be,c as je,d as ue}from"./select-CqKpvI98.js";import{e as Re,O as Be,A as De}from"./app-layout-CdJ5Qjms.js";import{c as de,a as Te}from"./format-B9SDkrWj.js";import"./chart-hover-B0SjyWFy.js";import"./index-B2_QluAw.js";import"./index-Dy7Wg880.js";import"./live-dot-Bejk0a5o.js";import"./label-BWgQzHCO.js";const He=["low","normal","high","urgent"];function bt(t){const e=Ie.c(82),{applications:O}=Oe().props,[m,ve]=re.useState(t.filters.q??""),[c,we]=re.useState(null);let z;e[0]===Symbol.for("react.memo_cache_sentinel")?(z=new Set,e[0]=z):z=e[0];const[a,E]=re.useState(z),ae=t.filters.status??"open";let P;e[1]!==t.filters?(P=n=>I.visit(fe({...t.filters,...n}),{preserveState:!0}),e[1]=t.filters,e[2]=P):P=e[2];const r=P,M=st;let A;e[3]===Symbol.for("react.memo_cache_sentinel")?(A={onOpen:(n,i)=>i?.newTab?window.open(M(n),"_blank"):I.visit(M(n)),onHighlightChange:n=>we(n?.id??null)},e[3]=A):A=e[3];const Ne=A;let L,R;e[4]!==c||e[5]!==t.issues?(L=()=>{const n=function(l){if(Ae(l)||l.key!=="r"&&l.key!=="i"&&l.key!=="a")return;const o=t.issues.findIndex(ce=>ce.id===c);if(o<0)return;l.preventDefault();const C=l.key==="r"?"resolve":l.key==="i"?"ignore":"assign_me";I.patch(ye(t.issues[o].id),{action_name:C},{preserveScroll:!0})};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},R=[c,t.issues],e[4]=c,e[5]=t.issues,e[6]=L,e[7]=R):(L=e[6],R=e[7]),re.useEffect(L,R);let B;e[8]===Symbol.for("react.memo_cache_sentinel")?(B=function(i){E(l=>{const o=new Set(l);return o.has(i)?o.delete(i):o.add(i),o})},e[8]=B):B=e[8];const Ce=B;let D;e[9]!==a?(D=function(i,l){I.post(ze(),{ids:[...a],action_name:i,value:l},{preserveScroll:!0,onSuccess:()=>E(new Set)})},e[9]=a,e[10]=D):D=e[10];const N=D;let T,H;e[11]===Symbol.for("react.memo_cache_sentinel")?(T=[{title:"Issues",href:fe()}],H=s.jsx(Ee,{title:"Issues"}),e[11]=T,e[12]=H):(T=e[11],H=e[12]);let K;e[13]===Symbol.for("react.memo_cache_sentinel")?(K=[["exception","Exceptions"],["performance","Performance"],["anomaly","Anomalies"]],e[13]=K):K=e[13];let d;e[14]!==r||e[15]!==t.filters.kind||e[16]!==t.kindCounts?(d=s.jsx(he,{children:K.map(n=>{const[i,l]=n;return s.jsxs(xe,{mono:!1,active:(t.filters.kind??"")===i,onClick:()=>r({kind:t.filters.kind===i?void 0:i}),className:"gap-2 px-3",children:[l,s.jsx("span",{className:"bg-muted text-muted-foreground rounded px-1.5 font-mono text-[10px]",children:de(t.kindCounts?.[i]??0)})]},i)})}),e[14]=r,e[15]=t.filters.kind,e[16]=t.kindCounts,e[17]=d):d=e[17];let u;e[18]!==r||e[19]!==m?(u=n=>{n.preventDefault(),r({q:m})},e[18]=r,e[19]=m,e[20]=u):u=e[20];let q;e[21]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(Re,{className:"text-muted-foreground size-3.5 shrink-0"}),e[21]=q):q=e[21];let V;e[22]===Symbol.for("react.memo_cache_sentinel")?(V=n=>ve(n.target.value),e[22]=V):V=e[22];let f;e[23]!==m?(f=s.jsx("input",{value:m,onChange:V,placeholder:"Search or source:browser",className:"placeholder:text-muted-foreground min-w-0 flex-1 bg-transparent text-sm outline-none"}),e[23]=m,e[24]=f):f=e[24];let h;e[25]!==u||e[26]!==f?(h=s.jsxs("form",{className:"bg-card flex h-8 min-w-0 flex-1 items-center gap-1.5 rounded-md border px-2 md:max-w-xs",onSubmit:u,children:[q,f]}),e[25]=u,e[26]=f,e[27]=h):h=e[27];let U;e[28]===Symbol.for("react.memo_cache_sentinel")?(U=["open","Open",{}],e[28]=U):U=e[28];let $;e[29]===Symbol.for("react.memo_cache_sentinel")?($=["mine","Mine",{mine:"1"}],e[29]=$):$=e[29];let Q;e[30]===Symbol.for("react.memo_cache_sentinel")?(Q=["resolved","Resolved",{}],e[30]=Q):Q=e[30];let W;e[31]===Symbol.for("react.memo_cache_sentinel")?(W=[U,$,Q,["ignored","Ignored",{}]],e[31]=W):W=e[31];let x;e[32]!==r||e[33]!==t.counts||e[34]!==t.filters.mine||e[35]!==ae?(x=s.jsx("div",{className:"-mx-3 [scrollbar-width:none] overflow-x-auto px-3 md:mx-0 md:ml-auto md:overflow-visible md:px-0 [&::-webkit-scrollbar]:hidden",children:s.jsx(he,{children:W.map(n=>{const[i,l,o]=n,C=i==="mine",ce=C?t.filters.mine==="1":ae===i&&t.filters.mine!=="1";return s.jsxs(xe,{mono:!1,active:ce,onClick:()=>r(C?{mine:"1",status:"open"}:{status:i,mine:void 0,...o}),className:"px-3",children:[l,!C&&s.jsx("span",{className:"text-muted-foreground font-mono text-[10px]",children:de(t.counts[i]??0)})]},i)})})}),e[32]=r,e[33]=t.counts,e[34]=t.filters.mine,e[35]=ae,e[36]=x):x=e[36];let p;e[37]!==O||e[38]!==r||e[39]!==t.filters.application_id?(p=O.length>1&&s.jsxs(ge,{value:t.filters.application_id??"all",onValueChange:n=>r({application_id:n==="all"?void 0:n,environment_id:void 0}),children:[s.jsx(ke,{className:"h-8 w-44 text-xs",children:s.jsx(be,{placeholder:"Application"})}),s.jsxs(je,{children:[s.jsx(ue,{value:"all",children:"All applications"}),O.map(tt)]})]}),e[37]=O,e[38]=r,e[39]=t.filters.application_id,e[40]=p):p=e[40];let g;e[41]!==d||e[42]!==h||e[43]!==x||e[44]!==p?(g=s.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:flex-wrap md:items-center",children:[d,h,x,p]}),e[41]=d,e[42]=h,e[43]=x,e[44]=p,e[45]=g):g=e[45];let F,G;e[46]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(Le,{icon:Be,title:"No issues match",signal:"caution",description:"Issues are grouped from repeated request, job, and exception errors."}),G=n=>I.visit(M(n)),e[46]=F,e[47]=G):(F=e[46],G=e[47]);const oe=t.issues.length>0&&a.size===t.issues.length;let k;e[48]!==t.issues?(k=n=>E(n?new Set(t.issues.map(Ze)):new Set),e[48]=t.issues,e[49]=k):k=e[49];let b;e[50]!==oe||e[51]!==k?(b=s.jsx(pe,{checked:oe,onCheckedChange:k,"aria-label":"Select all",onClick:Ye}),e[50]=oe,e[51]=k,e[52]=b):b=e[52];let j;e[53]!==a?(j=n=>s.jsx(pe,{checked:a.has(n.id),onCheckedChange:()=>Ce(n.id),"aria-label":`Select ${n.key}`,onClick:Xe}),e[53]=a,e[54]=j):j=e[54];let y;e[55]!==b||e[56]!==j?(y={key:"sel",hideOnMobile:!0,header:b,cell:j},e[55]=b,e[56]=j,e[57]=y):y=e[57];let S;e[58]!==c?(S={key:"k",header:"Issue",cell:n=>s.jsxs("div",{className:"flex items-center gap-1",children:[n.id===c&&s.jsx("span",{className:"text-primary","aria-hidden":!0,children:"›"}),s.jsx(Pe,{className:"font-mono text-xs font-semibold hover:underline",href:M(n),children:n.key})]})},e[58]=c,e[59]=S):S=e[59];let J,X,Y,Z,ee,te,se,ne,ie;e[60]===Symbol.for("react.memo_cache_sentinel")?(J={key:"t",header:"Title",grow:!0,cell:Je},X={key:"env",hideOnMobile:!0,header:"Where",cell:Ge},Y={key:"kind",hideOnMobile:!0,header:"Kind",cell:Fe},Z={key:"s",hideOnMobile:!0,header:"Status",cell:We},ee={key:"p",hideOnMobile:!0,header:"Priority",cell:Qe},te={key:"a",hideOnMobile:!0,header:"Assignee",cell:$e},se={key:"n",header:"Events",align:"right",cell:Ue},ne={key:"u",hideOnMobile:!0,header:"Users",align:"right",cell:Ve},ie={key:"l",hideOnMobile:!0,header:"Last seen",align:"right",cell:qe},e[60]=J,e[61]=X,e[62]=Y,e[63]=Z,e[64]=ee,e[65]=te,e[66]=se,e[67]=ne,e[68]=ie):(J=e[60],X=e[61],Y=e[62],Z=e[63],ee=e[64],te=e[65],se=e[66],ne=e[67],ie=e[68]);let _;e[69]!==y||e[70]!==S?(_=[y,S,J,X,Y,Z,ee,te,se,ne,ie],e[69]=y,e[70]=S,e[71]=_):_=e[71];let v;e[72]!==t.issues||e[73]!==_?(v=s.jsx(Me,{rows:t.issues,rowKey:et,empty:F,onRowClick:G,keyboardNav:Ne,columns:_}),e[72]=t.issues,e[73]=_,e[74]=v):v=e[74];let w;e[75]!==N||e[76]!==a.size?(w=a.size>0&&s.jsxs("div",{className:"bg-background sticky bottom-4 z-10 flex w-fit items-center gap-2 self-start rounded-lg border p-2 shadow-md",children:[s.jsxs("span",{className:"px-1 text-sm",children:[a.size," selected"]}),s.jsx(me,{size:"sm",variant:"outline",onClick:()=>N("resolve"),children:"Resolve"}),s.jsx(me,{size:"sm",variant:"outline",onClick:()=>N("ignore"),children:"Ignore"}),s.jsxs(ge,{onValueChange:n=>N("priority",n),children:[s.jsx(ke,{className:"h-8 w-32",children:s.jsx(be,{placeholder:"Priority"})}),s.jsx(je,{children:He.map(Ke)})]}),s.jsx(me,{size:"sm",variant:"ghost",onClick:()=>E(new Set),children:"Clear"})]}),e[75]=N,e[76]=a.size,e[77]=w):w=e[77];let le;return e[78]!==g||e[79]!==v||e[80]!==w?(le=s.jsxs(De,{breadcrumbs:T,children:[H,s.jsxs("div",{className:"flex flex-1 flex-col gap-4 p-3 md:gap-5 md:px-6 md:pt-2 md:pb-6",children:[g,v,w]})]}),e[78]=g,e[79]=v,e[80]=w,e[81]=le):le=e[81],le}function Ke(t){return s.jsx(ue,{value:t,className:"capitalize",children:t},t)}function qe(t){return s.jsx("span",{title:t.last_seen_at,children:Te(t.last_seen_at)})}function Ve(t){return t.affected_users}function Ue(t){return de(t.occurrences)}function $e(t){return t.assignee?.name??s.jsx("span",{className:"text-muted-foreground",children:"–"})}function Qe(t){return s.jsx("span",{className:t.priority==="urgent"?"text-destructive font-semibold":t.priority==="high"?"text-amber-600":"text-muted-foreground",children:t.priority})}function We(t){return s.jsx(Se,{status:t.status})}function Fe(t){return s.jsx(_e,{variant:"outline",children:t.kind})}function Ge(t){return s.jsxs("span",{className:"text-xs",children:[t.application?.name," · ",t.environment?.name]})}function Je(t){return s.jsxs("div",{className:"text-xs",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"line-clamp-1 font-medium",children:t.title}),t.fingerprint_source&&t.fingerprint_source!=="default"&&s.jsxs(_e,{variant:"secondary",className:"shrink-0",children:["grouped by ",t.fingerprint_source]}),s.jsx("span",{className:"md:hidden",children:s.jsx(Se,{status:t.status})})]}),s.jsx("div",{className:"text-muted-foreground font-mono",children:t.culprit})]})}function Xe(t){return t.stopPropagation()}function Ye(t){return t.stopPropagation()}function Ze(t){return t.id}function et(t){return t.id}function tt(t){return s.jsx(ue,{value:String(t.id),children:t.name},t.id)}function st(t){return ye(t.id)}export{bt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as G,r as D,at as T,aL as J,j as t,H as V,F as z,e as o,aM as Y,aN as R,aO as Z,aP as ee,aQ as te}from"./inertia-TViv6kNv.js";import{I as O}from"./input-error-LxImUkxv.js";import{D as E}from"./data-table-iv1bdF6u.js";import{R as se}from"./relative-time-IOOgl5n2.js";import{B as K}from"./badge-Daw4Hvr8.js";import{B as i}from"./app-wordmark-nbjkzxwQ.js";import{b as H,c as B,C as M,a as W}from"./card-BX_3HXcJ.js";import{C as U}from"./checkbox-D3aRSsBj.js";import{L as r,I as l}from"./label-COUKWqE_.js";import{A as ne}from"./app-layout-yh-sPWgK.js";import"./chart-hover-Vy52H4uD.js";import"./empty-state-6j_0AaQQ.js";import"./live-dot-ChfUtY3p.js";import"./index-OqI59zPb.js";import"./index-1ol1-QWI.js";import"./format-B9SDkrWj.js";const re={slack:"Slack hook id — incoming webhooks do not expose their channel"},$={slack:{key:"webhook_url",label:"New Slack incoming webhook URL"},webhook:{key:"secret",label:"New signing secret"},linear:{key:"api_key",label:"New Linear API key"}};function ie(e){const s=$[e.kind];if(!s)return;const n=window.prompt(s.label)?.trim();n&&o.patch(R(e.id),{enabled:!0,settings:{[s.key]:n}})}const Q={new_issue:"New issue",regressed_issue:"Regressed or reopened issue",resolved_issue:"Issue resolved",ignored_issue:"Issue ignored",assigned_issue:"Issue assigned",threshold:"Threshold exceeded",quota:"Quota reached"};function ae(e,s){const n=e.filters??{};return[...(s[e.application_id]??[]).filter(a=>(n.environment_ids??[]).includes(a.id)).map(a=>a.name),...n.kinds??[],n.min_priority?`>= ${n.min_priority}`:null,n.title_pattern].filter(Boolean).join(" · ")}function Ke(e){const s=G.c(40),[n,q]=D.useState("slack"),[a,X]=D.useState(e.application_options[0]?.id);let j,f;s[0]===Symbol.for("react.memo_cache_sentinel")?(j=[{title:"Integrations",href:T()}],f=t.jsx(V,{title:"Integrations"}),s[0]=j,s[1]=f):(j=s[0],f=s[1]);let _;s[2]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsxs("div",{children:[t.jsx("h1",{className:"text-xl font-semibold",children:"Integrations and alerts"}),t.jsx("p",{className:"text-muted-foreground text-sm",children:"Where alerts go, and which events trigger them per application."})]}),s[2]=_):_=s[2];let b;s[3]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(H,{children:t.jsx(B,{className:"text-sm",children:"Add integration"})}),s[3]=b):b=s[3];let k;s[4]===Symbol.for("react.memo_cache_sentinel")?(k=T(),s[4]=k):k=s[4];let d;s[5]!==n||s[6]!==e.kinds||s[7]!==e.linear_oauth_enabled?(d=t.jsxs(M,{children:[b,t.jsx(W,{children:t.jsx(z,{method:"post",action:k,className:"space-y-3",resetOnSuccess:!0,children:g=>{const{errors:L,processing:A}=g;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"kind",children:"Kind"}),t.jsx("select",{id:"kind",name:"kind",value:n,onChange:P=>q(P.target.value),className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",children:e.kinds.map(Ce)})]}),!(n==="linear"&&e.linear_oauth_enabled)&&t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"name",children:"Name"}),t.jsx(l,{id:"name",name:"name",required:!0,placeholder:"#alerts"}),t.jsx(O,{messages:L.name})]}),n==="email"&&t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"to",children:"Send to"}),t.jsx(l,{id:"to",name:"settings[to]",type:"email",required:!0})]}),n==="slack"&&t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"webhook_url",children:"Incoming webhook URL"}),t.jsx(l,{id:"webhook_url",name:"settings[webhook_url]",type:"url",required:!0,placeholder:"https://hooks.slack.com/services/…"})]}),n==="webhook"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"url",children:"URL"}),t.jsx(l,{id:"url",name:"settings[url]",type:"url",required:!0})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"secret",children:"Signing secret (optional)"}),t.jsx(l,{id:"secret",name:"settings[secret]"}),t.jsx("p",{className:"text-muted-foreground text-xs",children:"Sent as X-Railwatch-Signature: sha256=HMAC(body)."})]})]}),n==="linear"&&e.linear_oauth_enabled&&t.jsxs("div",{className:"bg-muted/40 space-y-2 rounded-md border p-3",children:[t.jsx("p",{className:"text-sm",children:"Linear uses OAuth to discover your workspace and teams. Connect your workspace, then select a team."}),t.jsx("p",{className:"text-muted-foreground text-xs",children:"Railwatch names the integration from the Linear workspace."})]}),n==="linear"&&!e.linear_oauth_enabled&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"api_key",children:"API key"}),t.jsx(l,{id:"api_key",name:"settings[api_key]",required:!0})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"team_id",children:"Team ID"}),t.jsx(l,{id:"team_id",name:"settings[team_id]",required:!0})]})]}),t.jsx(O,{messages:L.settings}),n==="linear"&&e.linear_oauth_enabled?t.jsx(i,{type:"button",onClick:Se,children:"Connect Linear workspace"}):t.jsx(i,{disabled:A,children:"Add"})]})}})})]}),s[5]=n,s[6]=e.kinds,s[7]=e.linear_oauth_enabled,s[8]=d):d=s[8];let v;s[9]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(H,{children:t.jsx(B,{className:"text-sm",children:"Add alert rule"})}),s[9]=v):v=s[9];let y;s[10]===Symbol.for("react.memo_cache_sentinel")?(y=J(),s[10]=y):y=s[10];let c;s[11]!==a||s[12]!==e.application_options||s[13]!==e.environment_options||s[14]!==e.events||s[15]!==e.integrations||s[16]!==e.issue_kinds||s[17]!==e.priorities?(c=t.jsxs(M,{children:[v,t.jsx(W,{children:t.jsx(z,{method:"post",action:y,className:"space-y-3",children:g=>{const{errors:L,processing:A}=g;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"application_id",children:"Application"}),t.jsx("select",{id:"application_id",name:"application_id",value:a??"",onChange:P=>X(Number(P.target.value)),className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",children:e.application_options.map(we)})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"event",children:"When"}),t.jsx("select",{id:"event",name:"event",className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",children:e.events.map(Ne)})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"integration_id",children:"Notify"}),t.jsx("select",{id:"integration_id",name:"integration_id",className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",children:e.integrations.map(ye)})]}),t.jsxs("div",{className:"space-y-3 border-t pt-3",children:[t.jsx("p",{className:"label-caps",children:"Only notify when (optional)"}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx("span",{className:"text-sm",children:"Environments"}),t.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-2",children:(e.environment_options[a??0]??[]).map(ve)})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx("span",{className:"text-sm",children:"Issue kinds"}),t.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-2",children:e.issue_kinds.map(ke)})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"min_priority",children:"Minimum priority"}),t.jsxs("select",{id:"min_priority",name:"filters[min_priority]",className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",children:[t.jsx("option",{value:"",children:"any"}),e.priorities.map(be)]})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"title_pattern",children:"Title matches"}),t.jsx(l,{id:"title_pattern",name:"filters[title_pattern]",placeholder:"timeout, or /Redis.*timeout/"}),t.jsx("p",{className:"text-muted-foreground text-xs",children:"Case-insensitive substring, or a regular expression when wrapped in slashes."})]})]}),t.jsx(O,{messages:L.event}),t.jsx(i,{disabled:A||e.integrations.length===0,children:"Add rule"})]})}})})]}),s[11]=a,s[12]=e.application_options,s[13]=e.environment_options,s[14]=e.events,s[15]=e.integrations,s[16]=e.issue_kinds,s[17]=e.priorities,s[18]=c):c=s[18];let m;s[19]!==d||s[20]!==c?(m=t.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[d,c]}),s[19]=d,s[20]=c,s[21]=m):m=s[21];let N;s[22]===Symbol.for("react.memo_cache_sentinel")?(N=[{key:"n",header:"Integration",cell:fe},{key:"k",header:"Kind",cell:je},{key:"s",header:"Destination",cell:ge},{key:"d",header:"Health",hideOnMobile:!0,cell:xe},{key:"e",header:"",cell:pe},{key:"x",header:"",align:"right",cell:he}],s[22]=N):N=s[22];let h;s[23]!==e.integrations?(h=t.jsx(E,{rows:e.integrations,rowKey:_e,empty:"No integrations yet.",columns:N}),s[23]=e.integrations,s[24]=h):h=s[24];let w,S,C;s[25]===Symbol.for("react.memo_cache_sentinel")?(w={key:"a",header:"Application",cell:ce},S={key:"e",header:"When",cell:de},C={key:"i",header:"Notify",cell:oe},s[25]=w,s[26]=S,s[27]=C):(w=s[25],S=s[26],C=s[27]);let u;s[28]!==e.environment_options?(u={key:"f",header:"Only when",hideOnMobile:!0,cell:g=>t.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:ae(g,e.environment_options)||"—"})},s[28]=e.environment_options,s[29]=u):u=s[29];let I;s[30]===Symbol.for("react.memo_cache_sentinel")?(I={key:"x",header:"",align:"right",cell:le},s[30]=I):I=s[30];let p;s[31]!==u?(p=[w,S,C,u,I],s[31]=u,s[32]=p):p=s[32];let x;s[33]!==e.alert_rules||s[34]!==p?(x=t.jsx(E,{rows:e.alert_rules,rowKey:me,empty:"No alert rules yet.",columns:p}),s[33]=e.alert_rules,s[34]=p,s[35]=x):x=s[35];let F;return s[36]!==h||s[37]!==x||s[38]!==m?(F=t.jsxs(ne,{breadcrumbs:j,children:[f,t.jsxs("div",{className:"flex flex-1 flex-col gap-6 p-4 md:p-6",children:[_,m,h,x]})]}),s[36]=h,s[37]=x,s[38]=m,s[39]=F):F=s[39],F}function le(e){return t.jsx(i,{size:"sm",variant:"ghost",className:"text-destructive",onClick:()=>o.delete(te(e.id)),children:"Remove"})}function oe(e){return e.integration}function de(e){return Q[e.event]??e.event}function ce(e){return e.application}function me(e){return e.id}function he(e){return t.jsxs("span",{className:"flex flex-wrap justify-end gap-1",children:[e.kind==="linear"&&(e.settings.team_options?.length??0)>0&&t.jsxs("select",{"aria-label":`Linear team for ${e.name}`,value:e.settings.team_id??"",onChange:s=>o.patch(R(e.id),{enabled:!0,settings:{team_id:s.target.value}}),className:"border-input h-8 rounded-md border bg-transparent px-2 text-xs",children:[t.jsx("option",{value:"",children:"Select team…"}),e.settings.team_options?.map(ue)]}),t.jsx(i,{size:"sm",variant:"ghost",onClick:()=>o.post(Z(e.id),{},{preserveScroll:!0}),children:"Send test"}),$[e.kind]&&!(e.kind==="linear"&&e.settings.oauth)&&t.jsx(i,{size:"sm",variant:"ghost",onClick:()=>ie(e),children:"Rotate"}),e.kind==="linear"&&e.settings.oauth&&e.settings.credential&&t.jsx(i,{size:"sm",variant:"ghost",onClick:()=>o.delete(ee(e.id)),children:"Disconnect"}),t.jsx(i,{size:"sm",variant:"ghost",onClick:()=>o.patch(R(e.id),{enabled:!e.enabled}),children:e.enabled?"Disable":"Enable"}),t.jsx(i,{size:"sm",variant:"ghost",className:"text-destructive",onClick:()=>o.delete(R(e.id)),children:"Remove"})]})}function ue(e){return t.jsxs("option",{value:e.id,children:[e.name," (",e.key,")"]},e.id)}function pe(e){return e.enabled?null:t.jsx(K,{variant:"secondary",children:"disabled"})}function xe(e){return t.jsxs("span",{className:"flex flex-col gap-0.5",children:[t.jsxs("span",{className:"text-muted-foreground text-xs",children:[e.kind==="linear"?"Last sync ":"Last delivery ",t.jsx(se,{iso:e.kind==="linear"?e.last_synced_at:e.last_delivered_at})]}),e.kind==="linear"&&e.webhook_health&&t.jsxs("span",{className:"text-muted-foreground text-xs",children:["Webhooks: ",e.webhook_health.pending," pending ·"," ",e.webhook_health.failed," failed"]}),e.last_error&&t.jsx("span",{className:"text-destructive max-w-64 truncate text-xs",title:e.last_error,children:e.last_error})]})}function ge(e){return t.jsx("span",{className:"font-mono text-xs",title:re[e.kind],children:e.destination??"—"})}function je(e){return t.jsx(K,{variant:"outline",children:e.kind})}function fe(e){return t.jsx("span",{className:"font-medium",children:e.name})}function _e(e){return e.id}function be(e){return t.jsx("option",{value:e,children:e},e)}function ke(e){return t.jsxs(r,{className:"text-muted-foreground gap-1.5 font-normal",children:[t.jsx(U,{name:"filters[kinds][]",value:e}),e]},e)}function ve(e){return t.jsxs(r,{className:"text-muted-foreground gap-1.5 font-normal",children:[t.jsx(U,{name:"filters[environment_ids][]",value:String(e.id)}),e.name]},e.id)}function ye(e){return t.jsxs("option",{value:e.id,children:[e.name," (",e.kind,")"]},e.id)}function Ne(e){return t.jsx("option",{value:e,children:Q[e]??e},e)}function we(e){return t.jsx("option",{value:e.id,children:e.name},e.id)}function Se(){return o.post(Y())}function Ce(e){return t.jsx("option",{value:e,children:e},e)}export{Ke as default};
|
|
1
|
+
import{c as G,r as D,at as T,aL as J,j as t,H as V,F as z,e as o,aM as Y,aN as R,aO as Z,aP as ee,aQ as te}from"./inertia-CgBdJDaE.js";import{I as O}from"./input-error-DfpIawjl.js";import{D as E}from"./data-table-Bc3ZRnpb.js";import{R as se}from"./relative-time-BHbJh8HW.js";import{B as K}from"./badge-DKvItdlb.js";import{B as i}from"./app-wordmark-B-0yZiDb.js";import{b as H,c as B,C as M,a as W}from"./card-C9j_ffR9.js";import{C as U}from"./checkbox-BsBkRg5n.js";import{L as r,I as l}from"./label-BWgQzHCO.js";import{A as ne}from"./app-layout-CdJ5Qjms.js";import"./chart-hover-B0SjyWFy.js";import"./empty-state-CkPROZB0.js";import"./live-dot-Bejk0a5o.js";import"./index-Dy7Wg880.js";import"./index-B2_QluAw.js";import"./format-B9SDkrWj.js";const re={slack:"Slack hook id — incoming webhooks do not expose their channel"},$={slack:{key:"webhook_url",label:"New Slack incoming webhook URL"},webhook:{key:"secret",label:"New signing secret"},linear:{key:"api_key",label:"New Linear API key"}};function ie(e){const s=$[e.kind];if(!s)return;const n=window.prompt(s.label)?.trim();n&&o.patch(R(e.id),{enabled:!0,settings:{[s.key]:n}})}const Q={new_issue:"New issue",regressed_issue:"Regressed or reopened issue",resolved_issue:"Issue resolved",ignored_issue:"Issue ignored",assigned_issue:"Issue assigned",threshold:"Threshold exceeded",quota:"Quota reached"};function ae(e,s){const n=e.filters??{};return[...(s[e.application_id]??[]).filter(a=>(n.environment_ids??[]).includes(a.id)).map(a=>a.name),...n.kinds??[],n.min_priority?`>= ${n.min_priority}`:null,n.title_pattern].filter(Boolean).join(" · ")}function Ke(e){const s=G.c(40),[n,q]=D.useState("slack"),[a,X]=D.useState(e.application_options[0]?.id);let j,f;s[0]===Symbol.for("react.memo_cache_sentinel")?(j=[{title:"Integrations",href:T()}],f=t.jsx(V,{title:"Integrations"}),s[0]=j,s[1]=f):(j=s[0],f=s[1]);let _;s[2]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsxs("div",{children:[t.jsx("h1",{className:"text-xl font-semibold",children:"Integrations and alerts"}),t.jsx("p",{className:"text-muted-foreground text-sm",children:"Where alerts go, and which events trigger them per application."})]}),s[2]=_):_=s[2];let b;s[3]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(H,{children:t.jsx(B,{className:"text-sm",children:"Add integration"})}),s[3]=b):b=s[3];let k;s[4]===Symbol.for("react.memo_cache_sentinel")?(k=T(),s[4]=k):k=s[4];let d;s[5]!==n||s[6]!==e.kinds||s[7]!==e.linear_oauth_enabled?(d=t.jsxs(M,{children:[b,t.jsx(W,{children:t.jsx(z,{method:"post",action:k,className:"space-y-3",resetOnSuccess:!0,children:g=>{const{errors:L,processing:A}=g;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"kind",children:"Kind"}),t.jsx("select",{id:"kind",name:"kind",value:n,onChange:P=>q(P.target.value),className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",children:e.kinds.map(Ce)})]}),!(n==="linear"&&e.linear_oauth_enabled)&&t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"name",children:"Name"}),t.jsx(l,{id:"name",name:"name",required:!0,placeholder:"#alerts"}),t.jsx(O,{messages:L.name})]}),n==="email"&&t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"to",children:"Send to"}),t.jsx(l,{id:"to",name:"settings[to]",type:"email",required:!0})]}),n==="slack"&&t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"webhook_url",children:"Incoming webhook URL"}),t.jsx(l,{id:"webhook_url",name:"settings[webhook_url]",type:"url",required:!0,placeholder:"https://hooks.slack.com/services/…"})]}),n==="webhook"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"url",children:"URL"}),t.jsx(l,{id:"url",name:"settings[url]",type:"url",required:!0})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"secret",children:"Signing secret (optional)"}),t.jsx(l,{id:"secret",name:"settings[secret]"}),t.jsx("p",{className:"text-muted-foreground text-xs",children:"Sent as X-Railwatch-Signature: sha256=HMAC(body)."})]})]}),n==="linear"&&e.linear_oauth_enabled&&t.jsxs("div",{className:"bg-muted/40 space-y-2 rounded-md border p-3",children:[t.jsx("p",{className:"text-sm",children:"Linear uses OAuth to discover your workspace and teams. Connect your workspace, then select a team."}),t.jsx("p",{className:"text-muted-foreground text-xs",children:"Railwatch names the integration from the Linear workspace."})]}),n==="linear"&&!e.linear_oauth_enabled&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"api_key",children:"API key"}),t.jsx(l,{id:"api_key",name:"settings[api_key]",required:!0})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"team_id",children:"Team ID"}),t.jsx(l,{id:"team_id",name:"settings[team_id]",required:!0})]})]}),t.jsx(O,{messages:L.settings}),n==="linear"&&e.linear_oauth_enabled?t.jsx(i,{type:"button",onClick:Se,children:"Connect Linear workspace"}):t.jsx(i,{disabled:A,children:"Add"})]})}})})]}),s[5]=n,s[6]=e.kinds,s[7]=e.linear_oauth_enabled,s[8]=d):d=s[8];let v;s[9]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(H,{children:t.jsx(B,{className:"text-sm",children:"Add alert rule"})}),s[9]=v):v=s[9];let y;s[10]===Symbol.for("react.memo_cache_sentinel")?(y=J(),s[10]=y):y=s[10];let c;s[11]!==a||s[12]!==e.application_options||s[13]!==e.environment_options||s[14]!==e.events||s[15]!==e.integrations||s[16]!==e.issue_kinds||s[17]!==e.priorities?(c=t.jsxs(M,{children:[v,t.jsx(W,{children:t.jsx(z,{method:"post",action:y,className:"space-y-3",children:g=>{const{errors:L,processing:A}=g;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"application_id",children:"Application"}),t.jsx("select",{id:"application_id",name:"application_id",value:a??"",onChange:P=>X(Number(P.target.value)),className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",children:e.application_options.map(we)})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"event",children:"When"}),t.jsx("select",{id:"event",name:"event",className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",children:e.events.map(Ne)})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"integration_id",children:"Notify"}),t.jsx("select",{id:"integration_id",name:"integration_id",className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",children:e.integrations.map(ye)})]}),t.jsxs("div",{className:"space-y-3 border-t pt-3",children:[t.jsx("p",{className:"label-caps",children:"Only notify when (optional)"}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx("span",{className:"text-sm",children:"Environments"}),t.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-2",children:(e.environment_options[a??0]??[]).map(ve)})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx("span",{className:"text-sm",children:"Issue kinds"}),t.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-2",children:e.issue_kinds.map(ke)})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"min_priority",children:"Minimum priority"}),t.jsxs("select",{id:"min_priority",name:"filters[min_priority]",className:"border-input h-9 rounded-md border bg-transparent px-2 text-sm",children:[t.jsx("option",{value:"",children:"any"}),e.priorities.map(be)]})]}),t.jsxs("div",{className:"grid gap-1",children:[t.jsx(r,{htmlFor:"title_pattern",children:"Title matches"}),t.jsx(l,{id:"title_pattern",name:"filters[title_pattern]",placeholder:"timeout, or /Redis.*timeout/"}),t.jsx("p",{className:"text-muted-foreground text-xs",children:"Case-insensitive substring, or a regular expression when wrapped in slashes."})]})]}),t.jsx(O,{messages:L.event}),t.jsx(i,{disabled:A||e.integrations.length===0,children:"Add rule"})]})}})})]}),s[11]=a,s[12]=e.application_options,s[13]=e.environment_options,s[14]=e.events,s[15]=e.integrations,s[16]=e.issue_kinds,s[17]=e.priorities,s[18]=c):c=s[18];let m;s[19]!==d||s[20]!==c?(m=t.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[d,c]}),s[19]=d,s[20]=c,s[21]=m):m=s[21];let N;s[22]===Symbol.for("react.memo_cache_sentinel")?(N=[{key:"n",header:"Integration",cell:fe},{key:"k",header:"Kind",cell:je},{key:"s",header:"Destination",cell:ge},{key:"d",header:"Health",hideOnMobile:!0,cell:xe},{key:"e",header:"",cell:pe},{key:"x",header:"",align:"right",cell:he}],s[22]=N):N=s[22];let h;s[23]!==e.integrations?(h=t.jsx(E,{rows:e.integrations,rowKey:_e,empty:"No integrations yet.",columns:N}),s[23]=e.integrations,s[24]=h):h=s[24];let w,S,C;s[25]===Symbol.for("react.memo_cache_sentinel")?(w={key:"a",header:"Application",cell:ce},S={key:"e",header:"When",cell:de},C={key:"i",header:"Notify",cell:oe},s[25]=w,s[26]=S,s[27]=C):(w=s[25],S=s[26],C=s[27]);let u;s[28]!==e.environment_options?(u={key:"f",header:"Only when",hideOnMobile:!0,cell:g=>t.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:ae(g,e.environment_options)||"—"})},s[28]=e.environment_options,s[29]=u):u=s[29];let I;s[30]===Symbol.for("react.memo_cache_sentinel")?(I={key:"x",header:"",align:"right",cell:le},s[30]=I):I=s[30];let p;s[31]!==u?(p=[w,S,C,u,I],s[31]=u,s[32]=p):p=s[32];let x;s[33]!==e.alert_rules||s[34]!==p?(x=t.jsx(E,{rows:e.alert_rules,rowKey:me,empty:"No alert rules yet.",columns:p}),s[33]=e.alert_rules,s[34]=p,s[35]=x):x=s[35];let F;return s[36]!==h||s[37]!==x||s[38]!==m?(F=t.jsxs(ne,{breadcrumbs:j,children:[f,t.jsxs("div",{className:"flex flex-1 flex-col gap-6 p-4 md:p-6",children:[_,m,h,x]})]}),s[36]=h,s[37]=x,s[38]=m,s[39]=F):F=s[39],F}function le(e){return t.jsx(i,{size:"sm",variant:"ghost",className:"text-destructive",onClick:()=>o.delete(te(e.id)),children:"Remove"})}function oe(e){return e.integration}function de(e){return Q[e.event]??e.event}function ce(e){return e.application}function me(e){return e.id}function he(e){return t.jsxs("span",{className:"flex flex-wrap justify-end gap-1",children:[e.kind==="linear"&&(e.settings.team_options?.length??0)>0&&t.jsxs("select",{"aria-label":`Linear team for ${e.name}`,value:e.settings.team_id??"",onChange:s=>o.patch(R(e.id),{enabled:!0,settings:{team_id:s.target.value}}),className:"border-input h-8 rounded-md border bg-transparent px-2 text-xs",children:[t.jsx("option",{value:"",children:"Select team…"}),e.settings.team_options?.map(ue)]}),t.jsx(i,{size:"sm",variant:"ghost",onClick:()=>o.post(Z(e.id),{},{preserveScroll:!0}),children:"Send test"}),$[e.kind]&&!(e.kind==="linear"&&e.settings.oauth)&&t.jsx(i,{size:"sm",variant:"ghost",onClick:()=>ie(e),children:"Rotate"}),e.kind==="linear"&&e.settings.oauth&&e.settings.credential&&t.jsx(i,{size:"sm",variant:"ghost",onClick:()=>o.delete(ee(e.id)),children:"Disconnect"}),t.jsx(i,{size:"sm",variant:"ghost",onClick:()=>o.patch(R(e.id),{enabled:!e.enabled}),children:e.enabled?"Disable":"Enable"}),t.jsx(i,{size:"sm",variant:"ghost",className:"text-destructive",onClick:()=>o.delete(R(e.id)),children:"Remove"})]})}function ue(e){return t.jsxs("option",{value:e.id,children:[e.name," (",e.key,")"]},e.id)}function pe(e){return e.enabled?null:t.jsx(K,{variant:"secondary",children:"disabled"})}function xe(e){return t.jsxs("span",{className:"flex flex-col gap-0.5",children:[t.jsxs("span",{className:"text-muted-foreground text-xs",children:[e.kind==="linear"?"Last sync ":"Last delivery ",t.jsx(se,{iso:e.kind==="linear"?e.last_synced_at:e.last_delivered_at})]}),e.kind==="linear"&&e.webhook_health&&t.jsxs("span",{className:"text-muted-foreground text-xs",children:["Webhooks: ",e.webhook_health.pending," pending ·"," ",e.webhook_health.failed," failed"]}),e.last_error&&t.jsx("span",{className:"text-destructive max-w-64 truncate text-xs",title:e.last_error,children:e.last_error})]})}function ge(e){return t.jsx("span",{className:"font-mono text-xs",title:re[e.kind],children:e.destination??"—"})}function je(e){return t.jsx(K,{variant:"outline",children:e.kind})}function fe(e){return t.jsx("span",{className:"font-medium",children:e.name})}function _e(e){return e.id}function be(e){return t.jsx("option",{value:e,children:e},e)}function ke(e){return t.jsxs(r,{className:"text-muted-foreground gap-1.5 font-normal",children:[t.jsx(U,{name:"filters[kinds][]",value:e}),e]},e)}function ve(e){return t.jsxs(r,{className:"text-muted-foreground gap-1.5 font-normal",children:[t.jsx(U,{name:"filters[environment_ids][]",value:String(e.id)}),e.name]},e.id)}function ye(e){return t.jsxs("option",{value:e.id,children:[e.name," (",e.kind,")"]},e.id)}function Ne(e){return t.jsx("option",{value:e,children:Q[e]??e},e)}function we(e){return t.jsx("option",{value:e.id,children:e.name},e.id)}function Se(){return o.post(Y())}function Ce(e){return t.jsx("option",{value:e,children:e},e)}export{Ke as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as B,u as F,j as t,e as I,A as R,r as A,L as $}from"./inertia-CgBdJDaE.js";import{E as G}from"./empty-state-CkPROZB0.js";import{F as H}from"./filter-bar-C0O2rJVr.js";import{P as O,E as T}from"./env-layout-aGQgTZRg.js";import{S as J}from"./series-chart-COEtj3PY.js";import{S as q}from"./stat-Cd8QaTGw.js";import{B as L}from"./badge-DKvItdlb.js";import{C as K,a as M}from"./card-C9j_ffR9.js";import{e as Q}from"./execution-path-BX5NcXUZ.js";import{c as P,w as z}from"./format-B9SDkrWj.js";import"./app-wordmark-B-0yZiDb.js";import"./app-layout-CdJ5Qjms.js";import"./live-dot-Bejk0a5o.js";import"./index-Dy7Wg880.js";import"./index-B2_QluAw.js";import"./checkbox-BsBkRg5n.js";import"./label-BWgQzHCO.js";import"./use-live-LwJStJvD.js";import"./segmented-Dg8CES94.js";import"./chart-hover-B0SjyWFy.js";import"./chart-Cmh6JEww.js";import"./arrow-up-DY1fS0tD.js";function U(i){const e=B.c(51),{d:s,a:g,e:j}=i,[_,w]=A.useState(!1);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>w(V),e[0]=f):f=e[0];let l;e[1]!==s.gem_name?(l=s.gem_name&&t.jsx(L,{variant:"secondary",className:"font-mono",children:s.gem_name}),e[1]=s.gem_name,e[2]=l):l=e[2];let r;e[3]!==s.horizon?(r=s.horizon&&t.jsxs(L,{variant:"outline",className:"font-mono",children:["removed in ",s.horizon]}),e[3]=s.horizon,e[4]=r):r=e[4];let a;e[5]!==l||e[6]!==r?(a=t.jsxs("div",{className:"flex items-center gap-2",children:[l,r]}),e[5]=l,e[6]=r,e[7]=a):a=e[7];let n;e[8]!==s.message?(n=t.jsx("p",{className:"mt-1 font-mono text-xs whitespace-pre-wrap",children:s.message}),e[8]=s.message,e[9]=n):n=e[9];let o;e[10]!==s.source?(o=s.source&&t.jsx("p",{className:"text-muted-foreground mt-1 font-mono text-xs",children:s.source}),e[10]=s.source,e[11]=o):o=e[11];let c;e[12]!==a||e[13]!==n||e[14]!==o?(c=t.jsxs("div",{className:"min-w-0 flex-1",children:[a,n,o]}),e[12]=a,e[13]=n,e[14]=o,e[15]=c):c=e[15];let x;e[16]!==s.sparkline?(x=t.jsx(J,{data:s.sparkline,className:"h-10 w-32"}),e[16]=s.sparkline,e[17]=x):x=e[17];let m;e[18]!==s.count?(m=P(s.count),e[18]=s.count,e[19]=m):m=e[19];let d;e[20]!==m?(d=t.jsx("div",{className:"text-lg font-semibold tabular-nums",children:m}),e[20]=m,e[21]=d):d=e[21];let p;e[22]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"text-muted-foreground text-xs",children:"occurrences"}),e[22]=p):p=e[22];let u;e[23]!==d?(u=t.jsxs("div",{className:"text-right",children:[d,p]}),e[23]=d,e[24]=u):u=e[24];let h;e[25]!==u||e[26]!==x?(h=t.jsxs("div",{className:"flex shrink-0 items-center gap-4",children:[x,u]}),e[25]=u,e[26]=x,e[27]=h):h=e[27];let v;e[28]!==h||e[29]!==c?(v=t.jsxs("button",{type:"button",onClick:f,className:"flex flex-wrap items-start justify-between gap-4 text-left",children:[c,h]}),e[28]=h,e[29]=c,e[30]=v):v=e[30];let N;e[31]!==s.first_seen_at?(N=z(s.first_seen_at),e[31]=s.first_seen_at,e[32]=N):N=e[32];let b;e[33]!==N?(b=t.jsxs("span",{children:["First seen ",N]}),e[33]=N,e[34]=b):b=e[34];let y;e[35]!==s.last_seen_at?(y=z(s.last_seen_at),e[35]=s.last_seen_at,e[36]=y):y=e[36];let S;e[37]!==y?(S=t.jsxs("span",{children:["Last seen ",y]}),e[37]=y,e[38]=S):S=e[38];let k;e[39]!==b||e[40]!==S?(k=t.jsxs("div",{className:"text-muted-foreground flex gap-4 text-xs",children:[b,S]}),e[39]=b,e[40]=S,e[41]=k):k=e[41];let E;e[42]!==g||e[43]!==s.occurrences||e[44]!==j||e[45]!==_?(E=_&&t.jsx("div",{className:"mt-2 overflow-hidden rounded-lg border",children:t.jsx("table",{className:"w-full text-xs",children:t.jsx("tbody",{children:s.occurrences.map(D=>t.jsxs("tr",{className:"border-t first:border-t-0",children:[t.jsx("td",{className:"px-3 py-1.5 tabular-nums",children:z(D.occurred_at)}),t.jsx("td",{className:"px-3 py-1.5",children:D.execution_id?t.jsx($,{className:"font-mono hover:underline",href:Q({applicationId:g,environmentId:j,source:D.execution_source,executionId:D.execution_id}),children:D.execution_preview}):t.jsx("span",{className:"text-muted-foreground",children:"–"})})]},D.id))})})}),e[42]=g,e[43]=s.occurrences,e[44]=j,e[45]=_,e[46]=E):E=e[46];let C;return e[47]!==v||e[48]!==k||e[49]!==E?(C=t.jsx(K,{children:t.jsxs(M,{className:"flex flex-col gap-2 pt-4",children:[v,k,E]})}),e[47]=v,e[48]=k,e[49]=E,e[50]=C):C=e[50],C}function V(i){return!i}function _e(i){const e=B.c(33),{environment:s,window:g}=F().props,j=s.application_id,_=s.id;let w;e[0]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(O,{title:"Deprecations",description:"ActiveSupport::Deprecation warnings, grouped by gem and message."}),e[0]=w):w=e[0];let f;e[1]!==i.distinct?(f=P(i.distinct),e[1]=i.distinct,e[2]=f):f=e[2];let l;e[3]!==f?(l=t.jsx(q,{label:"Distinct deprecations",value:f}),e[3]=f,e[4]=l):l=e[4];let r;e[5]!==i.total_occurrences?(r=P(i.total_occurrences),e[5]=i.total_occurrences,e[6]=r):r=e[6];let a;e[7]!==r?(a=t.jsx(q,{label:"Total occurrences",value:r}),e[7]=r,e[8]=a):a=e[8];let n;e[9]!==i.new_this_window?(n=P(i.new_this_window),e[9]=i.new_this_window,e[10]=n):n=e[10];let o;e[11]!==n?(o=t.jsx(q,{label:"New this window",value:n}),e[11]=n,e[12]=o):o=e[12];let c;e[13]!==l||e[14]!==a||e[15]!==o?(c=t.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[l,a,o]}),e[13]=l,e[14]=a,e[15]=o,e[16]=c):c=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=[{key:"gem",label:"Gem"}],e[17]=x):x=e[17];let m;e[18]!==j||e[19]!==_||e[20]!==g?(m=h=>I.visit(R(j,_,{window:g,q:h||void 0}),{preserveState:!0}),e[18]=j,e[19]=_,e[20]=g,e[21]=m):m=e[21];let d;e[22]!==i.q||e[23]!==m?(d=t.jsx(H,{value:i.q,fields:x,onChange:m,placeholder:"gem:rails deprecated method"}),e[22]=i.q,e[23]=m,e[24]=d):d=e[24];let p;e[25]!==j||e[26]!==_||e[27]!==i.deprecations?(p=i.deprecations.length===0?t.jsx(G,{title:"No deprecations in this window."}):t.jsx("div",{className:"flex flex-col gap-3",children:i.deprecations.map(h=>t.jsx(U,{d:h,a:j,e:_},h.group_hash))}),e[25]=j,e[26]=_,e[27]=i.deprecations,e[28]=p):p=e[28];let u;return e[29]!==d||e[30]!==p||e[31]!==c?(u=t.jsxs(T,{title:"Deprecations",children:[w,c,d,p]}),e[29]=d,e[30]=p,e[31]=c,e[32]=u):u=e[32],u}export{_e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as _,u as x,j as r,e as k,v as b}from"./inertia-CgBdJDaE.js";import{V as v}from"./chart-panel-DKNxoauI.js";import{D as j}from"./data-table-Bc3ZRnpb.js";import{E as S}from"./empty-state-CkPROZB0.js";import{F as C}from"./filter-bar-C0O2rJVr.js";import{P as E,E as w}from"./env-layout-aGQgTZRg.js";import{S as M}from"./sparkline-cell-BbfXw3kA.js";import{c as f,m as O}from"./format-B9SDkrWj.js";import{L as P}from"./app-layout-CdJ5Qjms.js";import"./series-chart-COEtj3PY.js";import"./chart-hover-B0SjyWFy.js";import"./chart-Cmh6JEww.js";import"./badge-DKvItdlb.js";import"./app-wordmark-B-0yZiDb.js";import"./use-live-LwJStJvD.js";import"./live-dot-Bejk0a5o.js";import"./index-Dy7Wg880.js";import"./index-B2_QluAw.js";import"./segmented-Dg8CES94.js";import"./label-BWgQzHCO.js";import"./checkbox-BsBkRg5n.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as O,j as s,C as R,aa as H}from"./inertia-CgBdJDaE.js";import{C as w}from"./chart-panel-DKNxoauI.js";import{D as C}from"./data-table-Bc3ZRnpb.js";import{E as q}from"./empty-state-CkPROZB0.js";import{C as U,X as G,Y as I,a as W,b as X,c as Y}from"./chart-Cmh6JEww.js";import{A as J,a as V}from"./series-chart-COEtj3PY.js";import{E as Z,P as ee}from"./env-layout-aGQgTZRg.js";import{a as te,S as _}from"./stat-Cd8QaTGw.js";import{C as A,b as L,c as P,a as $}from"./card-C9j_ffR9.js";import{c as j,m as T,b as se,a as K,w as Q}from"./format-B9SDkrWj.js";import{r as B}from"./app-layout-CdJ5Qjms.js";import"./chart-hover-B0SjyWFy.js";import"./badge-DKvItdlb.js";import"./app-wordmark-B-0yZiDb.js";import"./use-live-LwJStJvD.js";import"./live-dot-Bejk0a5o.js";import"./index-Dy7Wg880.js";import"./index-B2_QluAw.js";import"./segmented-Dg8CES94.js";import"./label-BWgQzHCO.js";import"./arrow-up-DY1fS0tD.js";import"./checkbox-BsBkRg5n.js";const E={fontSize:10,fontFamily:"var(--font-mono)"};function re(t){return new Date(t).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function D(t){return new Date(t).toLocaleString(void 0,{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit"})}function N(t){const e=O.c(24),{label:a,data:r,format:o,color:p,className:l}=t,c=p===void 0?"var(--primary)":p,x=l===void 0?"h-32":l;let m;e[0]!==c||e[1]!==a?(m={value:{label:a,color:c}},e[0]=c,e[1]=a,e[2]=m):m=e[2];const b=m,h=`${x} w-full`;let n,u;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(U,{vertical:!1,strokeDasharray:"2 4"}),u=s.jsx(G,{dataKey:"t",tickFormatter:re,tickLine:!1,axisLine:!1,minTickGap:40,tick:E}),e[3]=n,e[4]=u):(n=e[3],u=e[4]);let i;e[5]!==o?(i=s.jsx(I,{width:44,tickLine:!1,axisLine:!1,tick:E,tickFormatter:S=>o(Number(S))}),e[5]=o,e[6]=i):i=e[6];let d;e[7]!==o||e[8]!==a?(d=s.jsx(W,{content:s.jsx(X,{labelFormatter:ae,formatter:S=>[o(Number(S)),a]})}),e[7]=o,e[8]=a,e[9]=d):d=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(J,{dataKey:"value",stroke:"var(--color-value)",fill:"var(--color-value)",fillOpacity:.15,strokeWidth:1.75,isAnimationActive:!1}),e[10]=g):g=e[10];let f;e[11]!==r||e[12]!==i||e[13]!==d?(f=s.jsxs(V,{data:r,children:[n,u,i,d,g]}),e[11]=r,e[12]=i,e[13]=d,e[14]=f):f=e[14];let v;e[15]!==b||e[16]!==f||e[17]!==h?(v=s.jsx(Y,{config:b,className:h,children:f}),e[15]=b,e[16]=f,e[17]=h,e[18]=v):v=e[18];let y;e[19]!==r?(y=r.length>0&&s.jsxs("div",{className:"text-muted-foreground mt-1 flex justify-between font-mono text-[10px]",children:[s.jsx("span",{children:D(r[0].t)}),s.jsx("span",{children:D(r[r.length-1].t)})]}),e[19]=r,e[20]=y):y=e[20];let k;return e[21]!==v||e[22]!==y?(k=s.jsxs("div",{children:[v,y]}),e[21]=v,e[22]=y,e[23]=k):k=e[23],k}function ae(t){return D(String(t))}function z(t){const e=O.c(21),{busy:a,max:r,className:o}=t;if(!r){let f;return e[0]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("span",{className:"text-muted-foreground",children:"–"}),e[0]=f):f=e[0],f}const p=Math.min(1,(a??0)/r);let l;e[1]!==o?(l=R("flex items-center gap-1.5",o),e[1]=o,e[2]=l):l=e[2];const c=a??0,x=p>=.9?"bg-danger":p>=.7?"bg-warning":"bg-live";let m;e[3]!==x?(m=R("absolute inset-y-0 left-0 rounded-full",x),e[3]=x,e[4]=m):m=e[4];const b=`${Math.max(4,p*100)}%`;let h;e[5]!==b?(h={width:b},e[5]=b,e[6]=h):h=e[6];let n;e[7]!==m||e[8]!==h?(n=s.jsx("span",{className:m,style:h}),e[7]=m,e[8]=h,e[9]=n):n=e[9];let u;e[10]!==r||e[11]!==c||e[12]!==n?(u=s.jsx("span",{role:"meter","aria-label":"Utilisation","aria-valuenow":c,"aria-valuemin":0,"aria-valuemax":r,className:"bg-muted-foreground/25 relative h-1.5 w-10 shrink-0 overflow-hidden rounded-full",children:n}),e[10]=r,e[11]=c,e[12]=n,e[13]=u):u=e[13];const i=a??0;let d;e[14]!==r||e[15]!==i?(d=s.jsxs("span",{className:"font-mono tabular-nums",children:[i,"/",r]}),e[14]=r,e[15]=i,e[16]=d):d=e[16];let g;return e[17]!==l||e[18]!==d||e[19]!==u?(g=s.jsxs("span",{className:l,children:[u,d]}),e[17]=l,e[18]=d,e[19]=u,e[20]=g):g=e[20],g}const M=t=>`${t.toFixed(0)}%`;function le(t){return t.reduce((e,a)=>e+(a??0),0)}function F(t){return t.reduce((e,a)=>Math.max(e,a??0),0)}function lt(t){const e=O.c(27);let a;if(e[0]!==t.samples){const i=t.samples.flatMap(Pe);a=i.length?i.reduce(Le,0)/i.length:0,e[0]=t.samples,e[1]=a}else a=e[1];const r=a;let o,p,l,c,x;if(e[2]!==t.queues||e[3]!==t.samples||e[4]!==t.series||e[5]!==t.silent_servers||e[6]!==r){const i=le(t.samples.map(Ae)),d=F(t.samples.map(Re)),g=F(t.samples.map(Oe)),f=t.samples.length>0||t.series.length>0;o=Z,p="Processes",e[12]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ee,{title:"Processes",description:"What every web and worker process is doing right now: thread pools, socket backlog, queue depth, and the boots behind them."}),e[12]=l):l=e[12],e[13]!==t.silent_servers?(c=t.silent_servers.length>0&&s.jsxs(A,{className:"border-warning/40",children:[s.jsx(L,{children:s.jsxs(P,{className:"flex items-center gap-2",children:[s.jsx(H,{className:"text-warning size-4"}),t.silent_servers.length===1?"1 expected host is silent":`${t.silent_servers.length} expected hosts are silent`]})}),s.jsxs($,{className:"space-y-2",children:[s.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.silent_servers.map(De)}),s.jsx("p",{className:"text-muted-foreground text-xs",children:"No health sample or execution from these hosts in the last 10 minutes. Expected hosts come from your Kamal post-deploy hook, or from the environment settings if you set them by hand."})]})]}),e[13]=t.silent_servers,e[14]=c):c=e[14],x=f?s.jsxs(s.Fragment,{children:[s.jsxs(te,{children:[s.jsx(_,{label:"Live processes",value:t.samples.length}),s.jsx(_,{label:"Thread utilisation",value:M(r),tone:r>=90?"destructive":r>=70?"warning":void 0,hint:"averaged across live processes"}),s.jsx(_,{label:"Backlog",value:j(i)}),s.jsx(_,{label:"Queue depth",value:j(d)}),s.jsx(_,{label:"Oldest job",value:T(g)})]}),s.jsx(C,{rows:t.samples,rowKey:Te,empty:s.jsx(q,{title:"No process reported in the last 10 minutes",description:"Health samples are older than the live window."}),columns:[{key:"server",header:"Server",cell:Me},{key:"role",header:"Role",cell:qe},{key:"pid",hideOnMobile:!0,header:"PID",align:"right",cell:Ce},{key:"threads",header:"Threads",cell:Se},{key:"pool",hideOnMobile:!0,header:"DB pool",cell:Ne},{key:"mem",hideOnMobile:!0,header:"Memory",align:"right",cell:we},{key:"seen",header:"Last sample",align:"right",cell:ke}]}),t.queues.length>0&&s.jsxs(A,{children:[s.jsx(L,{children:s.jsx(P,{children:"Queue depth"})}),s.jsx($,{children:s.jsx(C,{rows:t.queues,rowKey:_e,columns:[{key:"q",header:"Queue",cell:ye},{key:"d",header:"Ready jobs",align:"right",cell:ve}]})})]}),s.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[s.jsx(w,{label:"Thread utilisation",value:M(r),children:s.jsx(N,{label:"Utilisation",format:M,data:t.series.map(je)})}),s.jsx(w,{label:"Backlog",value:j(i),children:s.jsx(N,{label:"Backlog",color:"var(--warning)",format:j,data:t.series.map(ge)})}),s.jsx(w,{label:"Queue depth",value:j(d),children:s.jsx(N,{label:"Ready jobs",format:j,data:t.series.map(be)})}),s.jsx(w,{label:"Oldest job",value:T(g),children:s.jsx(N,{label:"Oldest job",color:"var(--danger)",format:xe,data:t.series.map(fe)})})]})]}):s.jsx(q,{icon:B,title:"No health samples yet",description:"The gem reports thread pool, backlog and queue health every 15s from each web and worker process."}),e[2]=t.queues,e[3]=t.samples,e[4]=t.series,e[5]=t.silent_servers,e[6]=r,e[7]=o,e[8]=p,e[9]=l,e[10]=c,e[11]=x}else o=e[7],p=e[8],l=e[9],c=e[10],x=e[11];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("h2",{className:"text-sm font-semibold",children:"Process boots"}),e[15]=m):m=e[15];let b,h;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(q,{icon:B,title:"No process has booted with Railwatch yet",description:"Server processes report here once they boot with the gem installed."}),h=[{key:"b",header:"Booted",cell:he},{key:"s",header:"Server",cell:de},{key:"r",header:"Role",cell:ue},{key:"pid",hideOnMobile:!0,header:"PID",align:"right",cell:me},{key:"d",header:"Deploy",cell:ce},{key:"v",hideOnMobile:!0,header:"Ruby / Rails / Railwatch",cell:ie},{key:"ad",hideOnMobile:!0,header:"DB / queue / cache",cell:oe},{key:"boot",hideOnMobile:!0,header:"Boot",align:"right",cell:ne}],e[16]=b,e[17]=h):(b=e[16],h=e[17]);let n;e[18]!==t.processes?(n=s.jsx(C,{rows:t.processes,rowKey:pe,empty:b,columns:h}),e[18]=t.processes,e[19]=n):n=e[19];let u;return e[20]!==o||e[21]!==p||e[22]!==l||e[23]!==c||e[24]!==x||e[25]!==n?(u=s.jsxs(o,{title:p,children:[l,c,x,m,n]}),e[20]=o,e[21]=p,e[22]=l,e[23]=c,e[24]=x,e[25]=n,e[26]=u):u=e[26],u}function ne(t){return t.boot_seconds?`${t.boot_seconds.toFixed(1)}s`:"–"}function oe(t){return s.jsxs("span",{className:"font-mono text-xs",children:[t.detail.database_adapter," / ",t.detail.queue_adapter," /"," ",t.detail.cache_store?.replace("ActiveSupport::Cache::","")]})}function ie(t){return s.jsxs("span",{className:"font-mono text-xs",children:[t.ruby_version," / ",t.rails_version," / ",t.railwatch_version]})}function ce(t){return s.jsx("span",{className:"font-mono text-xs",children:t.deploy?.slice(0,12)})}function me(t){return t.pid}function ue(t){return t.role}function de(t){return s.jsx("span",{className:"font-mono text-xs",children:t.server})}function he(t){return s.jsx("span",{className:"text-xs",title:Q(t.booted_at),children:K(t.booted_at)})}function pe(t){return t.id}function fe(t){return{t:t.t,value:t.queue_latency}}function xe(t){return T(t)}function be(t){return{t:t.t,value:t.queue_depth}}function ge(t){return{t:t.t,value:t.backlog}}function je(t){return{t:t.t,value:t.utilisation}}function ve(t){return j(t.depth)}function ye(t){return t.queue}function _e(t){return t.queue}function ke(t){return s.jsx("span",{title:Q(t.sampled_at),children:K(t.sampled_at)})}function we(t){return se(t.memory)}function Ne(t){return s.jsx(z,{busy:t.pool_busy,max:t.pool_size})}function Se(t){return s.jsx(z,{busy:t.threads_busy,max:t.threads_max})}function Ce(t){return t.pid}function qe(t){return t.role}function Me(t){return s.jsx("span",{className:"font-mono text-xs",children:t.server})}function Te(t){return t.id}function De(t){return s.jsx("span",{className:"border-warning/40 bg-warning/10 text-warning rounded-sm border px-1.5 font-mono text-[11px]",children:t},t)}function Oe(t){return t.queue_latency}function Re(t){return t.queue_depth}function Ae(t){return t.backlog}function Le(t,e){return t+e}function Pe(t){return t.threads_max?[(t.threads_busy??0)/t.threads_max*100]:[]}export{lt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as ee,u as ne,j as s,E as se,e as ie,L as le,i as oe}from"./inertia-CgBdJDaE.js";import{V as ae}from"./chart-panel-DKNxoauI.js";import{C as re}from"./cursor-load-more-OpHbe_kE.js";import{D as ce}from"./data-table-Bc3ZRnpb.js";import{F as me}from"./filter-bar-C0O2rJVr.js";import{P as de,E as fe}from"./env-layout-aGQgTZRg.js";import{S as ue}from"./app-layout-CdJ5Qjms.js";import{B as te}from"./badge-DKvItdlb.js";import{C as X,a as Y}from"./card-C9j_ffR9.js";import{e as xe}from"./execution-path-BX5NcXUZ.js";import{c as Z,w as pe}from"./format-B9SDkrWj.js";import"./series-chart-COEtj3PY.js";import"./chart-hover-B0SjyWFy.js";import"./chart-Cmh6JEww.js";import"./app-wordmark-B-0yZiDb.js";import"./empty-state-CkPROZB0.js";import"./use-live-LwJStJvD.js";import"./live-dot-Bejk0a5o.js";import"./index-Dy7Wg880.js";import"./index-B2_QluAw.js";import"./segmented-Dg8CES94.js";import"./label-BWgQzHCO.js";import"./checkbox-BsBkRg5n.js";function he(t){const e=ee.c(3),{handled:n}=t,o=n?"secondary":"destructive",l=n?"handled":"unhandled";let i;return e[0]!==o||e[1]!==l?(i=s.jsx(te,{variant:o,children:l}),e[0]=o,e[1]=l,e[2]=i):i=e[2],i}function ye(t){const e=ee.c(3),{severity:n}=t;if(!n)return null;const o=n==="fatal"||n==="error"?"destructive":n==="warning"?"secondary":"outline";let l;return e[0]!==n||e[1]!==o?(l=s.jsx(te,{variant:o,className:"capitalize",children:n}),e[0]=n,e[1]=o,e[2]=l):l=e[2],l}function Je(t){const e=ee.c(76),{environment:n,window:o,range:l}=ne().props,i=n.application_id,a=n.id;let N;e[0]!==l?.from||e[1]!==l?.to||e[2]!==o?(N=o==="custom"?{from:l?.from,to:l?.to}:{window:o},e[0]=l?.from,e[1]=l?.to,e[2]=o,e[3]=N):N=e[3];const c=N;let w;e[4]!==l||e[5]!==c?(w=l?{from:l.from,to:l.to}:c,e[4]=l,e[5]=c,e[6]=w):w=e[6];const J=w;let S;e[7]!==i||e[8]!==J||e[9]!==a||e[10]!==t.pagination.limit||e[11]!==t.q?(S=r=>se(i,a,{...J,q:t.q||void 0,cursor:r,limit:t.pagination.limit}),e[7]=i,e[8]=J,e[9]=a,e[10]=t.pagination.limit,e[11]=t.q,e[12]=S):S=e[12];const Q=S;let E;e[13]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(de,{title:"Exceptions",description:"Every exception raised, handled or not -- distinct from Issues, which group and track these over time.",actions:s.jsx(ue,{page:"exceptions"})}),e[13]=E):E=e[13];let m;e[14]!==t.series?(m=s.jsx(ae,{legend:"exception",label:"Exceptions",seriesLabel:"Exceptions",data:t.series}),e[14]=t.series,e[15]=m):m=e[15];let q;e[16]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx("div",{className:"text-muted-foreground text-xs font-medium tracking-wide uppercase",children:"Total"}),e[16]=q):q=e[16];let d;e[17]!==t.total?(d=Z(t.total),e[17]=t.total,e[18]=d):d=e[18];let f;e[19]!==d?(f=s.jsx(X,{className:"gap-1 py-4",children:s.jsxs(Y,{className:"px-4",children:[q,s.jsx("div",{className:"mt-1 text-2xl font-semibold tabular-nums",children:d})]})}),e[19]=d,e[20]=f):f=e[20];let P;e[21]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx("div",{className:"text-muted-foreground text-xs font-medium tracking-wide uppercase",children:"Unhandled"}),e[21]=P):P=e[21];let u;e[22]!==t.unhandled?(u=Z(t.unhandled),e[22]=t.unhandled,e[23]=u):u=e[23];let x;e[24]!==u?(x=s.jsx(X,{className:"gap-1 py-4",children:s.jsxs(Y,{className:"px-4",children:[P,s.jsx("div",{className:"text-destructive mt-1 text-2xl font-semibold tabular-nums",children:u})]})}),e[24]=u,e[25]=x):x=e[25];let C;e[26]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"text-muted-foreground text-xs font-medium tracking-wide uppercase",children:"Top classes"}),e[26]=C):C=e[26];let p;e[27]!==t.classes?(p=t.classes.slice(0,5).map(we),e[27]=t.classes,e[28]=p):p=e[28];let h;e[29]!==p?(h=s.jsx(X,{className:"gap-1 py-4",children:s.jsxs(Y,{className:"px-4",children:[C,s.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:p})]})}),e[29]=p,e[30]=h):h=e[30];let y;e[31]!==x||e[32]!==h||e[33]!==f?(y=s.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[f,x,h]}),e[31]=x,e[32]=h,e[33]=f,e[34]=y):y=e[34];let B,M,I,L,T,H;e[35]===Symbol.for("react.memo_cache_sentinel")?(B={key:"after",label:"After"},M={key:"before",label:"Before"},I={key:"user",label:"User"},L={key:"tenant",label:"Tenant"},T={key:"deploy",label:"Deploy"},H={key:"source",label:"Source"},e[35]=B,e[36]=M,e[37]=I,e[38]=L,e[39]=T,e[40]=H):(B=e[35],M=e[36],I=e[37],L=e[38],T=e[39],H=e[40]);let O,R;e[41]===Symbol.for("react.memo_cache_sentinel")?(O={key:"kind",label:"Execution kind",options:["request","job","scheduled_task","command"]},R={key:"class",label:"Class"},e[41]=O,e[42]=R):(O=e[41],R=e[42]);let D;e[43]===Symbol.for("react.memo_cache_sentinel")?(D={key:"handled",label:"Handled",options:["true","false"]},e[43]=D):D=e[43];let F;e[44]===Symbol.for("react.memo_cache_sentinel")?(F=[B,M,I,L,T,H,O,R,D,{key:"severity",label:"Severity",options:["fatal","error","warning","info"]}],e[44]=F):F=e[44];let g;e[45]!==i||e[46]!==a||e[47]!==c?(g=r=>ie.visit(se(i,a,{...c,q:r||void 0}),{only:["exceptions","pagination","q"],preserveState:!0,reset:["exceptions"]}),e[45]=i,e[46]=a,e[47]=c,e[48]=g):g=e[48];let v;e[49]!==t.q||e[50]!==g?(v=s.jsx(me,{value:t.q,fields:F,onChange:g,placeholder:"class:ActiveRecord::RecordNotFound handled:false"}),e[49]=t.q,e[50]=g,e[51]=v):v=e[51];let U,V,$,A,z;e[52]===Symbol.for("react.memo_cache_sentinel")?(U={key:"when",header:"When",className:"w-40",cell:ke},V={key:"class",header:"Class",grow:!0,cell:_e},$={key:"handled",header:"Handled",cell:je},A={key:"sev",hideOnMobile:!0,header:"Severity",cell:be},z={key:"source",hideOnMobile:!0,header:"Source",cell:ve},e[52]=U,e[53]=V,e[54]=$,e[55]=A,e[56]=z):(U=e[52],V=e[53],$=e[54],A=e[55],z=e[56]);let b;e[57]!==i||e[58]!==a?(b={key:"in",hideOnMobile:!0,header:"In",cell:r=>r.execution_id?s.jsx(le,{className:"font-mono text-xs hover:underline",href:xe({applicationId:i,environmentId:a,source:r.execution_source,executionId:r.execution_id}),children:r.execution_preview}):s.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})},e[57]=i,e[58]=a,e[59]=b):b=e[59];let K;e[60]===Symbol.for("react.memo_cache_sentinel")?(K={key:"user",hideOnMobile:!0,header:"User",cell:ge},e[60]=K):K=e[60];let j;e[61]!==b?(j=[U,V,$,A,z,b,K],e[61]=b,e[62]=j):j=e[62];let _;e[63]!==t.exceptions||e[64]!==j?(_=s.jsx(ce,{rows:t.exceptions,rowKey:Ne,empty:"No exceptions in this window.",columns:j}),e[63]=t.exceptions,e[64]=j,e[65]=_):_=e[65];let W;e[66]===Symbol.for("react.memo_cache_sentinel")?(W=["exceptions","pagination"],e[66]=W):W=e[66];let k;e[67]!==Q||e[68]!==t.pagination?(k=s.jsx(re,{meta:t.pagination,href:Q,only:W}),e[67]=Q,e[68]=t.pagination,e[69]=k):k=e[69];let G;return e[70]!==y||e[71]!==v||e[72]!==_||e[73]!==k||e[74]!==m?(G=s.jsxs(fe,{title:"Exceptions",children:[E,m,y,v,_,k]}),e[70]=y,e[71]=v,e[72]=_,e[73]=k,e[74]=m,e[75]=G):G=e[75],G}function ge(t){return s.jsx("span",{className:"font-mono text-xs",children:t.user_ref??""})}function ve(t){return s.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:t.source??""})}function be(t){return s.jsx(ye,{severity:t.severity})}function je(t){return s.jsx(he,{handled:t.handled})}function _e(t){return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.issue_key?s.jsx(le,{className:"font-mono text-xs font-semibold hover:underline",href:oe(t.issue_id),children:t.class_name}):s.jsx("span",{className:"font-mono text-xs font-semibold",children:t.class_name}),s.jsx("span",{className:"text-muted-foreground line-clamp-1 text-xs",children:t.message})]})}function ke(t){return s.jsx("span",{className:"text-xs tabular-nums",children:pe(t.occurred_at)})}function Ne(t){return t.id}function we(t){const[e,n]=t;return s.jsxs(te,{variant:"outline",className:"font-mono",children:[e," (",Z(n),")"]},e)}export{Je as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as M,u as A,j as n,t as K,e as P,L as R}from"./inertia-CgBdJDaE.js";import{D as S}from"./data-table-Bc3ZRnpb.js";import{E as B}from"./empty-state-CkPROZB0.js";import{P as $,E as D}from"./env-layout-aGQgTZRg.js";import{B as L}from"./badge-DKvItdlb.js";import{c as T,b as O,m as C,w as H}from"./format-B9SDkrWj.js";import{b as E}from"./app-layout-CdJ5Qjms.js";import"./chart-hover-B0SjyWFy.js";import"./use-live-LwJStJvD.js";import"./live-dot-Bejk0a5o.js";import"./index-Dy7Wg880.js";import"./app-wordmark-B-0yZiDb.js";import"./index-B2_QluAw.js";import"./segmented-Dg8CES94.js";import"./label-BWgQzHCO.js";import"./checkbox-BsBkRg5n.js";function fe(t){const e=M.c(26),{environment:N}=A().props,j=N.application_id,w=N.id;let c;e[0]!==j||e[1]!==w?(c=r=>r.execution_id?K(j,w,r.execution_id):null,e[0]=j,e[1]=w,e[2]=c):c=e[2];const i=c;let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx($,{title:"Broadcasts",description:"Action Cable broadcasts, transmits, and channel actions (covers inertia_cable and Turbo Streams)."}),e[3]=m):m=e[3];let d,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(B,{icon:E,title:"No broadcasts in this window",description:"Action Cable broadcasts appear here as your app sends them."}),u=[{key:"k",header:"Kind",cell:X},{key:"n",header:"Stream / channel",cell:V},{key:"c",hideOnMobile:!0,header:"Count",align:"right",cell:U},{key:"b",hideOnMobile:!0,header:"Bytes",align:"right",cell:Q},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:J}],e[4]=d,e[5]=u):(d=e[4],u=e[5]);let a;e[6]!==t.streams?(a=n.jsx(S,{rows:t.streams,rowKey:Y,empty:d,columns:u}),e[6]=t.streams,e[7]=a):a=e[7];let p;e[8]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx("h2",{className:"text-sm font-semibold",children:"Recent"}),e[8]=p):p=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(B,{icon:E,title:"No broadcasts in this window",description:"Action Cable broadcasts appear here as your app sends them."}),e[9]=h):h=e[9];let s;e[10]!==i?(s={onOpen:(r,g)=>{const v=i(r);v&&(g?.newTab?window.open(v,"_blank"):P.visit(v))}},e[10]=i,e[11]=s):s=e[11];let f,b,x,y,_;e[12]===Symbol.for("react.memo_cache_sentinel")?(y={key:"when",header:"When",cell:F},_={key:"k",header:"Kind",cell:z},f={key:"s",header:"Stream / channel",cell:W},b={key:"b",hideOnMobile:!0,header:"Bytes",align:"right",cell:I},x={key:"d",header:"Duration",align:"right",cell:q},e[12]=f,e[13]=b,e[14]=x,e[15]=y,e[16]=_):(f=e[12],b=e[13],x=e[14],y=e[15],_=e[16]);let o;e[17]!==i?(o=[y,_,f,b,x,{key:"in",hideOnMobile:!0,header:"In",cell:r=>{const g=i(r);return g?n.jsx(R,{className:"font-mono text-xs hover:underline",href:g,children:r.execution_preview}):null}}],e[17]=i,e[18]=o):o=e[18];let l;e[19]!==t.recent||e[20]!==o||e[21]!==s?(l=n.jsx(S,{rows:t.recent,rowKey:G,empty:h,keyboardNav:s,columns:o}),e[19]=t.recent,e[20]=o,e[21]=s,e[22]=l):l=e[22];let k;return e[23]!==l||e[24]!==a?(k=n.jsxs(D,{title:"Broadcasts",children:[m,a,p,l]}),e[23]=l,e[24]=a,e[25]=k):k=e[25],k}function q(t){return C(t.duration,3)}function I(t){return O(t.bytes)}function W(t){return n.jsxs("span",{className:"font-mono text-xs",children:[t.stream??t.channel,t.action?`#${t.action}`:""]})}function z(t){return t.failed?n.jsxs("span",{className:"flex items-center gap-1.5",children:[t.kind,n.jsx(L,{variant:"destructive",children:"failed"})]}):t.kind}function F(t){return n.jsx("span",{className:"text-xs",children:H(t.occurred_at)})}function G(t){return t.id}function J(t){return C(t.avg,3)}function Q(t){return O(t.bytes)}function U(t){return T(t.count)}function V(t){return n.jsx("span",{className:"font-mono text-xs",children:t.name})}function X(t){return t.kind}function Y(t){return`${t.group_hash}-${t.kind}`}export{fe as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as le,u as ae,j as r,e as oe,ab as ne,a1 as ce,L as me}from"./inertia-CgBdJDaE.js";import{C as de}from"./chart-hover-B0SjyWFy.js";import{V as ue,D as fe}from"./chart-panel-DKNxoauI.js";import{D as he}from"./data-table-Bc3ZRnpb.js";import{E as xe}from"./empty-state-CkPROZB0.js";import{F as pe}from"./filter-bar-C0O2rJVr.js";import{P as ye,E as ge}from"./env-layout-aGQgTZRg.js";import{u as ve,P as be}from"./percentile-picker-DLAnTKY3.js";import{S as ke,H as je}from"./app-layout-CdJ5Qjms.js";import{S as M}from"./sort-header-DBxQ_KFX.js";import{S as _e}from"./sparkline-cell-BbfXw3kA.js";import{m as re,c as $,p as qe}from"./format-B9SDkrWj.js";import"./series-chart-COEtj3PY.js";import"./chart-Cmh6JEww.js";import"./badge-DKvItdlb.js";import"./app-wordmark-B-0yZiDb.js";import"./use-live-LwJStJvD.js";import"./live-dot-Bejk0a5o.js";import"./index-Dy7Wg880.js";import"./index-B2_QluAw.js";import"./segmented-Dg8CES94.js";import"./label-BWgQzHCO.js";import"./checkbox-BsBkRg5n.js";import"./arrow-up-DY1fS0tD.js";function it(t){const e=le.c(95),{environment:se,window:a}=ae().props,{percentile:o}=ve(),n=se.application_id,c=se.id;let O;e[0]!==n||e[1]!==c||e[2]!==t.dir||e[3]!==t.q||e[4]!==t.sort||e[5]!==a?(O=s=>oe.visit(ne(n,c,{window:a,sort:t.sort,dir:t.dir,q:t.q||void 0,...s}),{preserveState:!0}),e[0]=n,e[1]=c,e[2]=t.dir,e[3]=t.q,e[4]=t.sort,e[5]=a,e[6]=O):O=e[6];const m=O;let H;e[7]!==t.dir||e[8]!==t.sort||e[9]!==m?(H=s=>m({sort:s,dir:t.sort===s&&t.dir==="desc"?"asc":"desc"}),e[7]=t.dir,e[8]=t.sort,e[9]=m,e[10]=H):H=e[10];const i=H;let N;e[11]!==n||e[12]!==c||e[13]!==a?(N=s=>ce(n,c,s.group_hash,{window:a}),e[11]=n,e[12]=c,e[13]=a,e[14]=N):N=e[14];const l=N;let D;e[15]===Symbol.for("react.memo_cache_sentinel")?(D=r.jsx(ye,{title:"Requests",description:"Every route your app served, with error rates and percentiles.",actions:r.jsxs(r.Fragment,{children:[r.jsx(ke,{page:"requests"}),r.jsx(be,{})]})}),e[15]=D):D=e[15];let L;e[16]===Symbol.for("react.memo_cache_sentinel")?(L={key:"method",label:"Method",options:["GET","POST","PUT","PATCH","DELETE"]},e[16]=L):L=e[16];let A;e[17]===Symbol.for("react.memo_cache_sentinel")?(A=[L,{key:"status",label:"Status",options:["2xx","3xx","4xx","5xx"]},{key:"route",label:"Route"}],e[17]=A):A=e[17];let d;e[18]!==m?(d=s=>m({q:s||void 0}),e[18]=m,e[19]=d):d=e[19];let u;e[20]!==t.q||e[21]!==d?(u=r.jsx(pe,{value:t.q,fields:A,onChange:d,placeholder:"method:GET status:5xx route:/widgets"}),e[20]=t.q,e[21]=d,e[22]=u):u=e[22];let f;e[23]!==t.deploys||e[24]!==t.series?(f=r.jsx(ue,{label:"Requests",data:t.series,deploys:t.deploys}),e[23]=t.deploys,e[24]=t.series,e[25]=f):f=e[25];let h;e[26]!==t.deploys||e[27]!==t.series||e[28]!==o?(h=r.jsx(fe,{label:"Latency",data:t.series,deploys:t.deploys,percentile:o}),e[26]=t.deploys,e[27]=t.series,e[28]=o,e[29]=h):h=e[29];let x;e[30]!==f||e[31]!==h?(x=r.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[f,h]}),e[30]=f,e[31]=h,e[32]=x):x=e[32];let F;e[33]===Symbol.for("react.memo_cache_sentinel")?(F=r.jsx(xe,{icon:je,title:"No requests in this window",description:"HTTP requests to your app appear here as they're reported."}),e[33]=F):F=e[33];let p;e[34]!==l?(p={onOpen:(s,ie)=>ie?.newTab?globalThis.window.open(l(s),"_blank"):oe.visit(l(s))},e[34]=l,e[35]=p):p=e[35];let y;e[36]!==l?(y={key:"name",header:"Route",grow:!0,cell:s=>r.jsx(me,{className:"font-mono text-xs hover:underline",href:l(s),title:s.name,children:s.name})},e[36]=l,e[37]=y):y=e[37];let K,V,B;e[38]===Symbol.for("react.memo_cache_sentinel")?(K={key:"trend",hideOnMobile:!0,header:"Trend",cell:Me},V={key:"ok",hideOnMobile:!0,header:"2xx",align:"right",cell:Re},B={key:"4xx",hideOnMobile:!0,header:"4xx",align:"right",cell:Ce},e[38]=K,e[39]=V,e[40]=B):(K=e[38],V=e[39],B=e[40]);const z=t.sort==="errors",I=t.dir==="asc"?"asc":"desc";let g;e[41]!==i?(g=()=>i("errors"),e[41]=i,e[42]=g):g=e[42];let v;e[43]!==z||e[44]!==I||e[45]!==g?(v={key:"5xx",header:r.jsx(M,{label:"5xx",active:z,dir:I,onClick:g}),align:"right",cell:Te},e[43]=z,e[44]=I,e[45]=g,e[46]=v):v=e[46];const J=t.sort==="count",Q=t.dir==="asc"?"asc":"desc";let b;e[47]!==i?(b=()=>i("count"),e[47]=i,e[48]=b):b=e[48];let k;e[49]!==J||e[50]!==Q||e[51]!==b?(k={key:"total",header:r.jsx(M,{label:"Total",active:J,dir:Q,onClick:b}),align:"right",cell:we},e[49]=J,e[50]=Q,e[51]=b,e[52]=k):k=e[52];let G;e[53]===Symbol.for("react.memo_cache_sentinel")?(G={key:"err",hideOnMobile:!0,header:"Error %",align:"right",cell:Ee},e[53]=G):G=e[53];const W=t.sort==="avg",X=t.dir==="asc"?"asc":"desc";let j;e[54]!==i?(j=()=>i("avg"),e[54]=i,e[55]=j):j=e[55];let _;e[56]!==W||e[57]!==X||e[58]!==j?(_={key:"avg",hideOnMobile:!0,header:r.jsx(M,{label:"Avg",active:W,dir:X,onClick:j}),align:"right",cell:Se},e[56]=W,e[57]=X,e[58]=j,e[59]=_):_=e[59];const Y=t.sort===o,Z=t.dir==="asc"?"asc":"desc";let q;e[60]!==o||e[61]!==i?(q=()=>i(o),e[60]=o,e[61]=i,e[62]=q):q=e[62];let P;e[63]!==o||e[64]!==Y||e[65]!==Z||e[66]!==q?(P=r.jsx(M,{label:o,active:Y,dir:Z,onClick:q}),e[63]=o,e[64]=Y,e[65]=Z,e[66]=q,e[67]=P):P=e[67];let S;e[68]!==o?(S=s=>r.jsx("span",{className:"font-semibold",children:re(s[o])}),e[68]=o,e[69]=S):S=e[69];let E;e[70]!==o||e[71]!==P||e[72]!==S?(E={key:o,header:P,align:"right",cell:S},e[70]=o,e[71]=P,e[72]=S,e[73]=E):E=e[73];const ee=t.sort==="max",te=t.dir==="asc"?"asc":"desc";let w;e[74]!==i?(w=()=>i("max"),e[74]=i,e[75]=w):w=e[75];let T;e[76]!==ee||e[77]!==te||e[78]!==w?(T={key:"max",hideOnMobile:!0,header:r.jsx(M,{label:"Max",active:ee,dir:te,onClick:w}),align:"right",cell:Pe},e[76]=ee,e[77]=te,e[78]=w,e[79]=T):T=e[79];let C;e[80]!==y||e[81]!==v||e[82]!==k||e[83]!==_||e[84]!==E||e[85]!==T?(C=[y,K,V,B,v,k,G,_,E,T],e[80]=y,e[81]=v,e[82]=k,e[83]=_,e[84]=E,e[85]=T,e[86]=C):C=e[86];let R;e[87]!==t.routes||e[88]!==p||e[89]!==C?(R=r.jsx(he,{rows:t.routes,rowKey:He,empty:F,hoverKey:Oe,keyboardNav:p,columns:C}),e[87]=t.routes,e[88]=p,e[89]=C,e[90]=R):R=e[90];let U;return e[91]!==x||e[92]!==R||e[93]!==u?(U=r.jsx(ge,{title:"Requests",children:r.jsxs(de,{children:[D,u,x,R]})}),e[91]=x,e[92]=R,e[93]=u,e[94]=U):U=e[94],U}function Pe(t){return re(t.max)}function Se(t){return re(t.avg)}function Ee(t){return qe(t.errors,t.count)}function we(t){return $(t.count)}function Te(t){return r.jsx("span",{className:t.errors?"text-destructive":"",children:$(t.errors)})}function Ce(t){return $(t.client_errors)}function Re(t){return $(t.count-t.errors-t.client_errors)}function Me(t){return r.jsx(_e,{data:t.sparkline,hoverKey:t.group_hash})}function Oe(t){return t.group_hash}function He(t){return t.group_hash}export{it as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as D,u as P,j as i,t as L,e as A,L as B}from"./inertia-CgBdJDaE.js";import{D as M}from"./data-table-Bc3ZRnpb.js";import{E as O}from"./empty-state-CkPROZB0.js";import{P as F,E as H}from"./env-layout-aGQgTZRg.js";import{c as R,m as j,w as K}from"./format-B9SDkrWj.js";import{B as S}from"./app-layout-CdJ5Qjms.js";import"./chart-hover-B0SjyWFy.js";import"./badge-DKvItdlb.js";import"./app-wordmark-B-0yZiDb.js";import"./use-live-LwJStJvD.js";import"./live-dot-Bejk0a5o.js";import"./index-Dy7Wg880.js";import"./index-B2_QluAw.js";import"./segmented-Dg8CES94.js";import"./label-BWgQzHCO.js";import"./checkbox-BsBkRg5n.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as te,u as se,j as s,e as X,am as Y}from"./inertia-CgBdJDaE.js";import{V as re,D as ie}from"./chart-panel-DKNxoauI.js";import{D as Z}from"./data-table-Bc3ZRnpb.js";import{E as le}from"./empty-state-CkPROZB0.js";import{F as ne}from"./filter-bar-C0O2rJVr.js";import{E as oe,P as ae}from"./env-layout-aGQgTZRg.js";import{u as ce,P as me}from"./percentile-picker-DLAnTKY3.js";import{S as J}from"./sort-header-DBxQ_KFX.js";import{S as ue}from"./sparkline-cell-BbfXw3kA.js";import{a as de,S as pe}from"./stat-Cd8QaTGw.js";import{S as fe}from"./status-badge-Ys4b0fcG.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-CdJ5Qjms.js";import"./series-chart-COEtj3PY.js";import"./chart-hover-B0SjyWFy.js";import"./chart-Cmh6JEww.js";import"./badge-DKvItdlb.js";import"./app-wordmark-B-0yZiDb.js";import"./use-live-LwJStJvD.js";import"./live-dot-Bejk0a5o.js";import"./index-Dy7Wg880.js";import"./index-B2_QluAw.js";import"./segmented-Dg8CES94.js";import"./label-BWgQzHCO.js";import"./arrow-up-DY1fS0tD.js";import"./checkbox-BsBkRg5n.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};
|
|
@@ -0,0 +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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as x,u as g,j as r,az as j,e as h}from"./inertia-CgBdJDaE.js";import{D as _}from"./data-table-Bc3ZRnpb.js";import{E as w}from"./empty-state-CkPROZB0.js";import{E as b,P as v}from"./env-layout-aGQgTZRg.js";import{c as k,a as E}from"./format-B9SDkrWj.js";import{U as N}from"./app-layout-CdJ5Qjms.js";import"./chart-hover-B0SjyWFy.js";import"./badge-DKvItdlb.js";import"./app-wordmark-B-0yZiDb.js";import"./use-live-LwJStJvD.js";import"./live-dot-Bejk0a5o.js";import"./index-Dy7Wg880.js";import"./index-B2_QluAw.js";import"./segmented-Dg8CES94.js";import"./label-BWgQzHCO.js";import"./checkbox-BsBkRg5n.js";function Q(t){const e=x.c(13),{environment:f}=g().props,u=f.application_id,d=f.id;let a;e[0]!==u||e[1]!==d?(a=i=>j(u,d,i.ref),e[0]=u,e[1]=d,e[2]=a):a=e[2];const o=a;let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx(v,{title:"Users",description:"Your application's users as seen in telemetry, with their activity and errors."}),e[3]=l):l=e[3];let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsx(w,{icon:N,title:"No authenticated activity in this window",description:"People appear here once requests are tagged with an authenticated user."}),e[4]=m):m=e[4];let s,n;e[5]!==o?(s=i=>h.visit(o(i)),n={onOpen:(i,y)=>y?.newTab?window.open(o(i),"_blank"):h.visit(o(i))},e[5]=o,e[6]=s,e[7]=n):(s=e[6],n=e[7]);let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=[{key:"n",header:"User",cell:q},{key:"t",hideOnMobile:!0,header:"Tenant",cell:S},{key:"r",header:"Requests",align:"right",cell:R},{key:"e",hideOnMobile:!0,header:"Errors",align:"right",cell:U},{key:"l",header:"Last seen",align:"right",cell:P}],e[8]=c):c=e[8];let p;return e[9]!==t.people||e[10]!==s||e[11]!==n?(p=r.jsxs(b,{title:"Users",children:[l,r.jsx(_,{rows:t.people,rowKey:O,empty:m,onRowClick:s,keyboardNav:n,columns:c})]}),e[9]=t.people,e[10]=s,e[11]=n,e[12]=p):p=e[12],p}function P(t){return E(t.last_seen_at)}function U(t){return r.jsx("span",{className:t.errors?"text-destructive":"",children:t.errors})}function R(t){return k(t.requests)}function S(t){return r.jsx("span",{className:"font-mono text-xs",children:t.tenant??""})}function q(t){return r.jsxs("span",{className:"text-xs",children:[r.jsx("span",{className:"font-medium",children:t.name??t.ref}),t.email&&r.jsxs("span",{className:"text-muted-foreground",children:[" · ",t.email]})]})}function O(t){return t.ref}export{Q 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-
|
|
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
|
|
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-CgBdJDaE.js";import{C as fe}from"./cursor-load-more-OpHbe_kE.js";import{D as de}from"./data-table-Bc3ZRnpb.js";import{E as he}from"./empty-state-CkPROZB0.js";import{p as Z,F as ue,s as se}from"./filter-bar-C0O2rJVr.js";import{P as ge,E as xe}from"./env-layout-aGQgTZRg.js";import{S as pe,F as be}from"./app-layout-CdJ5Qjms.js";import{a as le,S as ve}from"./segmented-Dg8CES94.js";import{L as ye}from"./status-badge-Ys4b0fcG.js";import{c as oe,w as je}from"./format-B9SDkrWj.js";import"./app-wordmark-B-0yZiDb.js";import"./chart-hover-B0SjyWFy.js";import"./badge-DKvItdlb.js";import"./use-live-LwJStJvD.js";import"./live-dot-Bejk0a5o.js";import"./index-Dy7Wg880.js";import"./index-B2_QluAw.js";import"./label-BWgQzHCO.js";import"./checkbox-BsBkRg5n.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
|
+
`),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 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-CgBdJDaE.js";import{G as O}from"./google-sign-in-button-BzogBGeF.js";import{I as k}from"./input-error-DfpIawjl.js";import{D as T}from"./data-table-Bc3ZRnpb.js";import{B as z}from"./badge-DKvItdlb.js";import{B as x}from"./app-wordmark-B-0yZiDb.js";import{C as P,b as S,c as F,a as R}from"./card-C9j_ffR9.js";import{L as N,I as E}from"./label-BWgQzHCO.js";import{A as q}from"./app-layout-CdJ5Qjms.js";import{a as U}from"./format-B9SDkrWj.js";import"./separator-BOp2LHw3.js";import"./index-Dy7Wg880.js";import"./chart-hover-B0SjyWFy.js";import"./empty-state-CkPROZB0.js";import"./live-dot-Bejk0a5o.js";import"./index-B2_QluAw.js";import"./checkbox-BsBkRg5n.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as ae,c as F,u as he,j as l,t as pe,e as le,Z as fe,L as xe,C as ge,r as re}from"./inertia-CgBdJDaE.js";import{V as se,D as ne}from"./chart-panel-DKNxoauI.js";import{D as ee}from"./data-table-Bc3ZRnpb.js";import{E as ie}from"./empty-state-CkPROZB0.js";import{F as _e}from"./filter-bar-C0O2rJVr.js";import{P as ke,E as je}from"./env-layout-aGQgTZRg.js";import{S as ce}from"./sparkline-cell-BbfXw3kA.js";import{S as ye}from"./status-badge-Ys4b0fcG.js";import{c as p,u as de,p as te,m as q,w as be}from"./format-B9SDkrWj.js";import{p as me,C as Ne,a as we}from"./app-layout-CdJ5Qjms.js";import"./series-chart-COEtj3PY.js";import"./chart-hover-B0SjyWFy.js";import"./chart-Cmh6JEww.js";import"./badge-DKvItdlb.js";import"./app-wordmark-B-0yZiDb.js";import"./use-live-LwJStJvD.js";import"./live-dot-Bejk0a5o.js";import"./index-Dy7Wg880.js";import"./index-B2_QluAw.js";import"./segmented-Dg8CES94.js";import"./label-BWgQzHCO.js";import"./checkbox-BsBkRg5n.js";const ve=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Me=ae("paperclip",ve);const Se=[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]],Oe=ae("scissors",Se),oe=l.jsx(ie,{icon:me,title:"No model calls in this window",description:"Chats, embeddings, and other model calls your app makes through RubyLLM appear here, with the request or job that made them."}),Ce=l.jsx(ie,{icon:me,title:"No tool calls in this window",description:"Tools your models invoke appear here, timed separately from the calls that asked for them."});function Le(t){const e=F.c(7),{reason:s}=t;if(!s||s==="stop"||s==="tool_calls")return null;const a=s==="max_tokens"||s==="content_filter"?"text-destructive":"text-muted-foreground";let n;e[0]!==a?(n=ge("ml-2 inline-flex items-center gap-1 text-xs",a),e[0]=a,e[1]=n):n=e[1];const r=s==="max_tokens"?"The answer was cut off at the output token limit":`Model stopped: ${s}`;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(Oe,{className:"size-3"}),e[2]=i):i=e[2];let c;return e[3]!==s||e[4]!==n||e[5]!==r?(c=l.jsxs("span",{className:n,title:r,children:[i,s]}),e[3]=s,e[4]=n,e[5]=r,e[6]=c):c=e[6],c}function Te(t){const e=F.c(4),{call:s}=t;if(!s.attachments)return null;const o=s.attachment_names??`${s.attachments} file(s): ${s.attachment_types}`;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=l.jsx(Me,{className:"size-3"}),e[0]=a):a=e[0];const n=s.attachment_types??s.attachments;let r;return e[1]!==o||e[2]!==n?(r=l.jsxs("span",{className:"text-muted-foreground ml-2 inline-flex items-center gap-1 text-xs",title:o,children:[a,n]}),e[1]=o,e[2]=n,e[3]=r):r=e[3],r}function Fe(t){const e=F.c(19),{call:s}=t,[o,a]=re.useState(!1),{prompt:n,completion:r,params:i,provider_request_id:c,tools:f}=s;if(!(n!==null||r!==null||c!==null||f!==null||i!==null&&Object.keys(i).length>0)){let g;return e[0]===Symbol.for("react.memo_cache_sentinel")?(g=l.jsx("span",{className:"text-muted-foreground",children:"–"}),e[0]=g):g=e[0],g}const _=o?Ne:we;let d;e[1]!==o?(d=()=>a(!o),e[1]=o,e[2]=d):d=e[2];let m;e[3]!==_?(m=l.jsx(_,{className:"size-3"}),e[3]=_,e[4]=m):m=e[4];let u;e[5]!==o||e[6]!==d||e[7]!==m?(u=l.jsxs("button",{type:"button",onClick:d,"aria-expanded":o,className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1",children:[m,"Detail"]}),e[5]=o,e[6]=d,e[7]=m,e[8]=u):u=e[8];let h;e[9]!==r||e[10]!==o||e[11]!==i||e[12]!==n||e[13]!==c||e[14]!==f?(h=o&&l.jsxs("div",{className:"w-[70vw] max-w-[36rem] space-y-2 text-left",children:[l.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 font-mono text-[10px]",children:[c&&l.jsxs(l.Fragment,{children:[l.jsx("dt",{className:"text-muted-foreground",children:"provider id"}),l.jsx("dd",{className:"break-all",children:c})]}),f&&l.jsxs(l.Fragment,{children:[l.jsx("dt",{className:"text-muted-foreground",children:"tools"}),l.jsx("dd",{className:"break-all",children:f})]}),i&&Object.entries(i).map(qe)]}),[["Prompt",n],["Completion",r]].map($e)]}),e[9]=r,e[10]=o,e[11]=i,e[12]=n,e[13]=c,e[14]=f,e[15]=h):h=e[15];let x;return e[16]!==u||e[17]!==h?(x=l.jsxs("div",{className:"flex flex-col items-end gap-1",children:[u,h]}),e[16]=u,e[17]=h,e[18]=x):x=e[18],x}function $e(t){const[e,s]=t;return s?l.jsxs("div",{children:[l.jsx("div",{className:"text-muted-foreground text-[10px] tracking-wide uppercase",children:e}),l.jsx("pre",{className:"bg-muted max-h-64 overflow-auto rounded p-2 font-mono text-[10px] break-all whitespace-pre-wrap",children:s})]},e):null}function qe(t){const[e,s]=t;return l.jsxs(re.Fragment,{children:[l.jsx("dt",{className:"text-muted-foreground",children:e}),l.jsx("dd",{className:"break-all",children:typeof s=="string"||typeof s=="number"?s:JSON.stringify(s)})]},e)}function ue(t){const e=F.c(9),{cost:s,unpriced:o}=t;if(s===null){let i;return e[0]!==o?(i=o>0?l.jsx("span",{className:"text-muted-foreground",title:"No registry pricing",children:"unpriced"}):l.jsx("span",{className:"text-muted-foreground",title:"Nothing here has a price",children:"–"}),e[0]=o,e[1]=i):i=e[1],i}let a;e[2]!==s?(a=de(s),e[2]=s,e[3]=a):a=e[3];let n;e[4]!==o?(n=o>0&&l.jsxs("span",{className:"text-muted-foreground ml-1 text-xs font-normal",title:`${o} call${o===1?"":"s"} had no registry pricing and are not in this total`,children:["+",p(o)," unpriced"]}),e[4]=o,e[5]=n):n=e[5];let r;return e[6]!==a||e[7]!==n?(r=l.jsxs("span",{className:"font-semibold",children:[a,n]}),e[6]=a,e[7]=n,e[8]=r):r=e[8],r}function $(t){const e=F.c(7),{label:s,children:o}=t;let a;e[0]!==s?(a=l.jsx("div",{className:"text-muted-foreground text-xs",children:s}),e[0]=s,e[1]=a):a=e[1];let n;e[2]!==o?(n=l.jsx("div",{className:"truncate text-lg",children:o}),e[2]=o,e[3]=n):n=e[3];let r;return e[4]!==a||e[5]!==n?(r=l.jsxs("div",{className:"min-w-0",children:[a,n]}),e[4]=a,e[5]=n,e[6]=r):r=e[6],r}function Ft(t){const e=F.c(79),{environment:s,window:o}=he().props,a=s.application_id,n=s.id;let r;e[0]!==a||e[1]!==n?(r=k=>k.execution_id?pe(a,n,k.execution_id):null,e[0]=a,e[1]=n,e[2]=r):r=e[2];const i=r;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx(ke,{title:"LLM",description:"Model calls and tool invocations through RubyLLM, by model and by the request or job that made them."}),e[3]=c):c=e[3];let f;e[4]!==t.totals.count?(f=p(t.totals.count),e[4]=t.totals.count,e[5]=f):f=e[5];let j;e[6]!==f?(j=l.jsx($,{label:"Model calls",children:f}),e[6]=f,e[7]=j):j=e[7];let _;e[8]!==t.totals.tool_count?(_=p(t.totals.tool_count),e[8]=t.totals.tool_count,e[9]=_):_=e[9];let d;e[10]!==_?(d=l.jsx($,{label:"Tool calls",children:_}),e[10]=_,e[11]=d):d=e[11];let m;e[12]!==t.totals.cost||e[13]!==t.totals.unpriced?(m=l.jsx($,{label:"Spend",children:l.jsx(ue,{cost:t.totals.cost,unpriced:t.totals.unpriced})}),e[12]=t.totals.cost,e[13]=t.totals.unpriced,e[14]=m):m=e[14];let u;e[15]!==t.totals.input_tokens?(u=p(t.totals.input_tokens),e[15]=t.totals.input_tokens,e[16]=u):u=e[16];let h;e[17]!==u?(h=l.jsx($,{label:"Tokens in",children:u}),e[17]=u,e[18]=h):h=e[18];let x;e[19]!==t.totals.output_tokens?(x=p(t.totals.output_tokens),e[19]=t.totals.output_tokens,e[20]=x):x=e[20];let g;e[21]!==x?(g=l.jsx($,{label:"Tokens out",children:x}),e[21]=x,e[22]=g):g=e[22];let y;e[23]!==g||e[24]!==j||e[25]!==d||e[26]!==m||e[27]!==h?(y=l.jsxs("div",{className:"grid grid-cols-2 gap-4 lg:grid-cols-5",children:[j,d,m,h,g]}),e[23]=g,e[24]=j,e[25]=d,e[26]=m,e[27]=h,e[28]=y):y=e[28];let b;e[29]!==t.series?(b=l.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[l.jsx(se,{legend:"request",label:"Model calls",seriesLabel:"Calls",data:t.series}),l.jsx(ne,{label:"Model latency",data:t.series,percentile:"p95"})]}),e[29]=t.series,e[30]=b):b=e[30];let N;e[31]!==t.tool_series||e[32]!==t.totals.tool_count?(N=t.totals.tool_count>0&&l.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[l.jsx(se,{legend:"request",label:"Tool calls",seriesLabel:"Calls",data:t.tool_series}),l.jsx(ne,{label:"Tool latency",data:t.tool_series,percentile:"p95"})]}),e[31]=t.tool_series,e[32]=t.totals.tool_count,e[33]=N):N=e[33];let D;e[34]===Symbol.for("react.memo_cache_sentinel")?(D=[{key:"m",header:"Model",cell:it},{key:"trend",hideOnMobile:!0,header:"Trend",cell:rt},{key:"n",header:"Calls",align:"right",cell:at},{key:"f",hideOnMobile:!0,header:"Failed",align:"right",cell:ot},{key:"cut",hideOnMobile:!0,header:"Cut off",align:"right",cell:nt},{key:"att",hideOnMobile:!0,header:"With files",align:"right",cell:st},{key:"in",hideOnMobile:!0,header:"Tokens in",align:"right",cell:lt},{key:"out",hideOnMobile:!0,header:"Tokens out",align:"right",cell:tt},{key:"cached",hideOnMobile:!0,header:"Cached",align:"right",cell:et},{key:"p95",hideOnMobile:!0,header:"p95",align:"right",cell:Ye},{key:"cost",header:"Spend",align:"right",cell:Xe}],e[34]=D):D=e[34];let w;e[35]!==t.models?(w=l.jsx(ee,{rows:t.models,rowKey:ct,empty:oe,columns:D}),e[35]=t.models,e[36]=w):w=e[36];let v;e[37]!==t.tools?(v=t.tools.length>0&&l.jsxs(l.Fragment,{children:[l.jsx("h2",{className:"text-sm font-semibold",children:"Tools"}),l.jsx(ee,{rows:t.tools,rowKey:Ue,empty:Ce,columns:[{key:"t",header:"Tool",cell:Qe},{key:"trend",hideOnMobile:!0,header:"Trend",cell:Ge},{key:"n",header:"Calls",align:"right",cell:Ze},{key:"f",hideOnMobile:!0,header:"Failed",align:"right",cell:Je},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:He},{key:"p95",header:"p95",align:"right",cell:Ve},{key:"max",hideOnMobile:!0,header:"Max",align:"right",cell:Ie}]})]}),e[37]=t.tools,e[38]=v):v=e[38];let E;e[39]===Symbol.for("react.memo_cache_sentinel")?(E=l.jsx("h2",{className:"text-sm font-semibold",children:"Recent"}),e[39]=E):E=e[39];let P,R;e[40]===Symbol.for("react.memo_cache_sentinel")?(P={key:"model",label:"Model"},R={key:"provider",label:"Provider"},e[40]=P,e[41]=R):(P=e[40],R=e[41]);let W,z;e[42]===Symbol.for("react.memo_cache_sentinel")?(W={key:"operation",label:"Operation",options:["chat","tool","embedding","image","speech","transcription","moderation","rerank","ocr"]},z={key:"workflow",label:"Workflow"},e[42]=W,e[43]=z):(W=e[42],z=e[43]);let A;e[44]===Symbol.for("react.memo_cache_sentinel")?(A={key:"finish",label:"Finish",options:["stop","max_tokens","tool_calls","content_filter"]},e[44]=A):A=e[44];let B;e[45]===Symbol.for("react.memo_cache_sentinel")?(B=[P,R,W,z,A,{key:"attachments",label:"Files",options:["any","image","pdf","audio","video"]}],e[45]=B):B=e[45];let M;e[46]!==a||e[47]!==n||e[48]!==o?(M=k=>le.visit(fe(a,n,{window:o,q:k||void 0}),{preserveState:!0}),e[46]=a,e[47]=n,e[48]=o,e[49]=M):M=e[49];let S;e[50]!==t.q||e[51]!==M?(S=l.jsx(_e,{value:t.q,fields:B,onChange:M,placeholder:"model:claude-opus-5 operation:chat"}),e[50]=t.q,e[51]=M,e[52]=S):S=e[52];let O;e[53]!==i?(O={onOpen:(k,X)=>{const Y=i(k);Y&&(X?.newTab?globalThis.window.open(Y,"_blank"):le.visit(Y))}},e[53]=i,e[54]=O):O=e[54];let K,I,V,H,J,Z,G;e[55]===Symbol.for("react.memo_cache_sentinel")?(K={key:"when",header:"When",cell:Be},I={key:"st",header:"Status",cell:Ae},V={key:"what",header:"Call",cell:ze},H={key:"wf",hideOnMobile:!0,header:"Workflow",cell:We},J={key:"tok",hideOnMobile:!0,header:"Tokens",align:"right",cell:Re},Z={key:"d",header:"Duration",align:"right",cell:Pe},G={key:"cost",header:"Cost",align:"right",cell:Ee},e[55]=K,e[56]=I,e[57]=V,e[58]=H,e[59]=J,e[60]=Z,e[61]=G):(K=e[55],I=e[56],V=e[57],H=e[58],J=e[59],Z=e[60],G=e[61]);let C;e[62]!==i?(C={key:"in",hideOnMobile:!0,header:"In",cell:k=>{const X=i(k);return X?l.jsx(xe,{className:"font-mono text-xs hover:underline",href:X,children:k.execution_preview}):null}},e[62]=i,e[63]=C):C=e[63];let Q;e[64]===Symbol.for("react.memo_cache_sentinel")?(Q={key:"content",header:"Detail",align:"right",cell:De},e[64]=Q):Q=e[64];let L;e[65]!==C?(L=[K,I,V,H,J,Z,G,C,Q],e[65]=C,e[66]=L):L=e[66];let T;e[67]!==t.recent||e[68]!==O||e[69]!==L?(T=l.jsx(ee,{rows:t.recent,rowKey:Ke,empty:oe,keyboardNav:O,columns:L}),e[67]=t.recent,e[68]=O,e[69]=L,e[70]=T):T=e[70];let U;return e[71]!==y||e[72]!==b||e[73]!==N||e[74]!==w||e[75]!==v||e[76]!==S||e[77]!==T?(U=l.jsxs(je,{title:"LLM",children:[c,y,b,N,w,v,E,S,T]}),e[71]=y,e[72]=b,e[73]=N,e[74]=w,e[75]=v,e[76]=S,e[77]=T,e[78]=U):U=e[78],U}function De(t){return l.jsx(Fe,{call:t})}function Ee(t){return t.cost===null&&t.operation!=="tool"?l.jsx("span",{className:"text-muted-foreground",title:"No registry pricing",children:"unpriced"}):de(t.cost)}function Pe(t){return q(t.duration)}function Re(t){return t.input_tokens===null&&t.output_tokens===null?l.jsx("span",{className:"text-muted-foreground",children:"–"}):l.jsxs("span",{className:"font-mono text-xs",children:[p(t.input_tokens??0)," / ",p(t.output_tokens??0)]})}function We(t){return t.workflow_name?l.jsxs("span",{className:"text-xs",children:[t.workflow_name,t.workflow_step_name&&l.jsxs("span",{className:"text-muted-foreground",children:[" · ",t.workflow_step_name]})]}):null}function ze(t){return l.jsxs("span",{className:"font-mono text-xs",children:[t.operation==="tool"?t.tool_name:l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"text-muted-foreground",children:[t.provider,"/"]}),l.jsx("span",{className:"font-semibold",children:t.model})]}),t.error&&l.jsx("span",{className:"text-destructive ml-2",children:t.error}),l.jsx(Le,{reason:t.finish_reason}),l.jsx(Te,{call:t})]})}function Ae(t){return l.jsx(ye,{status:null,label:t.status==="failed"?"error":t.operation,outcome:t.status==="failed"?"failed":void 0})}function Be(t){return l.jsx("span",{className:"text-xs",children:be(t.occurred_at)})}function Ke(t){return t.id}function Ie(t){return q(t.max)}function Ve(t){return l.jsx("span",{className:"font-semibold",children:q(t.p95)})}function He(t){return q(t.avg)}function Je(t){return l.jsx("span",{className:t.errors?"text-destructive":"",children:te(t.errors,t.count)})}function Ze(t){return p(t.count)}function Ge(t){return l.jsx(ce,{data:t.sparkline})}function Qe(t){return l.jsx("span",{className:"font-mono text-xs",children:t.name})}function Ue(t){return t.group_hash}function Xe(t){return l.jsx(ue,{cost:t.cost,unpriced:t.unpriced})}function Ye(t){return q(t.p95)}function et(t){return p(t.cache_read_tokens)}function tt(t){return p(t.output_tokens)}function lt(t){return p(t.input_tokens)}function st(t){return t.with_attachments?p(t.with_attachments):l.jsx("span",{className:"text-muted-foreground",children:"–"})}function nt(t){return t.truncated?l.jsx("span",{className:"text-destructive",title:"Answers stopped at the output token limit",children:te(t.truncated,t.count)}):l.jsx("span",{className:"text-muted-foreground",children:"–"})}function ot(t){return l.jsx("span",{className:t.errors?"text-destructive":"",children:te(t.errors,t.count)})}function at(t){return p(t.count)}function rt(t){return l.jsx(ce,{data:t.sparkline})}function it(t){return l.jsx("span",{className:"font-mono text-xs",children:t.name})}function ct(t){return t.group_hash}export{Ft 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-CgBdJDaE.js";import{H as g,S as v}from"./layout-neknbxn-.js";import{B as y}from"./badge-DKvItdlb.js";import{B as S}from"./app-wordmark-B-0yZiDb.js";import{A as N}from"./app-layout-CdJ5Qjms.js";import"./separator-BOp2LHw3.js";import"./index-Dy7Wg880.js";import"./live-dot-Bejk0a5o.js";import"./index-B2_QluAw.js";import"./checkbox-BsBkRg5n.js";import"./label-BWgQzHCO.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as p,j as c,W as f}from"./inertia-
|
|
1
|
+
import{r as p,j as c,W as f}from"./inertia-CgBdJDaE.js";import{a as u}from"./app-wordmark-B-0yZiDb.js";var d=Object.defineProperty,v=(r,t)=>d(r,"name",{value:t,configurable:!0}),l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],P=l.reduce((r,t)=>{const i=u(`Primitive.${t}`),e=p.forwardRef((o,s)=>{const{asChild:a,...n}=o,m=a?i:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(m,{...n,ref:s})});return e.displayName=`Primitive.${t}`,{...r,[t]:e}},{});function h(r,t){r&&f.flushSync(()=>r.dispatchEvent(t))}v(h,"dispatchDiscreteCustomEvent");export{P,h as d};
|
|
@@ -0,0 +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-CgBdJDaE.js";import{S as _}from"./code-C879Qwgg.js";import{C as R}from"./cursor-load-more-OpHbe_kE.js";import{D as q}from"./data-table-Bc3ZRnpb.js";import{E as z}from"./empty-state-CkPROZB0.js";import{F as B}from"./filter-bar-C0O2rJVr.js";import{u as K,E as $,P as A}from"./env-layout-aGQgTZRg.js";import{u as H,P as I}from"./percentile-picker-DLAnTKY3.js";import{S as k}from"./sort-header-DBxQ_KFX.js";import{S as J}from"./sparkline-cell-BbfXw3kA.js";import{a as U,S as C}from"./stat-Cd8QaTGw.js";import{B as W}from"./app-wordmark-B-0yZiDb.js";import{C as G,b as V,c as X,a as Y}from"./card-C9j_ffR9.js";import{u as Z,C as ee}from"./use-clipboard-3hTXU91g.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-CdJ5Qjms.js";import{C as te}from"./index-B2_QluAw.js";import"./chart-hover-B0SjyWFy.js";import"./badge-DKvItdlb.js";import"./use-live-LwJStJvD.js";import"./live-dot-Bejk0a5o.js";import"./index-Dy7Wg880.js";import"./segmented-Dg8CES94.js";import"./label-BWgQzHCO.js";import"./arrow-up-DY1fS0tD.js";import"./series-chart-COEtj3PY.js";import"./chart-Cmh6JEww.js";import"./checkbox-BsBkRg5n.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as ee,u as re,j as r,e as X,ai as Y,L as ie}from"./inertia-CgBdJDaE.js";import{D as ne}from"./chart-panel-DKNxoauI.js";import{D as Z}from"./data-table-Bc3ZRnpb.js";import{F as se}from"./filter-bar-C0O2rJVr.js";import{P as oe,E as le}from"./env-layout-aGQgTZRg.js";import{u as ae,P as ce}from"./percentile-picker-DLAnTKY3.js";import{S as F}from"./sort-header-DBxQ_KFX.js";import{S as de}from"./sparkline-cell-BbfXw3kA.js";import{B as me}from"./badge-DKvItdlb.js";import{e as ue}from"./execution-path-BX5NcXUZ.js";import{m as H,c as fe,w as he}from"./format-B9SDkrWj.js";import"./series-chart-COEtj3PY.js";import"./chart-hover-B0SjyWFy.js";import"./chart-Cmh6JEww.js";import"./empty-state-CkPROZB0.js";import"./app-wordmark-B-0yZiDb.js";import"./app-layout-CdJ5Qjms.js";import"./live-dot-Bejk0a5o.js";import"./index-Dy7Wg880.js";import"./index-B2_QluAw.js";import"./checkbox-BsBkRg5n.js";import"./label-BWgQzHCO.js";import"./use-live-LwJStJvD.js";import"./segmented-Dg8CES94.js";import"./arrow-up-DY1fS0tD.js";function te(t){const e=ee.c(3),{kind:l}=t;if(!l)return null;const o=l==="partial"?"secondary":l==="layout"?"outline":"default";let i;return e[0]!==l||e[1]!==o?(i=r.jsx(me,{variant:o,className:"font-mono",children:l}),e[0]=l,e[1]=o,e[2]=i):i=e[2],i}function Ze(t){const e=ee.c(81),{environment:l,window:o}=re().props,{percentile:i}=ae(),a=l.application_id,c=l.id;let q;e[0]!==a||e[1]!==c||e[2]!==t.dir||e[3]!==t.q||e[4]!==t.sort||e[5]!==o?(q=s=>X.visit(Y(a,c,{window:o,sort:s,dir:t.sort===s&&t.dir==="desc"?"asc":"desc",q:t.q||void 0}),{preserveState:!0}),e[0]=a,e[1]=c,e[2]=t.dir,e[3]=t.q,e[4]=t.sort,e[5]=o,e[6]=q):q=e[6];const n=q;let M;e[7]===Symbol.for("react.memo_cache_sentinel")?(M=r.jsx(oe,{title:"View renders",description:"Every template your app rendered, grouped by identifier.",actions:r.jsx(ce,{})}),e[7]=M):M=e[7];let d;e[8]!==t.series||e[9]!==i?(d=r.jsx(ne,{label:"Duration",data:t.series,percentile:i}),e[8]=t.series,e[9]=i,e[10]=d):d=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=[{key:"template",label:"Template"}],e[11]=C):C=e[11];let m;e[12]!==a||e[13]!==c||e[14]!==o?(m=s=>X.visit(Y(a,c,{window:o,q:s||void 0}),{preserveState:!0}),e[12]=a,e[13]=c,e[14]=o,e[15]=m):m=e[15];let u;e[16]!==t.q||e[17]!==m?(u=r.jsx(se,{value:t.q,fields:C,onChange:m,placeholder:"template:widgets/_row"}),e[16]=t.q,e[17]=m,e[18]=u):u=e[18];let O,D,E;e[19]===Symbol.for("react.memo_cache_sentinel")?(O={key:"id",header:"Template",grow:!0,cell:Ne},D={key:"kind",hideOnMobile:!0,header:"Kind",cell:Se},E={key:"trend",hideOnMobile:!0,header:"Trend",cell:be},e[19]=O,e[20]=D,e[21]=E):(O=e[19],D=e[20],E=e[21]);const $=t.sort==="count",A=t.dir==="asc"?"asc":"desc";let f;e[22]!==n?(f=()=>n("count"),e[22]=n,e[23]=f):f=e[23];let h;e[24]!==A||e[25]!==f||e[26]!==$?(h={key:"n",header:r.jsx(F,{label:"Count",active:$,dir:A,onClick:f}),align:"right",cell:ve},e[24]=A,e[25]=f,e[26]=$,e[27]=h):h=e[27];const W=t.sort==="avg",z=t.dir==="asc"?"asc":"desc";let x;e[28]!==n?(x=()=>n("avg"),e[28]=n,e[29]=x):x=e[29];let p;e[30]!==W||e[31]!==z||e[32]!==x?(p={key:"avg",hideOnMobile:!0,header:r.jsx(F,{label:"Avg",active:W,dir:z,onClick:x}),align:"right",cell:je},e[30]=W,e[31]=z,e[32]=x,e[33]=p):p=e[33];const G=t.sort===i,J=t.dir==="asc"?"asc":"desc";let y;e[34]!==i||e[35]!==n?(y=()=>n(i),e[34]=i,e[35]=n,e[36]=y):y=e[36];let _;e[37]!==i||e[38]!==G||e[39]!==J||e[40]!==y?(_=r.jsx(F,{label:i,active:G,dir:J,onClick:y}),e[37]=i,e[38]=G,e[39]=J,e[40]=y,e[41]=_):_=e[41];let k;e[42]!==i?(k=s=>r.jsx("span",{className:"font-semibold",children:H(s[i],2)}),e[42]=i,e[43]=k):k=e[43];let g;e[44]!==i||e[45]!==_||e[46]!==k?(g={key:i,header:_,align:"right",cell:k},e[44]=i,e[45]=_,e[46]=k,e[47]=g):g=e[47];const Q=t.sort==="max",U=t.dir==="asc"?"asc":"desc";let w;e[48]!==n?(w=()=>n("max"),e[48]=n,e[49]=w):w=e[49];let j;e[50]!==Q||e[51]!==U||e[52]!==w?(j={key:"max",hideOnMobile:!0,header:r.jsx(F,{label:"Max",active:Q,dir:U,onClick:w}),align:"right",cell:we},e[50]=Q,e[51]=U,e[52]=w,e[53]=j):j=e[53];let v;e[54]!==h||e[55]!==p||e[56]!==g||e[57]!==j?(v=[O,D,E,h,p,g,j],e[54]=h,e[55]=p,e[56]=g,e[57]=j,e[58]=v):v=e[58];let b;e[59]!==t.renders||e[60]!==v?(b=r.jsx(Z,{rows:t.renders,rowKey:Pe,empty:"No view renders in this window.",columns:v}),e[59]=t.renders,e[60]=v,e[61]=b):b=e[61];let B;e[62]===Symbol.for("react.memo_cache_sentinel")?(B=r.jsx("h2",{className:"text-sm font-semibold",children:"Slowest recent renders"}),e[62]=B):B=e[62];let K,T,I,L;e[63]===Symbol.for("react.memo_cache_sentinel")?(K={key:"when",header:"When",className:"w-40",cell:ke},T={key:"id",header:"Template",grow:!0,cell:_e},I={key:"kind",hideOnMobile:!0,header:"Kind",cell:ye},L={key:"layout",hideOnMobile:!0,header:"Layout",cell:pe},e[63]=K,e[64]=T,e[65]=I,e[66]=L):(K=e[63],T=e[64],I=e[65],L=e[66]);let S;e[67]!==a||e[68]!==c?(S={key:"in",hideOnMobile:!0,header:"In",cell:s=>s.execution_id?r.jsx(ie,{className:"font-mono text-xs hover:underline",href:ue({applicationId:a,environmentId:c,source:s.execution_source,executionId:s.execution_id}),children:s.execution_preview}):r.jsx("span",{className:"text-muted-foreground text-xs",children:"–"})},e[67]=a,e[68]=c,e[69]=S):S=e[69];let R;e[70]===Symbol.for("react.memo_cache_sentinel")?(R={key:"d",header:"Duration",align:"right",cell:xe},e[70]=R):R=e[70];let N;e[71]!==S?(N=[K,T,I,L,S,R],e[71]=S,e[72]=N):N=e[72];let P;e[73]!==t.slowest||e[74]!==N?(P=r.jsx(Z,{rows:t.slowest,rowKey:ge,columns:N}),e[73]=t.slowest,e[74]=N,e[75]=P):P=e[75];let V;return e[76]!==d||e[77]!==b||e[78]!==P||e[79]!==u?(V=r.jsxs(le,{title:"View renders",children:[M,d,u,b,B,P]}),e[76]=d,e[77]=b,e[78]=P,e[79]=u,e[80]=V):V=e[80],V}function xe(t){return H(t.duration,2)}function pe(t){return r.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:t.layout??""})}function ye(t){return r.jsx(te,{kind:t.kind})}function _e(t){return r.jsx("span",{className:"font-mono text-xs",children:t.identifier})}function ke(t){return r.jsx("span",{className:"text-xs tabular-nums",children:he(t.occurred_at)})}function ge(t){return t.id}function we(t){return H(t.max,2)}function je(t){return H(t.avg,2)}function ve(t){return fe(t.count)}function be(t){return r.jsx(de,{data:t.sparkline})}function Se(t){return r.jsx(te,{kind:t.kind})}function Ne(t){return r.jsx("span",{className:"font-mono text-xs",children:t.name})}function Pe(t){return t.group_hash}export{Ze as default};
|