PageSourceSearch

https://console.sleakops.com/_next/static/chunks/pages/hooks/[id]/edit-77869166ccc6bc33.js

js sleakops.com collected 2026-10-04 19:23:38 UTC 6,089 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4809],{757:(e,t,l)=>{"use strict";l.d(t,{A:()=>u});var r=l(37876),n=l(61710),i=l(84307),s=l(62001),o=l(13368),a=l(9887),d=l(67524),c=l(14475);let u=e=>{let{handleBack:t,handleReload:l,errorCode:u}=e;return(0,r.jsxs)(n.a,{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"100vh",textAlign:"center",py:10,px:6,children:[404!==u?(0,r.jsx)(n.a,{display:"inline-block",children:(0,r.jsx)(i.s,{flexDirection:"column",justifyContent:"center",alignItems:"center",bg:"red.500",rounded:"50px",w:"55px",h:"55px",textAlign:"center",children:(0,r.jsx)(c.uv,{boxSize:"20px",color:"white"})})}):(0,r.jsx)(s.D,{display:"inline-block",as:"h2",size:"2xl",bgGradient:"to-r",graduentFrom:"blue.400",graduentTo:"blue.600",backgroundClip:"text",children:"404"}),(0,r.jsx)(s.D,{as:"h2",size:"lg",mt:6,mb:2,children:"Oops! Something went wrong."}),(0,r.jsx)(o.E,{color:"gray.500",children:"We couldn't load the data you requested. Please try the following:"}),(0,r.jsxs)(a.B,{direction:"row",alignItems:"center",justifyContent:"center",w:"100%",pt:6,children:[(0,r.jsx)(d.$,{onClick:()=>t(),children:"Go Back"}),404!==u&&(0,r.jsx)(d.$,{onClick:()=>l(),rightIcon:(0,r.jsx)(c.qU,{}),children:"Reload Form"})]})]})}},11229:(e,t,l)=>{"use strict";l.d(t,{G:()=>s});var r=l(75656),n=l(32487),i=l(8965);let s=function(e,t){var l,s;let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3?arguments[3]:void 0,d=e?"".concat(t).concat(e,"/"):null,c=o?i.Ay:n.Ay,u=o?i.xt:n.Tm,{data:h,error:x,isLoading:p,mutate:g}=(0,r.Ay)(d,a?e=>u(e,a):c,{revalidateOnFocus:!1,revalidateOnReconnect:!1,revalidateIfStale:!1});return{data:null!=h?h:null,errorCode:null!=(s=null==x||null==(l=x.response)?void 0:l.status)?s:null,isLoading:p,reloadData:g}}},61148:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/hooks/[id]/edit",function(){return l(94467)}])},94467:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>W});var r=l(37876),n=l(14232),i=l(89099),s=l(81805),o=l(47501),a=l(86435),d=l(61710),c=l(52914),u=l(13368),h=l(62427),x=l(67524),p=l(5068),g=l(79829),j=l(28331),b=l(62770),m=l(82767),f=l(71555),v=l(8178),y=l(69775),k=l(40595),E=l(53912),S=l(30301),w=l(34386),A=l(62081),C=l(68634),z=l(3394);let _=e=>{let{data:t,onSuccess:l,onCancel:s}=e,_=(0,i.useRouter)(),N=(0,n.useRef)(null),P=(0,n.useRef)(null),[R,T]=(0,n.use
1State)(!0),[D,I]=(0,n.useState)(0),O=(0,S.f)(w.UT.map((e,t)=>"step-".concat(t)),{rootMargin:"-10% 0px -70% 0px"});(0,n.useEffect)(()=>{if(O){let e=parseInt(O.replace("step-",""),10);isNaN(e)||I(e)}},[O]);let W=(0,A.I)(t),q=(0,C.M)(),F=async(e,r)=>{r.setSubmitting(!0);let n=(0,z.S)(e,{deploy:R});try{let e=await p.A.patch("service/".concat(t.id,"/"),n);await (0,g.j)("/service/".concat(t.id,"/"),void 0,{revalidate:!1}),_.push("/hooks/"),l&&l(e.data,r)}catch(e){var i,s,o,a,d,c;r.setSubmitting(!1),(null==e||null==(i=e.response)?void 0:i.data)&&(r.setErrors(e.response.data),null==(o=P.current)||o.call(P,e.response.data)),[405,412,428].includes(null!=(a=null==e||null==(s=e.response)?void 0:s.status)?a:0)||j.X.create({title:"Error",description:(null==e||null==(c=e.response)||null==(d=c.data)?void 0:d.detail)||(null==e?void 0:e.message)||"An error occurred. Please try again.",type:"error",duration:4e3,meta:{closable:!0}})}},H=()=>{s?s():_.back()};return(0,r.jsx)(f.A,{initialValues:W,validationSchema:q,onSubmit:F,stepFieldNames:w.Py,formikRef:N,scrollToErrorRef:P,children:e=>{let{projectEnvData:t,isSpotNodepool:l,formik:n}=e;return(0,r.jsxs)(o.x,{templateColumns:{base:"1fr",md:"260px 1fr"},gap:{base:6,md:8},minH:"500px",children:[(0,r.jsx)(a.E,{children:(0,r.jsx)(m.A,{icon:(0,r.jsx)(E.A,{}),title:"Hook Config",wizardLabel:"DEPLOYMENT WIZARD",steps:w.UT,stepFieldNames:w.Py,quickTip:w.MM,activeStep:D,formikErrors:n.errors,projectEnvId:null==t?void 0:t.id})}),(0,r.jsx)(a.E,{children:(0,r.jsxs)(d.a,{position:"relative",children:[(0,r.jsx)(d.a,{display:"flex",flexDirection:"column",gap:8,mb:10,children:w.UT.map((e,t)=>(0,r.jsxs)(d.a,{id:"step-".concat(t),borderWidth:"1px",borderColor:"border.muted",overflow:"hidden",bg:"bg.card",children:[(0,r.jsxs)(d.a,{px:6,pt:6,pb:4,children:[(0,r.jsxs)(c.z,{gap:3,align:"baseline",mb:1,children:[(0,r.jsx)(u.E,{fontWeight:"bold",fontSize:"3xl",color:"fg.subtle",lineHeight:"1",children:String(t+1).padStart(2,"0")}),(0,r.jsx)(u.E,{fontWeight:"bold",fontSize:"2xl",color:"fg",lineHeight:"1",children:e.title})]}),e.description&&(0,r.jsx)(u.E,{fontSize:"sm",color:"fg.muted",mt:2,children:e.description})]}),(0,r.jsx)(h.w,{borderColor:"border.muted"}),(0,r.jsxs)(d.a,{px:6,py:6,children:[0===t&&(0,r.jsx)(v.A,{readOnly:!0}),1===t&&(0,r.jsx)(y.A,{}),2===t&&(0,r.jsx)(k.A,{isSpotNodepool:l})]})]},t))}),(0,r.jsx)(d.a,{px:6,py:4,bg:"bg.subtle",borderWidth:"1px",borderColor:"border.muted",children:(0,r.jsxs)(c.z,{justify:"space-between",align:"center",children:[(0,r.jsx)(x.$,{variant:"ghost",onClick:H,children:"Cancel"}),(0,r.jsxs)(c.z,{gap:4,children:[(0,r.jsxs)(c.z,{gap:2,align:"center",children:[(0,r.jsx)(u.E,{fontSize:"sm",fontWeight:"medium",color:"fg.muted",children:"Deploy?"}),(0,r.jsx)(b.d,{checked:R,onCheckedChange:e=>T(e.checked),colorPalette:"green"})]}),(0,r.jsx)(x.$,{type:"submit",colorPalette:"cyan",loading:n.isSubmitting,disabled:n.isSubmitting,children:"Save Changes"})]})]})})]})})]})}})};var N=l(757),P=l(11229),R=l(84307),T=l(36875),D=l(21891),I=l(32296);let O=()=>{let e=(0,i.useRouter)(),{id:t}=e.query,l="string"==typeof t?t:Array.isArray(t)?t[0]:void 0,{data:n,errorCode:s,reloadData:o,isLoading:a}=(0,P.G)(l,"/service/");return a?(0,r.jsx)(R.s,{justify:"center",align:"center",height:"100vh",children:(0,r.jsx)(T.y,{size:"xl"})}):s?(0,r.jsx)(N.A,{handleBack:e.back,handleReload:o,errorCode:s}):n?(0,r.jsx)(_,{data:n}):void 0};O.requireAuth=!0,O.getLayout=e=>(0,r.jsx)(s.A,{title:"Edit Hook",icon:D.X.workloads.icon,helpPath:I.O.hook,children:e});let W=O}},e=>{e.O(0,[9004,3519,6855,1805,5439,8118,6869,8266,636,6593,8792],()=>e(e.s=61148)),_N_E=e.O()}]);
2//# sourceMappingURL=edit-77869166ccc6bc33.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.