First Commit
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1973],{71889:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/console",function(){return t(73794)}])},73794:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return h},default:function(){return x}});var l=t(85893),o=t(67294),s=t(85313),i=t(828),r=t(53920),c=t(47568),a=t(97582);function u(){return(u=(0,c.Z)((function(e){var n,l,o,s,i,r,c,u,d,f,m,h;return(0,a.__generator)(this,(function(a){return n=e.socket,l=t(12320).Terminal,o=t(12617).FitAddon,s=new o,i=document.getElementById("terminalWrapper"),r=document.getElementById("terminal"),c=i.clientWidth,u=Math.round(c/12),(d=new l({cols:u,rows:6})).open(r),s.fit(),n.on("console",(function(e){d.write(e)})),f=new o,m=document.getElementById("shell"),(h=new l({cols:u,rows:17})).open(m),f.fit(),n.on("shell",(function(e){h.write(e)})),h.onKey((function(e,t){n.emit("shell",e.key)})),[2,d]}))}))).apply(this,arguments)}var d=t(48531),f=!1;function m(e){var n=e.socketDomain,t=(0,i.Z)(o.useState(null),2),s=t[0],c=t[1],a=(0,i.Z)(o.useState(null),2),m=a[0],h=a[1],x=(0,i.Z)(o.useState(""),2),v=x[0],g=x[1];return o.useEffect((function(){var e=n;if(console.log("Socket Domain =>",e),e){var t=(0,r.io)(e,{extraHeaders:{"X-Socket-Paradigm":"Console"}});t.on("connect",(function(){c(t),console.log("Socket Connected!")})),setInterval((function(){t.emit("get-log")}),1e3),t.on("console-log",(function(e){console.log("Fetched Log",e),g(e.replace((0,d.Z)(),"")),setTimeout((function(){var e=document.getElementById("logHistoryWrapper");e&&!f&&(e.scrollTop=e.scrollHeight)}),200)}))}}),[]),o.useEffect((function(){if(s)return function(e){return u.apply(this,arguments)}({socket:s}).then((function(e){h(e)})),function(){var e,n;null===(e=document.getElementById("terminal"))||void 0===e||e.childNodes.forEach((function(e){var n;null===(n=e.parentNode)||void 0===n||n.removeChild(e)})),null===(n=document.getElementById("shell"))||void 0===n||n.childNodes.forEach((function(e){var n;null===(n=e.parentNode)||void 0===n||n.removeChild(e)})),null===m||void 0===m||m.dispose()}}),[s]),(0,l.jsxs)(o.Fragment,{children:[(0,l.jsxs)("div",{className:"w-full justify-between",children:[(0,l.jsx)("h2",{className:"text-2xl m-0",children:"Console"}),(0,l.jsx)("button",{onClick:function(e){s&&s.emit("log","Logging to the console")},children:"Log console"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-6 w-full items-stretch",children:[(0,l.jsx)("section",{className:"paper bg-slate-900",id:"terminalWrapper",children:(0,l.jsxs)("div",{className:"flex flex-col w-full gap-10 items-start justify-start terminal",children:[(0,l.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,l.jsx)("h2",{className:"m-0 text-white text-base",children:"Server Log"}),(0,l.jsx)("hr",{className:"opacity-20"}),(0,l.jsx)("div",{id:"terminal",className:"relative grow z-50 overflow-hidden w-full h-[150px]"})]}),(0,l.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,l.jsx)("h2",{className:"m-0 text-white text-base",children:"Shell"}),(0,l.jsx)("hr",{className:"opacity-20"}),(0,l.jsx)("div",{id:"shell",className:"relative grow z-50 overflow-hidden w-full h-[340px]"})]})]})}),(0,l.jsxs)("section",{className:"paper",children:[(0,l.jsxs)("div",{className:"flex w-full justify-between",children:[(0,l.jsx)("h2",{className:"m-0 text-2xl",children:"Log History"}),(0,l.jsx)("button",{className:"outlined smallest gray",onClick:function(e){window.confirm("Clear Log History?")&&s&&s.emit("clear-log")},children:"Clear Log"})]}),(0,l.jsx)("hr",{}),(0,l.jsx)("div",{className:"w-full max-h-[500px] overflow-auto",id:"logHistoryWrapper",style:{scrollBehavior:"smooth"},onMouseEnter:function(){return f=!0},onMouseLeave:function(){return f=!1},children:(0,l.jsx)("pre",{className:"block",children:v})})]})]})]})}t(56500);var h=!0;function x(e){var n=e.user,t=(e.data,e.socketDomain),o=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:"Console | Datasquirel"}),(0,l.jsx)("meta",{name:"description",content:"Databases Console"})]});return(0,l.jsx)(s.Z,{head:o,user:n,children:(0,l.jsx)(m,{socketDomain:t})})}}},function(e){e.O(0,[6142,493,5313,9774,2888,179],(function(){return n=71889,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1973],{71889:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/console",function(){return n(73794)}])},73794:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return m},default:function(){return h}});var l=n(85893),o=n(67294),s=n(85313),i=n(828),r=n(53920),a=n(47568),c=n(97582);function u(){return(u=(0,a.Z)((function(e){var t,l,o,s,i,r,a,u,d,f,m,h;return(0,c.__generator)(this,(function(c){return t=e.socket,l=n(12320).Terminal,o=n(12617).FitAddon,s=new o,i=document.getElementById("terminalWrapper"),r=document.getElementById("terminal"),a=i.clientWidth,u=Math.round(a/12),(d=new l({cols:u,rows:6})).open(r),s.fit(),t.on("console",(function(e){d.write(e)})),f=new o,m=document.getElementById("shell"),(h=new l({cols:u,rows:17})).open(m),f.fit(),t.on("shell",(function(e){h.write(e)})),h.onKey((function(e,n){t.emit("shell",e.key)})),[2,d]}))}))).apply(this,arguments)}var d=n(48531);function f(e){var t=e.socketDomain,n=(0,i.Z)(o.useState(null),2),s=n[0],a=n[1],c=(0,i.Z)(o.useState(null),2),f=c[0],m=c[1],h=(0,i.Z)(o.useState(""),2),x=(h[0],h[1]);return o.useEffect((function(){var e=t;if(console.log("Socket Domain =>",e),e){var n=(0,r.io)(e,{extraHeaders:{"X-Socket-Paradigm":"Console"}});n.on("connect",(function(){a(n),console.log("Socket Connected!")})),setInterval((function(){n.emit("get-log")}),1e3),n.on("console-log",(function(e){console.log("Fetched Log",e),x(e.replace((0,d.Z)(),"")),setTimeout((function(){var e=document.getElementById("logHistoryWrapper");e&&(e.scrollTop=e.scrollHeight)}),200)}))}}),[]),o.useEffect((function(){if(s)return function(e){return u.apply(this,arguments)}({socket:s}).then((function(e){m(e)})),function(){var e,t;null===(e=document.getElementById("terminal"))||void 0===e||e.childNodes.forEach((function(e){var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)})),null===(t=document.getElementById("shell"))||void 0===t||t.childNodes.forEach((function(e){var t;null===(t=e.parentNode)||void 0===t||t.removeChild(e)})),null===f||void 0===f||f.dispose()}}),[s]),(0,l.jsxs)(o.Fragment,{children:[(0,l.jsxs)("div",{className:"w-full justify-between",children:[(0,l.jsx)("h2",{className:"text-2xl m-0",children:"Console"}),(0,l.jsx)("button",{onClick:function(e){s&&s.emit("log","Logging to the console")},children:"Log console"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-6 w-full items-stretch",children:[(0,l.jsx)("section",{className:"paper bg-slate-900",id:"terminalWrapper",children:(0,l.jsx)("div",{className:"flex flex-col w-full gap-10 items-start justify-start terminal",children:(0,l.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,l.jsx)("h2",{className:"m-0 text-white text-base",children:"Shell"}),(0,l.jsx)("hr",{className:"opacity-20"}),(0,l.jsx)("div",{id:"shell",className:"relative grow z-50 overflow-hidden w-full h-[340px]"})]})})}),(0,l.jsx)("section",{className:"paper bg-slate-500",id:"terminalWrapper",children:(0,l.jsx)("div",{className:"flex flex-col w-full gap-10 items-start justify-start terminal",children:(0,l.jsxs)("div",{className:"flex flex-col items-start w-full",children:[(0,l.jsx)("h2",{className:"m-0 text-white text-base",children:"Server Log"}),(0,l.jsx)("hr",{className:"opacity-20"}),(0,l.jsx)("div",{id:"terminal",className:"relative grow z-50 overflow-hidden w-full h-[150px]"})]})})})]})]})}n(56500);var m=!0;function h(e){var t=e.user,n=(e.data,e.socketDomain),o=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:"Console | Datasquirel"}),(0,l.jsx)("meta",{name:"description",content:"Databases Console"})]});return(0,l.jsx)(s.Z,{head:o,user:t,children:(0,l.jsx)(f,{socketDomain:n})})}}},function(e){e.O(0,[6142,493,5313,9774,2888,179],(function(){return t=71889,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3036],{82907:function(n,t,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/docs",function(){return e(1376)}])},1376:function(n,t,e){"use strict";e.r(t),e.d(t,{__N_SSP:function(){return s},default:function(){return c}});var r=e(85893),u=(e(67294),e(85313)),a=e(62435),s=!0;function c(n){var t=n.user,e=n.data,s=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,r.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,r.jsx)(u.Z,{head:s,user:t,children:(0,r.jsx)(a.Z,{data:e})})}}},function(n){n.O(0,[5313,5622,9774,2888,179],(function(){return t=82907,n(n.s=t);var t}));var t=n.O();_N_E=t}]);
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7363],{60745:function(n,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/docs/create-page",function(){return r(37585)}])},37585:function(n,e,r){"use strict";r.r(e),r.d(e,{__N_SSP:function(){return s},default:function(){return c}});var t=r(85893),u=(r(67294),r(85313)),a=r(92378),s=!0;function c(n){var e=n.user,r=n.data,s=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,t.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,t.jsx)(u.Z,{head:s,user:e,children:(0,t.jsx)(a.Z,{data:r,user:e})})}}},function(n){n.O(0,[1179,4185,2452,7901,5313,2378,9774,2888,179],(function(){return e=60745,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3412],{29373:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/docs/edit-page",function(){return t(86046)}])},86046:function(n,e,t){"use strict";t.r(e),t.d(e,{__N_SSP:function(){return s},default:function(){return i}});var r=t(85893),u=(t(67294),t(85313)),a=t(92378),s=!0;function i(n){var e=n.user,t=n.data,s=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,r.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,r.jsx)(u.Z,{head:s,user:e,children:(0,r.jsx)(a.Z,{data:t,user:e})})}}},function(n){n.O(0,[1179,4185,2452,7901,5313,2378,9774,2888,179],(function(){return e=29373,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3281],{15410:function(n,e,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/docs/pages",function(){return t(46103)}])},46103:function(n,e,t){"use strict";t.r(e),t.d(e,{__N_SSP:function(){return s},default:function(){return c}});var r=t(85893),u=(t(67294),t(85313)),a=t(62435),s=!0;function c(n){var e=n.user,t=n.data,s=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,r.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,r.jsx)(u.Z,{head:s,user:e,children:(0,r.jsx)(a.Z,{data:t})})}}},function(n){n.O(0,[5313,5622,9774,2888,179],(function(){return e=15410,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9025],{61182:function(n,r,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/docs/pages/[id]",function(){return e(89242)}])},89242:function(n,r,e){"use strict";e.r(r),e.d(r,{__N_SSP:function(){return i},default:function(){return o}});var t=e(85893),a=e(67294),u=e(85313),s=e(92378);function c(n){var r=n.data,e=n.user,u=r.targetDocPage;return(0,t.jsx)(a.Fragment,{children:(0,t.jsx)(s.Z,{data:u,user:e})})}var i=!0;function o(n){var r=n.user,e=n.data,a=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,t.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,t.jsx)(u.Z,{head:a,user:r,children:(0,t.jsx)(c,{data:e,user:r})})}}},function(n){n.O(0,[1179,4185,2452,7901,5313,2378,9774,2888,179],(function(){return r=61182,n(n.s=r);var r}));var r=n.O();_N_E=r}]);
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3753],{31893:function(n,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/error-logs",function(){return r(31300)}])},96251:function(n,e,r){"use strict";r.d(e,{Z:function(){return u}});var t=r(828),o=r(85893),s=r(67294),i=r(86729),a=r(95264);function u(n){var e=function(){(0,i.Z)("/api/admin/grabErrorLogs").then((function(n){var e;"string"!==typeof n.log||(null===(e=n.log)||void 0===e?void 0:e.match(/./))?c(n.log.replace(/\n|\r|\n\r|\\n/gm,"<br/>")):c("No Logs Yet")}))},r=(0,t.Z)(s.useState(null),2),u=r[0],c=r[1],l=(0,t.Z)(s.useState(!1),2),d=l[0],f=l[1],h=(0,t.Z)(s.useState(0),2),g=h[0],p=h[1];return s.useEffect((function(){e(),0===g&&setInterval((function(){e()}),1e4)}),[g]),(0,o.jsxs)(s.Fragment,{children:[(0,o.jsxs)("div",{className:"w-full justify-between",children:[(0,o.jsx)("h2",{className:"text-xl m-0",children:"Error Logs"}),(0,o.jsx)("div",{children:(0,o.jsxs)("button",{onClick:function(n){window.confirm("Clear Error Logs?")&&(f(!0),(0,i.Z)("/api/admin/clearErrorLogs","post").then((function(n){console.log(n),p((function(n){return n+1}))})),setTimeout((function(){f(!1)}),2e3))},className:"outlined gray relative",children:[d&&(0,o.jsx)(a.Z,{width:"20px"}),"Clear Error Log"]})})]}),(0,o.jsxs)("section",{className:"paper",children:[u&&(0,o.jsx)("p",{dangerouslySetInnerHTML:{__html:u||"No Log"}}),!u&&(0,o.jsx)(a.Z,{position:"relative",width:"25px"})]})]})}},31300:function(n,e,r){"use strict";r.r(e),r.d(e,{__N_SSP:function(){return i},default:function(){return a}});var t=r(85893),o=(r(67294),r(85313)),s=(r(44187),r(96251)),i=!0;function a(n){var e=n.user,r=(n.data,(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,t.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}));return(0,t.jsx)(o.Z,{head:r,user:e,children:(0,t.jsx)(s.Z,{})})}}},function(n){n.O(0,[5313,3695,9774,2888,179],(function(){return e=31893,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3753],{31893:function(n,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/error-logs",function(){return r(31300)}])},96251:function(n,e,r){"use strict";r.d(e,{Z:function(){return u}});var t=r(828),o=r(85893),s=r(67294),i=r(86729),a=r(95264);function u(n){var e=function(){(0,i.Z)("/api/admin/grabErrorLogs").then((function(n){var e;"string"!==typeof n.log||(null===(e=n.log)||void 0===e?void 0:e.match(/./))?(c(""),c(n.log.replace(/\n|\r|\n\r|\\n/gm,"<br/>"))):c("No Logs Yet")}))},r=(0,t.Z)(s.useState(null),2),u=r[0],c=r[1],l=(0,t.Z)(s.useState(!1),2),d=l[0],f=l[1],h=(0,t.Z)(s.useState(0),2),g=h[0],p=h[1];return s.useEffect((function(){e(),0===g&&setInterval((function(){e()}),1e4)}),[g]),(0,o.jsxs)(s.Fragment,{children:[(0,o.jsxs)("div",{className:"w-full justify-between",children:[(0,o.jsx)("h2",{className:"text-xl m-0",children:"Error Logs"}),(0,o.jsx)("div",{children:(0,o.jsxs)("button",{onClick:function(n){window.confirm("Clear Error Logs?")&&(f(!0),(0,i.Z)("/api/admin/clearErrorLogs","post").then((function(n){console.log(n),p((function(n){return n+1}))})),setTimeout((function(){f(!1)}),2e3))},className:"outlined gray relative",children:[d&&(0,o.jsx)(a.Z,{width:"20px"}),"Clear Error Log"]})})]}),(0,o.jsxs)("section",{className:"paper",children:[u&&(0,o.jsx)("p",{dangerouslySetInnerHTML:{__html:u||"No Log"}}),!u&&(0,o.jsx)(a.Z,{position:"relative",width:"25px"})]})]})}},31300:function(n,e,r){"use strict";r.r(e),r.d(e,{__N_SSP:function(){return i},default:function(){return a}});var t=r(85893),o=(r(67294),r(85313)),s=(r(44187),r(96251)),i=!0;function a(n){var e=n.user,r=(n.data,(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("title",{children:"User Dashboard | Datasquirel"}),(0,t.jsx)("meta",{name:"description",content:"Welcome to your data app"})]}));return(0,t.jsx)(o.Z,{head:r,user:e,children:(0,t.jsx)(s.Z,{})})}}},function(n){n.O(0,[5313,3695,9774,2888,179],(function(){return e=31893,n(n.s=e);var e}));var e=n.O();_N_E=e}]);
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7570],{20343:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/login",function(){return n(54211)}])},54211:function(e,s,n){"use strict";n.r(s),n.d(s,{__N_SSP:function(){return a},default:function(){return o}});var i=n(85893),l=(n(67294),n(9008)),t=n.n(l),r=n(86729),a=!0;function o(e){e.user;var s=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("title",{children:"Super User Login | Datasquirel"}),(0,i.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,i.jsxs)("section",{className:"w-full h-screen justify-center items-center",children:[(0,i.jsx)(t(),{children:s}),(0,i.jsxs)("div",{className:"p-6 bg-slate-100 rounded w-full max-w-2xl flex flex-col items-center",children:[(0,i.jsx)(c,{}),(0,i.jsxs)("form",{onSubmit:function(e){e.preventDefault();var s=e.target;(0,r.Z)("/api/admin/loginSuUser",{method:"post",body:{email:s.email.value,password:s.password.value,authKey:s["auth-key"].value}}).then((function(e){window.location.reload()}))},className:"flex flex-col items-stretch gap-4 w-full",children:[(0,i.jsx)("input",{type:"text",name:"email",id:"email",placeholder:"Email Address"}),(0,i.jsx)("input",{type:"password",name:"password",id:"password",placeholder:"Password"}),(0,i.jsx)("input",{type:"password",name:"auth-key",id:"auth-key",placeholder:"Auth Key"}),(0,i.jsx)("button",{children:"Login"})]})]})]})}function c(){return(0,i.jsxs)("div",{className:"flex flex-col items-center gap-2 text-center",children:[(0,i.jsx)("h1",{className:"text-2xl text-center m-0",children:"Super User Login"}),(0,i.jsxs)("span",{children:["This area is reserved only for the owner of this Admin. To login use the info in your ",(0,i.jsx)("b",{children:"dsql.env"})," File. Use the env variables as follows. Your ",(0,i.jsx)("i",{children:"email address"})," is the same address used to register the first user account"]}),(0,i.jsxs)("ul",{className:"p-0",children:[(0,i.jsxs)("li",{children:["Password:"," ",(0,i.jsx)("i",{className:"info small w-auto inline",children:"dsql.env::"}),(0,i.jsx)("b",{children:" USER_KEY"})]}),(0,i.jsxs)("li",{children:["Auth Key:"," ",(0,i.jsx)("i",{className:"info small w-auto inline",children:"dsql.env::"}),(0,i.jsx)("b",{children:" SPECIAL_KEY"})]})]})]})}}},function(e){e.O(0,[9774,2888,179],(function(){return s=20343,e(e.s=s);var s}));var s=e.O();_N_E=s}]);
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7570],{20343:function(e,s,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/login",function(){return n(54211)}])},54211:function(e,s,n){"use strict";n.r(s),n.d(s,{__N_SSP:function(){return a},default:function(){return o}});var i=n(85893),l=(n(67294),n(9008)),t=n.n(l),r=n(86729),a=!0;function o(e){e.user;var s=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("title",{children:"Super User Login | Datasquirel"}),(0,i.jsx)("meta",{name:"description",content:"Welcome to your data app"})]});return(0,i.jsxs)("section",{className:"w-full h-screen justify-center items-center",children:[(0,i.jsx)(t(),{children:s}),(0,i.jsxs)("div",{className:"p-6 bg-slate-100 rounded w-full max-w-2xl flex flex-col items-center",children:[(0,i.jsx)(c,{}),(0,i.jsxs)("form",{onSubmit:function(e){e.preventDefault();var s=e.target;(0,r.Z)("/api/admin/loginSuUser",{method:"post",body:{email:s.email.value,password:s.password.value,authKey:s["auth-key"].value}}).then((function(e){window.location.reload()}))},className:"flex flex-col items-stretch gap-4 w-full",children:[(0,i.jsx)("input",{type:"text",name:"email",id:"email",placeholder:"Email Address"}),(0,i.jsx)("input",{type:"password",name:"password",id:"password",placeholder:"Password"}),(0,i.jsx)("input",{type:"password",name:"auth-key",id:"auth-key",placeholder:"Auth Key"}),(0,i.jsx)("button",{children:"Login"})]})]})]})}function c(){return(0,i.jsxs)("div",{className:"flex flex-col items-center gap-2 text-center",children:[(0,i.jsx)("h1",{className:"text-2xl text-center m-0",children:"Super User Login"}),(0,i.jsxs)("span",{children:["This area is reserved only for the owner of this Admin. To login use the info in your ",(0,i.jsx)("b",{children:"dsql.env"})," File. Use the env variables as follows. Your ",(0,i.jsx)("i",{children:"email address"})," is the same address used to register the first user account"]}),(0,i.jsxs)("ul",{className:"p-0",children:[(0,i.jsxs)("li",{children:["Password:"," ",(0,i.jsx)("i",{className:"info small w-auto inline",children:"dsql.env::"}),(0,i.jsx)("b",{children:" DSQL_USER_KEY"})]}),(0,i.jsxs)("li",{children:["Auth Key:"," ",(0,i.jsx)("i",{className:"info small w-auto inline",children:"dsql.env::"}),(0,i.jsx)("b",{children:" DSQL_SPECIAL_KEY"})]})]})]})}}},function(e){e.O(0,[9774,2888,179],(function(){return s=20343,e(e.s=s);var s}));var s=e.O();_N_E=s}]);
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user