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

1 line
9.0 KiB
JavaScript
Raw Normal View History

2024-12-08 19:56:57 +00:00
"use strict";(()=>{var e={};e.id=9157,e.ids=[636,9157],e.modules={52093:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.r(r),t.d(r,{config:()=>h,default:()=>p,getServerSideProps:()=>m,getStaticPaths:()=>x,getStaticProps:()=>d,reportWebVitals:()=>g,routeModule:()=>q,unstable_getServerProps:()=>v,unstable_getServerSideProps:()=>S,unstable_getStaticParams:()=>j,unstable_getStaticPaths:()=>y,unstable_getStaticProps:()=>f});var i=t(63865),a=t(9455),n=t(30671),o=t(49407),u=t(68268),l=t(64232),c=e([l]);l=(c.then?(await c)():c)[0];let p=(0,n.M)(l,"default"),d=(0,n.M)(l,"getStaticProps"),x=(0,n.M)(l,"getStaticPaths"),m=(0,n.M)(l,"getServerSideProps"),h=(0,n.M)(l,"config"),g=(0,n.M)(l,"reportWebVitals"),f=(0,n.M)(l,"unstable_getStaticProps"),y=(0,n.M)(l,"unstable_getStaticPaths"),j=(0,n.M)(l,"unstable_getStaticParams"),v=(0,n.M)(l,"unstable_getServerProps"),S=(0,n.M)(l,"unstable_getServerSideProps"),q=new i.PagesRouteModule({definition:{kind:a.A.PAGES,page:"/su/load-balancing",pathname:"/su/load-balancing",bundlePath:"",filename:""},components:{App:u.default,Document:o.default},userland:l});s()}catch(e){s(e)}})},94010:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.d(r,{A:()=>u});var i=t(8732);t(82015);var a=t(96089),n=t(75979),o=e([n]);function u({slugText:e,justIcon:r,noIcon:t,title:s,outlined:o,extraClasses:u}){return(0,i.jsxs)("div",{className:(0,n.twMerge)("button small-text",o?" outlined gray bg-white":" ghost light-gray",u),onClick:r=>{navigator.clipboard.writeText(e).then(()=>{alert(`Copied: "${e}"`)})},style:o?void 0:{padding:0},children:[!t&&(0,i.jsx)(a.A,{size:o?15:20}),!r&&(0,i.jsx)("span",{className:"text-slate-500 dark:text-slate-300",children:s||"Copy Slug"})]})}n=(o.then?(await o)():o)[0],s()}catch(e){s(e)}})},19262:(e,r,t)=>{t.d(r,{A:()=>u});var s=t(8732),i=t(82015),a=t.n(i),n=t(63715),o=t(32415);function u(e){let[r,t]=a().useState(null),[i,u]=a().useState(!1),[l,c]=a().useState(0);return(0,s.jsxs)(a().Fragment,{children:[(0,s.jsxs)("div",{className:"w-full justify-between",children:[(0,s.jsx)("h2",{className:"text-xl m-0",children:"Error Logs"}),(0,s.jsx)("div",{children:(0,s.jsxs)("button",{onClick:e=>{window.confirm("Clear Error Logs?")&&(u(!0),(0,n.A)("/api/admin/clearErrorLogs","post").then(e=>{console.log(e),c(e=>e+1)}),setTimeout(()=>{u(!1)},2e3))},className:"outlined gray relative",children:[i&&(0,s.jsx)(o.A,{width:"20px"}),"Clear Error Log"]})})]}),(0,s.jsxs)("section",{className:"paper",children:[r&&(0,s.jsx)("p",{dangerouslySetInnerHTML:{__html:r||"No Log"}}),!r&&(0,s.jsx)(o.A,{position:"relative",width:"25px"})]})]})}},77306:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.d(r,{A:()=>l});var i=t(8732),a=t(94010),n=t(2459),o=t(75979),u=e([a,o]);function l({server:e,noLoadBalance:r}){return(0,i.jsxs)("div",{className:"stack w-full",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(n.A,{size:15,opacity:.5}),(0,i.jsxs)("div",{children:[(0,i.jsx)("span",{children:e.host}),r?(0,i.jsx)(i.Fragment,{}):e.loadBalanced?(0,i.jsx)("span",{className:"info green small",children:"Load Balanced"}):(0,i.jsx)("button",{children:"Add to Load Balancer"})]})]}),(0,i.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,i.jsx)("ul",{className:"p-0 m-0 pl-4",children:e.users?.map((e,r)=>i.jsx(c,{user:e},r))})})]})}function c({user:e}){return(0,i.jsx)("li",{className:(0,o.twMerge)("w-full"),children:(0,i.jsxs)("div",{className:"stack gap-0",children:[(0,i.jsxs)("span",{children:["user: ",(0,i.jsx)("b",{children:e.name})]}),(0,i.jsxs)("span",{children:["pass:"," ",(0,i.jsx)("b",{children:(0,i.jsx)(a.A,{slugText:e.password,title:"********",extraClasses:"inline",noIcon:!0})})]})]})})}[a,o]=u.then?(await u)():u,s()}catch(e){s(e)}})},72179:(e,r,t)=>{t.a(e,async(e,s)=>{try{t.d(r,{A:()=>c});var i=t(8732),a=t(68268),n=t(82015),o=t.n(n),u=t(77306),l=e([u]);function c(){let e=o().useContext(a.AppContext).pageProps;e.user;let r=e.servers;return(0,i.jsxs)(o().Fragment,{children:[(0,i.jsxs)("div",{className:"w-full justify-between",children:[(0,i.jsxs)("div",{className:"f