2025-02-16 16:12:40 +00:00
|
|
|
"use strict";(()=>{var e={};e.id=2504,e.ids=[2504],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,s){return s in t?t[s]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,s)):"function"==typeof t&&"default"===s?t:void 0}}})},44088:(e,t,s)=>{s.a(e,async(e,a)=>{try{s.r(t),s.d(t,{config:()=>m,default:()=>u,getServerSideProps:()=>x,getStaticPaths:()=>h,getStaticProps:()=>p,reportWebVitals:()=>y,routeModule:()=>b,unstable_getServerProps:()=>j,unstable_getServerSideProps:()=>g,unstable_getStaticParams:()=>A,unstable_getStaticPaths:()=>v,unstable_getStaticProps:()=>f});var r=s(63865),n=s(9455),l=s(30671),i=s(5583),c=s(53881),d=s(30350),o=e([d]);d=(o.then?(await o)():o)[0];let u=(0,l.M)(d,"default"),p=(0,l.M)(d,"getStaticProps"),h=(0,l.M)(d,"getStaticPaths"),x=(0,l.M)(d,"getServerSideProps"),m=(0,l.M)(d,"config"),y=(0,l.M)(d,"reportWebVitals"),f=(0,l.M)(d,"unstable_getStaticProps"),v=(0,l.M)(d,"unstable_getStaticPaths"),A=(0,l.M)(d,"unstable_getStaticParams"),j=(0,l.M)(d,"unstable_getServerProps"),g=(0,l.M)(d,"unstable_getServerSideProps"),b=new r.PagesRouteModule({definition:{kind:n.A.PAGES,page:"/admin/[user_id]/connect",pathname:"/admin/[user_id]/connect",bundlePath:"",filename:""},components:{App:c.default,Document:i.default},userland:d});a()}catch(e){a(e)}})},49773:(e,t,s)=>{s.a(e,async(e,a)=>{try{s.d(t,{A:()=>p});var r=s(8732),n=s(82015),l=s.n(n),i=s(53926),c=s(30350),d=s(81344),o=s(46168),u=e([c,d,o]);function p(){let{user:e,query:t,mariadbUserCred:s}=l().useContext(c.ConnectContext);return(0,r.jsxs)(l().Fragment,{children:[(0,r.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,r.jsx)("div",{className:"",children:(0,r.jsx)("h1",{className:"text-3xl m-0",children:"Connect"})}),(0,r.jsx)(i.A,{user:e})]}),(0,r.jsx)(d.A,{}),(0,r.jsx)(o.A,{})]})}[c,d,o]=u.then?(await u)():u,a()}catch(e){a(e)}})},81344:(e,t,s)=>{s.a(e,async(e,a)=>{try{s.d(t,{A:()=>u});var r=s(8732),n=s(82015),l=s.n(n),i=s(30350),c=s(96089),d=s(25088),o=e([i]);function u(){let{user:e,query:t,mariadbUserCred:s}=l().useContext(i.ConnectContext);return(0,r.jsx)("section",{className:"paper",children:(0,r.jsxs)("div",{className:"flex-col items-start w-full",children:[(0,r.jsx)("span",{children:"You can connect to your database remotely using any MySQL/Mariadb client. Use these credentials to connect:"}),(0,r.jsx)("hr",{}),(0,r.jsxs)("ul",{className:"m-0",children:[(0,r.jsxs)("li",{children:["Server:"," ",(0,r.jsx)("b",{children:"172.72.0.24"})]}),(0,r.jsxs)("li",{children:["Username: ",(0,r.jsx)("b",{children:s?.mariadb_user})]}),(0,r.jsxs)("li",{children:["Host: ",(0,r.jsx)("b",{children:s?.mariadb_host})]}),(0,r.jsxs)("li",{children:["Password: ",(0,r.jsx)("b",{children:"*****************"}),(0,r.jsx)("button",{className:"ghost inline-block -my-4",onClick:e=>{navigator.clipboard.writeText(s?.mariadb_pass||"").then(()=>{window.alert("Copied Password!")})},children:(0,r.jsx)(c.A,{})})]}),(0,r.jsx)("li",{children:(0,r.jsxs)("div",{className:"flex",children:["SSL Certificate:"," ",(0,r.jsx)("b",{children:(0,r.jsx)("span",{className:"flex items-center gap-2",children:(0,r.jsxs)("a",{href:"https://datasquirel.com/documents/ssl/ca-cert.pem",className:"flex items-center gap-2 border-none hover:opacity-60",target:"_blank",children:[(0,r.jsx)(d.A,{}),"Download"]})})})]})})]})]})})}i=(o.then?(await o)():o)[0],a()}catch(e){a(e)}})},63997:(e,t,s)=>{s.a(e,async(e,a)=>{try{s.d(t,{A:()=>p});var r=s(8732),n=s(82015),l=s.n(n),i=s(30350),c=s(91140),d=s(16757),o=s(1756),u=e([i,o]);function p(){let{targetMariadbUser:e}=l().useContext(i.ConnectContext),[t,s]=l().useState(!1);return(0,r.jsx)(c.Ay,{title:"edit-mariadb-user-popup",children:t&&e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h3",{children:(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("span",{children:"Edit"}),(0,r.jsxs)("span",{className:"info inline w-auto text-xl green",children:[e.username,"@",e.host]})]})}),(0,r.jsx)("hr",{}),(0,r.jsx)(o.A,{mariaDBUser:e,edit:!0})]}):(0,r.jsx)("div",{className:"p-20",children:(0,r.jsx)(d.A,{width:"25px
|