dsql-admin/dsql-app/.local_dist/static/chunks/pages/su/backups-bca9ee6e12563d0e.js
2024-11-05 12:12:42 +01:00

1 line
7.5 KiB
JavaScript

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3159],{50027:function(t,e,c){"use strict";var n=c(64836);e.Z=void 0;var s=n(c(64938)),a=c(85893),r=(0,s.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=r},64689:function(t,e,c){"use strict";var n=c(64836);e.Z=void 0;var s=n(c(64938)),a=c(85893),r=(0,s.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=r},39269:function(t,e,c){"use strict";var n=c(64836);e.Z=void 0;var s=n(c(64938)),a=c(85893),r=(0,s.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=r},28466:function(t,e,c){"use strict";var n=c(64836);e.Z=void 0;var s=n(c(64938)),a=c(85893),r=(0,s.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=r},38544:function(t,e,c){"use strict";var n=c(64836);e.Z=void 0;var s=n(c(64938)),a=c(85893),r=(0,s.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=r},34999:function(t,e,c){"use strict";var n=c(64836);e.Z=void 0;var s=n(c(64938)),a=c(85893),r=(0,s.default)([(0,a.jsx)("path",{d:"M15.22 4.75 7.87 7.79l4.96 11.96 7.35-3.05-4.96-11.95zM11 10c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z",opacity:".3"},"0"),(0,a.jsx)("path",{d:"m3.87 11.18-2.43 5.86c-.41 1.02.08 2.19 1.09 2.61l1.34.56v-9.03zm18.16 4.77L17.07 3.98c-.31-.75-1.04-1.21-1.81-1.23-.26 0-.53.04-.79.15L7.1 5.95c-.75.31-1.21 1.03-1.23 1.8-.01.27.04.54.15.8l4.96 11.97c.31.76 1.05 1.22 1.83 1.23.26 0 .52-.05.77-.15l7.36-3.05c1.02-.42 1.51-1.59 1.09-2.6zm-9.2 3.8L7.87 7.79l7.35-3.04h.01l4.95 11.95-7.35 3.05z"},"1"),(0,a.jsx)("circle",{cx:"11",cy:"9",r:"1"},"2"),(0,a.jsx)("path",{d:"m9.33 21.75-3.45-8.34v6.34c0 1.1.9 2 2 2h1.45z"},"3")],"StyleTwoTone");e.Z=r},51903:function(t,e,c){"use strict";var n=c(64836);e.Z=void 0;var s=n(c(64938)),a=c(85893),r=(0,s.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=r},5218:function(t,e,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/backups",function(){return c(8188)}])},96251:function(t,e,c){"use strict";c.d(e,{Z:function(){return o}});var n=c(828),s=c(85893),a=c(67294),r=c(86729),i=c(95264);function o(t){var e=function(){(0,r.Z)("/api/admin/grabErrorLogs").then((function(t){var e;"string"!==typeof t.log||(null===(e=t.log)||void 0===e?void 0:e.match(/./))?u(t.log.replace(/\n|\r|\n\r|\\n/gm,"<br/>")):u("No Logs Yet")}))},c=(0,n.Z)(a.useState(null),2),o=c[0],u=c[1],l=(0,n.Z)(a.useState(!1),2),h=l[0],v=l[1],d=(0,n.Z)(a.useState(0),2),p=d[0],f=d[1];return a.useEffect((function(){e(),0===p&&setInterval((function(){e()}),1e4)}),[p]),(0,s.jsxs)(a.Fragment,{children:[(0,s.jsxs)("div",{className:"w-full justify-between",children:[(0,s.jsx)("h2",{className:"text-xl m-0",children:"Error Logs"}),(0,s.jsx)("div",{children:(0,s.jsxs)("button",{onClick:function(t){window.confirm("Clear Error Logs?")&&(v(!0),(0,r.Z)("/api/admin/clearErrorLogs","post").then((function(t){console.log(t),f((function(t){return t+1}))})),setTimeout((function(){v(!1)}),2e3))},className:"outlined gray relative",children:[h&&(0,s.jsx)(i.Z,{width:"20px"}),"Clear Error Log"]})})]}),(0,s.jsxs)("section",{className:"paper",children:[o&&(0,s.jsx)("p",{dangerouslySetInnerHTML:{__html:o||"No Log"}}),!o&&(0,s.jsx)(i.Z,{position:"relative",width:"25px"})]})]})}},8188:function(t,e,c){"use strict";c.r(e),c.d(e,{__N_SSP:function(){return h},default:function(){return v}});var n=c(85893),s=c(67294),a=c(85313),r=(c(96251),c(828)),i=c(86729),o=c(95264),u=c(34999);function l(t){var e=(0,r.Z)(s.useState(!1),2),c=e[0],a=e[1],l=(0,r.Z)(s.useState([]),2),h=l[0],v=l[1],d=(0,r.Z)(s.useState(0),2),p=d[0],f=d[1];return s.useEffect((function(){(0,i.Z)("/api/admin/grabBackups").then((function(t){v(t.backups)}))}),[p]),(0,n.jsxs)(s.Fragment,{children:[c&&(0,n.jsx)(o.Z,{}),(0,n.jsxs)("div",{className:"w-full justify-between",children:[(0,n.jsx)("h2",{className:"text-xl m-0",children:"Backups"}),(0,n.jsx)("div",{children:(0,n.jsx)("button",{onClick:function(t){window.confirm("Create new backup?")&&(a(!0),(0,i.Z)("/api/admin/createNewBackup").then((function(t){f((function(t){return t+1})),setTimeout((function(){a(!1)}),2e3)})))},className:"relative",children:"Create New Backup"})})]}),(0,n.jsxs)("section",{className:h&&h[0]?"p-0 gap-4":"paper",children:[!h&&(0,n.jsx)(o.Z,{}),h&&h[0]&&h.sort((function(t,e){return parseInt(t)>parseInt(e)?-1:1})).map((function(t,e){var c=new Date(parseInt(t));return(0,n.jsxs)("a",{href:"/su/backups/".concat(t),className:"card w-full items-center",children:[(0,n.jsx)(u.Z,{color:"inherit",className:"opacity-40 text-slate-500"}),(0,n.jsx)("b",{children:"Backup:"}),(0,n.jsx)("span",{children:c.toString()})]},t)})),h&&!h[0]&&(0,n.jsx)("span",{children:"No Backups Yet"})]})]})}var h=!0;function v(t){var e=t.user,c=(t.data,(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("title",{children:"Backups | Datasquirel"}),(0,n.jsx)("meta",{name:"description",content:"Databases backups"})]}));return(0,n.jsx)(a.Z,{head:c,user:e,children:(0,n.jsx)(l,{})})}}},function(t){t.O(0,[5313,9774,2888,179],(function(){return e=5218,t(t.s=e);var e}));var e=t.O();_N_E=e}]);