1 line
5.7 KiB
JavaScript
1 line
5.7 KiB
JavaScript
"use strict";(()=>{var e={};e.id=964,e.ids=[964],e.modules={281:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.r(t),r.d(t,{config:()=>h,default:()=>u,getServerSideProps:()=>m,getStaticPaths:()=>x,getStaticProps:()=>p,reportWebVitals:()=>v,routeModule:()=>S,unstable_getServerProps:()=>Z,unstable_getServerSideProps:()=>_,unstable_getStaticParams:()=>f,unstable_getStaticPaths:()=>j,unstable_getStaticProps:()=>g});var a=r(7093),i=r(5244),n=r(1323),l=r(1070),c=r(3893),d=r(110),o=e([c,d]);[c,d]=o.then?(await o)():o;let u=(0,n.l)(d,"default"),p=(0,n.l)(d,"getStaticProps"),x=(0,n.l)(d,"getStaticPaths"),m=(0,n.l)(d,"getServerSideProps"),h=(0,n.l)(d,"config"),v=(0,n.l)(d,"reportWebVitals"),g=(0,n.l)(d,"unstable_getStaticProps"),j=(0,n.l)(d,"unstable_getStaticPaths"),f=(0,n.l)(d,"unstable_getStaticParams"),Z=(0,n.l)(d,"unstable_getServerProps"),_=(0,n.l)(d,"unstable_getServerSideProps"),S=new a.PagesRouteModule({definition:{kind:i.x.PAGES,page:"/admin",pathname:"/admin",bundlePath:"",filename:""},components:{App:c.default,Document:l.default},userland:d});s()}catch(e){s(e)}})},3353:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.d(t,{Z:()=>u});var a=r(997),i=r(3893),n=r(9705),l=r(5743),c=r(3216),d=r(6689),o=e([i,n,l,c]);function u(){let{pageProps:e}=(0,d.useContext)(i.AppContext),{user:t,deployment:r,deployment_id:s}=e;return r?a.jsx(c.Z,{className:"w-full gap-0",children:(0,a.jsxs)(c.Z,{className:"grid-cell-content",children:[(0,a.jsxs)(l.Z,{children:[r.services.length," Services"]}),a.jsx(n.Z,{children:r.services.map((e,t)=>a.jsx("a",{href:`/admin/services/${e.service_name}`,children:a.jsx("code",{children:e.service_name})},t))})]})}):null}[i,n,l,c]=o.then?(await o)():o,s()}catch(e){s(e)}})},4745:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.d(t,{Z:()=>x});var a=r(997),i=r(3353),n=r(2394),l=r(6689),c=r(3893),d=r(6425),o=r(2984),u=r(1537),p=e([i,n,c,o,u]);function x(){let{pageProps:e}=(0,l.useContext)(c.AppContext),{user:t,deployment:r,deployment_id:s}=e,p=r?.deployment_name;return(0,a.jsxs)(l.Fragment,{children:[a.jsx(n.Z,{title:`${(0,d.Z)(p)} Deplyoment Dashboard`,description:(0,a.jsxs)(a.Fragment,{children:["Deployment"," ",a.jsx("code",{children:s?.split("-").shift()})," > ",a.jsx("code",{children:r?.deployment_name})]})}),a.jsx(o.Z,{}),a.jsx(i.Z,{}),a.jsx(o.Z,{}),a.jsx(u.Z,{})]})}[i,n,c,o,u]=p.then?(await p)():p,s()}catch(e){s(e)}})},9708:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.d(t,{Z:()=>h});var a=r(997),i=r(3893),n=r(5766),l=r(1309),c=r(9705),d=r(3216),o=r(6689),u=r(9986),p=r(5031),x=r(975);r(6517);var m=e([i,n,l,c,d,u,p]);function h({service:e}){let{pageProps:t,ws:r}=(0,o.useContext)(i.AppContext),{deployment:s}=t,{ready:m,setReady:h}=(0,x.Z)(),v=s?.services.filter(t=>t.parent_service_name==e.service_name),g=[e,...v||[]],[j,f]=(0,o.useState)(g?.[0]);g.findIndex(e=>e.service_name==j?.service_name);let Z=j?.servers,[_,S]=(0,o.useState)(Z?.[0]),y=(0,o.useRef)(void 0);return(0,a.jsxs)(d.Z,{className:"grid-cell",children:[(0,a.jsxs)(d.Z,{className:"grid-cell-content",children:[(0,a.jsxs)(c.Z,{className:"w-full justify-between",children:[a.jsx(l.Z,{children:e.service_name}),a.jsx(n.Z,{link:{url:`/admin/services/${e.service_name}`,title:"View"}})]}),(0,a.jsxs)("code",{children:[e.service_name," service"]})]}),a.jsx("hr",{}),(0,a.jsxs)(d.Z,{className:"gap-0",children:[(0,a.jsxs)(c.Z,{className:"p-4 grid md:grid-cols-2",children:[a.jsx(p.Z,{options:g.map((e,t)=>({value:e.service_name,title:`Cluster #${t+1}`})),changeHandler:e=>{f(g.find(t=>t.service_name==e))}}),Z?a.jsx(p.Z,{options:Z.map(e=>({value:e.private_ip,title:e.private_ip})),changeHandler:e=>{S(Z.find(t=>t.private_ip==e))}}):void 0]}),m&&_?a.jsx(u.Z,{server:_,service:e,portRef:y}):void 0]})]})}[i,n,l,c,d,u,p]=m.then?(await m)():m,s()}catch(e){s(e)}})},1537:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.d(t,{Z:()=>o});var a=r(997),i=r(3893),n=r(3216),l=r(6689),c=r(9708),d=e([i,n,c]);function o(){let{pageProps:e}=(0,l.useContext)(i.AppContext),{deployment:t,children_services:r}=e,s=t?.services.filter(e=>!e.parent_service_name);return a.jsx(n.Z,{className:"w-full nested-grid-frame xl:grid-cols-2",children:s?.map((e,t)=>a.jsx(c.Z,{service:e},t))})}[i,n,c]=d.then?(await d)():d,s()}catch(e){s(e)}})},110:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.r(t),r.d(t,{default:()=>d,getServerSideProps:()=>o});var a=r(997),i=r(4745),n=r(8688),l=r(3060),c=e([i,l]);function d(){return a.jsx(l.Z,{children:a.jsx(i.Z,{})})}[i,l]=c.then?(await c)():c;let o=async e=>await (0,n.Z)({ctx:e});s()}catch(e){s(e)}})},5766:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.d(t,{Z:()=>d});var a=r(997),i=r(6461),n=r(5976),l=r(9705),c=e([n,l]);function d({link:e,icon:t,...r}){return a.jsx(n.Z,{href:e.url,...r,...e.linkProps,children:(0,a.jsxs)(l.Z,{children:[a.jsx("span",{children:e.title}),t||a.jsx(i.Z,{size:17})]})})}[n,l]=c.then?(await c)():c,s()}catch(e){s(e)}})},5191:e=>{e.exports=require("@moduletrace/datasquirel/dist/client")},4882:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/functions/dsql/decrypt")},4605:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/utils/ejson")},1521:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/utils/numberfy")},6255:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/utils/slugify")},1635:e=>{e.exports=require("dayjs")},6517:e=>{e.exports=require("lodash")},2423:e=>{e.exports=require("lucide-react")},2785:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},968:e=>{e.exports=require("next/head")},6689:e=>{e.exports=require("react")},6405:e=>{e.exports=require("react-dom")},997:e=>{e.exports=require("react/jsx-runtime")},2048:e=>{e.exports=require("fs")},5315:e=>{e.exports=require("path")},8097:e=>{e.exports=import("tailwind-merge")}};var t=require("../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[859,330,752,248,150,824],()=>r(281));module.exports=s})(); |