railwatch 0.3.6 → 0.4.0

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.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +60 -0
  3. data/{lib/generators/railwatch/install/templates → app/frontend/lib}/railwatch.ts +162 -42
  4. data/app/models/railwatch/ingest/batch.rb +1 -0
  5. data/app/models/railwatch/ingest/mapper.rb +12 -0
  6. data/docs/configuration.md +8 -3
  7. data/lib/generators/railwatch/install/install_generator.rb +5 -1
  8. data/lib/railwatch/patches/rake_task.rb +10 -1
  9. data/lib/railwatch/patches/runner_command.rb +3 -1
  10. data/lib/railwatch/transport/http.rb +15 -5
  11. data/lib/railwatch/version.rb +1 -1
  12. data/lib/railwatch/wire_fixtures.json +856 -0
  13. data/lib/railwatch.rb +22 -0
  14. data/lib/tasks/railwatch_tasks.rake +7 -0
  15. data/public/railwatch/assets/{app-layout-B5Fcdwfz.js → app-layout-DUk54qUM.js} +1 -1
  16. data/public/railwatch/assets/{app-wordmark-1SRllgHv.js → app-wordmark-DDNuuq5_.js} +1 -1
  17. data/public/railwatch/assets/{appearance-DbwahDrc.js → appearance-C3LMdsDy.js} +1 -1
  18. data/public/railwatch/assets/{arrow-up-DwKQcab4.js → arrow-up-DYTCBENO.js} +1 -1
  19. data/public/railwatch/assets/{auth-layout-DXfxXAN_.js → auth-layout-CzPRawuI.js} +1 -1
  20. data/public/railwatch/assets/{badge-CApjyWcg.js → badge-s7YDycYg.js} +1 -1
  21. data/public/railwatch/assets/{braces-kGSgxWnS.js → braces-BFrg-bvp.js} +1 -1
  22. data/public/railwatch/assets/{card-BaJ8kNkp.js → card-DiW-JhK3.js} +1 -1
  23. data/public/railwatch/assets/{chart-hover-XYPNE2CX.js → chart-hover-DMWx5-Rs.js} +1 -1
  24. data/public/railwatch/assets/{chart-Xnrz1Nqw.js → chart-nsdZV0Dv.js} +1 -1
  25. data/public/railwatch/assets/{chart-panel-BYk68mJJ.js → chart-panel-BlirnMrQ.js} +1 -1
  26. data/public/railwatch/assets/{checkbox-Bf41R8W6.js → checkbox-C2AqEZXX.js} +1 -1
  27. data/public/railwatch/assets/{code-a-9sh36A.js → code-DVJtYP7h.js} +1 -1
  28. data/public/railwatch/assets/{copy-block-zykZWQym.js → copy-block-D1myf7is.js} +1 -1
  29. data/public/railwatch/assets/{copy-id-b6CW5ESL.js → copy-id-CyRCMfdH.js} +1 -1
  30. data/public/railwatch/assets/{cursor-load-more-0cHzbTPT.js → cursor-load-more-JfSVBn9C.js} +1 -1
  31. data/public/railwatch/assets/{data-table-IvA7xvrK.js → data-table-CwtPkw_i.js} +1 -1
  32. data/public/railwatch/assets/{edit-7lmf3k80.js → edit-BvTugIpj.js} +1 -1
  33. data/public/railwatch/assets/{edit-ZKE15r-F.js → edit-DvpDUM-t.js} +1 -1
  34. data/public/railwatch/assets/{edit-DTtRV1fO.js → edit-fB83T9Yh.js} +1 -1
  35. data/public/railwatch/assets/{empty-state-BFTnQ2oT.js → empty-state-CshhuRUU.js} +1 -1
  36. data/public/railwatch/assets/{env-layout-erSDpIXg.js → env-layout-Dkp_4NvM.js} +1 -1
  37. data/public/railwatch/assets/{execution-path-Di5uUHi-.js → execution-path-CdEerUGH.js} +1 -1
  38. data/public/railwatch/assets/{filter-bar-Btm__gQi.js → filter-bar-BMHf8xBb.js} +1 -1
  39. data/public/railwatch/assets/{flamegraph-C-mZdqa7.js → flamegraph-uYWk1Yov.js} +1 -1
  40. data/public/railwatch/assets/{frames-KZBsjg6-.js → frames-B5ZECkvt.js} +1 -1
  41. data/public/railwatch/assets/{google-sign-in-button-DJRoD72g.js → google-sign-in-button-CAvsXYb4.js} +1 -1
  42. data/public/railwatch/assets/{index-CeqMDByC.js → index-1-78ZewP.js} +1 -1
  43. data/public/railwatch/assets/{index-P_e_cI0O.js → index-B-qRsj0W.js} +1 -1
  44. data/public/railwatch/assets/{index-kNhZPLVj.js → index-B4IRsZXK.js} +1 -1
  45. data/public/railwatch/assets/{index-QyHE9WsU.js → index-BIZsdfdM.js} +1 -1
  46. data/public/railwatch/assets/{index-EGU__DOB.js → index-BIom4V2g.js} +1 -1
  47. data/public/railwatch/assets/{index-Bot7kHMA.js → index-BMgA9NNc.js} +1 -1
  48. data/public/railwatch/assets/{index-CX8Br7m9.js → index-BpnfuXi-.js} +1 -1
  49. data/public/railwatch/assets/{index-D4968-TC.js → index-Bw_ByIps.js} +1 -1
  50. data/public/railwatch/assets/{index-CU6yhEyt.js → index-C7bU7oUF.js} +1 -1
  51. data/public/railwatch/assets/{index-Z1c4nFL0.js → index-CAkCcAty.js} +1 -1
  52. data/public/railwatch/assets/{index-B-bSm1jB.js → index-CRShH-fR.js} +1 -1
  53. data/public/railwatch/assets/{index-DBTxQw77.js → index-CZWzIE8F.js} +1 -1
  54. data/public/railwatch/assets/{index-Cj3_jD1E.js → index-CaJvo0Oc.js} +1 -1
  55. data/public/railwatch/assets/{index-HCJmFcZu.js → index-CdM3F3jz.js} +1 -1
  56. data/public/railwatch/assets/{index-DcItJxa5.js → index-ClG89uia.js} +1 -1
  57. data/public/railwatch/assets/{index-CAzQkw-h.js → index-ClJtZh5Q.js} +1 -1
  58. data/public/railwatch/assets/{index-Bjw4sTXU.js → index-Czq2bi1U.js} +1 -1
  59. data/public/railwatch/assets/{index-CP6jrrPT.js → index-D-O1LUPq.js} +1 -1
  60. data/public/railwatch/assets/{index-CYYmZpZu.js → index-DJIXGkfB.js} +1 -1
  61. data/public/railwatch/assets/{index-BAkZNNEh.js → index-DMcsT2ES.js} +1 -1
  62. data/public/railwatch/assets/{index-wOj5j0KC.js → index-DVUwgfqP.js} +1 -1
  63. data/public/railwatch/assets/{index-DAEzO_vq.js → index-DWMKU6mG.js} +1 -1
  64. data/public/railwatch/assets/{index-BWSyQRZI.js → index-DYrF-A96.js} +1 -1
  65. data/public/railwatch/assets/{index-BsrCnQqg.js → index-DcuyMiuG.js} +1 -1
  66. data/public/railwatch/assets/{index-BoTOVM0v.js → index-DpWQMikK.js} +1 -1
  67. data/public/railwatch/assets/{index-CIUl9POV.js → index-DuGGTdIJ.js} +1 -1
  68. data/public/railwatch/assets/{index-uHBVO8Lh.js → index-DzoUj38Q.js} +1 -1
  69. data/public/railwatch/assets/{index-CBJZQgHA.js → index-QxAKxnHK.js} +1 -1
  70. data/public/railwatch/assets/{index-9LL_C3eG.js → index-X13K9BbO.js} +1 -1
  71. data/public/railwatch/assets/{index-DEfu_YvU.js → index-Zf9xXwq7.js} +1 -1
  72. data/public/railwatch/assets/{index-Bo8hrjbs.js → index-dKn1tKSX.js} +1 -1
  73. data/public/railwatch/assets/{index-DCAho97K.js → index-fA7h22qS.js} +1 -1
  74. data/public/railwatch/assets/{index-BtSlLmkg.js → index-iVNm3uzI.js} +1 -1
  75. data/public/railwatch/assets/{index-B0VXzXYG.js → index-n16aviHx.js} +1 -1
  76. data/public/railwatch/assets/{index-DXUwhSCQ.js → index-vC9KU2bt.js} +1 -1
  77. data/public/railwatch/assets/{inertia-Degv_G9N.js → inertia-CUTKXjxg.js} +3 -3
  78. data/public/railwatch/assets/{input-error-C6SqO_iU.js → input-error-C8ycyeD0.js} +1 -1
  79. data/public/railwatch/assets/{json-viewer-DcQIxT86.js → json-viewer-CJECqZ0l.js} +1 -1
  80. data/public/railwatch/assets/{klass-WgQEfWpo.js → klass-Br9dng39.js} +1 -1
  81. data/public/railwatch/assets/{label-B_vK19tR.js → label-B32Ks8n7.js} +1 -1
  82. data/public/railwatch/assets/{layout-C8q7GUlZ.js → layout-5ZhRtywp.js} +1 -1
  83. data/public/railwatch/assets/{live-dot-DaXEbkXo.js → live-dot-Bb1UYT9F.js} +1 -1
  84. data/public/railwatch/assets/{nav-BnD5XArZ.js → nav-XUcwnBso.js} +1 -1
  85. data/public/railwatch/assets/{new-BL9OqXHe.js → new-0xyEF6NL.js} +1 -1
  86. data/public/railwatch/assets/{new-DIjwu2jF.js → new-CV011uLi.js} +1 -1
  87. data/public/railwatch/assets/{new-BqP0NhOF.js → new-CdvlEBjJ.js} +1 -1
  88. data/public/railwatch/assets/{new-BhRnQn4w.js → new-D9-ORiNW.js} +1 -1
  89. data/public/railwatch/assets/{new-uxMnBtoY.js → new-GIkDYLt8.js} +1 -1
  90. data/public/railwatch/assets/{new-CWP3wtwt.js → new-YBWOo9_V.js} +1 -1
  91. data/public/railwatch/assets/{onboarding-C_Y3xTsH.js → onboarding-BqEuP-Ml.js} +1 -1
  92. data/public/railwatch/assets/{origin-identity-CNhOnfBa.js → origin-identity-DrJ4D2TX.js} +1 -1
  93. data/public/railwatch/assets/{percentile-picker-BujVEhP6.js → percentile-picker-_wllqYoJ.js} +1 -1
  94. data/public/railwatch/assets/{relative-time-6CoKr1lN.js → relative-time-CV7V8aSP.js} +1 -1
  95. data/public/railwatch/assets/{release-health-1Qzc_XhT.js → release-health-DRNLZtT7.js} +1 -1
  96. data/public/railwatch/assets/{route-xqgYjOwJ.js → route-D9slUz_a.js} +1 -1
  97. data/public/railwatch/assets/{segmented-CVKq2Xpa.js → segmented-Bj70Htrs.js} +1 -1
  98. data/public/railwatch/assets/{select-CsmSXsJ4.js → select-DJBZX2ky.js} +1 -1
  99. data/public/railwatch/assets/{separator-CrM10Oot.js → separator-UUo0bkyc.js} +1 -1
  100. data/public/railwatch/assets/{series-chart-D33UhdG2.js → series-chart-C1YrNlID.js} +1 -1
  101. data/public/railwatch/assets/{show-zxVxhUel.js → show-BQtEcTeD.js} +1 -1
  102. data/public/railwatch/assets/{show-B0nHy31L.js → show-BT3tKCgP.js} +1 -1
  103. data/public/railwatch/assets/{show-DZwcZZrz.js → show-BoG7jcwk.js} +1 -1
  104. data/public/railwatch/assets/{show-ixK2r2f1.js → show-BpyCRL-I.js} +1 -1
  105. data/public/railwatch/assets/{show-rysBbvt-.js → show-C0uC3gnA.js} +1 -1
  106. data/public/railwatch/assets/{show-B3izvRdU.js → show-COfP8yWt.js} +1 -1
  107. data/public/railwatch/assets/{show-B7NhcWgp.js → show-CefJwag7.js} +1 -1
  108. data/public/railwatch/assets/{show-8H9WAGav.js → show-ChDJZjoj.js} +1 -1
  109. data/public/railwatch/assets/{show-CJMeX75E.js → show-D7IL22Hy.js} +1 -1
  110. data/public/railwatch/assets/{show-DUwQlohF.js → show-D7tP881O.js} +1 -1
  111. data/public/railwatch/assets/{show-BM-E2iYc.js → show-DR6u4CR7.js} +1 -1
  112. data/public/railwatch/assets/{show-CMisHNAI.js → show-DnBCvlnd.js} +1 -1
  113. data/public/railwatch/assets/{show-BlNR3ZOZ.js → show-DoCg0ifP.js} +1 -1
  114. data/public/railwatch/assets/{show-9jDeBNpc.js → show-GruxlCov.js} +1 -1
  115. data/public/railwatch/assets/{show-CvNV23gH.js → show-Pu3Iehw5.js} +1 -1
  116. data/public/railwatch/assets/{show-DMZlwzL_.js → show-TTCk2Met.js} +1 -1
  117. data/public/railwatch/assets/{show-CQ4Ze-Un.js → show-yQipmite.js} +1 -1
  118. data/public/railwatch/assets/{sort-header-CKj_7G3U.js → sort-header-CqQQhaxg.js} +1 -1
  119. data/public/railwatch/assets/{sparkline-cell-Ckg29yVq.js → sparkline-cell-BwdBz0yv.js} +1 -1
  120. data/public/railwatch/assets/{stat-TxvoBiC8.js → stat-IghK3WjD.js} +1 -1
  121. data/public/railwatch/assets/{status-badge-5NCVJHjo.js → status-badge-XYUN9gUA.js} +1 -1
  122. data/public/railwatch/assets/{tenant-path-B5ZRK4x3.js → tenant-path-SxnZbfU1.js} +1 -1
  123. data/public/railwatch/assets/{text-link-BPllRj0F.js → text-link-NCL9N5D5.js} +1 -1
  124. data/public/railwatch/assets/{textarea-DtD5yZp_.js → textarea-DhI1dmQa.js} +1 -1
  125. data/public/railwatch/assets/{timeline-DZz5ZnHN.js → timeline-CLAwsAlo.js} +1 -1
  126. data/public/railwatch/assets/{transition-Ds6Cakuc.js → transition-DpTb9Yiv.js} +1 -1
  127. data/public/railwatch/assets/{use-clipboard-BLjjYH8V.js → use-clipboard-D5i6e5kf.js} +1 -1
  128. data/public/railwatch/assets/{use-live-GKze1mNC.js → use-live-V-slSdFJ.js} +1 -1
  129. data/public/railwatch/manifest.json +1287 -1287
  130. metadata +117 -116
@@ -1 +1 @@
1
- import{c as D,u as P,j as i,t as L,e as A,L as B}from"./inertia-Degv_G9N.js";import{D as M}from"./data-table-IvA7xvrK.js";import{E as O}from"./empty-state-BFTnQ2oT.js";import{P as F,E as H}from"./env-layout-erSDpIXg.js";import{c as R,m as j,w as K}from"./format-B9SDkrWj.js";import{B as S}from"./app-layout-B5Fcdwfz.js";import"./chart-hover-XYPNE2CX.js";import"./badge-CApjyWcg.js";import"./app-wordmark-1SRllgHv.js";import"./use-live-GKze1mNC.js";import"./live-dot-DaXEbkXo.js";import"./index-B0VXzXYG.js";import"./index-CX8Br7m9.js";import"./segmented-CVKq2Xpa.js";import"./label-B_vK19tR.js";import"./checkbox-Bf41R8W6.js";function pe(t){const e=D.c(26),{environment:E}=P().props,N=E.application_id,w=E.id;let c;e[0]!==N||e[1]!==w?(c=n=>n.execution_id?L(N,w,n.execution_id):null,e[0]=N,e[1]=w,e[2]=c):c=e[2];const r=c;let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(F,{title:"Notifications",description:"ActionMailer/Noticed deliveries, grouped by notifier and delivery method."}),e[3]=m):m=e[3];let u,f;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(O,{icon:S,title:"No notifications in this window",description:"Notifications delivered by your app appear here as they're sent."}),f=[{key:"n",header:"Notifier",cell:U},{key:"c",hideOnMobile:!0,header:"Count",align:"right",cell:Q},{key:"f",hideOnMobile:!0,header:"Failed",align:"right",cell:J},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:G},{key:"p95",header:"p95",align:"right",cell:z}],e[4]=u,e[5]=f):(u=e[4],f=e[5]);let o;e[6]!==t.groups?(o=i.jsx(M,{rows:t.groups,rowKey:V,empty:u,columns:f}),e[6]=t.groups,e[7]=o):o=e[7];let p;e[8]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx("h2",{className:"text-sm font-semibold",children:"Recent"}),e[8]=p):p=e[8];let d;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(O,{icon:S,title:"No notifications in this window",description:"Notifications delivered by your app appear here as they're sent."}),e[9]=d):d=e[9];let l;e[10]!==r?(l={onOpen:(n,v)=>{const k=r(n);k&&(v?.newTab?window.open(k,"_blank"):A.visit(k))}},e[10]=r,e[11]=l):l=e[11];let h,y,_,x,g;e[12]===Symbol.for("react.memo_cache_sentinel")?(x={key:"when",header:"When",cell:W},g={key:"n",header:"Notifier",cell:I},h={key:"dm",hideOnMobile:!0,header:"Delivery method",cell:C},y={key:"f",hideOnMobile:!0,header:"Failed",cell:q},_={key:"d",header:"Duration",align:"right",cell:T},e[12]=h,e[13]=y,e[14]=_,e[15]=x,e[16]=g):(h=e[12],y=e[13],_=e[14],x=e[15],g=e[16]);let s;e[17]!==r?(s=[x,g,h,y,_,{key:"in",hideOnMobile:!0,header:"In",cell:n=>{const v=r(n);return v?i.jsx(B,{className:"font-mono text-xs hover:underline",href:v,children:n.execution_preview}):null}}],e[17]=r,e[18]=s):s=e[18];let a;e[19]!==t.recent||e[20]!==s||e[21]!==l?(a=i.jsx(M,{rows:t.recent,rowKey:$,empty:d,keyboardNav:l,columns:s}),e[19]=t.recent,e[20]=s,e[21]=l,e[22]=a):a=e[22];let b;return e[23]!==a||e[24]!==o?(b=i.jsxs(H,{title:"Notifications",children:[m,o,p,a]}),e[23]=a,e[24]=o,e[25]=b):b=e[25],b}function T(t){return j(t.duration,3)}function q(t){return t.failed?"yes":""}function C(t){return t.delivery_method}function I(t){return i.jsx("span",{className:"font-mono text-xs",children:t.notifier})}function W(t){return i.jsx("span",{className:"text-xs",children:K(t.occurred_at)})}function $(t){return t.id}function z(t){return j(t.p95,3)}function G(t){return j(t.avg,3)}function J(t){return R(t.errors)}function Q(t){return R(t.count)}function U(t){return i.jsx("span",{className:"font-mono text-xs",children:t.name})}function V(t){return t.group_hash}export{pe as default};
1
+ import{c as D,u as P,j as i,t as L,e as A,L as B}from"./inertia-CUTKXjxg.js";import{D as M}from"./data-table-CwtPkw_i.js";import{E as O}from"./empty-state-CshhuRUU.js";import{P as F,E as H}from"./env-layout-Dkp_4NvM.js";import{c as R,m as j,w as K}from"./format-B9SDkrWj.js";import{B as S}from"./app-layout-DUk54qUM.js";import"./chart-hover-DMWx5-Rs.js";import"./badge-s7YDycYg.js";import"./app-wordmark-DDNuuq5_.js";import"./use-live-V-slSdFJ.js";import"./live-dot-Bb1UYT9F.js";import"./index-n16aviHx.js";import"./index-BpnfuXi-.js";import"./segmented-Bj70Htrs.js";import"./label-B32Ks8n7.js";import"./checkbox-C2AqEZXX.js";function pe(t){const e=D.c(26),{environment:E}=P().props,N=E.application_id,w=E.id;let c;e[0]!==N||e[1]!==w?(c=n=>n.execution_id?L(N,w,n.execution_id):null,e[0]=N,e[1]=w,e[2]=c):c=e[2];const r=c;let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(F,{title:"Notifications",description:"ActionMailer/Noticed deliveries, grouped by notifier and delivery method."}),e[3]=m):m=e[3];let u,f;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(O,{icon:S,title:"No notifications in this window",description:"Notifications delivered by your app appear here as they're sent."}),f=[{key:"n",header:"Notifier",cell:U},{key:"c",hideOnMobile:!0,header:"Count",align:"right",cell:Q},{key:"f",hideOnMobile:!0,header:"Failed",align:"right",cell:J},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:G},{key:"p95",header:"p95",align:"right",cell:z}],e[4]=u,e[5]=f):(u=e[4],f=e[5]);let o;e[6]!==t.groups?(o=i.jsx(M,{rows:t.groups,rowKey:V,empty:u,columns:f}),e[6]=t.groups,e[7]=o):o=e[7];let p;e[8]===Symbol.for("react.memo_cache_sentinel")?(p=i.jsx("h2",{className:"text-sm font-semibold",children:"Recent"}),e[8]=p):p=e[8];let d;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(O,{icon:S,title:"No notifications in this window",description:"Notifications delivered by your app appear here as they're sent."}),e[9]=d):d=e[9];let l;e[10]!==r?(l={onOpen:(n,v)=>{const k=r(n);k&&(v?.newTab?window.open(k,"_blank"):A.visit(k))}},e[10]=r,e[11]=l):l=e[11];let h,y,_,x,g;e[12]===Symbol.for("react.memo_cache_sentinel")?(x={key:"when",header:"When",cell:W},g={key:"n",header:"Notifier",cell:I},h={key:"dm",hideOnMobile:!0,header:"Delivery method",cell:C},y={key:"f",hideOnMobile:!0,header:"Failed",cell:q},_={key:"d",header:"Duration",align:"right",cell:T},e[12]=h,e[13]=y,e[14]=_,e[15]=x,e[16]=g):(h=e[12],y=e[13],_=e[14],x=e[15],g=e[16]);let s;e[17]!==r?(s=[x,g,h,y,_,{key:"in",hideOnMobile:!0,header:"In",cell:n=>{const v=r(n);return v?i.jsx(B,{className:"font-mono text-xs hover:underline",href:v,children:n.execution_preview}):null}}],e[17]=r,e[18]=s):s=e[18];let a;e[19]!==t.recent||e[20]!==s||e[21]!==l?(a=i.jsx(M,{rows:t.recent,rowKey:$,empty:d,keyboardNav:l,columns:s}),e[19]=t.recent,e[20]=s,e[21]=l,e[22]=a):a=e[22];let b;return e[23]!==a||e[24]!==o?(b=i.jsxs(H,{title:"Notifications",children:[m,o,p,a]}),e[23]=a,e[24]=o,e[25]=b):b=e[25],b}function T(t){return j(t.duration,3)}function q(t){return t.failed?"yes":""}function C(t){return t.delivery_method}function I(t){return i.jsx("span",{className:"font-mono text-xs",children:t.notifier})}function W(t){return i.jsx("span",{className:"text-xs",children:K(t.occurred_at)})}function $(t){return t.id}function z(t){return j(t.p95,3)}function G(t){return j(t.avg,3)}function J(t){return R(t.errors)}function Q(t){return R(t.count)}function U(t){return i.jsx("span",{className:"font-mono text-xs",children:t.name})}function V(t){return t.group_hash}export{pe as default};
@@ -1 +1 @@
1
- import{c as M,u as R,j as n,t as A,e as D,L}from"./inertia-Degv_G9N.js";import{D as N}from"./data-table-IvA7xvrK.js";import{E as O}from"./empty-state-BFTnQ2oT.js";import{P,E as H}from"./env-layout-erSDpIXg.js";import{c as K,m as j,w as $}from"./format-B9SDkrWj.js";import{J as E}from"./app-layout-B5Fcdwfz.js";import"./chart-hover-XYPNE2CX.js";import"./badge-CApjyWcg.js";import"./app-wordmark-1SRllgHv.js";import"./use-live-GKze1mNC.js";import"./live-dot-DaXEbkXo.js";import"./index-B0VXzXYG.js";import"./index-CX8Br7m9.js";import"./segmented-CVKq2Xpa.js";import"./label-B_vK19tR.js";import"./checkbox-Bf41R8W6.js";function pe(t){const e=M.c(25),{environment:S}=R().props,w=S.application_id,b=S.id;let c;e[0]!==w||e[1]!==b?(c=r=>r.execution_id?A(w,b,r.execution_id):null,e[0]=w,e[1]=b,e[2]=c):c=e[2];const o=c;let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(P,{title:"Storage",description:"Active Storage service operations: uploads, downloads, deletes, URL generation, analysis, and transforms."}),e[3]=m):m=e[3];let p,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(O,{icon:E,title:"No storage operations in this window",description:"Active Storage reads and writes instrumented by the gem appear here."}),u=[{key:"s",header:"Service",cell:F},{key:"o",header:"Operation",cell:B},{key:"n",header:"Count",align:"right",cell:z},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:W},{key:"max",hideOnMobile:!0,header:"Max",align:"right",cell:U}],e[4]=p,e[5]=u):(p=e[4],u=e[5]);let i;e[6]!==t.ops?(i=n.jsx(N,{rows:t.ops,rowKey:G,empty:p,columns:u}),e[6]=t.ops,e[7]=i):i=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("h2",{className:"text-sm font-semibold",children:"Recent"}),e[8]=d):d=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(O,{icon:E,title:"No storage operations in this window",description:"Active Storage reads and writes instrumented by the gem appear here."}),e[9]=f):f=e[9];let s;e[10]!==o?(s={onOpen:(r,v)=>{const k=o(r);k&&(v?.newTab?window.open(k,"_blank"):D.visit(k))}},e[10]=o,e[11]=s):s=e[11];let h,x,y,_;e[12]===Symbol.for("react.memo_cache_sentinel")?(y={key:"when",header:"When",cell:I},_={key:"o",header:"Op",cell:C},h={key:"k",hideOnMobile:!0,header:"Key",cell:q},x={key:"d",header:"Duration",align:"right",cell:T},e[12]=h,e[13]=x,e[14]=y,e[15]=_):(h=e[12],x=e[13],y=e[14],_=e[15]);let a;e[16]!==o?(a=[y,_,h,x,{key:"in",hideOnMobile:!0,header:"In",cell:r=>{const v=o(r);return v?n.jsx(L,{className:"font-mono text-xs hover:underline",href:v,children:r.execution_preview}):null}}],e[16]=o,e[17]=a):a=e[17];let l;e[18]!==t.recent||e[19]!==a||e[20]!==s?(l=n.jsx(N,{rows:t.recent,rowKey:J,empty:f,keyboardNav:s,columns:a}),e[18]=t.recent,e[19]=a,e[20]=s,e[21]=l):l=e[21];let g;return e[22]!==l||e[23]!==i?(g=n.jsxs(H,{title:"Storage",children:[m,i,d,l]}),e[22]=l,e[23]=i,e[24]=g):g=e[24],g}function T(t){return j(t.duration)}function q(t){return n.jsx("span",{className:"font-mono text-xs",children:t.key})}function C(t){return n.jsxs("span",{className:"font-mono text-xs",children:[t.service," ",t.op]})}function I(t){return n.jsx("span",{className:"text-xs",children:$(t.occurred_at)})}function J(t){return t.id}function U(t){return j(t.max)}function W(t){return j(t.avg)}function z(t){return K(t.count)}function B(t){return n.jsx("span",{className:"font-mono text-xs",children:t.op})}function F(t){return t.service}function G(t){return`${t.service}-${t.op}`}export{pe as default};
1
+ import{c as M,u as R,j as n,t as A,e as D,L}from"./inertia-CUTKXjxg.js";import{D as N}from"./data-table-CwtPkw_i.js";import{E as O}from"./empty-state-CshhuRUU.js";import{P,E as H}from"./env-layout-Dkp_4NvM.js";import{c as K,m as j,w as $}from"./format-B9SDkrWj.js";import{J as E}from"./app-layout-DUk54qUM.js";import"./chart-hover-DMWx5-Rs.js";import"./badge-s7YDycYg.js";import"./app-wordmark-DDNuuq5_.js";import"./use-live-V-slSdFJ.js";import"./live-dot-Bb1UYT9F.js";import"./index-n16aviHx.js";import"./index-BpnfuXi-.js";import"./segmented-Bj70Htrs.js";import"./label-B32Ks8n7.js";import"./checkbox-C2AqEZXX.js";function pe(t){const e=M.c(25),{environment:S}=R().props,w=S.application_id,b=S.id;let c;e[0]!==w||e[1]!==b?(c=r=>r.execution_id?A(w,b,r.execution_id):null,e[0]=w,e[1]=b,e[2]=c):c=e[2];const o=c;let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(P,{title:"Storage",description:"Active Storage service operations: uploads, downloads, deletes, URL generation, analysis, and transforms."}),e[3]=m):m=e[3];let p,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(O,{icon:E,title:"No storage operations in this window",description:"Active Storage reads and writes instrumented by the gem appear here."}),u=[{key:"s",header:"Service",cell:F},{key:"o",header:"Operation",cell:B},{key:"n",header:"Count",align:"right",cell:z},{key:"avg",hideOnMobile:!0,header:"Avg",align:"right",cell:W},{key:"max",hideOnMobile:!0,header:"Max",align:"right",cell:U}],e[4]=p,e[5]=u):(p=e[4],u=e[5]);let i;e[6]!==t.ops?(i=n.jsx(N,{rows:t.ops,rowKey:G,empty:p,columns:u}),e[6]=t.ops,e[7]=i):i=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("h2",{className:"text-sm font-semibold",children:"Recent"}),e[8]=d):d=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(O,{icon:E,title:"No storage operations in this window",description:"Active Storage reads and writes instrumented by the gem appear here."}),e[9]=f):f=e[9];let s;e[10]!==o?(s={onOpen:(r,v)=>{const k=o(r);k&&(v?.newTab?window.open(k,"_blank"):D.visit(k))}},e[10]=o,e[11]=s):s=e[11];let h,x,y,_;e[12]===Symbol.for("react.memo_cache_sentinel")?(y={key:"when",header:"When",cell:I},_={key:"o",header:"Op",cell:C},h={key:"k",hideOnMobile:!0,header:"Key",cell:q},x={key:"d",header:"Duration",align:"right",cell:T},e[12]=h,e[13]=x,e[14]=y,e[15]=_):(h=e[12],x=e[13],y=e[14],_=e[15]);let a;e[16]!==o?(a=[y,_,h,x,{key:"in",hideOnMobile:!0,header:"In",cell:r=>{const v=o(r);return v?n.jsx(L,{className:"font-mono text-xs hover:underline",href:v,children:r.execution_preview}):null}}],e[16]=o,e[17]=a):a=e[17];let l;e[18]!==t.recent||e[19]!==a||e[20]!==s?(l=n.jsx(N,{rows:t.recent,rowKey:J,empty:f,keyboardNav:s,columns:a}),e[18]=t.recent,e[19]=a,e[20]=s,e[21]=l):l=e[21];let g;return e[22]!==l||e[23]!==i?(g=n.jsxs(H,{title:"Storage",children:[m,i,d,l]}),e[22]=l,e[23]=i,e[24]=g):g=e[24],g}function T(t){return j(t.duration)}function q(t){return n.jsx("span",{className:"font-mono text-xs",children:t.key})}function C(t){return n.jsxs("span",{className:"font-mono text-xs",children:[t.service," ",t.op]})}function I(t){return n.jsx("span",{className:"text-xs",children:$(t.occurred_at)})}function J(t){return t.id}function U(t){return j(t.max)}function W(t){return j(t.avg)}function z(t){return K(t.count)}function B(t){return n.jsx("span",{className:"font-mono text-xs",children:t.op})}function F(t){return t.service}function G(t){return`${t.service}-${t.op}`}export{pe as default};
@@ -1 +1 @@
1
- import{aC as te,c as ae,u as le,j as r,e as re,L as ie}from"./inertia-Degv_G9N.js";import{C as oe}from"./chart-panel-BYk68mJJ.js";import{D as ne}from"./data-table-IvA7xvrK.js";import{E as me}from"./empty-state-BFTnQ2oT.js";import{E as ue,P as ce}from"./env-layout-erSDpIXg.js";import{b as fe}from"./series-chart-D33UhdG2.js";import{S as Y,a as he}from"./stat-TxvoBiC8.js";import{c as a,w as de,m as ye}from"./format-B9SDkrWj.js";import{rate as Z,crashFreeTone as se}from"./release-health-1Qzc_XhT.js";import{z as _e}from"./app-layout-B5Fcdwfz.js";import"./chart-hover-XYPNE2CX.js";import"./badge-CApjyWcg.js";import"./app-wordmark-1SRllgHv.js";import"./use-live-GKze1mNC.js";import"./live-dot-DaXEbkXo.js";import"./index-B0VXzXYG.js";import"./index-CX8Br7m9.js";import"./segmented-CVKq2Xpa.js";import"./label-B_vK19tR.js";import"./chart-Xnrz1Nqw.js";import"./arrow-up-DwKQcab4.js";import"./checkbox-Bf41R8W6.js";function pe(s,e,H,q){const z=String(te(s,e,H,q)),[F,u]=z.split("?");return`${F.replace(/\./g,"%2E")}${u?`?${u}`:""}`}function Ve(s){const e=ae.c(98),{environment:H,window:q}=le().props,z=H.application_id,F=H.id;let u;e[0]!==z||e[1]!==F||e[2]!==q?(u=t=>pe(z,F,t.deploy,{window:q}),e[0]=z,e[1]=F,e[2]=q,e[3]=u):u=e[3];const l=u;let c,f,h,i,d,y,_,p,x,o,k,n;if(e[4]!==s.series||e[5]!==s.summary.crash_free_sessions||e[6]!==s.summary.crash_free_users||e[7]!==s.summary.releases||e[8]!==s.summary.sessions||e[9]!==s.summary.users){const t=s.series.reduce(Ce,{ok:0,errored:0,crashed:0});f=ue,k="Releases",e[22]===Symbol.for("react.memo_cache_sentinel")?(n=r.jsx(ce,{title:"Releases",description:"Sessions per deploy, and how many of them ended without a crash. A release is the deploy stamped on every record the gem ships."}),e[22]=n):n=e[22];let m;e[23]!==s.summary.crash_free_sessions?(m=Z(s.summary.crash_free_sessions),e[23]=s.summary.crash_free_sessions,e[24]=m):m=e[24];let N;e[25]!==s.summary.crash_free_sessions?(N=se(s.summary.crash_free_sessions),e[25]=s.summary.crash_free_sessions,e[26]=N):N=e[26];let P;e[27]!==m||e[28]!==N?(P=r.jsx(Y,{label:"Crash-free sessions",value:m,tone:N}),e[27]=m,e[28]=N,e[29]=P):P=e[29];let T;e[30]!==s.summary.crash_free_users?(T=Z(s.summary.crash_free_users),e[30]=s.summary.crash_free_users,e[31]=T):T=e[31];let $;e[32]!==s.summary.crash_free_users?($=se(s.summary.crash_free_users),e[32]=s.summary.crash_free_users,e[33]=$):$=e[33];let A;e[34]!==T||e[35]!==$?(A=r.jsx(Y,{label:"Crash-free users",value:T,tone:$}),e[34]=T,e[35]=$,e[36]=A):A=e[36];let D;e[37]!==s.summary.sessions?(D=a(s.summary.sessions),e[37]=s.summary.sessions,e[38]=D):D=e[38];let X;e[39]!==s.summary.users?(X=a(s.summary.users),e[39]=s.summary.users,e[40]=X):X=e[40];const ee=`${X} users`;let O;e[41]!==D||e[42]!==ee?(O=r.jsx(Y,{label:"Sessions",value:D,hint:ee}),e[41]=D,e[42]=ee,e[43]=O):O=e[43];let L;e[44]!==s.summary.releases?(L=a(s.summary.releases),e[44]=s.summary.releases,e[45]=L):L=e[45];let M;e[46]!==L?(M=r.jsx(Y,{label:"Active releases",value:L}),e[46]=L,e[47]=M):M=e[47],e[48]!==P||e[49]!==A||e[50]!==O||e[51]!==M?(i=r.jsxs(he,{children:[P,A,O,M]}),e[48]=P,e[49]=A,e[50]=O,e[51]=M,e[52]=i):i=e[52],c=oe,x="Sessions by status",e[53]!==s.summary.sessions?(o=a(s.summary.sessions),e[53]=s.summary.sessions,e[54]=o):o=e[54],_={key:"ok",label:"ok",value:a(t.ok),color:"var(--ok)"},p={key:"errored",label:"errored",value:a(t.errored),color:"var(--warning)"},h="crashed",d="crashed",y=a(t.crashed),e[4]=s.series,e[5]=s.summary.crash_free_sessions,e[6]=s.summary.crash_free_users,e[7]=s.summary.releases,e[8]=s.summary.sessions,e[9]=s.summary.users,e[10]=c,e[11]=f,e[12]=h,e[13]=i,e[14]=d,e[15]=y,e[16]=_,e[17]=p,e[18]=x,e[19]=o,e[20]=k,e[21]=n}else c=e[10],f=e[11],h=e[12],i=e[13],d=e[14],y=e[15],_=e[16],p=e[17],x=e[18],o=e[19],k=e[20],n=e[21];let v;e[55]!==h||e[56]!==d||e[57]!==y?(v={key:h,label:d,value:y,color:"var(--danger)"},e[55]=h,e[56]=d,e[57]=y,e[58]=v):v=e[58];let b;e[59]!==v||e[60]!==_||e[61]!==p?(b=[_,p,v],e[59]=v,e[60]=_,e[61]=p,e[62]=b):b=e[62];let g;e[63]!==s.series?(g=r.jsx(fe,{data:s.series}),e[63]=s.series,e[64]=g):g=e[64];let w;e[65]!==c||e[66]!==b||e[67]!==g||e[68]!==x||e[69]!==o?(w=r.jsx(c,{label:x,value:o,legend:b,children:g}),e[65]=c,e[66]=b,e[67]=g,e[68]=x,e[69]=o,e[70]=w):w=e[70];let K;e[71]===Symbol.for("react.memo_cache_sentinel")?(K=r.jsx(me,{icon:_e,title:"No releases in this window",description:"A release appears once a deploy is recorded and the app reports sessions for it."}),e[71]=K):K=e[71];let j,S;e[72]!==l?(j=t=>re.visit(l(t)),S={onOpen:(t,m)=>m?.newTab?globalThis.window.open(l(t),"_blank"):re.visit(l(t))},e[72]=l,e[73]=j,e[74]=S):(j=e[73],S=e[74]);let C;e[75]!==l?(C={key:"ref",header:"Release",cell:t=>r.jsx(ie,{className:"font-mono text-xs hover:underline",href:l(t),children:t.ref})},e[75]=l,e[76]=C):C=e[76];let B,G,I,J,Q,U,V;e[77]===Symbol.for("react.memo_cache_sentinel")?(B={key:"at",header:"Deployed",cell:je},G={key:"adoption",header:"Adoption",align:"right",cell:we},I={key:"sessions",header:"Sessions",align:"right",cell:ge},J={key:"cfs",header:"Crash-free sessions",align:"right",cell:be},Q={key:"cfu",hideOnMobile:!0,header:"Crash-free users",align:"right",cell:ve},U={key:"issues",hideOnMobile:!0,header:"New issues",align:"right",cell:ke},V={key:"duration",hideOnMobile:!0,header:"Duration",align:"right",cell:xe},e[77]=B,e[78]=G,e[79]=I,e[80]=J,e[81]=Q,e[82]=U,e[83]=V):(B=e[77],G=e[78],I=e[79],J=e[80],Q=e[81],U=e[82],V=e[83]);let E;e[84]!==C?(E=[C,B,G,I,J,Q,U,V],e[84]=C,e[85]=E):E=e[85];let R;e[86]!==s.releases||e[87]!==j||e[88]!==S||e[89]!==E?(R=r.jsx(ne,{rows:s.releases,rowKey:Se,empty:K,onRowClick:j,keyboardNav:S,columns:E}),e[86]=s.releases,e[87]=j,e[88]=S,e[89]=E,e[90]=R):R=e[90];let W;return e[91]!==f||e[92]!==i||e[93]!==w||e[94]!==R||e[95]!==k||e[96]!==n?(W=r.jsxs(f,{title:k,children:[n,i,w,R]}),e[91]=f,e[92]=i,e[93]=w,e[94]=R,e[95]=k,e[96]=n,e[97]=W):W=e[97],W}function xe(s){return ye(s.avg_duration_ms)}function ke(s){return r.jsx("span",{className:s.new_issues?"text-destructive":"",children:a(s.new_issues)})}function ve(s){return Z(s.crash_free_users)}function be(s){return r.jsx("span",{className:se(s.crash_free_sessions)==="destructive"?"text-destructive font-semibold":"font-semibold",children:Z(s.crash_free_sessions)})}function ge(s){return a(s.sessions)}function we(s){return`${s.adoption}%`}function je(s){return r.jsx("span",{className:"text-xs",children:de(s.deployed_at)})}function Se(s){return s.deploy}function Ce(s,e){return{ok:s.ok+e.ok,errored:s.errored+e.errored,crashed:s.crashed+e.crashed}}export{Ve as default};
1
+ import{aC as te,c as ae,u as le,j as r,e as re,L as ie}from"./inertia-CUTKXjxg.js";import{C as oe}from"./chart-panel-BlirnMrQ.js";import{D as ne}from"./data-table-CwtPkw_i.js";import{E as me}from"./empty-state-CshhuRUU.js";import{E as ue,P as ce}from"./env-layout-Dkp_4NvM.js";import{b as fe}from"./series-chart-C1YrNlID.js";import{S as Y,a as he}from"./stat-IghK3WjD.js";import{c as a,w as de,m as ye}from"./format-B9SDkrWj.js";import{rate as Z,crashFreeTone as se}from"./release-health-DRNLZtT7.js";import{z as _e}from"./app-layout-DUk54qUM.js";import"./chart-hover-DMWx5-Rs.js";import"./badge-s7YDycYg.js";import"./app-wordmark-DDNuuq5_.js";import"./use-live-V-slSdFJ.js";import"./live-dot-Bb1UYT9F.js";import"./index-n16aviHx.js";import"./index-BpnfuXi-.js";import"./segmented-Bj70Htrs.js";import"./label-B32Ks8n7.js";import"./chart-nsdZV0Dv.js";import"./arrow-up-DYTCBENO.js";import"./checkbox-C2AqEZXX.js";function pe(s,e,H,q){const z=String(te(s,e,H,q)),[F,u]=z.split("?");return`${F.replace(/\./g,"%2E")}${u?`?${u}`:""}`}function Ve(s){const e=ae.c(98),{environment:H,window:q}=le().props,z=H.application_id,F=H.id;let u;e[0]!==z||e[1]!==F||e[2]!==q?(u=t=>pe(z,F,t.deploy,{window:q}),e[0]=z,e[1]=F,e[2]=q,e[3]=u):u=e[3];const l=u;let c,f,h,i,d,y,_,p,x,o,k,n;if(e[4]!==s.series||e[5]!==s.summary.crash_free_sessions||e[6]!==s.summary.crash_free_users||e[7]!==s.summary.releases||e[8]!==s.summary.sessions||e[9]!==s.summary.users){const t=s.series.reduce(Ce,{ok:0,errored:0,crashed:0});f=ue,k="Releases",e[22]===Symbol.for("react.memo_cache_sentinel")?(n=r.jsx(ce,{title:"Releases",description:"Sessions per deploy, and how many of them ended without a crash. A release is the deploy stamped on every record the gem ships."}),e[22]=n):n=e[22];let m;e[23]!==s.summary.crash_free_sessions?(m=Z(s.summary.crash_free_sessions),e[23]=s.summary.crash_free_sessions,e[24]=m):m=e[24];let N;e[25]!==s.summary.crash_free_sessions?(N=se(s.summary.crash_free_sessions),e[25]=s.summary.crash_free_sessions,e[26]=N):N=e[26];let P;e[27]!==m||e[28]!==N?(P=r.jsx(Y,{label:"Crash-free sessions",value:m,tone:N}),e[27]=m,e[28]=N,e[29]=P):P=e[29];let T;e[30]!==s.summary.crash_free_users?(T=Z(s.summary.crash_free_users),e[30]=s.summary.crash_free_users,e[31]=T):T=e[31];let $;e[32]!==s.summary.crash_free_users?($=se(s.summary.crash_free_users),e[32]=s.summary.crash_free_users,e[33]=$):$=e[33];let A;e[34]!==T||e[35]!==$?(A=r.jsx(Y,{label:"Crash-free users",value:T,tone:$}),e[34]=T,e[35]=$,e[36]=A):A=e[36];let D;e[37]!==s.summary.sessions?(D=a(s.summary.sessions),e[37]=s.summary.sessions,e[38]=D):D=e[38];let X;e[39]!==s.summary.users?(X=a(s.summary.users),e[39]=s.summary.users,e[40]=X):X=e[40];const ee=`${X} users`;let O;e[41]!==D||e[42]!==ee?(O=r.jsx(Y,{label:"Sessions",value:D,hint:ee}),e[41]=D,e[42]=ee,e[43]=O):O=e[43];let L;e[44]!==s.summary.releases?(L=a(s.summary.releases),e[44]=s.summary.releases,e[45]=L):L=e[45];let M;e[46]!==L?(M=r.jsx(Y,{label:"Active releases",value:L}),e[46]=L,e[47]=M):M=e[47],e[48]!==P||e[49]!==A||e[50]!==O||e[51]!==M?(i=r.jsxs(he,{children:[P,A,O,M]}),e[48]=P,e[49]=A,e[50]=O,e[51]=M,e[52]=i):i=e[52],c=oe,x="Sessions by status",e[53]!==s.summary.sessions?(o=a(s.summary.sessions),e[53]=s.summary.sessions,e[54]=o):o=e[54],_={key:"ok",label:"ok",value:a(t.ok),color:"var(--ok)"},p={key:"errored",label:"errored",value:a(t.errored),color:"var(--warning)"},h="crashed",d="crashed",y=a(t.crashed),e[4]=s.series,e[5]=s.summary.crash_free_sessions,e[6]=s.summary.crash_free_users,e[7]=s.summary.releases,e[8]=s.summary.sessions,e[9]=s.summary.users,e[10]=c,e[11]=f,e[12]=h,e[13]=i,e[14]=d,e[15]=y,e[16]=_,e[17]=p,e[18]=x,e[19]=o,e[20]=k,e[21]=n}else c=e[10],f=e[11],h=e[12],i=e[13],d=e[14],y=e[15],_=e[16],p=e[17],x=e[18],o=e[19],k=e[20],n=e[21];let v;e[55]!==h||e[56]!==d||e[57]!==y?(v={key:h,label:d,value:y,color:"var(--danger)"},e[55]=h,e[56]=d,e[57]=y,e[58]=v):v=e[58];let b;e[59]!==v||e[60]!==_||e[61]!==p?(b=[_,p,v],e[59]=v,e[60]=_,e[61]=p,e[62]=b):b=e[62];let g;e[63]!==s.series?(g=r.jsx(fe,{data:s.series}),e[63]=s.series,e[64]=g):g=e[64];let w;e[65]!==c||e[66]!==b||e[67]!==g||e[68]!==x||e[69]!==o?(w=r.jsx(c,{label:x,value:o,legend:b,children:g}),e[65]=c,e[66]=b,e[67]=g,e[68]=x,e[69]=o,e[70]=w):w=e[70];let K;e[71]===Symbol.for("react.memo_cache_sentinel")?(K=r.jsx(me,{icon:_e,title:"No releases in this window",description:"A release appears once a deploy is recorded and the app reports sessions for it."}),e[71]=K):K=e[71];let j,S;e[72]!==l?(j=t=>re.visit(l(t)),S={onOpen:(t,m)=>m?.newTab?globalThis.window.open(l(t),"_blank"):re.visit(l(t))},e[72]=l,e[73]=j,e[74]=S):(j=e[73],S=e[74]);let C;e[75]!==l?(C={key:"ref",header:"Release",cell:t=>r.jsx(ie,{className:"font-mono text-xs hover:underline",href:l(t),children:t.ref})},e[75]=l,e[76]=C):C=e[76];let B,G,I,J,Q,U,V;e[77]===Symbol.for("react.memo_cache_sentinel")?(B={key:"at",header:"Deployed",cell:je},G={key:"adoption",header:"Adoption",align:"right",cell:we},I={key:"sessions",header:"Sessions",align:"right",cell:ge},J={key:"cfs",header:"Crash-free sessions",align:"right",cell:be},Q={key:"cfu",hideOnMobile:!0,header:"Crash-free users",align:"right",cell:ve},U={key:"issues",hideOnMobile:!0,header:"New issues",align:"right",cell:ke},V={key:"duration",hideOnMobile:!0,header:"Duration",align:"right",cell:xe},e[77]=B,e[78]=G,e[79]=I,e[80]=J,e[81]=Q,e[82]=U,e[83]=V):(B=e[77],G=e[78],I=e[79],J=e[80],Q=e[81],U=e[82],V=e[83]);let E;e[84]!==C?(E=[C,B,G,I,J,Q,U,V],e[84]=C,e[85]=E):E=e[85];let R;e[86]!==s.releases||e[87]!==j||e[88]!==S||e[89]!==E?(R=r.jsx(ne,{rows:s.releases,rowKey:Se,empty:K,onRowClick:j,keyboardNav:S,columns:E}),e[86]=s.releases,e[87]=j,e[88]=S,e[89]=E,e[90]=R):R=e[90];let W;return e[91]!==f||e[92]!==i||e[93]!==w||e[94]!==R||e[95]!==k||e[96]!==n?(W=r.jsxs(f,{title:k,children:[n,i,w,R]}),e[91]=f,e[92]=i,e[93]=w,e[94]=R,e[95]=k,e[96]=n,e[97]=W):W=e[97],W}function xe(s){return ye(s.avg_duration_ms)}function ke(s){return r.jsx("span",{className:s.new_issues?"text-destructive":"",children:a(s.new_issues)})}function ve(s){return Z(s.crash_free_users)}function be(s){return r.jsx("span",{className:se(s.crash_free_sessions)==="destructive"?"text-destructive font-semibold":"font-semibold",children:Z(s.crash_free_sessions)})}function ge(s){return a(s.sessions)}function we(s){return`${s.adoption}%`}function je(s){return r.jsx("span",{className:"text-xs",children:de(s.deployed_at)})}function Se(s){return s.deploy}function Ce(s,e){return{ok:s.ok+e.ok,errored:s.errored+e.errored,crashed:s.crashed+e.crashed}}export{Ve as default};
@@ -1 +1 @@
1
- import{r as p,j as c,W as f}from"./inertia-Degv_G9N.js";import{a as u}from"./app-wordmark-1SRllgHv.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};
1
+ import{r as p,j as c,W as f}from"./inertia-CUTKXjxg.js";import{a as u}from"./app-wordmark-DDNuuq5_.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};
@@ -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-Degv_G9N.js";import{I as O}from"./input-error-C6SqO_iU.js";import{D as E}from"./data-table-IvA7xvrK.js";import{R as se}from"./relative-time-6CoKr1lN.js";import{B as K}from"./badge-CApjyWcg.js";import{B as i}from"./app-wordmark-1SRllgHv.js";import{b as H,c as B,C as M,a as W}from"./card-BaJ8kNkp.js";import{C as U}from"./checkbox-Bf41R8W6.js";import{L as r,I as l}from"./label-B_vK19tR.js";import{A as ne}from"./app-layout-B5Fcdwfz.js";import"./chart-hover-XYPNE2CX.js";import"./empty-state-BFTnQ2oT.js";import"./live-dot-DaXEbkXo.js";import"./index-B0VXzXYG.js";import"./index-CX8Br7m9.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-CUTKXjxg.js";import{I as O}from"./input-error-C8ycyeD0.js";import{D as E}from"./data-table-CwtPkw_i.js";import{R as se}from"./relative-time-CV7V8aSP.js";import{B as K}from"./badge-s7YDycYg.js";import{B as i}from"./app-wordmark-DDNuuq5_.js";import{b as H,c as B,C as M,a as W}from"./card-DiW-JhK3.js";import{C as U}from"./checkbox-C2AqEZXX.js";import{L as r,I as l}from"./label-B32Ks8n7.js";import{A as ne}from"./app-layout-DUk54qUM.js";import"./chart-hover-DMWx5-Rs.js";import"./empty-state-CshhuRUU.js";import"./live-dot-Bb1UYT9F.js";import"./index-n16aviHx.js";import"./index-BpnfuXi-.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};