PageSourceSearch

https://v3.quickbox.io/_next/static/chunks/12892-ea219893e451b99d.js

js quickbox.io collected 2026-09-24 10:05:45 UTC 35,041 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[12892],{55763:(e,t,s)=>{s.d(t,{l:()=>c});var a=s(95155),i=s(12115),r=s(26497),n=s(15927),l=s(65847),o=s(45871);let d=e=>{let{content:t,children:s,position:r="top"}=e,n=(0,i.useRef)(null),l=(0,o.D)(n,{content:t,position:r});return(0,a.jsx)("div",{ref:n,...l,children:s})};function c(e){var t,s,o,c,x,h,m,p;let{table:b,allTables:u,onClose:g,contentRef:j,isDetached:w,onDetach:f,onDock:v,versions:N}=e,k=(0,l.f)(),y=(0,i.useRef)(k);y.current=k,(0,i.useEffect)(()=>()=>{y.current.hideTooltip({immediate:!0})},[]);let L=e=>{if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return"".concat((e/Math.pow(1024,t)).toFixed(2)," ").concat(["B","KB","MB","GB"][t])},C=e=>{let t=e.rows>0?e.totalSize/e.rows:0,s=e.dataSize>0?e.indexSize/e.dataSize*100:0;u.reduce((e,t)=>e+t.totalSize,0);let a=(e=>{let t=u.reduce((e,t)=>e+t.totalSize,0);return t>0?e/t*100:0})(e.totalSize);return{rowSize:t,indexRatio:s,sizePercentage:a,isLarge:e.rows>1e5,isVeryLarge:e.rows>1e6,isHeavilyIndexed:s>50,isDominant:a>25,hasLargeRows:t>10240,recommendations:[]}};if(!b)return null;let M=C(b),S=(e=>{let t=C(e),s=[];return t.isVeryLarge?(s.push("⚠️ Very large table (>1M rows) - Consider partitioning by date or ID ranges"),s.push("\uD83D\uDCA1 Implement archival strategy for old records")):t.isLarge&&s.push("\uD83D\uDCCA Large table (>100K rows) - Monitor growth trends regularly"),t.isDominant&&s.push("\uD83C\uDFAF Dominant table (>25% of database) - Primary candidate for optimization"),t.isHeavilyIndexed?s.push("\uD83D\uDD0D High index-to-data ratio - Review index usage and remove unused indexes"):t.indexRatio<10&&e.rows>1e4&&s.push("⚡ Low index coverage - Consider adding indexes for common queries"),t.hasLargeRows&&s.push("\uD83D\uDCE6 Large average row size - Consider normalizing or moving BLOBs to object storage"),!(e.rows>5e5)||e.name.includes("log")||e.name.includes("audit")||s.push("\uD83D\uDD04 Consider read replicas or separate analytics database for reporting"),(e.name.includes("log")||e.name.includes("audit")||e.name.includes("event"))&&s.push("\uD83D\uDDC4️ Log/audit table detected - Implement time-based retention policy"),0===s.length&&s.push("✅ Table appears well-optimized for current size"),s})(b),z=b.name.split("_")[0],B=u.filter(e=>e.name!==b.name&&e.name.startsWith(z)).slice(0,5);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.N,{children:b&&!w&&(0,a.jsx)(n.P.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-50",onClick:g},"table-backdrop")}),(0,a.jsx)(r.N,{children:b&&(0,a.jsxs)(n.P.div,{initial:w?{scale:.95,opacity:0}:{y:"100%",opacity:0},animate:w?{scale:1,opacity:1}:{y:0,opacity:1},exit:w?{scale:.9,opacity:0}:{y:"100%",opacity:0},transition:{type:"spring",damping:30,stiffness:300},drag:w,dragMomentum:!1,dragElastic:.1,style:w?{position:"fixed",top:"50%",left:"50%",x:"-50%",y:"-50%",width:"min(900px, calc(100vw - 4rem))",maxHeight:"85vh",zIndex:9999}:{position:"fixed",bottom:0,left:null!=(c=null==j||null==(t=j.current)?void 0:t.getBoundingClientRect().left)?c:0,width:null!=(x=null==j||null==(s=j.current)?void 0:s.getBoundingClientRect().width)?x:"100%",maxHeight:"85vh",zIndex:51},className:"overflow-hidden bg-gradient-to-b from-[#0d1025] to-[#080a18] shadow-2xl ".concat(w?"rounded-xl border border-white/10":"rounded-t-2xl border-t border-x border-white/10"),children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-2 pt-3 pb-2 ".concat(w?"cursor-move":""),children:w?(0,a.jsx)(d,{content:"Drag to reposition",position:"bottom",children:(0,a.jsx)("div",{className:"flex items-center gap-1 text-white/30",children:(0,a.jsxs)("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:[(0,a.jsx)("circle",{cx:"5",cy:"9",r:"1.5"}),(0,a.jsx)("circle",{cx:"12",cy:"9",r:"1.5"}),(0,a.jsx)("circle",{cx:"19",cy:"9",r:"1.5"}),(0,a.jsx)("circle",{cx:"5",cy:"15",r:"1.5"}),(0,a.jsx)("circle",{cx:"12",cy:"15",r:"1.5"}),(0,a.jsx)("circle",{cx:"19",cy:"15",r:"1.5"})]})})}):(0,a.jsx)(d,{content:"Click to detach panel",position:"bottom",children:(0,a.jsxs)("button",{onClick:f,className:"group flex items-center gap-1.5 px-2 py-1 rounded-full hover:bg-white/[0.05] transition-colors",children:[(0,a.jsx)(n.P.div,{className:"w-10 h-1 rounded-full bg-white/20 group-hover:bg-white/30 transition-colors",animate:{scaleX:[1,.8,1]},transition:{duration:2,repeat:1/0,ease:[.45,0,.55,1]}}),(0,a.jsx)(n.P.svg,{className:"w-3.5 h-3.5 text-white/30 group-hover:text-white/50 transition-colors",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",animate:{scale:[1,1.1,1],opacity:[.3,.5,.3]},transition:{duration:2,repeat:1/0,ease:[.45,0,.55,1]},children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"})})]})})}),(0,a.jsx)("div",{className:"px-4 sm:px-6 pb-4 border-b border-white/[0.06]",children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg border ".concat("influxdb"===b.database?"bg-gradient-to-br from-purple-500/20 to-purple-400/20 border-purple-500/30":"bg-gradient-to-br from-[#26AE7F]/20 to-[#2aebcb]/20 border-[#26AE7F]/30"),children:"influxdb"===b.database?(0,a.jsx)("svg",{className:"w-5 h-5 text-purple-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})}):(0,a.jsx)("svg",{className:"w-5 h-5 text-[#26AE7F]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"})})}),(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-semibold text-white truncate font-mono leading-tight ".concat(w?"text-base":"text-lg"),children:b.name}),b.database&&(0,a.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded font-medium uppercase tracking-wide ".concat("logs"===b.database?"bg-amber-500/20 text-amber-400 border border-amber-500/30":"influxdb"===b.database?"bg-purple-500/20 text-purple-400 border border-purple-500/30":"bg-blue-500/20 text-blue-400 border border-blue-500/30"),children:"influxdb"===b.database?"InfluxDB":b.database})]})})]}),(0,a.jsx)("p",{className:"text-xs text-white/60",children:"influxdb"===b.database?"Time-Series Bucket • ".concat((null!=(h=b.pointCount)?h:b.rows).toLocaleStr
1ing()," points • ").concat(L(b.totalSize)):"Database Table Analysis • ".concat(b.rows.toLocaleString()," rows • ").concat(L(b.totalSize))})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[(0,a.jsx)(d,{content:w?"Dock panel to bottom":"Detach panel to float",position:"bottom",children:(0,a.jsx)("button",{onClick:()=>w?v():f(),className:"p-2 rounded-lg bg-white/[0.05] hover:bg-white/[0.1] border border-white/[0.08] text-white/50 hover:text-white transition-all",children:w?(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}):(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"})})})}),(0,a.jsx)(d,{content:"Close panel",position:"bottom",children:(0,a.jsx)("button",{onClick:g,className:"p-2 rounded-lg bg-white/[0.05] hover:bg-white/[0.1] border border-white/[0.08] text-white/50 hover:text-white transition-all",children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})})]})]})}),(0,a.jsx)("div",{className:"px-4 sm:px-6 py-4 overflow-y-auto custom-scrollbar ".concat(w?"max-h-[65vh]":"max-h-[70vh]"),children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[(0,a.jsxs)("div",{className:"p-3 bg-white/5 border border-white/10 rounded-lg",children:[(0,a.jsx)("p",{className:"text-xs text-white/60 mb-1",children:"influxdb"===b.database?"Data Points":"Total Rows"}),(0,a.jsx)("p",{className:"text-xl font-bold text-white",children:("influxdb"===b.database&&null!=(m=b.pointCount)?m:b.rows).toLocaleString()})]}),(0,a.jsxs)("div",{className:"p-3 bg-white/5 border border-white/10 rounded-lg",children:[(0,a.jsx)("p",{className:"text-xs text-white/60 mb-1",children:"influxdb"===b.database?"Est. Size":"Total Size"}),(0,a.jsx)("p",{className:"text-xl font-bold ".concat("influxdb"===b.database?"text-purple-400":"text-[#26AE7F]"),children:L(b.totalSize)})]}),"influxdb"===b.database?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"p-3 bg-white/5 border border-white/10 rounded-lg",children:[(0,a.jsx)("p",{className:"text-xs text-white/60 mb-1",children:"Retention"}),(0,a.jsx)("p",{className:"text-xl font-bold text-blue-400",children:b.retentionPeriod||"Infinite"})]}),(0,a.jsxs)("div",{className:"p-3 bg-white/5 border border-white/10 rounded-lg",children:[(0,a.jsx)("p",{className:"text-xs text-white/60 mb-1",children:"Measurements"}),(0,a.jsx)("p",{className:"text-xl font-bold text-amber-400",children:null!=(p=null==(o=b.measurements)?void 0:o.length)?p:0})]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"p-3 bg-white/5 border border-white/10 rounded-lg",children:[(0,a.jsx)("p",{className:"text-xs text-white/60 mb-1",children:"Avg Row Size"}),(0,a.jsx)("p",{className:"text-xl font-bold text-blue-400",children:L(M.rowSize)})]}),(0,a.jsxs)("div",{className:"p-3 bg-white/5 border border-white/10 rounded-lg",children:[(0,a.jsx)("p",{className:"text-xs text-white/60 mb-1",children:"% of Database"}),(0,a.jsxs)("p",{className:"text-xl font-bold text-purple-400",children:[M.sizePercentage.toFixed(2),"%"]})]})]})]}),"influxdb"===b.database&&b.measurements&&b.measurements.length>0&&(0,a.jsxs)("div",{className:"p-4 bg-gradient-to-br from-purple-500/10 to-blue-500/10 border border-purple-500/30 rounded-lg",children:[(0,a.jsxs)("h4",{className:"text-sm font-semibold text-white mb-3 flex items-center gap-2",children:[(0,a.jsx)("svg",{className:"w-4 h-4 text-purple-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})}),"Measurements"]}),(0,a.jsx)("div",{className:"space-y-2",children:b.measurements.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between p-2 bg-white/5 rounded border border-white/10",children:[(0,a.jsx)("span",{className:"text-sm font-mono text-white/80",children:e.name}),(0,a.jsxs)("span",{className:"text-xs text-white/60",children:[e.pointCount.toLocaleStr
1ing()," pts"]})]},e.name))})]}),"influxdb"===b.database&&(0,a.jsxs)("div",{className:"p-4 bg-gradient-to-br from-purple-500/10 to-indigo-500/10 border border-purple-500/30 rounded-lg",children:[(0,a.jsxs)("h4",{className:"text-sm font-semibold text-white mb-3 flex items-center gap-2",children:[(0,a.jsx)("svg",{className:"w-4 h-4 text-purple-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Time-Series Database Info"]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)("div",{className:"p-1.5 bg-purple-500/20 rounded border border-purple-500/30 mt-0.5",children:(0,a.jsx)("svg",{className:"w-3 h-3 text-purple-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"text-xs text-white/60",children:"Retention Policy"}),(0,a.jsx)("p",{className:"text-sm font-medium text-white",children:b.retentionPeriod||"Infinite"})]})]}),(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)("div",{className:"p-1.5 bg-indigo-500/20 rounded border border-indigo-500/30 mt-0.5",children:(0,a.jsx)("svg",{className:"w-3 h-3 text-indigo-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"})})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"text-xs text-white/60",children:"Container"}),(0,a.jsx)("p",{className:"text-sm font-medium text-white font-mono text-[11px]",children:"quickbox-influxdb"})]})]})]}),(0,a.jsxs)("div",{className:"mt-3 p-3 bg-white/5 rounded-lg",children:[(0,a.jsx)("p",{className:"text-xs text-white/60 mb-1",children:"About InfluxDB"}),(0,a.jsx)("p",{className:"text-xs text-white/80 leading-relaxed",children:"InfluxDB stores time-series metrics like CPU, memory, network, and API performance data. Data is automatically downsampled from raw (24h) to hourly (30d) to daily (1y) for efficient storage."})]})]}),"influxdb"!==b.database&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"p-4 bg-gradient-to-br from-blue-500/10 to-purple-500/10 border border-blue-500/30 rounded-lg",children:[(0,a.jsxs)("h4",{className:"text-sm font-semibold text-white mb-3 flex items-center gap-2",children:[(0,a.jsx)("svg",{className:"w-4 h-4 text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Database Information"]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)("div",{className:"p-1.5 bg-blue-500/20 rounded border border-blue-500/30 mt-0.5",children:(0,a.jsx)("svg",{className:"w-3 h-3 text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4"})})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"text-xs text-white/60",children:"Database"}),(0,a.jsx)(d,{content:"logs"===b.database?"Logs database for API usage tracking":"Main database for users, licenses, etc.",position:"top",children:(0,a.jsx)("p",{className:"text-sm font-medium text-white",children:"logs"===b.database?"Logs Database":"Main Database"})})]})]}),(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)("div",{className:"p-1.5 bg-purple-500/20 rounded border border-purple-500/30 mt-0.5",children:(0,a.jsx)("svg",{className:"w-3 h-3 text-purple-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"})})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"text-xs text-white/60",children:"Container"}
1),(0,a.jsx)(d,{content:"Docker container running this database",position:"top",children:(0,a.jsx)("p",{className:"text-sm font-medium text-white font-mono text-[11px]",children:"logs"===b.database?"quickbox-mariadb-logs":"quickbox-mariadb"})})]})]})]})]}),(0,a.jsxs)("div",{className:"p-4 bg-white/5 border border-white/10 rounded-lg",children:[(0,a.jsx)("h4",{className:"text-sm font-semibold text-white mb-3",children:"Size Breakdown"}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between text-xs mb-1",children:[(0,a.jsx)("span",{className:"text-white/80",children:"Data Size"}),(0,a.jsx)("span",{className:"text-white/60",children:L(b.dataSize)})]}),(0,a.jsx)("div",{className:"h-2 bg-white/10 rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full bg-gradient-to-r from-blue-500 to-blue-400",style:{width:"".concat(b.dataSize/b.totalSize*100,"%")}})})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between text-xs mb-1",children:[(0,a.jsx)("span",{className:"text-white/80",children:"Index Size"}),(0,a.jsxs)("span",{className:"text-white/60",children:[L(b.indexSize)," (",M.indexRatio.toFixed(1),"%)"]})]}),(0,a.jsx)("div",{className:"h-2 bg-white/10 rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full bg-gradient-to-r from-purple-500 to-purple-400",style:{width:"".concat(b.indexSize/b.totalSize*100,"%")}})})]})]})]}),(0,a.jsxs)("div",{className:"p-4 bg-gradient-to-br from-[#26AE7F]/10 to-[#2aebcb]/10 border border-[#26AE7F]/30 rounded-lg",children:[(0,a.jsxs)("h4",{className:"text-sm font-semibold text-white mb-3 flex items-center gap-2",children:[(0,a.jsx)("svg",{className:"w-4 h-4 text-[#26AE7F]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"})}),"Optimization Recommendations"]}),(0,a.jsx)("ul",{className:"space-y-2",children:S.map((e,t)=>(0,a.jsxs)("li",{className:"text-sm text-white/80 flex items-start gap-2",children:[(0,a.jsx)("span",{className:"text-[#26AE7F] mt-0.5",children:"•"}),(0,a.jsx)("span",{className:"flex-1",children:e})]},t))})]})]}),"influxdb"!==b.database&&(0,a.jsxs)("div",{className:"p-4 bg-white/5 border border-white/10 rounded-lg",children:[(0,a.jsx)("h4",{className:"text-sm font-semibold text-white mb-3",children:"Scalability Assessment"}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"p-3 bg-white/5 rounded-lg",children:[(0,a.jsx)("p",{className:"text-xs text-white/60 mb-2",children:"Separate Database Recommendation"}),b.rows>1e6||M.sizePercentage>40?(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)("svg",{className:"w-4 h-4 text-orange-400 mt-0.5 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-orange-400",children:"High Priority - Consider Separation"}),(0,a.jsx)("p",{className:"text-xs text-white/60 mt-1",children:"This table is large enough to warrant its own database instance or connection pool. Consider implementing database sharding or a dedicated read replica."})]})]}):b.rows>5e5||M.sizePercentage>25?(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)("svg",{className:"w-4 h-4 text-yellow-400 mt-0.5 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-yellow-400",children:"Medium Priority - Monitor Growth"}),(0,a.jsx)("p",{className:"text-xs text-white/60 mt-1",children:"Table is growing significantly. Plan for potential separation if growth continues. Consider implementing connection pooling and query optimization."})]})]}):(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)("svg",{className:"w-4 h-4 text-green-400 mt-0.5 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-green-400",children:"Low Priority - Current Setup Adequate"}),(0,a.jsx)("p",{className:"text-xs text-white/60 mt-1",children:"Table size is manageable within current database. Continue monitoring growth trends."})]})]})]}),(b.rows>1e6||M.sizePercentage>40)&&(0,a.jsxs)("div",{className:"p-3 bg-blue-500/10 border border-blue-500/30 rounded-lg",children:[(0,a.jsx)("p",{className:"text-xs font-medium text-blue-400 mb-2",children:"\uD83D\uDCA1 Docker MariaDB Pool Strategy"}),(0,a.jsx)("p",{className:"text-xs text-white/80 leading-relaxed",children:"For tables this size, consider implementing a Docker-based database pool:"}),(0,a.jsxs)("ul",{className:"mt-2 space-y-1 text-xs text-white/70",children:[(0,a.jsx)("li",{children:"• Create dedicated MariaDB container for this table"}),(0,a.jsx)("li",{children:"• Implement connection pooling with separate credentials"}),(0,a.jsx)("li",{children:"• Configure read replicas for reporting queries"}),(0,a.jsx)("li",{children:"• Use ProxySQL for query routing and load balancing"})]})]})]})]}),"influxdb"!==b.database&&B.length>0&&(0,a.jsxs)("div",{className:"p-4 bg-white/5 border border-white/10 rounded-lg",children:[(0,a.jsx)("h4",{className:"text-sm font-semibold text-white mb-3",children:"Related Tables (Same Prefix)"}),(0,a.jsx)("div",{className:"space-y-2",children:B.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between p-2 bg-white/5 rounded hover:bg-white/10 transition-colors",children:[(0,a.jsx)("span",{className:"text-xs font-mono text-white/80",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-3 text-xs text-white/60",children:[(0,a.jsxs)("span",{children:[e.rows.toLocaleStr
1ing()," rows"]}),(0,a.jsx)("span",{className:"text-[#26AE7F]",children:L(e.totalSize)})]})]},e.name))})]}),N&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-white/10",children:[(0,a.jsx)("h4",{className:"text-xs font-medium text-white/50 mb-2 uppercase tracking-wider",children:"System Versions"}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[N.docker&&"unknown"!==N.docker&&(0,a.jsx)(d,{content:"Docker engine version",position:"top",children:(0,a.jsxs)("span",{className:"px-2 py-1 bg-blue-500/20 text-blue-400 text-[10px] rounded border border-blue-500/30",children:["Docker ",N.docker]})}),"influxdb"===b.database?N.influxdb&&"unknown"!==N.influxdb&&(0,a.jsx)(d,{content:"InfluxDB version for time-series metrics",position:"top",children:(0,a.jsxs)("span",{className:"px-2 py-1 bg-cyan-500/20 text-cyan-400 text-[10px] rounded border border-cyan-500/30",children:["InfluxDB ",N.influxdb]})}):"logs"===b.database?N.mariadbLogs&&"unknown"!==N.mariadbLogs&&(0,a.jsx)(d,{content:"MariaDB version for logs database",position:"top",children:(0,a.jsxs)("span",{className:"px-2 py-1 bg-amber-500/20 text-amber-400 text-[10px] rounded border border-amber-500/30",children:["MariaDB ",N.mariadbLogs]})}):N.mariadb&&"unknown"!==N.mariadb&&(0,a.jsx)(d,{content:"MariaDB version for main database",position:"top",children:(0,a.jsxs)("span",{className:"px-2 py-1 bg-green-500/20 text-green-400 text-[10px] rounded border border-green-500/30",children:["MariaDB ",N.mariadb]})}),N.node&&(0,a.jsx)(d,{content:"Node.js runtime version",position:"top",children:(0,a.jsxs)("span",{className:"px-2 py-1 bg-white/10 text-white/60 text-[10px] rounded",children:["Node ",N.node]})}),N.prisma&&(0,a.jsx)(d,{content:"Prisma ORM version",position:"top",children:(0,a.jsxs)("span",{className:"px-2 py-1 bg-white/10 text-white/60 text-[10px] rounded",children:["Prisma ",N.prisma]})})]})]})]})})]},w?"panel-detached":"panel-docked")})]})}},95780:(e,t,s)=>{s.d(t,{O:()=>o});var a=s(95155),i=s(12115),r=s(45871),n=s(12769);let l=(0,i.memo)(function(e){var t;let{table:s,onTableClick:n,formatBytes:l,isInfluxDB:o}=e,d=(0,i.useRef)(null),c=(0,r.D)(d,{content:o?"Click to view bucket details":"Click to analyze table",position:"top",disabled:!n}),x=(0,i.useCallback)(()=>{null==n||n(s)},[n,s]),h=o&&null!=(t=s.pointCount)?t:s.rows;return(0,a.jsxs)("tr",{ref:d,onClick:x,...c,className:"border-b border-white/5 transition-colors ".concat(n?"cursor-pointer":""),style:{"--row-bg":"transparent"},children:[(0,a.jsx)("td",{className:"py-2 px-3",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-white/80 font-mono text-[11px] sm:text-xs truncate max-w-[120px] sm:max-w-none",children:s.name}),s.database&&(0,a.jsx)("span",{className:"text-[8px] sm:text-[9px] px-1 py-0.5 rounded font-medium uppercase tracking-wide flex-shrink-0 ".concat("logs"===s.database?"bg-amber-500/20 text-amber-400 border border-amber-500/30":"influxdb"===s.database?"bg-purple-500/20 text-purple-400 border border-purple-500/30":"bg-blue-500/20 text-blue-400 border border-blue-500/30"),children:"influxdb"===s.database?"InfluxDB":s.database})]})}),(0,a.jsxs)("td",{className:"py-2 px-3 text-right text-white/60 text-[11px] sm:text-xs",children:[h.toLocaleString(),o&&(0,a.jsx)("span",{className:"text-[9px] ml-1 text-white/40",children:"pts"})]}),o?(0,a.jsx)("td",{className:"hidden sm:table-cell py-2 px-3 text-right text-white/60",colSpan:2,children:s.retentionPeriod||"Infinite"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"hidden sm:table-cell py-2 px-3 text-right text-white/60",children:l(s.dataSize)}),(0,a.jsx)("td",{className:"hidden sm:table-cell py-2 px-3 text-right text-white/60",children:l(s.indexSize)})]}),(0,a.jsx)("td",{className:"py-2 px-3 text-right text-[#26AE7F] font-medium text-[11px] sm:text-xs",children:l(s.totalSize)})]})},(e,t)=>e.table.name===t.table.name&&e.table.database===t.table.database&&e.table.rows===t.table.rows&&e.table.dataSize===t.table.dataSize&&e.table.indexSize===t.table.indexSize&&e.table.totalSize===t.table.totalSize&&e.table.pointCount===t.table.pointCount&&e.onTableClick===t.onTableClick&&e.isInfluxDB===t.isInfluxDB);function o(e){let{tables:t,onTableClick:s}=e,[r,o]=(0,i.useState)(""),[d,c]=(0,i.useState)("totalSize"),[x,h]=(0,i.useState)("desc"),[m,p]=(0,i.useState)(10),[b,u]=(0,i.useState)(1),[g,j]=(0,i.useState)("all"),w=(0,i.useMemo)(()=>new Set(t.map(e=>e.database||"main")),[t]),f=w.size>1,v=w.has("influxdb"),N="influxdb"===g,k=e=>{if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return"".concat((e/Math.pow(1024,t)).toFixed(2)," ").concat(["B","KB","MB","GB"][t])},y=e=>{d===e?h("asc"===x?"desc":"asc"):(c(e),h("desc")),u(1)},L=(0,i.useMemo)(()=>{let e=t;return"all"!==g&&(e=e.filter(e=>(e.database||"main")===g)),r&&(e=e.filter(e=>e.name.toLowerCase().includes(r.toLowerCase()))),e=[...e].sort((e,t)=>
1{let s=e[d],a=t[d];return"name"===d?"asc"===x?s.toString().localeCompare(a.toString()):a.toString().localeCompare(s.toString()):"asc"===x?s-a:a-s})},[t,r,d,x,g]),C=Math.ceil(L.length/m),M=L.slice((b-1)*m,b*m),S=e=>{let{field:t}=e;return d!==t?(0,a.jsx)("svg",{className:"w-3 h-3 text-white/30",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"})}):"asc"===x?(0,a.jsx)("svg",{className:"w-3 h-3 text-[#26AE7F]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 15l7-7 7 7"})}):(0,a.jsx)("svg",{className:"w-3 h-3 text-[#26AE7F]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})};return(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3 items-start sm:items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 w-full sm:w-auto",children:[(0,a.jsxs)("div",{className:"relative flex-1 sm:max-w-xs",children:[(0,a.jsx)("input",{type:"text",value:r,onChange:e=>{o(e.target.value),u(1)},placeholder:"Search tables...",className:"w-full pl-9 pr-4 py-1.5 bg-white/5 border border-white/10 rounded-lg text-white text-xs focus:outline-none focus:ring-1 focus:ring-[#26AE7F]/50"}),(0,a.jsx)("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-white/40",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})]}),f&&(0,a.jsx)("div",{className:"w-40",children:(0,a.jsx)(n.l,{size:"sm",value:g,onChange:e=>{j(e),u(1)},"aria-label":"Filter by database",options:[{value:"all",label:"All Databases"},{value:"main",label:"Main DB"},{value:"logs",label:"Logs DB"},...v?[{value:"influxdb",label:"InfluxDB"}]:[]]})})]}),(0,a.jsxs)("div",{className:"hidden sm:flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-white/60",children:"Show:"}),(0,a.jsx)("div",{className:"w-20",children:(0,a.jsx)(n.l,{size:"sm",value:String(m),onChange:e=>{p(Number(e)),u(1)},"aria-label":"Rows per page",options:[{value:"5",label:"5"},{value:"10",label:"10"},{value:"25",label:"25"},{value:"50",label:"50"},{value:"100",label:"100"}]})})]})]}),(0,a.jsx)("div",{className:"overflow-x-auto -mx-2 sm:mx-0 rounded-lg border border-white/10",children:(0,a.jsxs)("table",{className:"w-full text-xs min-w-0",children:[(0,a.jsx)("thead",{className:"bg-white/5",children:(0,a.jsxs)("tr",{className:"border-b border-white/10",children:[(0,a.jsx)("th",{onClick:()=>y("name"),className:"text-left py-2 px-3 text-white/80 font-medium cursor-pointer hover:bg-white/5 transition-colors",children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[N?"Bucket":"Table",(0,a.jsx)(S,{field:"name"})]})}),(0,a.jsx)("th",{onClick:()=>y("rows"),className:"text-right py-2 px-3 text-white/80 font-medium cursor-pointer hover:bg-white/5 transition-colors",children:(0,a.jsxs)("div",{className:"flex items-center justify-end gap-1.5",children:[N?"Points":"Rows",(0,a.jsx)(S,{field:"rows"})]})}),N?(0,a.jsx)("th",{className:"hidden sm:table-cell text-right py-2 px-3 text-white/80 font-medium",colSpan:2,children:"Retention"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("th",{onClick:()=>y("dataSize"),className:"hidden sm:table-cell text-right py-2 px-3 text-white/80 font-medium cursor-pointer hover:bg-white/5 transition-colors",children:(0,a.jsxs)("div",{className:"flex items-center justify-end gap-1.5",children:["Data",(0,a.jsx)(S,{field:"dataSize"})]})}),(0,a.jsx)("th",{onClick:()=>y("indexSize"),className:"hidden sm:table-cell text-right py-2 px-3 text-white/80 font-medium cursor-pointer hover:bg-white/5 transition-colors",children:(0,a.jsxs)("div",{className:"flex items-center justify-end gap-1.5",children:["Index",(0,a.jsx)(S,{field:"indexSize"})]})})]}),(0,a.jsx)("th",{onClick:()=>y("totalSize"),className:"text-right py-2 px-3 text-white/80 font-medium cursor-pointer hover:bg-white/5 transition-colors",children:(0,a.jsxs)("div",{className:"flex items-center justify-end gap-1.5",children:[N?"Est. Size":"Total",(0,a.jsx)(S,{field:"totalSize"})]})})]})}),(0,a.jsx)("tbody",{className:"[&>tr:hover]:bg-white/[0.05]",children:0===M.length?(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:5,className:"text-center py-8 text-white/40",children:r?"No tables match your search":N?"No buckets found":"No tables found"})}):M.map(e=>(0,a.jsx)(l,{table:e,onTableClick:s,formatBytes:k,isInfluxDB:"influxdb"===e.database},"".concat(e.database||"main","-").concat(e.name)))})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3 items-start sm:items-center justify-between text-xs",children:[(0,a.jsxs)("div",{className:"text-white/60",children:["Showing ",0===M.length?0:(b-1)*m+1," ","-"," ",Math.min(b*m,L.length)," ","of"," ",L.length,r&&" (filtered from ".concat(t.length," total)")]}),C>1&&(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{onClick:()=>u(1),disabled:1===b,className:"px-2 py-1 bg-white/5 hover:bg-white/10 border border-white/10 rounded text-white disabled:opacity-30 disabled:cursor-not-allowed transition-all",children:(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 19l-7-7 7-7m8 14l-7-7 7-7"})})}),(0,a.jsx)("button",{onClick:()=>u(Math.max(1,b-1)),disabled:1===b,className:"px-2 py-1 bg-white/5 hover:bg-white/10 border border-white/10 rounded text-white disabled:opacity-30 disabled:cursor-not-allowed transition-all",children:(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),(0,a.jsxs)("span",{className:"px-3 py-1 bg-white/5 border border-white/10 rounded text-white",children:[b," / ",C]}),(0,a.jsx)("button",{onClick:()=>u(Math.min(C,b+1)),disabled:b===C,className:"px-2 py-1 bg-white/5 hover:bg-white/10 border border-white/10 rounded text-white disabled:opacity-30 disabled:cursor-not-allowed transition-all",children:(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}),(0,a.jsx)("button",{onClick:()=>u(C),disabled:b===C,className:"px-2 py-1 bg-white/5 hover:bg-white/10 border border-white/10 rounded text-white disabled:opacity-30 disabled:cursor-not-allowed transition-all",children:(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 5l7 7-7 7M5 5l7 7-7 7"})})})]})]})]})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.