1 line
9.5 KiB
JavaScript
1 line
9.5 KiB
JavaScript
(()=>{var e={};e.id=866,e.ids=[636,866],e.modules={30671:(e,t)=>{"use strict";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}}})},509:(e,t,s)=>{"use strict";s.a(e,async(e,r)=>{try{s.r(t),s.d(t,{config:()=>h,default:()=>p,getServerSideProps:()=>x,getStaticPaths:()=>m,getStaticProps:()=>d,reportWebVitals:()=>y,routeModule:()=>P,unstable_getServerProps:()=>v,unstable_getServerSideProps:()=>k,unstable_getStaticParams:()=>q,unstable_getStaticPaths:()=>g,unstable_getStaticProps:()=>f});var i=s(63865),u=s(9455),a=s(30671),l=s(49407),c=s(68268),o=s(21711),n=e([o]);o=(n.then?(await n)():n)[0];let p=(0,a.M)(o,"default"),d=(0,a.M)(o,"getStaticProps"),m=(0,a.M)(o,"getStaticPaths"),x=(0,a.M)(o,"getServerSideProps"),h=(0,a.M)(o,"config"),y=(0,a.M)(o,"reportWebVitals"),f=(0,a.M)(o,"unstable_getStaticProps"),g=(0,a.M)(o,"unstable_getStaticPaths"),q=(0,a.M)(o,"unstable_getStaticParams"),v=(0,a.M)(o,"unstable_getServerProps"),k=(0,a.M)(o,"unstable_getServerSideProps"),P=new i.PagesRouteModule({definition:{kind:u.A.PAGES,page:"/su/console",pathname:"/su/console",bundlePath:"",filename:""},components:{App:c.default,Document:l.default},userland:o});r()}catch(e){r(e)}})},54254:(e,t,s)=>{"use strict";s.a(e,async(e,r)=>{try{s.d(t,{A:()=>n});var i=s(8732),u=s(82015),a=s.n(u),l=s(10717);s(20008);var c=s(39127),o=e([l,c]);function n({socketDomain:e}){let[t,s]=a().useState(null),[r,u]=a().useState(null),[l,c]=a().useState("");return(0,i.jsxs)(a().Fragment,{children:[(0,i.jsxs)("div",{className:"w-full justify-between",children:[(0,i.jsx)("h2",{className:"text-2xl m-0",children:"Console"}),(0,i.jsx)("button",{onClick:e=>{t&&t.emit("log","Logging to the console")},children:"Log console"})]}),(0,i.jsxs)("div",{className:"grid grid-cols-2 gap-6 w-full items-stretch",children:[(0,i.jsx)("section",{className:"paper bg-slate-900",id:"terminalWrapper",children:(0,i.jsx)("div",{className:"flex flex-col w-full gap-10 items-start justify-start terminal",children:(0,i.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,i.jsx)("h2",{className:"m-0 text-white text-base",children:"Shell"}),(0,i.jsx)("hr",{className:"opacity-20"}),(0,i.jsx)("div",{id:"shell",className:"relative grow z-50 overflow-hidden w-full h-[340px]"})]})})}),(0,i.jsx)("section",{className:"paper bg-slate-500",id:"terminalWrapper",children:(0,i.jsx)("div",{className:"flex flex-col w-full gap-10 items-start justify-start terminal",children:(0,i.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,i.jsx)("h2",{className:"m-0 text-white text-base",children:"Server Log"}),(0,i.jsx)("hr",{className:"opacity-20"}),(0,i.jsx)("div",{id:"terminal",className:"relative grow z-50 overflow-hidden w-full h-[150px]"})]})})})]})]})}[l,c]=o.then?(await o)():o,r()}catch(e){r(e)}})},20008:(e,t,s)=>{"use strict";async function r({socket:e}){let{Terminal:t}=s(86182),{FitAddon:r}=s(91999),i=new r,u=document.getElementById("terminalWrapper"),a=document.getElementById("terminal"),l=Math.round(u.clientWidth/12),c=new t({cols:l,rows:6});c.open(a),i.fit(),e.on("console",e=>{c.write(e)});{let s=new r,i=document.getElementById("shell"),u=new t({cols:l,rows:17});u.open(i),s.fit(),e.on("shell",e=>{u.write(e)}),u.onKey((t,s)=>{e.emit("shell",t.key)})}return c}s.d(t,{A:()=>r})},67105:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(82544).A)("CloudUpload",[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M12 12v9",key:"192myk"}],["path",{d:"m16 16-4-4-4 4",key:"119tzi"}]])},26628:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(82544).A)("DatabaseBackup",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 12a9 3 0 0 0 5 2.69",key:"1ui2ym"}],["path",{d:"M21 9.3V5",key:"6k6cib"}],["path",{d:"M3 5v14a9 3 0 0 0 6.47 2.88",key:"i62tjy"}],["path",{d:"M12 12v4h4",key:"1bxaet"}],["path",{d:"M13 20a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L12 16",key:"1f4ei9"}]])},34479:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(82544).A)("FileWarning",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},20427:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(82544).A)("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]])},62011:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(82544).A)("LockKeyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]])},2459:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(82544).A)("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},80006:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(82544).A)("SquareChevronRight",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m10 8 4 4-4 4",key:"1wy4r4"}]])},25294:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(82544).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},21711:(e,t,s)=>{"use strict";s.a(e,async(e,r)=>{try{s.r(t),s.d(t,{default:()=>n,getServerSideProps:()=>p});var i=s(8732);s(82015);var u=s(93615),a=s.n(u),l=s(64987),c=s(54254);s(68353);var o=e([c]);function n({user:e,data:t,socketDomain:s}){let r=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("title",{children:"Console | Datasquirel"}),(0,i.jsx)("meta",{name:"description",content:"Databases Console"})]});return(0,i.jsx)(l.A,{head:r,user:e,children:(0,i.jsx)(c.A,{socketDomain:s})})}async function p({req:e,res:t,query:s}){let r=await a()(e);if(!r?.logged_in_status)return{redirect:{destination:"/su/login",permanent:!1}};let i=process.env.DSQL_SOCKET_DOMAIN;return{props:{user:r,socketDomain:i||""}}}c=(o.then?(await o)():o)[0],r()}catch(e){r(e)}})},68353:()=>{},9455:(e,t)=>{"use strict";var s;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return s}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(s||(s={}))},66099:e=>{"use strict";e.exports=require("@mui/system")},37616:e=>{"use strict";e.exports=require("@mui/system/DefaultPropsProvider")},24509:e=>{"use strict";e.exports=require("@mui/system/InitColorSchemeScript")},84781:e=>{"use strict";e.exports=require("@mui/system/colorManipulator")},18215:e=>{"use strict";e.exports=require("@mui/system/createStyled")},59989:e=>{"use strict";e.exports=require("@mui/system/createTheme")},16670:e=>{"use strict";e.exports=require("@mui/system/styleFunctionSx")},88698:e=>{"use strict";e.exports=require("@mui/system/useThemeProps")},76831:e=>{"use strict";e.exports=require("@mui/utils")},28578:e=>{"use strict";e.exports=require("@mui/utils/capitalize")},14036:e=>{"use strict";e.exports=require("@mui/utils/composeClasses")},31112:e=>{"use strict";e.exports=require("@mui/utils/createChainedFunction")},21763:e=>{"use strict";e.exports=require("@mui/utils/debounce")},7546:e=>{"use strict";e.exports=require("@mui/utils/deepmerge")},5928:e=>{"use strict";e.exports=require("@mui/utils/deprecatedPropType")},20985:e=>{"use strict";e.exports=require("@mui/utils/formatMuiErrorMessage")},61119:e=>{"use strict";e.exports=require("@mui/utils/generateUtilityClass")},81699:e=>{"use strict";e.exports=require("@mui/utils/generateUtilityClasses")},29823:e=>{"use strict";e.exports=require("@mui/utils/isMuiElement")},55402:e=>{"use strict";e.exports=require("@mui/utils/ownerDocument")},46875:e=>{"use strict";e.exports=require("@mui/utils/ownerWindow")},48080:e=>{"use strict";e.exports=require("@mui/utils/requirePropFactory")},39597:e=>{"use strict";e.exports=require("@mui/utils/setRef")},88190:e=>{"use strict";e.exports=require("@mui/utils/unsupportedProp")},83889:e=>{"use strict";e.exports=require("@mui/utils/useControlled")},21956:e=>{"use strict";e.exports=require("@mui/utils/useEnhancedEffect")},4926:e=>{"use strict";e.exports=require("@mui/utils/useEventCallback")},7376:e=>{"use strict";e.exports=require("@mui/utils/useForkRef")},63310:e=>{"use strict";e.exports=require("@mui/utils/useId")},10977:e=>{"use strict";e.exports=require("@mui/utils/useIsFocusVisible")},74956:e=>{"use strict";e.exports=require("clsx")},40361:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},27912:e=>{"use strict";e.exports=require("next/head")},29825:e=>{"use strict";e.exports=require("prop-types")},82015:e=>{"use strict";e.exports=require("react")},22326:e=>{"use strict";e.exports=require("react-dom")},8732:e=>{"use strict";e.exports=require("react/jsx-runtime")},86182:e=>{"use strict";e.exports=require("xterm")},91999:e=>{"use strict";e.exports=require("xterm-addon-fit")},79428:e=>{"use strict";e.exports=require("buffer")},55511:e=>{"use strict";e.exports=require("crypto")},81630:e=>{"use strict";e.exports=require("http")},33873:e=>{"use strict";e.exports=require("path")},39127:e=>{"use strict";e.exports=import("ansi-regex")},10717:e=>{"use strict";e.exports=import("socket.io-client")}};var t=require("../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[9764,883,8268,615],()=>s(509));module.exports=r})(); |