dsql-admin/dsql-app/.local_dist/server/pages/su/load-balancing.js

1 line
7.4 KiB
JavaScript
Raw Normal View History

2025-02-12 16:56:44 +00:00
"use strict";(()=>{var e={};e.id=9157,e.ids=[9157],e.modules={45035:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.r(r),t.d(r,{config:()=>g,default:()=>u,getServerSideProps:()=>x,getStaticPaths:()=>h,getStaticProps:()=>p,reportWebVitals:()=>v,routeModule:()=>y,unstable_getServerProps:()=>S,unstable_getServerSideProps:()=>b,unstable_getStaticParams:()=>f,unstable_getStaticPaths:()=>m,unstable_getStaticProps:()=>j});var a=t(63865),n=t(9455),i=t(30671),o=t(5583),l=t(19796),c=t(21922),d=e([c]);c=(d.then?(await d)():d)[0];let u=(0,i.M)(c,"default"),p=(0,i.M)(c,"getStaticProps"),h=(0,i.M)(c,"getStaticPaths"),x=(0,i.M)(c,"getServerSideProps"),g=(0,i.M)(c,"config"),v=(0,i.M)(c,"reportWebVitals"),j=(0,i.M)(c,"unstable_getStaticProps"),m=(0,i.M)(c,"unstable_getStaticPaths"),f=(0,i.M)(c,"unstable_getStaticParams"),S=(0,i.M)(c,"unstable_getServerProps"),b=(0,i.M)(c,"unstable_getServerSideProps"),y=new a.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/su/load-balancing",pathname:"/su/load-balancing",bundlePath:"",filename:""},components:{App:l.default,Document:o.default},userland:c});s()}catch(e){s(e)}})},73872:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.d(r,{A:()=>l});var a=t(8732);t(82015);var n=t(96089),i=t(75979),o=e([i]);function l({slugText:e,justIcon:r,noIcon:t,title:s,outlined:o,extraClasses:l}){return(0,a.jsxs)("div",{className:(0,i.twMerge)("button small-text hover:!bg-transparent",o?" outlined gray bg-white":" ghost light-gray",l),onClick:r=>{navigator.clipboard.writeText(e).then(()=>{alert(`Copied: "${e}"`)})},style:o?void 0:{padding:0},children:[!t&&(0,a.jsx)(n.A,{size:o?15:20}),!r&&(0,a.jsx)("span",{className:"text-slate-500 dark:text-slate-300",children:s||"Copy Slug"})]})}i=(o.then?(await o)():o)[0],s()}catch(e){s(e)}})},57168:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.d(r,{A:()=>c});var a=t(8732),n=t(73872),i=t(2459),o=t(75979),l=e([n,o]);function c({server:e,noLoadBalance:r}){return(0,a.jsxs)("div",{className:"stack w-full",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(i.A,{size:15,opacity:.5}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{children:e.host}),r?(0,a.jsx)(a.Fragment,{}):e.loadBalanced?(0,a.jsx)("span",{className:"info green small",children:"Load Balanced"}):(0,a.jsx)("button",{children:"Add to Load Balancer"})]})]}),(0,a.jsx)("div",{className:(0,o.twMerge)("stack border-0 border-l border-solid border-s-slate-200 dark:border-white/20","pl-6 ml-2 -mt-4 pt-2 w-full gap-0"),children:(0,a.jsx)("ul",{className:"p-0 m-0 pl-4",children:e.users?.map((e,r)=>a.jsx(d,{user:e},r))})})]})}function d({user:e}){return(0,a.jsx)("li",{className:(0,o.twMerge)("w-full"),children:(0,a.jsxs)("div",{className:"stack gap-0",children:[(0,a.jsxs)("span",{children:["user: ",(0,a.jsx)("b",{children:e.name})]}),(0,a.jsxs)("span",{children:["pass:"," ",(0,a.jsx)("b",{children:(0,a.jsx)(n.A,{slugText:e.password,title:"********",extraClasses:"inline",noIcon:!0})})]})]})})}[n,o]=l.then?(await l)():l,s()}catch(e){s(e)}})},53265:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.d(r,{A:()=>d});var a=t(8732),n=t(19796),i=t(82015),o=t.n(i),l=t(57168),c=e([l]);function d(){let e=o().useContext(n.AppContext).pageProps.servers;return(0,a.jsxs)(o().Fragment,{children:[(0,a.jsxs)("div",{className:"w-full justify-between",children:[(0,a.jsxs)("div",{className:"flex-col items-start gap-2",children:[(0,a.jsx)("h2",{className:"text-xl m-0",children:"Load Balancing"}),(0,a.jsx)("span",{children:"Distribute database load accross servers"})]}),(0,a.jsx)("div",{})]}),(0,a.jsxs)("section",{className:"paper",children:[(0,a.jsx)("h2",{className:"text-base m-0",children:"Servers"}),(0,a.jsx)("div",{className:"flex flex-col gap-2 w-full",children:e.map((e,r)=>(0,a.jsx)(l.A,{server:e},r))})]})]})}l=(c.then?(await c)():c)[0],s()}catch(e){s(e)}})},24934:(e,r,t)=>{t.d(r,{A:()=>c});var s=t(29021),a=t.n(s),n=t(60374),i=t(33873),o=t.n(i);function l(){let{userDirPath:e}=function(e){let r=process.env.DSQL_APP_DIR,t=process.env.DSQL_DB_SCHEMA_DIR,s=".tmp";if(!r)throw Error("Please provide the `DSQL_APP_DIR` env variable.");if(!t)throw Error("Please provide the `DSQL_DB_SCHEMA_DIR` env variable.");let a=