This commit is contained in:
2026-03-14 08:49:12 +01:00
parent 971695c6c2
commit c5bbe1361a
52 changed files with 363 additions and 80 deletions
@@ -1 +0,0 @@
self.__BUILD_MANIFEST=function(s,a,e,c,t,i,n,d,u){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[s,e,a,c,u,t,i,"static/chunks/pages/index-5ce092dbf4b7ea2c.js"],"/404":[s,a,"static/chunks/pages/404-8292e1046538596b.js"],"/_error":["static/chunks/pages/_error-10090a8ee211d5fd.js"],"/admin":[s,e,a,c,t,i,n,d,"static/chunks/pages/admin-8a0fdb80e9b4248f.js"],"/admin/services":[s,e,a,c,t,i,n,d,"static/chunks/pages/admin/services-68efb2b49e62c913.js"],"/admin/services/[service_name]":[s,e,a,c,t,i,n,d,"static/chunks/pages/admin/services/[service_name]-0049c2898ea64cc0.js"],"/admin/settings":[s,e,a,c,t,i,n,"static/chunks/pages/admin/settings-f58d63b2752f72a6.js"],"/admin/users":[s,e,a,c,t,n,"static/chunks/pages/admin/users-73e9775838b56d95.js"],"/admin/users/add-user":[s,e,a,c,t,i,n,"static/chunks/pages/admin/users/add-user-1db7c9ee89830b5b.js"],"/admin/users/[deployment_user_id]":[s,e,"static/chunks/ff39441c-88f593a46cb65964.js","static/chunks/d848df63-a470d32e7be4bfe3.js",a,c,"static/chunks/281-dcee0c6401936d5e.js",t,i,n,"static/chunks/pages/admin/users/[deployment_user_id]-fb1c3c9148c518cd.js"],"/auth/login":[s,e,a,c,u,t,i,"static/chunks/pages/auth/login-3f936f997e58438c.js"],"/auth/logout":[s,a,"static/chunks/pages/auth/logout-c8b207f96be4f684.js"],"/auth/signup":[s,e,a,c,t,i,"static/chunks/pages/auth/signup-5c0f6835749e755e.js"],sortedPages:["/","/404","/_app","/_error","/admin","/admin/services","/admin/services/[service_name]","/admin/settings","/admin/users","/admin/users/add-user","/admin/users/[deployment_user_id]","/auth/login","/auth/logout","/auth/signup"]}}("static/chunks/29107295-2819ba6e51dbf961.js","static/chunks/664-e347d64e56042a02.js","static/chunks/e5d67320-ccbab4288ca637ad.js","static/chunks/433-ace0b205fb566ad3.js","static/chunks/7-f0121001f735b8fe.js","static/chunks/827-7975edcf8481ec69.js","static/chunks/910-215ca9612c9e2400.js","static/chunks/464-f898cadde407dd9f.js","static/chunks/225-f257bb5bd6014d68.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[964],{64830:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin",function(){return s(9854)}])},49533:function(e,n,s){"use strict";s.d(n,{Z:function(){return _}});var r=s(85893),i=s(5606),t=s(60),l=s(67294),c=s(55412),a=s(86609),d=s(94655);function o(e){let{link:n,icon:s,...i}=e;return(0,r.jsx)(a.Z,{href:n.url,...i,...n.linkProps,children:(0,r.jsxs)(d.Z,{children:[(0,r.jsx)("span",{children:n.title}),s||(0,r.jsx)(c.Z,{size:17})]})})}var u=s(56211),v=s(45377),x=s(39483),f=s(25808),m=s(96486),p=s.n(m);function j(e){let{service:n}=e,{pageProps:s,ws:c}=(0,l.useContext)(i.AppContext),{deployment:a}=s,{ready:m,setReady:j}=(0,f.Z)(),_=null==a?void 0:a.services.filter(e=>e.parent_service_name==n.service_name),h=[n,..._||[]],[Z,g]=(0,l.useState)(null==h?void 0:h[0]);h.findIndex(e=>e.service_name==(null==Z?void 0:Z.service_name));let N=null==Z?void 0:Z.servers,[w,C]=(0,l.useState)(null==N?void 0:N[0]),k=(0,l.useRef)(void 0);return(0,l.useEffect)(()=>{var e;C(null==Z?void 0:null===(e=Z.servers)||void 0===e?void 0:e[0])},[Z]),(0,l.useEffect)(()=>{if(j(!1),w&&k.current){var e;e=k.current,c.sendData({event:"client:kill-port",server:w,service:p().omit(n,["servers"]),port:e})}setTimeout(()=>{j(!0)},2e3)},[w]),(0,r.jsxs)(t.Z,{className:"grid-cell",children:[(0,r.jsxs)(t.Z,{className:"grid-cell-content",children:[(0,r.jsxs)(d.Z,{className:"w-full justify-between",children:[(0,r.jsx)(u.Z,{children:n.service_name}),(0,r.jsx)(o,{link:{url:"/admin/services/".concat(n.service_name),title:"View"}})]}),(0,r.jsxs)("code",{children:[n.service_name," service"]})]}),(0,r.jsx)("hr",{}),(0,r.jsxs)(t.Z,{className:"gap-0",children:[(0,r.jsxs)(d.Z,{className:"p-4 grid md:grid-cols-2",children:[(0,r.jsx)(x.Z,{options:h.map((e,n)=>({value:e.service_name,title:"Cluster #".concat(n+1)})),changeHandler:e=>{g(h.find(n=>n.service_name==e))}}),N?(0,r.jsx)(x.Z,{options:N.map(e=>({value:e.private_ip,title:e.private_ip})),changeHandler:e=>{C(N.find(n=>n.private_ip==e))}}):void 0]}),m&&w?(0,r.jsx)(v.Z,{server:w,service:n,portRef:k}):void 0]})]})}function _(){let{pageProps:e}=(0,l.useContext)(i.AppContext),{deployment:n,children_services:s}=e,c=null==n?void 0:n.services.filter(e=>!e.parent_service_name);return(0,r.jsx)(t.Z,{className:"w-full nested-grid-frame xl:grid-cols-2",children:null==c?void 0:c.map((e,n)=>(0,r.jsx)(j,{service:e},n))})}},9854:function(e,n,s){"use strict";s.r(n),s.d(n,{__N_SSP:function(){return p},default:function(){return j}});var r=s(85893),i=s(5606),t=s(94655),l=s(3668),c=s(60),a=s(67294);function d(){let{pageProps:e}=(0,a.useContext)(i.AppContext),{user:n,deployment:s,deployment_id:d}=e;if(!s)return null;let o=s.services.filter(e=>!e.parent_service_name);return(0,r.jsx)(c.Z,{className:"w-full gap-0",children:(0,r.jsxs)(c.Z,{className:"grid-cell-content",children:[(0,r.jsxs)(l.Z,{children:[o.length," Services"]}),(0,r.jsx)(t.Z,{children:o.map((e,n)=>(0,r.jsx)("a",{href:"/admin/services/".concat(e.service_name),children:(0,r.jsx)("code",{children:e.service_name})},n))})]})})}var o=s(33028),u=s(38249),v=s(60705),x=s(49533);function f(){let{pageProps:e}=(0,a.useContext)(i.AppContext),{user:n,deployment:s,deployment_id:t}=e,l=null==s?void 0:s.deployment_name;return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)(o.Z,{title:"".concat((0,u.Z)(l)," Deplyoment Dashboard"),description:(0,r.jsxs)(r.Fragment,{children:["Deployment"," ",(0,r.jsx)("code",{children:null==t?void 0:t.split("-").shift()})," > ",(0,r.jsx)("code",{children:null==s?void 0:s.deployment_name})]})}),(0,r.jsx)(v.Z,{}),(0,r.jsx)(d,{}),(0,r.jsx)(v.Z,{}),(0,r.jsx)(x.Z,{})]})}var m=s(89350),p=!0;function j(){return(0,r.jsx)(m.Z,{children:(0,r.jsx)(f,{})})}}},function(e){e.O(0,[662,75,664,433,7,827,910,464,888,774,179],function(){return e(e.s=64830)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[964],{64830:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin",function(){return s(9854)}])},49533:function(e,n,s){"use strict";s.d(n,{Z:function(){return _}});var r=s(85893),i=s(5606),t=s(60),l=s(67294),c=s(55412),a=s(86609),d=s(94655);function o(e){let{link:n,icon:s,...i}=e;return(0,r.jsx)(a.Z,{href:n.url,...i,...n.linkProps,children:(0,r.jsxs)(d.Z,{children:[(0,r.jsx)("span",{children:n.title}),s||(0,r.jsx)(c.Z,{size:17})]})})}var u=s(56211),v=s(1765),x=s(39483),f=s(25808),m=s(96486),p=s.n(m);function j(e){let{service:n}=e,{pageProps:s,ws:c}=(0,l.useContext)(i.AppContext),{deployment:a}=s,{ready:m,setReady:j}=(0,f.Z)(),_=null==a?void 0:a.services.filter(e=>e.parent_service_name==n.service_name),h=[n,..._||[]],[Z,g]=(0,l.useState)(null==h?void 0:h[0]);h.findIndex(e=>e.service_name==(null==Z?void 0:Z.service_name));let N=null==Z?void 0:Z.servers,[w,C]=(0,l.useState)(null==N?void 0:N[0]),k=(0,l.useRef)(void 0);return(0,l.useEffect)(()=>{var e;C(null==Z?void 0:null===(e=Z.servers)||void 0===e?void 0:e[0])},[Z]),(0,l.useEffect)(()=>{if(j(!1),w&&k.current){var e;e=k.current,c.sendData({event:"client:kill-port",server:w,service:p().omit(n,["servers"]),port:e})}setTimeout(()=>{j(!0)},2e3)},[w]),(0,r.jsxs)(t.Z,{className:"grid-cell",children:[(0,r.jsxs)(t.Z,{className:"grid-cell-content",children:[(0,r.jsxs)(d.Z,{className:"w-full justify-between",children:[(0,r.jsx)(u.Z,{children:n.service_name}),(0,r.jsx)(o,{link:{url:"/admin/services/".concat(n.service_name),title:"View"}})]}),(0,r.jsxs)("code",{children:[n.service_name," service"]})]}),(0,r.jsx)("hr",{}),(0,r.jsxs)(t.Z,{className:"gap-0",children:[(0,r.jsxs)(d.Z,{className:"p-4 grid md:grid-cols-2",children:[(0,r.jsx)(x.Z,{options:h.map((e,n)=>({value:e.service_name,title:"Cluster #".concat(n+1)})),changeHandler:e=>{g(h.find(n=>n.service_name==e))}}),N?(0,r.jsx)(x.Z,{options:N.map(e=>({value:e.private_ip,title:e.private_ip})),changeHandler:e=>{C(N.find(n=>n.private_ip==e))}}):void 0]}),m&&w?(0,r.jsx)(v.Z,{server:w,service:n,portRef:k}):void 0]})]})}function _(){let{pageProps:e}=(0,l.useContext)(i.AppContext),{deployment:n,children_services:s}=e,c=null==n?void 0:n.services.filter(e=>!e.parent_service_name);return(0,r.jsx)(t.Z,{className:"w-full nested-grid-frame xl:grid-cols-2",children:null==c?void 0:c.map((e,n)=>(0,r.jsx)(j,{service:e},n))})}},9854:function(e,n,s){"use strict";s.r(n),s.d(n,{__N_SSP:function(){return p},default:function(){return j}});var r=s(85893),i=s(5606),t=s(94655),l=s(3668),c=s(60),a=s(67294);function d(){let{pageProps:e}=(0,a.useContext)(i.AppContext),{user:n,deployment:s,deployment_id:d}=e;if(!s)return null;let o=s.services.filter(e=>!e.parent_service_name);return(0,r.jsx)(c.Z,{className:"w-full gap-0",children:(0,r.jsxs)(c.Z,{className:"grid-cell-content",children:[(0,r.jsxs)(l.Z,{children:[o.length," Services"]}),(0,r.jsx)(t.Z,{children:o.map((e,n)=>(0,r.jsx)("a",{href:"/admin/services/".concat(e.service_name),children:(0,r.jsx)("code",{children:e.service_name})},n))})]})})}var o=s(33028),u=s(38249),v=s(60705),x=s(49533);function f(){let{pageProps:e}=(0,a.useContext)(i.AppContext),{user:n,deployment:s,deployment_id:t}=e,l=null==s?void 0:s.deployment_name;return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)(o.Z,{title:"".concat((0,u.Z)(l)," Deplyoment Dashboard"),description:(0,r.jsxs)(r.Fragment,{children:["Deployment"," ",(0,r.jsx)("code",{children:null==t?void 0:t.split("-").shift()})," > ",(0,r.jsx)("code",{children:null==s?void 0:s.deployment_name})]})}),(0,r.jsx)(v.Z,{}),(0,r.jsx)(d,{}),(0,r.jsx)(v.Z,{}),(0,r.jsx)(x.Z,{})]})}var m=s(89350),p=!0;function j(){return(0,r.jsx)(m.Z,{children:(0,r.jsx)(f,{})})}}},function(e){e.O(0,[662,75,664,433,7,827,910,926,888,774,179],function(){return e(e.s=64830)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[148],{55634:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/services",function(){return s(78701)}])},49533:function(e,n,s){"use strict";s.d(n,{Z:function(){return j}});var i=s(85893),r=s(5606),t=s(60),l=s(67294),c=s(55412),a=s(86609),o=s(94655);function u(e){let{link:n,icon:s,...r}=e;return(0,i.jsx)(a.Z,{href:n.url,...r,...n.linkProps,children:(0,i.jsxs)(o.Z,{children:[(0,i.jsx)("span",{children:n.title}),s||(0,i.jsx)(c.Z,{size:17})]})})}var d=s(56211),v=s(1765),f=s(39483),p=s(25808),x=s(96486),m=s.n(x);function _(e){let{service:n}=e,{pageProps:s,ws:c}=(0,l.useContext)(r.AppContext),{deployment:a}=s,{ready:x,setReady:_}=(0,p.Z)(),j=null==a?void 0:a.services.filter(e=>e.parent_service_name==n.service_name),h=[n,...j||[]],[Z,N]=(0,l.useState)(null==h?void 0:h[0]);h.findIndex(e=>e.service_name==(null==Z?void 0:Z.service_name));let g=null==Z?void 0:Z.servers,[w,C]=(0,l.useState)(null==g?void 0:g[0]),k=(0,l.useRef)(void 0);return(0,l.useEffect)(()=>{var e;C(null==Z?void 0:null===(e=Z.servers)||void 0===e?void 0:e[0])},[Z]),(0,l.useEffect)(()=>{if(_(!1),w&&k.current){var e;e=k.current,c.sendData({event:"client:kill-port",server:w,service:m().omit(n,["servers"]),port:e})}setTimeout(()=>{_(!0)},2e3)},[w]),(0,i.jsxs)(t.Z,{className:"grid-cell",children:[(0,i.jsxs)(t.Z,{className:"grid-cell-content",children:[(0,i.jsxs)(o.Z,{className:"w-full justify-between",children:[(0,i.jsx)(d.Z,{children:n.service_name}),(0,i.jsx)(u,{link:{url:"/admin/services/".concat(n.service_name),title:"View"}})]}),(0,i.jsxs)("code",{children:[n.service_name," service"]})]}),(0,i.jsx)("hr",{}),(0,i.jsxs)(t.Z,{className:"gap-0",children:[(0,i.jsxs)(o.Z,{className:"p-4 grid md:grid-cols-2",children:[(0,i.jsx)(f.Z,{options:h.map((e,n)=>({value:e.service_name,title:"Cluster #".concat(n+1)})),changeHandler:e=>{N(h.find(n=>n.service_name==e))}}),g?(0,i.jsx)(f.Z,{options:g.map(e=>({value:e.private_ip,title:e.private_ip})),changeHandler:e=>{C(g.find(n=>n.private_ip==e))}}):void 0]}),x&&w?(0,i.jsx)(v.Z,{server:w,service:n,portRef:k}):void 0]})]})}function j(){let{pageProps:e}=(0,l.useContext)(r.AppContext),{deployment:n,children_services:s}=e,c=null==n?void 0:n.services.filter(e=>!e.parent_service_name);return(0,i.jsx)(t.Z,{className:"w-full nested-grid-frame xl:grid-cols-2",children:null==c?void 0:c.map((e,n)=>(0,i.jsx)(_,{service:e},n))})}},78701:function(e,n,s){"use strict";s.r(n),s.d(n,{__N_SSP:function(){return v},default:function(){return f}});var i=s(85893),r=s(67294),t=s(5606),l=s(38249),c=s(60705),a=s(33028),o=s(49533);function u(){let{pageProps:e}=(0,r.useContext)(t.AppContext),{user:n,deployment:s,deployment_id:u}=e,d=null==s?void 0:s.deployment_name;return(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(a.Z,{title:"".concat((0,l.Z)(d)," Deplyoment Dashboard"),description:(0,i.jsxs)(i.Fragment,{children:["Deployment"," ",(0,i.jsx)("code",{children:null==u?void 0:u.split("-").shift()})," > ",(0,i.jsx)("code",{children:null==s?void 0:s.deployment_name})]})}),(0,i.jsx)(c.Z,{}),(0,i.jsx)(o.Z,{})]})}var d=s(89350),v=!0;function f(){return(0,i.jsx)(d.Z,{children:(0,i.jsx)(u,{})})}}},function(e){e.O(0,[662,75,664,433,7,827,910,926,888,774,179],function(){return e(e.s=55634)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[148],{55634:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/services",function(){return s(78701)}])},49533:function(e,n,s){"use strict";s.d(n,{Z:function(){return j}});var i=s(85893),r=s(5606),t=s(60),l=s(67294),c=s(55412),a=s(86609),o=s(94655);function u(e){let{link:n,icon:s,...r}=e;return(0,i.jsx)(a.Z,{href:n.url,...r,...n.linkProps,children:(0,i.jsxs)(o.Z,{children:[(0,i.jsx)("span",{children:n.title}),s||(0,i.jsx)(c.Z,{size:17})]})})}var d=s(56211),v=s(45377),f=s(39483),p=s(25808),x=s(96486),m=s.n(x);function _(e){let{service:n}=e,{pageProps:s,ws:c}=(0,l.useContext)(r.AppContext),{deployment:a}=s,{ready:x,setReady:_}=(0,p.Z)(),j=null==a?void 0:a.services.filter(e=>e.parent_service_name==n.service_name),h=[n,...j||[]],[Z,N]=(0,l.useState)(null==h?void 0:h[0]);h.findIndex(e=>e.service_name==(null==Z?void 0:Z.service_name));let g=null==Z?void 0:Z.servers,[w,C]=(0,l.useState)(null==g?void 0:g[0]),k=(0,l.useRef)(void 0);return(0,l.useEffect)(()=>{var e;C(null==Z?void 0:null===(e=Z.servers)||void 0===e?void 0:e[0])},[Z]),(0,l.useEffect)(()=>{if(_(!1),w&&k.current){var e;e=k.current,c.sendData({event:"client:kill-port",server:w,service:m().omit(n,["servers"]),port:e})}setTimeout(()=>{_(!0)},2e3)},[w]),(0,i.jsxs)(t.Z,{className:"grid-cell",children:[(0,i.jsxs)(t.Z,{className:"grid-cell-content",children:[(0,i.jsxs)(o.Z,{className:"w-full justify-between",children:[(0,i.jsx)(d.Z,{children:n.service_name}),(0,i.jsx)(u,{link:{url:"/admin/services/".concat(n.service_name),title:"View"}})]}),(0,i.jsxs)("code",{children:[n.service_name," service"]})]}),(0,i.jsx)("hr",{}),(0,i.jsxs)(t.Z,{className:"gap-0",children:[(0,i.jsxs)(o.Z,{className:"p-4 grid md:grid-cols-2",children:[(0,i.jsx)(f.Z,{options:h.map((e,n)=>({value:e.service_name,title:"Cluster #".concat(n+1)})),changeHandler:e=>{N(h.find(n=>n.service_name==e))}}),g?(0,i.jsx)(f.Z,{options:g.map(e=>({value:e.private_ip,title:e.private_ip})),changeHandler:e=>{C(g.find(n=>n.private_ip==e))}}):void 0]}),x&&w?(0,i.jsx)(v.Z,{server:w,service:n,portRef:k}):void 0]})]})}function j(){let{pageProps:e}=(0,l.useContext)(r.AppContext),{deployment:n,children_services:s}=e,c=null==n?void 0:n.services.filter(e=>!e.parent_service_name);return(0,i.jsx)(t.Z,{className:"w-full nested-grid-frame xl:grid-cols-2",children:null==c?void 0:c.map((e,n)=>(0,i.jsx)(_,{service:e},n))})}},78701:function(e,n,s){"use strict";s.r(n),s.d(n,{__N_SSP:function(){return v},default:function(){return f}});var i=s(85893),r=s(67294),t=s(5606),l=s(38249),c=s(60705),a=s(33028),o=s(49533);function u(){let{pageProps:e}=(0,r.useContext)(t.AppContext),{user:n,deployment:s,deployment_id:u}=e,d=null==s?void 0:s.deployment_name;return(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(a.Z,{title:"".concat((0,l.Z)(d)," Deplyoment Dashboard"),description:(0,i.jsxs)(i.Fragment,{children:["Deployment"," ",(0,i.jsx)("code",{children:null==u?void 0:u.split("-").shift()})," > ",(0,i.jsx)("code",{children:null==s?void 0:s.deployment_name})]})}),(0,i.jsx)(c.Z,{}),(0,i.jsx)(o.Z,{})]})}var d=s(89350),v=!0;function f(){return(0,i.jsx)(d.Z,{children:(0,i.jsx)(u,{})})}}},function(e){e.O(0,[662,75,664,433,7,827,910,464,888,774,179],function(){return e(e.s=55634)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[329],{89426:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/services/[service_name]",function(){return s(52963)}])},52963:function(e,n,s){"use strict";s.r(n),s.d(n,{__N_SSP:function(){return h},default:function(){return _}});var l=s(85893),r=s(67294),i=s(5606),t=s(38249),c=s(60705),a=s(33028),d=s(60),o=s(94655),u=s(45377);function x(e){let{service:n}=e,{pageProps:s}=(0,r.useContext)(i.AppContext),t=n.servers,[c,a]=(0,r.useState)(null==t?void 0:t[0]),x=null!=t&&!!t.length&&!!(t.length%2);return(0,l.jsx)(d.Z,{className:"w-full grid-cell col-span-1 gap-0",children:(0,l.jsxs)(o.Z,{className:"nested-grid-frame xl:grid-cols-2",children:[null==t?void 0:t.map((e,s)=>(0,l.jsx)(u.Z,{server:e,service:n,wrapperProps:{className:"grid-cell"}},s)),x?(0,l.jsx)("div",{className:"grid-cell"}):null]})})}var v=s(39483),p=s(56211);function m(){let{pageProps:e,ws:n}=(0,r.useContext)(i.AppContext),{service:s,deployment:t,children_services:c}=e,a=[s,...c||[]],[u,m]=(0,r.useState)(s||void 0),j=a.findIndex(e=>(null==e?void 0:e.service_name)==(null==u?void 0:u.service_name))+1;return null==u||u.servers,(0,l.jsx)(d.Z,{className:"w-full nested-grid-frame grid-cols-1",children:(0,l.jsxs)(d.Z,{className:"grid-cell gap-0",children:[(0,l.jsx)(o.Z,{className:"grid-cell-content flex-nowrap",children:(0,l.jsxs)(o.Z,{className:"w-full justify-between",children:[(0,l.jsx)(o.Z,{children:(0,l.jsxs)(p.Z,{children:["Cluster #",j]})}),(0,l.jsx)(o.Z,{children:(0,l.jsx)(v.Z,{options:a.map((e,n)=>({value:null==e?void 0:e.service_name,title:"Cluster #".concat(n+1)})),wrapperWrapperProps:{className:"max-w-[250px]"},changeHandler:e=>{m(void 0),n.sendData({event:"client:kill-all-ports"}),setTimeout(()=>{m(a.find(n=>(null==n?void 0:n.service_name)==e)||void 0)},200)}})})]})}),(0,l.jsx)("hr",{}),u?(0,l.jsx)(x,{service:u}):void 0]})})}function j(){let{pageProps:e}=(0,r.useContext)(i.AppContext),{service:n,deployment:s}=e,d=null==s?void 0:s.deployment_name,o=null==n?void 0:n.service_name;return(0,l.jsxs)(r.Fragment,{children:[(0,l.jsx)(a.Z,{title:"".concat((0,t.Z)(o)," Service"),description:(0,l.jsxs)(l.Fragment,{children:["Deployment ",(0,l.jsx)("code",{children:d})," > ",(0,l.jsx)("code",{children:o})]})}),(0,l.jsx)(c.Z,{}),(0,l.jsx)(m,{})]})}var f=s(89350),h=!0;function _(){return(0,l.jsx)(f.Z,{children:(0,l.jsx)(j,{})})}}},function(e){e.O(0,[662,75,664,433,7,827,910,464,888,774,179],function(){return e(e.s=89426)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[329],{89426:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/services/[service_name]",function(){return s(52963)}])},52963:function(e,n,s){"use strict";s.r(n),s.d(n,{__N_SSP:function(){return h},default:function(){return _}});var l=s(85893),r=s(67294),i=s(5606),t=s(38249),c=s(60705),a=s(33028),d=s(60),o=s(94655),u=s(1765);function x(e){let{service:n}=e,{pageProps:s}=(0,r.useContext)(i.AppContext),t=n.servers,[c,a]=(0,r.useState)(null==t?void 0:t[0]),x=null!=t&&!!t.length&&!!(t.length%2);return(0,l.jsx)(d.Z,{className:"w-full grid-cell col-span-1 gap-0",children:(0,l.jsxs)(o.Z,{className:"nested-grid-frame xl:grid-cols-2",children:[null==t?void 0:t.map((e,s)=>(0,l.jsx)(u.Z,{server:e,service:n,wrapperProps:{className:"grid-cell"}},s)),x?(0,l.jsx)("div",{className:"grid-cell"}):null]})})}var v=s(39483),p=s(56211);function m(){let{pageProps:e,ws:n}=(0,r.useContext)(i.AppContext),{service:s,deployment:t,children_services:c}=e,a=[s,...c||[]],[u,m]=(0,r.useState)(s||void 0),j=a.findIndex(e=>(null==e?void 0:e.service_name)==(null==u?void 0:u.service_name))+1;return null==u||u.servers,(0,l.jsx)(d.Z,{className:"w-full nested-grid-frame grid-cols-1",children:(0,l.jsxs)(d.Z,{className:"grid-cell gap-0",children:[(0,l.jsx)(o.Z,{className:"grid-cell-content flex-nowrap",children:(0,l.jsxs)(o.Z,{className:"w-full justify-between",children:[(0,l.jsx)(o.Z,{children:(0,l.jsxs)(p.Z,{children:["Cluster #",j]})}),(0,l.jsx)(o.Z,{children:(0,l.jsx)(v.Z,{options:a.map((e,n)=>({value:null==e?void 0:e.service_name,title:"Cluster #".concat(n+1)})),wrapperWrapperProps:{className:"max-w-[250px]"},changeHandler:e=>{m(void 0),n.sendData({event:"client:kill-all-ports"}),setTimeout(()=>{m(a.find(n=>(null==n?void 0:n.service_name)==e)||void 0)},200)}})})]})}),(0,l.jsx)("hr",{}),u?(0,l.jsx)(x,{service:u}):void 0]})})}function j(){let{pageProps:e}=(0,r.useContext)(i.AppContext),{service:n,deployment:s}=e,d=null==s?void 0:s.deployment_name,o=null==n?void 0:n.service_name;return(0,l.jsxs)(r.Fragment,{children:[(0,l.jsx)(a.Z,{title:"".concat((0,t.Z)(o)," Service"),description:(0,l.jsxs)(l.Fragment,{children:["Deployment ",(0,l.jsx)("code",{children:d})," > ",(0,l.jsx)("code",{children:o})]})}),(0,l.jsx)(c.Z,{}),(0,l.jsx)(m,{})]})}var f=s(89350),h=!0;function _(){return(0,l.jsx)(f.Z,{children:(0,l.jsx)(j,{})})}}},function(e){e.O(0,[662,75,664,433,7,827,910,926,888,774,179],function(){return e(e.s=89426)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[890],{25292:function(e,l,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/shell",function(){return n(30904)}])},40806:function(e,l,n){"use strict";n.d(l,{Z:function(){return x}});var s=n(85893),r=n(93452),t=n(76242),i=n(36969),c=n(25808),a=n(94495),u=n(57493),o=n(94655),d=n(3668),f=n(60),p=n(67294),m=n(98388);function x(e){let{url:l,wrapperProps:n,title:x,...h}=e,{loading:j,setLoading:v}=(0,c.Z)();return(0,s.jsx)(r.Z,{...n,className:(0,m.m6)("p-0",null==n?void 0:n.className),children:(0,s.jsxs)(f.Z,{className:"gap-0",children:[(0,s.jsxs)(o.Z,{className:"p-4 w-full justify-between",children:[(0,s.jsx)(o.Z,{children:x?(0,s.jsx)(p.Fragment,{children:(0,s.jsx)(d.Z,{size:"small",variant:"faded",children:x})}):null}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(a.Z,{title:"Open Full Screen",variant:"ghost",className:"p-1!",onClick:()=>{window.open(l,"__blank")},children:(0,s.jsx)(i.Z,{name:"ArrowUpRight",size:20})}),(0,s.jsx)(a.Z,{title:"Refresh Iframe",variant:"ghost",className:"p-1!",loading:j,onClick:()=>{v(!0),setTimeout(()=>{v(!1)},2e3)},loadingProps:{size:"smaller"},children:(0,s.jsx)(i.Z,{name:"RotateCcw",size:18})})]})]}),(0,s.jsx)("hr",{}),j?(0,s.jsx)(u.Z,{className:"w-full p-10 h-[400px]",children:(0,s.jsx)(t.Z,{})}):(0,s.jsx)("iframe",{...h,src:l,className:(0,m.m6)("w-full h-[400px]",h.className)})]})})}},30904:function(e,l,n){"use strict";n.r(l),n.d(l,{__N_SSP:function(){return v},default:function(){return Z}});var s=n(85893),r=n(67294),t=n(5606),i=n(60705),c=n(33028),a=n(60),u=n(71077),o=n(76242),d=n(57493),f=n(40806),p=n(25808);function m(e){let{paradigm:l}=e,{pageProps:n,ws:i}=(0,r.useContext)(t.AppContext),{user:c}=n,m=c.super_admin?"root":c.username,x="pm2-logs"==l?"pm2 logs":c.super_admin?"bash":m?"su - ".concat(m,' -c "bash"'):void 0,{data:h}=(0,u.Z)(),[j,v]=(0,r.useState)(),{refresh:Z,setRefresh:g}=(0,p.Z)(),N=(0,r.useRef)(!1);function w(){(null==j?void 0:j.port)&&i.sendData({event:"client:kill-port",port:j.port})}return(0,r.useEffect)(()=>{if((null==i?void 0:i.socket)&&!N.current)return i.sendData({event:"pm2-logs"==l?"client:relay-pm2-logs":"client:relay-shell",cmd:x}),N.current=!0,function(){w()}},[i,Z]),(0,r.useEffect)(()=>{N.current&&(w(),v(void 0),N.current=!1,g(e=>e+1))},[]),(0,r.useEffect)(()=>{!j&&((null==h?void 0:h.event)=="server:relay-shell"||(null==h?void 0:h.event)=="server:relay-pm2-logs")&&(null==h?void 0:h.ttyd)&&setTimeout(()=>{v(h.ttyd?{...h.ttyd,href:"".concat(window.location.origin).concat(h.ttyd.url)}:void 0)},2e3)},[h]),(0,s.jsxs)(a.Z,{className:"gap-0 w-full",children:[(null==j?void 0:j.url)&&j.port?(0,s.jsx)(a.Z,{className:"gap-0",children:(0,s.jsx)(f.Z,{url:null==j?void 0:j.url,title:"Relay Shell",wrapperProps:{className:"border-none"}})}):(0,s.jsx)(d.Z,{className:"p-10 h-[460px]",children:(0,s.jsx)(o.Z,{})}),(0,s.jsx)("hr",{})]})}function x(){let{pageProps:e}=(0,r.useContext)(t.AppContext),{user:l}=e;return(0,s.jsxs)(a.Z,{className:"w-full nested-grid-frame xl:grid-cols-2",children:[(0,s.jsx)(a.Z,{className:"grid-cell w-full",children:(0,s.jsx)(m,{paradigm:"shell"})}),l.super_admin?(0,s.jsx)(a.Z,{className:"grid-cell w-full",children:(0,s.jsx)(m,{paradigm:"pm2-logs"})}):null]})}function h(){let{pageProps:e}=(0,r.useContext)(t.AppContext);return(0,s.jsxs)(r.Fragment,{children:[(0,s.jsx)(c.Z,{title:"Shell",description:(0,s.jsx)(s.Fragment,{children:"Access the relay server shell"})}),(0,s.jsx)(i.Z,{}),(0,s.jsx)(x,{})]})}var j=n(89350),v=!0;function Z(){return(0,s.jsx)(j.Z,{children:(0,s.jsx)(h,{})})}},93452:function(e,l,n){"use strict";n.d(l,{Z:function(){return t}});var s=n(85893),r=n(98388);function t(e){let{spacing:l,componentRef:n,...t}=e;return(0,s.jsx)("div",{...t,className:(0,r.m6)("relative flex items-center gap-2 border border-solid rounded-default","border-slate-200 dark:border-white/10",l?"normal"==l?"px-3 py-2":"tight"==l?"px-2 py-1":"":"px-3 py-2","twui-border",t.className),ref:n,children:t.children})}},57493:function(e,l,n){"use strict";n.d(l,{Z:function(){return t}});var s=n(85893),r=n(98388);function t(e){let{...l}=e;return(0,s.jsx)("div",{...l,className:(0,r.m6)("flex flex-col items-center justify-center gap-4 p-2 w-full","h-full twui-center",l.className),children:l.children})}},9008:function(e,l,n){e.exports=n(23867)}},function(e){e.O(0,[662,75,664,433,7,910,888,774,179],function(){return e(e.s=25292)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
self.__BUILD_MANIFEST=function(s,e,a,c,t,i,d,n,u){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/":[s,a,e,c,u,t,i,"static/chunks/pages/index-5ce092dbf4b7ea2c.js"],"/404":[s,e,"static/chunks/pages/404-8292e1046538596b.js"],"/_error":["static/chunks/pages/_error-10090a8ee211d5fd.js"],"/admin":[s,a,e,c,t,i,d,n,"static/chunks/pages/admin-914586c03dfda5c1.js"],"/admin/services":[s,a,e,c,t,i,d,n,"static/chunks/pages/admin/services-16971626ad193c95.js"],"/admin/services/[service_name]":[s,a,e,c,t,i,d,n,"static/chunks/pages/admin/services/[service_name]-e8b08e5c11b1b12c.js"],"/admin/settings":[s,a,e,c,t,i,d,"static/chunks/pages/admin/settings-f58d63b2752f72a6.js"],"/admin/shell":[s,a,e,c,t,d,"static/chunks/pages/admin/shell-c4ef7e6bc7ca42e9.js"],"/admin/users":[s,a,e,c,t,d,"static/chunks/pages/admin/users-73e9775838b56d95.js"],"/admin/users/add-user":[s,a,e,c,t,i,d,"static/chunks/pages/admin/users/add-user-1db7c9ee89830b5b.js"],"/admin/users/[deployment_user_id]":[s,a,"static/chunks/ff39441c-88f593a46cb65964.js","static/chunks/d848df63-a470d32e7be4bfe3.js",e,c,"static/chunks/281-dcee0c6401936d5e.js",t,i,d,"static/chunks/pages/admin/users/[deployment_user_id]-fb1c3c9148c518cd.js"],"/auth/login":[s,a,e,c,u,t,i,"static/chunks/pages/auth/login-3f936f997e58438c.js"],"/auth/logout":[s,e,"static/chunks/pages/auth/logout-c8b207f96be4f684.js"],"/auth/signup":[s,a,e,c,t,i,"static/chunks/pages/auth/signup-5c0f6835749e755e.js"],sortedPages:["/","/404","/_app","/_error","/admin","/admin/services","/admin/services/[service_name]","/admin/settings","/admin/shell","/admin/users","/admin/users/add-user","/admin/users/[deployment_user_id]","/auth/login","/auth/logout","/auth/signup"]}}("static/chunks/29107295-2819ba6e51dbf961.js","static/chunks/664-e347d64e56042a02.js","static/chunks/e5d67320-ccbab4288ca637ad.js","static/chunks/433-ace0b205fb566ad3.js","static/chunks/7-f0121001f735b8fe.js","static/chunks/827-7975edcf8481ec69.js","static/chunks/910-7de3855073c34589.js","static/chunks/926-4b397e2b281b7271.js","static/chunks/225-f257bb5bd6014d68.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();