1 line
10 KiB
JavaScript
1 line
10 KiB
JavaScript
|
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9365],{424:function(e,s,a){a.d(s,{Z:function(){return i}});var t=a(828),n=a(85893),l=a(67294);function i(e){var s,a,i,r=e.confirmedDelegetedUser,c=e.linksArray,d=e.user,o=(null===r||void 0===r||r.delegated,null===r||void 0===r||null===(s=r.priviledges)||void 0===s||s.match(/Edit Tables/i),null===r||void 0===r||null===(a=r.priviledges)||void 0===a||a.match(/Delete Tables/i),null===r||void 0===r||null===(i=r.priviledges)||void 0===i||i.match(/Create Tables/i),l.useState(c||null)),u=(0,t.Z)(o,2),x=u[0],h=u[1];return l.useEffect((function(){var e;if(!c){var s=window.location.pathname,a=s.split("/"),t=[];t.push({title:"Home",path:s.match(/admin/)?"/admin":"/"});null===(e=window.location.search)||void 0===e||e.match(/delegated=true/);a.forEach((function(e,s,a){(null===e||void 0===e?void 0:e.match(/./))&&1!=s&&(e.match(/^\d+$/)&&d||t.push({title:e,path:function(){for(var e="",t=0;t<a.length;t++){var n=a[t];t>s||!n.match(/./)||(e+="/".concat(n))}return e}()}))})),h(t)}}),[]),x&&x[1]?(0,n.jsx)("div",{className:"text-sm mt-2 flex-wrap",children:x.map((function(e,s,a){return s===x.length-1?(0,n.jsx)("a",{href:e.path,className:"text-slate-400 dark:text-slate-500 pointer-events-none",children:e.title},s):(0,n.jsxs)(l.Fragment,{children:[(0,n.jsx)("a",{href:e.path,className:"query-url",children:e.title}),(0,n.jsx)("span",{className:"opacity-20",children:"|"})]},s)}))}):(0,n.jsx)(l.Fragment,{})}},96355:function(e,s,a){a.d(s,{Z:function(){return x}});var t=a(828),n=a(85893),l=a(67294),i=a(86729),r=a(81069),c=a(95264),d=a(88518),o=a(68599),u=a(62888);function x(e){var s=(0,t.Z)(l.useState(!0),2),a=s[0],x=s[1],h=(0,t.Z)(l.useState(0),2),m=h[0],f=h[1],p=(0,t.Z)(l.useState(0),2),j=(p[0],p[1]);return l.useEffect((function(){m||(0,i.Z)("/api/getDiskUsage").then((function(e){(null===e||void 0===e?void 0:e.total)&&(f(e.total),localStorage.setItem("disk_usage",e.total)),x(!1)}))}),[]),a?(0,n.jsx)("div",{className:"button ghost small-text",style:{height:"30px"},children:(0,n.jsx)(c.Z,{width:"15px",position:"relative"})}):(0,n.jsx)(l.Fragment,{children:m?(0,n.jsxs)("div",{className:"button ghost small-text normal-weight p-0",style:{height:"30px",padding:0},onClick:function(e){x(!0),(0,r.Z)().then((function(){j((function(e){return e+1})),x(!1)}))},children:[a&&(0,n.jsx)(c.Z,{width:"15px"}),(0,n.jsx)(o.Z,{size:20,className:"text-slate-400 mr-[3px]"}),(0,n.jsx)("span",{className:"font-bold text-slate-700 dark:text-white",children:m&&m.toFixed(2)}),(0,n.jsx)("span",{className:"text-slate-500",children:"mb"}),(0,n.jsx)(u.Z,{size:17,className:"text-slate-400",strokeWidth:2})]}):(0,n.jsxs)("span",{className:"text-sm info gray font-normal w-auto",children:[(0,n.jsx)(d.Z,{color:"inherit",className:"opacity-50 text-slate-500",fontSize:"small"}),(0,n.jsx)("span",{children:"No Disk Usage Data Available Yet"})]})})}},81069:function(e,s,a){a.d(s,{Z:function(){return i}});var t=a(47568),n=a(97582),l=a(86729);function i(){return r.apply(this,arguments)}function r(){return(r=(0,t.Z)((function(){var e;return(0,n.__generator)(this,(function(s){switch(s.label){case 0:return[4,(0,l.Z)("/api/getDiskUsage")];case 1:return e=s.sent(),localStorage.setItem("disk_usage",e.total),[2]}}))}))).apply(this,arguments)}},54858:function(e,s,a){a.d(s,{Z:function(){return N}});var t=a(85893),n=a(67294),l=a(9008),i=a.n(l),r=(a(15281),a(828)),c=a(64017),d=a(96224),o=a(73486),u=a(33587),x=a(78107),h=a(49525),m=a(57150),f=a(3848),p=a(4844);function j(e){var s=e.user,a=(0,r.Z)(n.useState(!0),2),l=a[0],i=a[1];return(0,t.jsxs)("aside",{className:"aside"+(l?" mobile-collapsed":" mobile-expanded"),children:[(0,t.jsx)(c.Z,{adminAside:!0,collapseAsideMobile:l,setCollapseAsideMobile:i}),(0,t.jsx)("hr",{className:"opacity-0 mt-4"}),(0,t.jsxs)("div",{className:"main-links"+(l?" hidden lg:flex":" "),children:[(0,t.jsxs)("a",{href:"/admin","data-currentlink":"/admin","data-strictlink":"true",children:[(0,t.jsx)(o.Z,{size:20}),(0,t.jsx)("span",{children:"Dashboard"})]}),(0,t.jsxs)("a",{href:"/admin/".concat(null===s||void 0===s?vo
|