dsql-admin/dsql-app/.local_dist/server/pages/admin/[user_id]/connect.js

1 line
28 KiB
JavaScript
Raw Normal View History

2025-02-19 19:38:56 +00:00
"use strict";(()=>{var e={};e.id=2504,e.ids=[2504],e.modules={30671:(e,s)=>{Object.defineProperty(s,"M",{enumerable:!0,get:function(){return function e(s,t){return t in s?s[t]:"then"in s&&"function"==typeof s.then?s.then(s=>e(s,t)):"function"==typeof s&&"default"===t?s:void 0}}})},44088:(e,s,t)=>{t.a(e,async(e,a)=>{try{t.r(s),t.d(s,{config:()=>m,default:()=>p,getServerSideProps:()=>x,getStaticPaths:()=>u,getStaticProps:()=>h,reportWebVitals:()=>y,routeModule:()=>b,unstable_getServerProps:()=>v,unstable_getServerSideProps:()=>g,unstable_getStaticParams:()=>f,unstable_getStaticPaths:()=>j,unstable_getStaticProps:()=>A});var r=t(63865),n=t(9455),l=t(30671),i=t(5583),c=t(53881),d=t(30350),o=e([d]);d=(o.then?(await o)():o)[0];let p=(0,l.M)(d,"default"),h=(0,l.M)(d,"getStaticProps"),u=(0,l.M)(d,"getStaticPaths"),x=(0,l.M)(d,"getServerSideProps"),m=(0,l.M)(d,"config"),y=(0,l.M)(d,"reportWebVitals"),A=(0,l.M)(d,"unstable_getStaticProps"),j=(0,l.M)(d,"unstable_getStaticPaths"),f=(0,l.M)(d,"unstable_getStaticParams"),v=(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,s,t)=>{t.a(e,async(e,a)=>{try{t.d(s,{A:()=>h});var r=t(8732),n=t(82015),l=t.n(n),i=t(53926),c=t(30350),d=t(81344),o=t(46168),p=e([c,d,o]);function h(){let{user:e,query:s,mariadbUserCred:t}=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]=p.then?(await p)():p,a()}catch(e){a(e)}})},81344:(e,s,t)=>{t.a(e,async(e,a)=>{try{t.d(s,{A:()=>u});var r=t(8732),n=t(82015),l=t.n(n),i=t(30350),c=t(96089),d=t(25088),o=t(53881),p=t(67982),h=e([i,p]);function u(){let e=l().useContext(o.AppContext),{user:s,query:t,mariadbUserCred:a}=l().useContext(i.ConnectContext),{DSQL_REMOTE_SQL_HOST:n}=e.pageProps.appData||{};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.jsx)("li",{children:(0,r.jsxs)(p.A,{children:[(0,r.jsx)("span",{className:"min-w-[200px]",children:"Server:"}),(0,r.jsx)("b",{children:n||"sql.datasquirel.com"})]})}),(0,r.jsx)("li",{children:(0,r.jsxs)(p.A,{children:[(0,r.jsx)("span",{className:"min-w-[200px]",children:"MariaDB Username:"})," ",(0,r.jsx)("b",{children:a?.mariadb_user})]})}),(0,r.jsx)("li",{children:(0,r.jsxs)(p.A,{children:[(0,r.jsx)("span",{className:"min-w-[200px]",children:"MariaDB Host:"})," ",(0,r.jsx)("b",{children:a?.mariadb_host})]})}),(0,r.jsx)("li",{children:(0,r.jsxs)(p.A,{children:[(0,r.jsx)("span",{className:"min-w-[200px]",children:"MariaDB Password:"})," ",(0,r.jsx)("b",{children:"*****************"}),(0,r.jsx)("button",{className:"ghost inline-block -my-4",onClick:e=>{navigator.clipboard.writeText(a?.mariadb_pass||"").then(()=>{window.alert("Copied Password!")})},children:(0,r.jsx)(c.A,{})})]})}),(0,r.jsx)("li",{children:(0,r.jsx)(p.A,{children:(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)("span",{className:"min-w-[200px]",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,p]=h.then?(await h)():h,a()}catch(e){a(e)}})},63997:(e,s,t)=>{t.a(e,async(e,a)=>{try{t.d(s,{A:()=>h});var r=t(8732),n=t(82015),l=t.n(n),i=t(30350),c=t(91140),d=t(16757),o=t(1756),p