1 line
6.9 KiB
JavaScript
1 line
6.9 KiB
JavaScript
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7775],{50027:function(t,e,n){"use strict";var r=n(64836);e.Z=void 0;var c=r(n(64938)),a=n(85893),o=(0,c.default)([(0,a.jsx)("path",{d:"m19.21 12.04-1.53-.11-.3-1.5C16.88 7.86 14.62 6 12 6 9.94 6 8.08 7.14 7.12 8.96l-.5.95-1.07.11C3.53 10.24 2 11.95 2 14c0 2.21 1.79 4 4 4h13c1.65 0 3-1.35 3-3 0-1.55-1.22-2.86-2.79-2.96zm-5.76.96v3h-2.91v-3H8l4-4 4 4h-2.55z",opacity:".3"},"0"),(0,a.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z"},"1")],"BackupTwoTone");e.Z=o},64689:function(t,e,n){"use strict";var r=n(64836);e.Z=void 0;var c=r(n(64938)),a=n(85893),o=(0,c.default)([(0,a.jsx)("path",{d:"M18 19h-5v-4h-2v4H6v-8.9l6-4.58 6 4.58z",opacity:".3"},"0"),(0,a.jsx)("path",{d:"M12 3 6 7.58V6H4v3.11L1 11.4l1.21 1.59L4 11.62V21h16v-9.38l1.79 1.36L23 11.4 12 3zm6 16h-5v-4h-2v4H6v-8.9l6-4.58 6 4.58V19zM10 1c0 1.66-1.34 3-3 3-.55 0-1 .45-1 1H4c0-1.66 1.34-3 3-3 .55 0 1-.45 1-1h2z"},"1")],"CottageTwoTone");e.Z=o},39269:function(t,e,n){"use strict";var r=n(64836);e.Z=void 0;var c=r(n(64938)),a=n(85893),o=(0,c.default)([(0,a.jsx)("path",{d:"M12 4c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm1 13h-2v-2h2v2zm0-4h-2V7h2v6z",opacity:".3"},"0"),(0,a.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm-1-5h2v2h-2zm0-8h2v6h-2z"},"1")],"ErrorTwoTone");e.Z=o},28466:function(t,e,n){"use strict";var r=n(64836);e.Z=void 0;var c=r(n(64938)),a=n(85893),o=(0,c.default)([(0,a.jsx)("path",{d:"M6 10v10h5.29c-.19-.63-.29-1.3-.29-2 0-3.87 3.13-7 7-7v-1H6z",opacity:".3"},"0"),(0,a.jsx)("path",{d:"M6 20V10h12v1c.7 0 1.37.1 2 .29V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6.26c-.42-.6-.75-1.28-.97-2H6zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6z"},"1"),(0,a.jsx)("path",{d:"M18 13c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0 2c.83 0 1.5.67 1.5 1.5S18.83 18 18 18s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5zm0 6c-1.03 0-1.94-.52-2.48-1.32.73-.42 1.57-.68 2.48-.68s1.75.26 2.48.68c-.54.8-1.45 1.32-2.48 1.32z"},"2")],"LockPersonTwoTone");e.Z=o},38544:function(t,e,n){"use strict";var r=n(64836);e.Z=void 0;var c=r(n(64938)),a=n(85893),o=(0,c.default)([(0,a.jsx)("circle",{cx:"9",cy:"8",r:"2",opacity:".3"},"0"),(0,a.jsx)("path",{d:"M9 15c-2.7 0-5.8 1.29-6 2.01V18h12v-1c-.2-.71-3.3-2-6-2z",opacity:".3"},"1"),(0,a.jsx)("path",{d:"M16.67 13.13C18.04 14.06 19 15.32 19 17v3h4v-3c0-2.18-3.57-3.47-6.33-3.87zM15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4c-.47 0-.91.1-1.33.24C14.5 5.27 15 6.58 15 8s-.5 2.73-1.33 3.76c.42.14.86.24 1.33.24zm-6 0c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm0 7c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4zm6 5H3v-.99C3.2 16.29 6.3 15 9 15s5.8 1.29 6 2v1z"},"2")],"PeopleAltTwoTone");e.Z=o},51903:function(t,e,n){"use strict";var r=n(64836);e.Z=void 0;var c=r(n(64938)),a=n(85893),o=(0,c.default)([(0,a.jsx)("path",{d:"M4 18h16V8H4v10zm8-3h6v2h-6v-2zm-5.91-4.59L7.5 9l4 4-4 4-1.41-1.41L8.67 13l-2.58-2.59z",opacity:".3"},"0"),(0,a.jsx)("path",{d:"M12 15h6v2h-6z"},"1"),(0,a.jsx)("path",{d:"M20 4H4c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm0 14H4V8h16v10z"},"2"),(0,a.jsx)("path",{d:"m7.5 17 4-4-4-4-1.41 1.41L8.67 13l-2.58 2.59z"},"3")],"TerminalTwoTone");e.Z=o},91869:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/envar",function(){return n(38195)}])},38195:function(t,e,n){"use strict";n.r(e),n.d(e,{__N_SSP:function(){return h},default:function(){return f}});var r,c=n(85893),a=n(67294),o=n(85313),i=n(26042),s=n(828),u=n(95264),v=(n(73461),n(86729));function d(t){var e=t.envObject,n=t.envKey,o=(0,s.Z)(a.useState(!1),2),i=o[0],d=o[1],l=(0,s.Z)(a.useState(!1),2),h=l[0],f=l[1],p=(0,s.Z)(a.useState(e[n]),2),m=p[0],x=p[1],j=(0,s.Z)(a.useState(!1),2),w=j[0],z=j[1];return(0,c.jsx)(a.Fragment,{children:(0,c.jsxs)("form",{className:"grid grid-cols-2 items-center gap2 w-full hover:bg-slate-100 py-2 px-4 relative",onSubmit:function(t){t.preventDefault(),i&&(f(!0),setTimeout((function(){f(!1)}),1e3))},children:[h&&(0,c.jsx)(u.Z,{width:"20px"}),(0,c.jsx)("span",{children:n}),(0,c.jsxs)("div",{children:[(0,c.jsx)("input",{type:i?"text":"password",onFocus:function(t){"password"==t.target.type&&(t.target.type="text"),z(!0),d(!0)},onBlur:function(t){window.clearTimeout(r),r=setTimeout((function(){"text"==t.target.type&&(t.target.type="password"),z(!1),d(!1)}),2e3)},value:m,onChange:function(t){x(t.target.value)}}),w?(0,c.jsx)("div",{className:"button secondary",onClick:function(t){t.preventDefault(),i&&(f(!0),(0,v.Z)("/api/admin/updateEnv",{method:"post",body:{key:n,value:m}}).then((function(t){t.success?window.location.reload():window.alert(t.error)})).finally((function(){setTimeout((function(){f(!1)}),1e3)})))},children:"Update"}):(0,c.jsx)("div",{className:"button outlined",onClick:function(t){d(!i),z(!0)},children:"Reveal"})]})]})})}function l(t){var e=t.data.envObject,n=(0,s.Z)(a.useState(e),2),r=n[0],o=n[1],u=Object.keys(r);return(0,c.jsxs)(a.Fragment,{children:[(0,c.jsxs)("div",{className:"w-full justify-between",children:[(0,c.jsx)("h2",{className:"text-2xl m-0",children:"Environment Variables"}),(0,c.jsx)("button",{onClick:function(t){var e=window.prompt("What is the new ENV name?"),n=window.prompt("ENV Value");e&&n&&o((function(t){var r=(0,i.Z)({},t);return r[e]=n,r}))},children:"Add Environment Variable"})]}),(0,c.jsx)("section",{className:"paper",children:u.map((function(t,e){return(0,c.jsx)(d,{envObject:r,envKey:t},e)}))})]})}var h=!0;function f(t){var e=t.user,n=t.data,r=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("title",{children:"Console | Datasquirel"}),(0,c.jsx)("meta",{name:"description",content:"Databases Console"})]});return(0,c.jsx)(o.Z,{head:r,user:e,children:(0,c.jsx)(l,{data:n})})}},73461:function(t){!function(){"undefined"!==typeof __nccwpck_require__&&(__nccwpck_require__.ab="//");var e={};!function(){var t=e;t.endianness=function(){return"LE"},t.hostname=function(){return"undefined"!==typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"undefined"!==typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"}}(),t.exports=e}()}},function(t){t.O(0,[5313,9774,2888,179],(function(){return e=91869,t(t.s=e);var e}));var e=t.O();_N_E=e}]); |