(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[469],{512:function(e,n,t){Promise.resolve().then(t.bind(t,4646))},4646:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return ServicePage}});var s=t(7437),r=t(1396),a=t.n(r),l=t(4033),i=t(9394),c=t(2067),o=t.n(c),d=t(2333),u=t(1628);function ServicePage(){var e,n;let t=(0,l.useSearchParams)(),r=t.get("serviceId"),{data:c,error:f}=(0,d.ZP)("/api/services/".concat(r),e=>fetch(e).then(e=>e.json()),{refreshInterval:5e3}),{data:h}=(0,d.ZP)("/api/services/".concat(r,"/container_logs"),e=>fetch(e).then(e=>e.json()),{refreshInterval:5e3});return c&&(null==c?void 0:c.detail)&&(window.location.href="/"),(0,s.jsx)("section",{className:"container grid items-center gap-6 pb-8 pt-6 md:py-10",children:(0,s.jsxs)("div",{className:"flex max-w-[980px] flex-col items-start gap-2",children:[(0,s.jsx)(a(),{href:"/",className:"text-xl mb-2",children:"◄ Back to Services"}),(0,s.jsx)("h1",{className:"text-2xl font-extrabold leading-tight tracking-tighter md:text-4xl",children:null==c?void 0:c.name}),c&&(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("span",{className:"font-bold mr-2",children:"Status:"}),(0,s.jsx)(i.J$M,{className:(0,u.cn)("mr-1 h-4 w-4",(null==c?void 0:c.status)==="online"?"fill-green-500 text-green-400":"fill-orange-500 text-orange-400")}),null==c?void 0:null===(n=c.status)||void 0===n?void 0:null===(e=n.toUpperCase())||void 0===e?void 0:e.replaceAll("_"," ")]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"font-bold mr-2",children:"Description:"}),null==c?void 0:c.description]}),(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("span",{className:"font-bold mr-2",children:"Created:"}),o()(null==c?void 0:c.created_at).format("LLL")]}),(0,s.jsx)("div",{className:"bg-gray-900 text-white p-2 rounded-md h-[500px] overflow-y-auto w-full",dangerouslySetInnerHTML:{__html:h},defaultValue:"Loading..."})]})})}},1628:function(e,n,t){"use strict";t.d(n,{cn:function(){return cn}});var s=t(348),r=t(3986);function cn(){for(var e=arguments.length,n=Array(e),t=0;t<e;t++)n[t]=arguments[t];return(0,r.m)((0,s.W)(n))}},4033:function(e,n,t){e.exports=t(94)}},function(e){e.O(0,[310,990,64,338,971,472,744],function(){return e(e.s=512)}),_N_E=e.O()}]);