The only tool you need to know what is happening and how to fix it.
Go alertingexception-trackerissue-trackinglogsmetricsmonitoringobservability-platformopen-telemetryotelsession-replaytelemetrytraces
import"./DsnmJJEf.js";import{p as it,b as dt,l as i,j as M,c as z,f as d,e as g,n as A,t as y,d as t,m,h as G,g as e,r as H,o as J,q as K,v as mt,u as Q,a as ct}from"./BKFspo1J.js";import{i as ft}from"./COK9M2N0.js";import{c}from"./CWm9VMfX.js";import{p as k}from"./CARHnQ8P.js";import{a as pt,g as ut}from"./CqMCVSVw.js";import{A as _t,a as vt,b as gt,c as $t,d as ht,e as Pt}from"./BHE_uV_q.js";import{B as wt}from"./DY5VVhnr.js";import{A as bt}from"./z6K29BOV.js";import{I as xt}from"./DGTs9ijT.js";import{L as At}from"./CfoMaPyy.js";import{E as yt}from"./CGiec90h.js";import{a as It,t as Et,p as jt}from"./BrdmM8Kw.js";import{g as Lt}from"./Cv0CJCi1.js";import{r as Mt}from"./UDuKBjKQ.js";import{P as kt}from"./MS5-RPlv.js";var Nt=g(`<!> The post-mortem is created right away; you write the document, add tags, and manage the incident
link on the next screen.`,1),Bt=g("<!> <!>",1),St=g("<!> ",1),Ct=g("<!> <!>",1),Tt=g('<!> <form class="space-y-4"><!> <div class="space-y-2"><!> <!></div></form> <!>',1);function ee(R,$){it($,!0);let h=k($,"open",15),I=k($,"incidentId",3,null),U=k($,"incidentLabel",3,"");const N=Q(()=>jt.currentProjectId);let P=M(""),s=M(!1),w=M("");dt(()=>{h()&&(i(P,""),i(w,""))});async function B(){if(e(N)!==null){i(s,!0),i(w,"");try{const n=await It.post("/post-mortems",{title:e(P),contentMd:"",tags:[],incidentId:I()},{projectId:e(N)??void 0});Et.success("Successfully created the Post-Mortem",{position:"top-center"}),h(!1),Lt(Mt(`/monitors/post-mortems/${n.id}`))}catch(n){pt(n)!==403&&i(w,n instanceof Error?ut(n):"Failed to create the post-mortem",!0)}finally{i(s,!1)}}}var S=z(),V=d(S);c(V,()=>Pt,(n,X)=>{X(n,{get open(){return h()},set open(E){h(E)},children:(E,qt)=>{var C=z(),Y=d(C);{let Z=Q(()=>e(s)?"ignore":"close");c(Y,()=>_t,(tt,et)=>{et(tt,{class:"sm:max-w-md",get interactOutsideBehavior(){return e(Z)},children:(rt,Dt)=>{var T=Tt(),q=d(T);c(q,()=>vt,(r,x)=>{x(r,{children:(p,st)=>{var u=Bt(),_=d(u);c(_,()=>gt,(l,f)=>{f(l,{children:(o,v)=>{A();var a=y("New Post-Mortem");t(o,a)},$$slots:{default:!0}})});var j=m(_,2);c(j,()=>$t,(l,f)=>{f(l,{children:(o,v)=>{var a=Nt(),nt=d(a);{var lt=L=>{var W=y();J(()=>K(W,`Linked to: ${(U()||`incident #${I()}`)??""}.`)),t(L,W)};ft(nt,L=>{I()&&L(lt)})}A(),t(o,a)},$$slots:{default:!0}})}),t(p,u)},$$slots:{default:!0}})});var b=m(q,2),D=G(b);yt(D,{get error(){return e(w)}});var F=m(D,2),O=G(F);At(O,{for:"new-post-mortem-title",children:(r,x)=>{A();var p=y("Title");t(r,p)},$$slots:{default:!0}});var ot=m(O,2);xt(ot,{id:"new-post-mortem-title",placeholder:"What went wrong, in one line",get disabled(){return e(s)},get value(){return e(P)},set value(r){i(P,r,!0)}}),H(F),H(b);var at=m(b,2);c(at,()=>ht,(r,x)=>{x(r,{children:(p,st)=>{var u=Ct(),_=d(u);c(_,()=>bt,(l,f)=>{f(l,{get disabled(){return e(s)},children:(o,v)=>{A();var a=y("Cancel");t(o,a)},$$slots:{default:!0}})});var j=m(_,2);wt(j,{variant:"success",onclick:B,get disabled(){return e(s)},children:(l,f)=>{var o=St(),v=d(o);kt(v,{class:"mr-2 h-4 w-4"});var a=m(v);J(()=>K(a,` ${e(s)?"Creating...":"New Post-Mortem"}`)),t(l,o)},$$slots:{default:!0}}),t(p,u)},$$slots:{default:!0}})}),mt("submit",b,r=>{r.preventDefault(),B()}),t(rt,T)},$$slots:{default:!0}})})}t(E,C)},$$slots:{default:!0}})}),t(R,S),ct()}export{ee as N};