(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[315],{479:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/jobs/[job]",function(){return t(8099)}])},6639:function(e,s,t){"use strict";t.d(s,{Z:function(){return r}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,t(998).Z)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},3626:function(e,s,t){"use strict";t.d(s,{Z:function(){return r}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,t(998).Z)("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},9307:function(e,s,t){"use strict";t.d(s,{Cl:function(){return c},OE:function(){return d}});var r=t(5893);t(7294);var n=t(8799),l=t(6989),a=t(3850);let c=e=>{switch(e){case"LAUNCHING":return"bg-blue-100 text-sky-blue";case"RUNNING":return"bg-green-50 text-green-700";case"STOPPED":return"bg-yellow-100 text-yellow-800";case"TERMINATED":default:return"bg-gray-100 text-gray-800";case"PENDING":case"CANCELLED":case"CANCELLING":return"bg-yellow-50 text-yellow-700";case"SUCCEEDED":return"bg-blue-50 text-blue-700";case"FAILED":case"FAILED_PRECHECKS":case"FAILED_NO_RESOURCE":case"FAILED_CONTROLLER":return"bg-red-50 text-red-700";case"RECOVERING":return"bg-orange-50 text-orange-700";case"SUBMITTED":return"bg-indigo-50 text-indigo-700";case"STARTING":return"bg-cyan-50 text-cyan-700";case"FAILED_SETUP":return"bg-pink-50 text-pink-700"}},i=e=>{switch(e){case"LAUNCHING":case"STARTING":return(0,r.jsx)(n.Z,{size:12,className:"w-3 h-3 mr-1"});case"RUNNING":default:return(0,r.jsx)(a.W2,{className:"w-3 h-3 mr-1"});case"STOPPED":return(0,r.jsx)(a.fp,{className:"w-3 h-3 mr-1"});case"TERMINATED":case"FAILED":case"CANCELLED":return(0,r.jsx)(a.Ps,{className:"w-3 h-3 mr-1"});case"SUCCEEDED":return(0,r.jsx)(a.Ye,{className:"w-3 h-3 mr-1"});case"PENDING":case"RECOVERING":case"SUBMITTED":case"CANCELLING":case"FAILED_SETUP":case"FAILED_PRECHECKS":case"FAILED_NO_RESOURCE":case"FAILED_CONTROLLER":return(0,r.jsx)(a.J$,{className:"w-3 h-3 mr-1"})}},o=e=>{let s=c(e),t=i(e);return(0,r.jsxs)("span",{className:"".concat("inline-flex items-center px-2 py-1 rounded-full text-sm"," ").concat(s),children:[t,e]})},d=e=>{let{status:s}=e;return(0,r.jsx)(l.WH,{content:s,className:"text-muted-foreground text-sm",children:(0,r.jsx)("span",{children:o(s)})})}},7673:function(e,s,t){"use strict";t.d(s,{Ol:function(){return o},Zb:function(){return i},aY:function(){return m},eW:function(){return x},ll:function(){return d}});var r=t(5893),n=t(7294),l=t(5697),a=t.n(l),c=t(2350);let i=n.forwardRef((e,s)=>{let{className:t,children:n,...l}=e;return(0,r.jsx)("div",{ref:s,className:(0,c.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",t),...l,children:n})});i.displayName="Card",i.propTypes={className:a().string,children:a().node};let o=n.forwardRef((e,s)=>{let{className:t,children:n,...l}=e;return(0,r.jsx)("div",{ref:s,className:(0,c.cn)("flex flex-col space-y-1.5 p-6",t),...l,children:n})});o.displayName="CardHeader",o.propTypes={className:a().string,children:a().node};let d=n.forwardRef((e,s)=>{let{className:t,children:n,...l}=e;return(0,r.jsx)("h3",{ref:s,className:(0,c.cn)("text-2xl font-semibold leading-none tracking-tight",t),...l,children:n})});d.displayName="CardTitle",d.propTypes={className:a().string,children:a().node};let u=n.forwardRef((e,s)=>{let{className:t,children:n,...l}=e;return(0,r.jsx)("p",{ref:s,className:(0,c.cn)("text-sm text-muted-foreground",t),...l,children:n})});u.displayName="CardDescription",u.propTypes={className:a().string,children:a().node};let m=n.forwardRef((e,s)=>{let{className:t,children:n,...l}=e;return(0,r.jsx)("div",{ref:s,className:(0,c.cn)("p-6 pt-0",t),...l,children:n})});m.displayName="CardContent",m.propTypes={className:a().string,children:a().node};let x=n.forwardRef((e,s)=>{let{className:t,children:n,...l}=e;return(0,r.jsx)("div",{ref:s,className:(0,c.cn)("flex items-center p-6 pt-0",t),...l,children:n})});x.displayName="CardFooter",x.propTypes={className:a().string,children:a().node}},8099:function(e,s,t){"use strict";t.r(s);var r=t(5893),n=t(7294),l=t(8799),a=t(1163),c=t(9470),i=t(7673),o=t(8969),d=t(1664),u=t.n(d),m=t(3626),x=t(5895),f=t(6639),g=t(6989),h=t(9307),j=t(3001),N=t(9008),b=t.n(N),p=t(1272);function y(e){let{jobData:s,activeTab:t,setIsLoadingLogs:a,setIsLoadingControllerLogs:c,isLoadingLogs:i,isLoadingControllerLogs:d,refreshFlag:m}=e,[j,N]=(0,n.useState)(""),[b,y]=(0,n.useState)(""),[v,E]=(0,n.useState)(!1),[L,w]=(0,n.useState)({}),[C,R]=(0,n.useState)(0),[S,I]=(0,n.useState)(0),[T,A]=(0,n.useState)(!1),[k,D]=(0,n.useState)(!1),[_,P]=(0,n.useState)(!1),[Z,F]=(0,n.useState)(!1),O=(0,n.useRef)(null),q=(0,n.useRef)(null),M=(0,n.useRef)(null),G=(0,n.useRef)(null),U=(0,n.useRef)(""),H=(0,n.useRef)(""),B=(0,n.useRef)(null);(0,n.useRef)(0);let W=(0,n.useCallback)(e=>{let s="logs"===e?M:G;if(s.current)for(let t of[()=>s.current.querySelector(".logs-container"),()=>s.current.querySelector('[class*="logs-container"]'),()=>s.current.querySelector('div[style*="overflow"]'),()=>s.current]){let s=t();if(s&&s.scrollHeight>s.clientHeight){s.scrollTop=s.scrollHeight,console.log("Auto-scrolled ".concat(e," to bottom"));break}}},[]),Y=["PENDING","SUBMITTED","STARTING"].includes(s.status),J=["PENDING","SUBMITTED"].includes(s.status),$=["RECOVERING"].includes(s.status),z=e=>{w(s=>({...s,[e]:!s[e]}))},V=e=>{if(!e)return[];try{let s=[],t=e.split(/^---$/m);for(let e=0;e<t.length;e++){let r=t[e].trim();r&&""!==r&&s.push(r)}return(s.length>1?s.slice(1):s).map((e,s)=>{try{let t=p.ZP.load(e),r=p.ZP.dump(t,{lineWidth:-1,styles:{"!!str":"literal"},quotingType:"'",forceQuotes:!1,noRefs:!0,sortKeys:!1,condenseFlow:!1,indent:2}).split("\n"),n=[],l=-1;for(let e=0;e<r.length;e++){let s=r[e],t=s.search(/\S/);0===t&&l>=0&&e>0&&n.push(""),n.push(s),l=t}return{index:s,content:n.join("\n").trim(),preview:K(t)}}catch(t){return console.error("YAML formatting error for document ".concat(s,":"),t),{index:s,content:e,preview:"Invalid YAML"}}})}catch(s){return console.error("YAML formatting error:",s),[{index:0,content:e,preview:"Invalid YAML"}]}},K=e=>"string"==typeof e?e.substring(0,50)+"...":e&&e.name?"name: ".concat(e.name):e&&e.resources?"Task configuration":"YAML document";(0,n.useEffect)(()=>{N(""),R(0),F(!1)},[t,s.id]),(0,n.useEffect)(()=>{y(""),I(0),F(!1)},[t,s.id]);let X=(0,n.useCallback)(function(e,s,t,r){let n=arguments.length>4&&void 0!==arguments[4]&&arguments[4],l="logs"===e?O:q;if(l.current)return console.log("Request already active for ".concat(e,", skipping...")),()=>{};let a=!0,c=new AbortController;return"logs"===e&&(Y||$)?(r(!1),n&&A(!1),()=>{}):"controllerlogs"===e&&J?(r(!1),n&&D(!1),()=>{}):s?(l.current=c,r(!0),P(!0),n&&(t(""),"logs"===e?R(0):I(0)),(0,o.NJ)({jobId:s,controller:"controllerlogs"===e,signal:c.signal,onNewLog:s=>{if(a){let t=(0,g.q8)(s);Z||F(!0),Q(e,t),"logs"===e?R(e=>e+t.length):I(e=>e+t.length)}}}).then(()=>{a&&(r(!1),n&&("logs"===e?A(!1):D(!1)),requestAnimationFrame(()=>{W(e)}))}).catch(s=>{a&&("AbortError"!==s.name&&(console.error("Error streaming ".concat(e,":"),s),s.message&&t(e=>e+"Error fetching logs: ".concat(s.message,"\n"))),r(!1),n&&("logs"===e?A(!1):D(!1)))}).finally(()=>{console.log("Cleaning up ".concat(e," request")),a=!1,l.current===c&&(l.current.abort(),l.current=null),"logs"===e?U.current="":H.current="",B.current&&(clearTimeout(B.current),B.current=null)}),()=>{console.log("Cleaning up ".concat(e," request")),a=!1,l.current===c&&(l.current.abort(),l.current=null),"logs"===e?U.current="":H.current="",B.current&&(clearTimeout(B.current),B.current=null)}):()=>{a=!1}},[Y,J,$,Z]);(0,n.useEffect)(()=>{if(O.current&&(O.current.abort(),O.current=null),!Y&&!$)return X("logs",s.id,N,a)},[s.id,X,a,Y,$]),(0,n.useEffect)(()=>{if(q.current&&(q.current.abort(),q.current=null),!J)return X("controllerlogs",s.id,y,c)},[s.id,X,c,J]),(0,n.useEffect)(()=>{if(m>0&&"logs"===t)return O.current&&(O.current.abort(),O.current=null),A(!0),X("logs",s.id,N,a,!0)},[m,t,s.id,X,a]),(0,n.useEffect)(()=>{if(m>0&&"controllerlogs"===t)return q.current&&(q.current.abort(),q.current=null),D(!0),X("controllerlogs",s.id,y,c,!0)},[m,t,s.id,X,c]),(0,n.useEffect)(()=>()=>{console.log("Cleaning up managed job log requests..."),O.current&&(O.current.abort(),O.current=null),q.current&&(q.current.abort(),q.current=null),B.current&&(clearTimeout(B.current),B.current=null),U.current="",H.current="",a(!1),c(!1),A(!1),D(!1)},[]),(0,n.useEffect)(()=>{let e=()=>{document.hidden?(console.log("Page hidden - pausing log streaming for performance"),B.current&&(clearTimeout(B.current),B.current=null)):console.log("Page visible - resuming normal operation")};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[]),(0,n.useEffect)(()=>{let e=()=>{("logs"===t&&j||"controllerlogs"===t&&b)&&W("logs"===t?"logs":"controllerlogs")};requestAnimationFrame(()=>{requestAnimationFrame(e)})},[t,j,b,W]);let Q=(0,n.useCallback)((e,s)=>{("logs"===e?N:y)(e=>e+s),requestAnimationFrame(()=>{W(e)})},[W]);return"logs"===t?(0,r.jsx)("div",{className:"max-h-96 overflow-y-auto",ref:M,children:Y?(0,r.jsx)("div",{className:"bg-[#f7f7f7] flex items-center justify-center py-4 text-gray-500",children:(0,r.jsx)("span",{children:"Waiting for the job to start, please refresh after a while"})}):$?(0,r.jsx)("div",{className:"bg-[#f7f7f7] flex items-center justify-center py-4 text-gray-500",children:(0,r.jsx)("span",{children:"Waiting for the job to recover, please refresh after a while"})}):Z||j?(0,r.jsx)(g.$B,{logs:j}):i?(0,r.jsxs)("div",{className:"flex items-center justify-center py-4",children:[(0,r.jsx)(l.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading logs..."})]}):(0,r.jsx)(g.$B,{logs:j})}):"controllerlogs"===t?(0,r.jsx)("div",{className:"max-h-96 overflow-y-auto",ref:G,children:J?(0,r.jsx)("div",{className:"bg-[#f7f7f7] flex items-center justify-center py-4 text-gray-500",children:(0,r.jsx)("span",{children:"Waiting for the job controller process to start, please refresh after a while"})}):Z||b?(0,r.jsx)(g.$B,{logs:b,controller:!0}):d?(0,r.jsxs)("div",{className:"flex items-center justify-center py-4",children:[(0,r.jsx)(l.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading logs..."})]}):(0,r.jsx)(g.$B,{logs:b,controller:!0})}):(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Job ID (Name)"}),(0,r.jsxs)("div",{className:"text-base mt-1",children:[s.id," ",s.name?"(".concat(s.name,")"):""]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Status"}),(0,r.jsxs)("div",{className:"text-base mt-1 flex items-center",children:[(0,r.jsx)(h.OE,{status:s.status}),s.priority&&(0,r.jsxs)("span",{className:"ml-2",children:[" (priority: ",s.priority,")"]})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"User"}),(0,r.jsx)("div",{className:"text-base mt-1",children:s.user})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Requested Resources"}),(0,r.jsx)("div",{className:"text-base mt-1",children:s.requested_resources||"N/A"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Infra"}),(0,r.jsx)("div",{className:"text-base mt-1",children:s.infra?(0,r.jsx)(g.Md,{content:s.full_infra||s.infra,className:"text-sm text-muted-foreground",children:(0,r.jsxs)("span",{children:[(0,r.jsx)(u(),{href:"/infra",className:"text-blue-600 hover:underline",children:s.cloud||s.infra.split("(")[0].trim()}),s.infra.includes("(")&&(0,r.jsx)("span",{children:" "+s.infra.substring(s.infra.indexOf("("))})]})}):"-"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Resources"}),(0,r.jsx)("div",{className:"text-base mt-1",children:s.resources_str_full||s.resources_str||"-"})]}),(s.entrypoint||s.dag_yaml)&&(0,r.jsxs)("div",{className:"col-span-2",children:[(0,r.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Entrypoint"}),(0,r.jsxs)("div",{className:"space-y-4 mt-3",children:[s.entrypoint&&(0,r.jsx)("div",{children:(0,r.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-md p-3",children:(0,r.jsx)("code",{className:"text-sm text-gray-800 font-mono break-all",children:s.entrypoint})})}),s.dag_yaml&&"{}"!==s.dag_yaml&&(0,r.jsxs)("div",{children:[(0,r.jsx)("button",{onClick:()=>{E(!v)},className:"flex items-center text-left focus:outline-none mb-2 text-gray-700 hover:text-gray-900 transition-colors duration-200",children:(0,r.jsxs)("div",{className:"flex items-center",children:[v?(0,r.jsx)(x.Z,{className:"w-4 h-4 mr-1"}):(0,r.jsx)(f.Z,{className:"w-4 h-4 mr-1"}),(0,r.jsx)("span",{className:"text-base",children:"Show SkyPilot YAML"})]})}),v&&(0,r.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-md p-3 max-h-96 overflow-y-auto",children:(()=>{let e=V(s.dag_yaml);return 0===e.length?(0,r.jsx)("div",{className:"text-gray-500",children:"No YAML available"}):1===e.length?(0,r.jsx)("pre",{className:"text-sm text-gray-800 font-mono whitespace-pre-wrap",children:e[0].content}):(0,r.jsx)("div",{className:"space-y-4",children:e.map((e,s)=>(0,r.jsxs)("div",{className:"border-b border-gray-200 pb-4 last:border-b-0",children:[(0,r.jsx)("button",{onClick:()=>z(s),className:"flex items-center justify-between w-full text-left focus:outline-none",children:(0,r.jsxs)("div",{className:"flex items-center",children:[L[s]?(0,r.jsx)(x.Z,{className:"w-4 h-4 mr-2"}):(0,r.jsx)(f.Z,{className:"w-4 h-4 mr-2"}),(0,r.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Task ",s+1,": ",e.preview]})]})}),L[s]&&(0,r.jsx)("div",{className:"mt-3 ml-6",children:(0,r.jsx)("pre",{className:"text-sm text-gray-800 font-mono whitespace-pre-wrap",children:e.content})})]},s))})})()})]})]})]})]})}s.default=function(){var e;let s=(0,a.useRouter)(),{job:t,tab:d}=s.query,[x,f]=(0,n.useState)(0),{jobData:h,loading:N}=(0,o.UA)(t,x),[p,v]=(0,n.useState)(!1),[E,L]=(0,n.useState)(!0),[w,C]=(0,n.useState)(!1),[R,S]=(0,n.useState)(!1),[I,T]=(0,n.useState)(!1),[A,k]=(0,n.useState)(!1),[D,_]=(0,n.useState)(!1),[P,Z]=(0,n.useState)(0),[F,O]=(0,n.useState)(0),q=(0,j.X)();n.useEffect(()=>{!N&&E&&L(!1)},[N,E]);let M=e=>{let s=document.getElementById(e);s&&s.scrollIntoView({behavior:"smooth"})};(0,n.useEffect)(()=>{k(!0)},[]),(0,n.useEffect)(()=>{if(!D){let e=new MutationObserver(()=>{let s=document.getElementById("logs-section"),t=document.getElementById("controller-logs-section");("logs"===d&&s||"controllerlogs"===d&&t)&&(_(!0),e.disconnect())});return e.observe(document.body,{childList:!0,subtree:!0}),()=>e.disconnect()}},[D,d]),(0,n.useEffect)(()=>{if(s.isReady&&A&&D&&!I){let e=setTimeout(()=>{"logs"===d?(M("logs-section"),T(!0)):"controllerlogs"===d&&(M("controller-logs-section"),T(!0))},800);return()=>clearTimeout(e)}},[s.isReady,d,I,A,D]),(0,n.useEffect)(()=>{T(!1),_(!1)},[d]);let G=async()=>{v(!0);try{f(e=>e+1),Z(e=>e+1),O(e=>e+1)}catch(e){console.error("Error refreshing data:",e)}finally{v(!1)}};if(!s.isReady)return(0,r.jsx)("div",{children:"Loading..."});let U=null==h?void 0:null===(e=h.jobs)||void 0===e?void 0:e.find(e=>String(e.id)===String(t)),H=t?"Job: ".concat(t," | SkyPilot Dashboard"):"Job Details | SkyPilot Dashboard";return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b(),{children:(0,r.jsx)("title",{children:H})}),(0,r.jsxs)(c.A,{highlighted:"managed-jobs",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{className:"text-base flex items-center",children:[(0,r.jsx)(u(),{href:"/jobs",className:"text-sky-blue hover:underline",children:"Managed Jobs"}),(0,r.jsx)("span",{className:"mx-2 text-gray-500",children:"›"}),(0,r.jsxs)(u(),{href:"/jobs/".concat(t),className:"text-sky-blue hover:underline",children:[t," ",(null==U?void 0:U.name)?"(".concat(U.name,")"):""]})]}),(0,r.jsxs)("div",{className:"text-sm flex items-center",children:[(N||p||w||R)&&(0,r.jsxs)("div",{className:"flex items-center mr-4",children:[(0,r.jsx)(l.Z,{size:15,className:"mt-0"}),(0,r.jsx)("span",{className:"ml-2 text-gray-500",children:"Loading..."})]}),(0,r.jsx)(g.WH,{content:"Refresh",className:"text-muted-foreground",children:(0,r.jsxs)("button",{onClick:G,disabled:N||p,className:"text-sky-blue hover:text-sky-blue-bright font-medium inline-flex items-center h-8",children:[(0,r.jsx)(m.Z,{className:"w-4 h-4 mr-1.5"}),!q&&(0,r.jsx)("span",{children:"Refresh"})]})})]})]}),N&&E?(0,r.jsxs)("div",{className:"flex items-center justify-center py-32",children:[(0,r.jsx)(l.Z,{size:20,className:"mr-2"}),(0,r.jsx)("span",{children:"Loading..."})]}):U?(0,r.jsxs)("div",{className:"space-y-8",children:[(0,r.jsx)("div",{id:"details-section",children:(0,r.jsxs)(i.Zb,{children:[(0,r.jsx)("div",{className:"flex items-center justify-between px-4 pt-4",children:(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Details"})}),(0,r.jsx)("div",{className:"p-4",children:(0,r.jsx)(y,{jobData:U,activeTab:"info",setIsLoadingLogs:C,setIsLoadingControllerLogs:S,isLoadingLogs:w,isLoadingControllerLogs:R,refreshFlag:0})})]})}),(0,r.jsx)("div",{id:"logs-section",className:"mt-6",children:(0,r.jsxs)(i.Zb,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 pt-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Logs"}),(0,r.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:"(Logs are not streaming; click refresh to fetch the latest logs.)"})]}),(0,r.jsx)(g.WH,{content:"Refresh logs",className:"text-muted-foreground",children:(0,r.jsx)("button",{onClick:()=>{Z(e=>e+1)},disabled:w,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:(0,r.jsx)(m.Z,{className:"w-4 h-4 ".concat(w?"animate-spin":"")})})})]}),(0,r.jsx)("div",{className:"p-4",children:(0,r.jsx)(y,{jobData:U,activeTab:"logs",setIsLoadingLogs:C,setIsLoadingControllerLogs:S,isLoadingLogs:w,isLoadingControllerLogs:R,refreshFlag:P})})]})}),(0,r.jsx)("div",{id:"controller-logs-section",className:"mt-6",children:(0,r.jsxs)(i.Zb,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-4 pt-4",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Controller Logs"}),(0,r.jsx)("span",{className:"ml-2 text-xs text-gray-500",children:"(Logs are not streaming; click refresh to fetch the latest logs.)"})]}),(0,r.jsx)(g.WH,{content:"Refresh controller logs",className:"text-muted-foreground",children:(0,r.jsx)("button",{onClick:()=>{O(e=>e+1)},disabled:R,className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:(0,r.jsx)(m.Z,{className:"w-4 h-4 ".concat(R?"animate-spin":"")})})})]}),(0,r.jsx)("div",{className:"p-4",children:(0,r.jsx)(y,{jobData:U,activeTab:"controllerlogs",setIsLoadingLogs:C,setIsLoadingControllerLogs:S,isLoadingLogs:w,isLoadingControllerLogs:R,refreshFlag:F})})]})})]}):(0,r.jsx)("div",{className:"flex items-center justify-center py-32",children:(0,r.jsx)("span",{children:"Job not found"})})]})]})}}},function(e){e.O(0,[614,798,470,969,888,774,179],function(){return e(e.s=479)}),_N_E=e.O()}]);