PageSourceSearch

https://www.devtoolsdaily.com/_next/static/chunks/pages/admin/ops-e11bf245d200d5c0.js

js devtoolsdaily.com collected 2026-09-25 20:18:52 UTC 27,364 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2149],{198:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/ops",function(){return r(18336)}])},45172:function(e,t,r){"use strict";r.d(t,{Z:function(){return g}});var i=r(85893),n=r(90991),s=r(8207),a=r(28008),o=r(84957),l=r(54680),c=r(4958),d=r(61723),u=r(54216),m=r(56038);function g(e){let{children:t}=e,r=(0,u.x)();return r?(0,m.vd)(r.email)?(0,i.jsx)(i.Fragment,{children:t}):(0,i.jsx)(n.M,{mih:300,children:(0,i.jsxs)(l.b,{color:"red",icon:(0,i.jsx)(c.Z,{size:16}),children:[r.email," is not authorized to view this page."]})}):(0,i.jsx)(n.M,{mih:300,children:(0,i.jsxs)(s.K,{align:"center",gap:"sm",children:[(0,i.jsx)(a.D,{order:3,children:"Admin sign in required"}),(0,i.jsx)(d.SigninButton,{onSignin:()=>{},children:(0,i.jsx)(o.z,{children:"Sign in"})})]})})}},18336:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSG:function(){return et},default:function(){return er}});var i=r(85893),n=r(45172),s=r(93715),a=r(67294),o=r(59091),l=r(54410),c=r(1506),d=r(93603),u=r(40158),m=r(8207),g=r(356),h=r(86641),p=r(24566),y=r(99704),f=r(26536),b=r(28008),v=r(24710),x=r(76556),_=r(54680),j=r(84957),w=r(83082),z=r(4958),A=r(49780),k=r(54216),S=r(83454);let P={summary:"/v1/summary",filesystems:"/v1/filesystems",processes:"/v1/processes",network:"/v1/network",docker:"/v1/docker",buzz:"/v1/buzz",history:"/v1/history"};class L extends Error{constructor(e,t,r){super(e),this.name="OpsApiError",this.kind=t,this.status=r}}function N(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"production",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S.env.NEXT_PUBLIC_OPS_API_URL;return"production"===e?"https://ops-api.devtoolsdaily.com":t||"http://127.0.0.1:18095"}();try{e=new URL(t)}catch(e){throw new L("The monitoring API URL is invalid.","response")}if(!["http:","https:"].includes(e.protocol)||e.username||e.password||e.search||e.hash)throw new L("The monitoring API URL is invalid.","response");return e.toString().replace(/\/+$/,"")}function C(e,t){return 401===e?new L("Your monitoring session expired. Sign in again and retry.","auth",e):403===e?new L("Your account is not authorized to access monitoring.","forbidden",e):503===e?"history"===t?new L("Historical metrics are unavailable. Confirm the monitoring agent has SQLite history enabled and is up to date.","unavailable",e):new L("The monitoring agent is temporarily unavailable. Try again shortly.","unavailable",e):404===e&&"history"===t?new L("This monitoring agent does not support historical metrics. Upgrade it to a version with SQLite history.","response",e):new L("The monitoring agent returned an unexpected response (".concat(e,")."),"response",e)}
1async function T(e,t,r,i){let n;try{n=await e("".concat(t).concat(r),{method:"GET",headers:{Accept:"application/json",Authorization:"Bearer ".concat(i)}})}catch(e){throw new L("Could not reach the monitoring agent. Check its URL, availability, and CORS policy.","network")}if(!n.ok)return{response:n};try{return{response:n,data:await n.json()}}catch(e){throw new L("The monitoring agent returned invalid JSON.","response",n.status)}}class R{async get(e){return this.getPath(e,P[e])}async getHistory(e){let t="minute"===e.resolution?604800:31622400;if(!Number.isSafeInteger(e.start)||!Number.isSafeInteger(e.end)||e.start<0||e.end<=e.start||e.end-e.start>t)throw new L("The selected monitoring history range is invalid.","response");let r=new URLSearchParams({start:String(e.start),end:String(e.end),resolution:e.resolution});return this.getPath("history","".concat(P.history,"?").concat(r.toString()))}async getPath(e,t){let r;try{r=await this.tokenProvider.getIdToken()}catch(e){throw new L("Your Firebase ID token could not be refreshed. Sign in again and retry.","auth")}let i=await T(this.fetchImpl,this.origin,t,r);if(401===i.response.status){try{r=await this.tokenProvider.getIdToken(!0)}catch(t){throw C(401,e)}i=await T(this.fetchImpl,this.origin,t,r)}if(!i.response.ok)throw C(i.response.status,e);return i.data}constructor(e,t={}){this.origin=N(t.origin),this.tokenProvider=e,this.fetchImpl=t.fetchImpl||fetch}}let F=[{endpoint:"summary",title:"System summary",description:"Host capacity and uptime.",listKeys:[]},{endpoint:"filesystems",title:"Filesystems",description:"Mounted storage and available capacity.",listKeys:["filesystems"]},{endpoint:"processes",title:"Processes",description:"Top running processes and resource usage.",listKeys:["processes"]},{endpoint:"network",title:"Network",description:"Interfaces and cumulative transfer counters.",listKeys:["interfaces"]},{endpoint:"docker",title:"Docker",description:"Daemon status, containers, images, and storage.",listKeys:["containers"]},{endpoint:"buzz",title:"Buzz agents",description:"Agent state and recent log summaries.",listKeys:[]}],U=[{value:"1h",label:"1h",seconds:3600,resolution:"minute"},{value:"24h",label:"24h",seconds:86400,resolution:"minute"},{value:"7d",label:"7d",seconds:604800,resolution:"minute"},{value:"30d",label:"30d",seconds:2592e3,resolution:"hour"}];function E(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function M(e){return/token|secret|password|authorization|cookie|private.?key/i.test(e)}function D(e){if(!Number.isFinite(e)||e<0)return"-";let t=["B","KB","MB","GB","TB"],r=e,i=0;for(;r>=1024&&i<t.length-1;)r/=1024,i+=1;return"".concat(r.toFixed(0===i?0:1)," ").concat(t[i])}function B(e){return"".concat(D(e),"/s")}function I(e,t){return!Number.isFinite(e)||!Number.isFinite(t)||e<=0||t<0?null:Math.max(0,Math.min(100,(e-t)/e*100))}function O(e){return"".concat(e.toFixed(e>=10?0:1),"%")}function Z(e){return E(e)&&Array.isArray(e.filesystems)?e.filesystems.filter(e=>E(e)&&"string"==typeof e.mount_point&&"number"==typeof e.total_bytes&&"number"==typeof e.available_bytes&&"string"==typeof e.source&&"string"==typeof e.filesystem_type):[]}function K(e){if(!E(e)||"boolean"!=typeof e.available||!Array.isArray(e.containers))return null;let t=e.containers.filter(e=>E(e)&&"string"==typeof e.id&&Array.isArray(e.names)&&e.names.every(e=>"string"==typeof e)&&"string"==typeof e.image&&"string"==typeof e.state&&"string"==typeof e.status).map(e=>({id:e.id,names:e.names,image:e.image,state:e.state,status:e.status})),r=E(e.storage)&&"number"==typeof e.storage.layers_size_bytes&&"number"==typeof e.storage.images&&"number"==typeof e.storage.containers?{layers_size_bytes:e.storage.layers_size_bytes,images:e.storage.images,containers:e.storage.containers}:null;return{available:e.available,containers:t,storage:r}}function H(e){var t;if(!E(e)||"boolean"!=typeof e.configured)return null;let r=E(e.log_summary)&&"number"==typeof e.log_summary.lines_considered&&"number"==typeof e.log_summary.warning_lines&&"number"==typeof e.log_summary.error_lines&&Array.isArray(e.log_summary.recent_lines)&&e.log_summary.recent_lines.every(e=>"string"==typeof e)?{lines_considered:e.log_summary.lines_considered,warning_lines:e.log_summary.warning_lines,error_lines:e.log_summary.error_lines,recent_lines:e.log_summary.recent_lines}:null;return{configured:e.configured,service_name:"string"==typeof e.service_name?e.service_name:null,status:null!==(t=e.status)&&void 0!==t?t:null,log_summary:r}}
1function X(e){let{label:t,value:r,detail:n,color:s}=e;return(0,i.jsxs)("div",{children:[(0,i.jsx)(l.x,{size:"xs",c:"dimmed",tt:"uppercase",fw:600,children:t}),(0,i.jsx)(l.x,{size:"sm",fw:700,c:s,children:r}),n&&(0,i.jsx)(l.x,{size:"xs",c:"dimmed",children:n})]})}function Y(e){var t,r,n,s,a,o;let{states:l,history:m}=e,g=l.summary,h=function(e){if(!E(e)||!E(e.load_average)||!E(e.memory))return null;let{uptime_seconds:t,load_average:r,memory:i}=e;if("number"!=typeof t||"number"!=typeof r.one||"number"!=typeof r.five||"number"!=typeof r.fifteen||"number"!=typeof i.total_bytes||"number"!=typeof i.available_bytes)return null;let n=E(e.cpu)&&("number"==typeof e.cpu.utilization_percent||null===e.cpu.utilization_percent)?{utilization_percent:e.cpu.utilization_percent}:void 0;return{uptime_seconds:t,load_average:{one:r.one,five:r.five,fifteen:r.fifteen},memory:{total_bytes:i.total_bytes,available_bytes:i.available_bytes},cpu:n}}(null==g?void 0:g.data),p=Z(null===(t=l.filesystems)||void 0===t?void 0:t.data),y=K(null===(r=l.docker)||void 0===r?void 0:r.data),f=H(null===(n=l.buzz)||void 0===n?void 0:n.data),b=F.some(e=>{var t;let{endpoint:r}=e;return null===(t=l[r])||void 0===t?void 0:t.loading}),v=F.filter(e=>{var t;let{endpoint:r}=e;return null===(t=l[r])||void 0===t?void 0:t.error}),x=h&&I(h.memory.total_bytes,h.memory.available_bytes),_=p.find(e=>"/"===e.mount_point)||null,j=_?I(_.total_bytes,_.available_bytes):null,w=function(e){if(!e)return null;let t=e.network.reduce((e,t)=>Math.max(e,t.timestamp),-1);if(t<0)return null;let r=e.network.filter(e=>e.timestamp===t),i=0,n=0,s=!1;for(let e of r)"number"==typeof e.received_bytes_per_second&&(i+=e.received_bytes_per_second,s=!0),"number"==typeof e.transmitted_bytes_per_second&&(n+=e.transmitted_bytes_per_second,s=!0);return s?{received:i,transmitted:n}:null}(m),z="number"==typeof(o=null==h?void 0:null===(s=h.cpu)||void 0===s?void 0:s.utilization_percent)&&Number.isFinite(o)&&o>=0&&o<=100?{value:"".concat(o.toFixed(o>=10?0:1),"%"),detail:"Current utilization"}:null===o?{value:"Collecting baseline",detail:"Awaiting /proc/stat delta"}:{value:"Unavailable",detail:"CPU metric not reported"};if(b&&!h&&!p.length&&!y&&!f)return(0,i.jsx)(c.O,{height:122,radius:"md"});let A=h?v.length?{label:"Degraded",color:"yellow"}:{label:"Healthy",color:"green"}:{label:"Unavailable",color:"red"};return(0,i.jsx)(d.Z,{withBorder:!0,radius:"md",padding:"md",children:(0,i.jsxs)(u.M,{cols:{base:2,sm:3,lg:5,xl:9},spacing:"md",children:[(0,i.jsx)(X,{label:"Host",value:A.label,detail:v.length?"".concat(v.length," collector issue").concat(1===v.length?"":"s"):"Live collectors responding",color:A.color}),(0,i.jsx)(X,{label:"CPU",value:z.value,detail:z.detail}),(0,i.jsx)(X,{label:"Memory",value:null===x?"Not reported":O(x),detail:h?"".concat(D(h.memory.available_bytes)," available"):void 0}),(0,i.jsx)(X,{label:"Disk",value:null===j?"Not reported":O(j),detail:_?"/ used":"Root filesystem not reported"}),(0,i.jsx)(X,{label:"Load",value:h?h.load_average.one.toFixed(2):"Not reported",detail:h?"5m ".concat(h.load_average.five.toFixed(2)," \xb7 15m ").concat(h.load_average.fifteen.toFixed(2)):void 0}),(0,i.jsx)(X,{label:"Network",value:w?"".concat(B(w.received)," RX"):"No rate yet",detail:w?"".concat(B(w.transmitted)," TX"):"Awaiting retained samples"}),(0,i.jsx)(X,{label:"Docker",value:y?y.available?"Available":"Unavailable":"Not reported",detail:y?"".concat(y.containers.length," container").concat(1===y.containers.length?"":"s"):void 0,color:(null==y?void 0:y.available)?"green":y?"red":void 0}),(0,i.jsx)(X,{label:"Buzz",value:f?f.configured?"Configured":"Not configured":"Not reported",detail:(null==f?void 0:f.log_summary)?"".concat(f.log_summary.warning_lines," warnings \xb7 ").concat(f.log_summary.error_lines," errors"):void 0,color:(null==f?void 0:null===(a=f.log_summary)||void 0===a?void 0:a.error_lines)?"red":void 0}),(0,i.jsx)(X,{label:"Uptime",value:h?function(e){if(!Number.isFinite(e)||e<0)return"-";let t=Math.floor(e/86400),r=Math.floor(e%86400/3600);return t>0?"".concat(t,"d ").concat(r,"h"):"".concat(r,"h ").concat(Math.floor(e%3600/60),"m")}(h.uptime_seconds):"Not reported"})]})})}function $(e){let{filesystems:t}=e;return t.length?(0,i.jsx)(m.K,{gap:"xs",children:t.map(e=>{let t=I(e.total_bytes,e.available_bytes);return null===t?null:(0,i.jsxs)("div",{children:[(0,i.jsxs)(g.Z,{justify:"space-between",gap:"xs",children:[(0,i.jsx)(l.x,{size:"xs",truncate:!0,children:e.mount_point}),(0,i.jsxs)(l.x,{size:"xs",c:"dimmed",children:[O(t)," used"]})]}),(0,i.jsx)(h.E,{mt:4,size:"sm",value:t,color:t>=90?"red":t>=75?"yellow":"blue","aria-label":"".concat(e.mount_point," is ").concat(O(t)," used")})]},"".concat(e.source,":").concat(e.mount_point))})}):null}function G(e){let{endpoint:t,data:r}=e;if(!E(r)||"summary"===t)return null;let n=[];if("filesystems"===t&&Array.isArray(r.filesystems)&&n.push(["Mounted filesystems",String(r.filesystems.length)]),"processes"===t&&Array.isArray(r.processes)&&n.push(["Top processes",String(r.processes.length)]),"network"===t&&Array.isArray(r.interfaces)&&n.push(["Network interfaces",String(r.interfaces.length)]),"docker"===t){let e=K(r);e&&(n.push(["Docker",e.available?"Available":"Unavailable"]),n.push(["Containers",String(e.containers.length)]),e.storage&&(n.push(["Layer storage",D(e.storage.layers_size_bytes)]),n.push(["Images",String(e.storage.images)])))}if("buzz"===t){let e=H(r);e&&(n.push(["Buzz",e.configured?"Configured":"Not configured"]),e.service_name&&n.push(["Service",e.service_name]),e.log_summary&&(n.push(["Warnings",String(e.log_summary.warning_lines)]),n.push(["Errors",String(e.log_summary.error_lines)])))}return n.length?(0,i.jsx)(u.M,{cols:{base:2,sm:4},spacing:"xs",children:n.map(e=>{let[t,r]=e;return(0,i.jsxs)("div",{children:[(0,i.jsx)(l.x,{size:"xs",c:"dimmed",tt:"uppercase",children:t}),(0,i.jsx)(l.x,{size:"sm",fw:600,children:r})]},t)})}):null}function W(e){let{data:t,listKeys:r}=e,n=function(e,t){if(Array.isArray(e))return e.filter(E);if(!E(e))return[];for(let r of t)if(Array.isArray(e[r]))return e[r].filter(E);return[]}(t,r);if(n.length>0){let e=Array.from(new Set(n.flatMap(e=>Object.keys(e)))).filter(e=>!M(e)).slice(0,6);return(0,i.jsxs)(p.x,{type:"auto",mah:260,children:[(0,i.jsxs)(y.i,{striped:!0,highlightOnHover:!0,withTableBorder:!0,children:[(0,i.jsx)(y.i.Thead,{children:(0,i.jsx)(y.i.Tr,{children:e.map(e=>(0,i.jsx)(y.i.Th,{children:e},e))})}),(0,i.jsx)(y.i.Tbody,{children:n.slice(0,20).map((t,r)=>(0,i.jsx)(y.i.Tr,{children:e.map(e=>(0,i.jsx)(y.i.Td,{children:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return M(t)?"redacted":null==e?"-":/_bytes$/i.test(t)&&"number"==typeof e?D(e):"string"==typeof e?e.length>180?"".concat(e.slice(0,177),"..."):e:"number"==typeof e||"boolean"==typeof e?String(e):Array.isArray(e)?"".concat(e.length," item").concat(1===e.length?"":"s"):"details available"}(t[e],e)},e))},r))})]}),n.length>20&&(0,i.jsx)(l.x,{size:"xs",c:"dimmed",mt:"xs",children:"Showing the first 20 entries."})]})}return E(t)&&0===Object.keys(t).length?(0,i.jsx)(l.x,{size:"sm",c:"dimmed",children:"No monitoring data is available."}):(0,i.jsx)(p.x,{type:"auto",mah:260,children:(0,i.jsx)(f.E,{block:!0,children:JSON.stringify(function e(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return r>3?"[truncated]":Array.isArray(t)?t.slice(0,20).map(t=>e(t,r+1)):E(t)?Object.fromEntries(Object.entries(t).slice(0,30).map(t=>{let[i,n]=t;return[i,M(i)?"redacted":e(n,r+1)]})):"string"==typeof t&&t.length>400?"".concat(t.slice(0,397),"..."):t}(t),null,2)})})}function Q(e){let{definition:t,state:r}=e;return(0,i.jsx)(d.Z,{withBorder:!0,radius:"md",padding:"lg",children:(0,i.jsxs)(m.K,{gap:"sm",children:[(0,i.jsxs)(g.Z,{justify:"space-between",align:"flex-start",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(b.D,{order:4,children:t.title}),(0,i.jsx)(l.x,{size:"sm",c:"dimmed",children:t.description})]}),(0,i.jsx)(v.C,{variant:"light",children:t.endpoint})]}),r.loading&&(0,i.jsxs)(g.Z,{gap:"xs",children:[(0,i.jsx)(x.a,{size:"sm"}),(0,i.jsx)(l.x,{size:"sm",c:"dimmed",children:"Loading monitoring data..."})]}),r.error&&(0,i.jsx)(_.b,{color:"red",icon:(0,i.jsx)(z.Z,{size:16}),variant:"light",children:r.error}),!r.loading&&!r.error&&void 0!==r.data&&(0,i.jsxs)(i.Fragment,{children:["filesystems"===t.endpoint&&(0,i.jsx)($,{filesystems:Z(r.data)}),(0,i.jsx)(G,{endpoint:t.endpoint,data:r.data}),(0,i.jsx)(W,{data:r.data,listKeys:t.listKeys})]})]})})}function q(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];
1return new Date(1e3*e).toLocaleString(void 0,t?{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}:{hour:"numeric",minute:"2-digit"})}function J(e){let{title:t,description:r,data:n,series:s,yAxisLabel:a,valueFormatter:c,withRightYAxis:u,rightYAxisLabel:g,rightYAxisProps:h,emptyMessage:p="No retained samples contain this metric for the selected range."}=e,y=n.some(e=>s.some(t=>{let{name:r}=t;return"number"==typeof e[r]}));return(0,i.jsx)(d.Z,{withBorder:!0,radius:"md",padding:"md",children:(0,i.jsxs)(m.K,{gap:"xs",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(l.x,{fw:600,size:"sm",children:t}),(0,i.jsx)(l.x,{size:"xs",c:"dimmed",children:r})]}),y?(0,i.jsx)(o.w,{h:230,data:n,dataKey:"label",series:s,curveType:"monotone",withDots:!1,activeDotProps:{r:4,strokeWidth:1},withLegend:!0,withTooltip:!0,"aria-label":"".concat(t,". ").concat(r),xAxisLabel:"Sample time",yAxisLabel:a,xAxisProps:{minTickGap:42},yAxisProps:{width:62},withRightYAxis:u,rightYAxisLabel:g,rightYAxisProps:h,valueFormatter:c}):(0,i.jsx)(l.x,{c:"dimmed",size:"sm",py:"xl",children:p})]})})}function V(e){let{state:t}=e,r=(0,a.useMemo)(()=>{if(!t.data)return null;let e=t.data.host.map(e=>{var t,r;return{label:q(e.timestamp,!0),load:e.load_average.one,memory:I(e.memory.total_bytes,e.memory.available_bytes),cpu:"number"==typeof(r=null===(t=e.cpu)||void 0===t?void 0:t.utilization_percent)&&Number.isFinite(r)&&r>=0&&r<=100?r:null}}),r=function(e){let t=Array.from(new Set(e.map(e=>e.mount_point))).slice(0,4),r=Array.from(new Set(e.map(e=>e.timestamp))).sort((e,t)=>e-t),i=new Map(e.map(e=>["".concat(e.timestamp,":").concat(e.mount_point),e])),n=["blue","cyan","violet","grape"];return{data:r.map(e=>{let r={label:q(e,!0)};for(let n of t){let t=i.get("".concat(e,":").concat(n));r[n]=t?I(t.total_bytes,t.available_bytes):null}return r}),series:t.map((e,t)=>({name:e,label:e,color:n[t]}))}}(t.data.filesystems),i=t.data.docker.map(e=>({label:q(e.timestamp,!0),containers:e.container_count,available:e.available?100:0})),n=t.data.docker.map(e=>({label:q(e.timestamp,!0),storage:e.layers_size_bytes})),s=t.data.buzz.map(e=>({label:q(e.timestamp,!0),warnings:e.warning_count,errors:e.error_count}));return{host:e,filesystem:r,network:function(e){let t=new Map;for(let r of e.network){let e=t.get(r.timestamp)||{received:0,transmitted:0,hasRate:!1};"number"==typeof r.received_bytes_per_second&&(e.received+=r.received_bytes_per_second,e.hasRate=!0),"number"==typeof r.transmitted_bytes_per_second&&(e.transmitted+=r.transmitted_bytes_per_second,e.hasRate=!0),t.set(r.timestamp,e)}return Array.from(t.entries()).sort((e,t)=>{let[r]=e,[i]=t;return r-i}).map(e=>{let[t,r]=e;return{label:q(t,!0),received:r.hasRate?r.received:null,transmitted:r.hasRate?r.transmitted:null}})}(t.data),docker:i,dockerStorage:n,buzz:s}},[t.data]);return t.loading&&!t.data?(0,i.jsx)(c.O,{height:280,radius:"md"}):t.error?(0,i.jsx)(_.b,{color:"yellow",icon:(0,i.jsx)(z.Z,{size:16}),title:"Historical metrics unavailable",children:t.error}):t.data&&r?t.data.host.length||t.data.filesystems.length||t.data.network.length||t.data.docker.length||t.data.buzz.length?(0,i.jsxs)(u.M,{cols:{base:1,xl:2},spacing:"md",children:[(0,i.jsx)(J,{title:"Host load",description:"One-minute load average.",data:r.host,series:[{name:"load",label:"Load (1m)",color:"blue"}],yAxisLabel:"Load",valueFormatter:e=>e.toFixed(2)}),(0,i.jsx)(J,{title:"CPU utilization",description:"Samples without a /proc/stat delta are left unavailable until a baseline is collected.",data:r.host,series:[{name:"cpu",label:"CPU utilization",color:"green"}],yAxisLabel:"CPU",valueFormatter:O,emptyMessage:"Collecting baseline: no CPU utilization samples are available for this range yet."}),(0,i.jsx)(J,{title:"Memory utilization",description:"Used memory calculated from the retained total and available memory counters.",data:r.host,series:[{name:"memory",label:"Memory used",color:"violet"}],yAxisLabel:"Used",valueFormatter:O}),(0,i.jsx)(J,{title:"Filesystem usage",description:"Used capacity by mounted filesystem. Directory drill-down requires a separate scheduled backend API.",data:r.filesystem.data,series:r.filesystem.series,yAxisLabel:"Used",valueFormatter:O}),(0,i.jsx)(J,{title:"Network rate",description:"Aggregate RX and TX rates across retained interfaces; samples around counter resets are omitted by the agent.",data:r.network,series:[{name:"received",label:"RX",color:"teal"},{name:"transmitted",label:"TX",color:"orange"}],yAxisLabel:"Rate",valueFormatter:B}),(0,i.jsx)(J,{title:"Docker runtime",description:"Container count and sampled Docker availability.",data:r.docker,series:[{name:"containers",label:"Containers",color:"blue"},{name:"available",label:"Available",color:"green",yAxisId:"right"}],yAxisLabel:"Containers",valueFormatter:e=>String(e),withRightYAxis:!0,rightYAxisLabel:"Available",rightYAxisProps:{domain:[0,100],tickFormatter:e=>"".concat(e,"%")}}),(0,i.jsx)(J,{title:"Docker storage",description:"Retained Docker layer storage when the agent reports it.",data:r.dockerStorage,series:[{name:"storage",label:"Layer storage",color:"cyan"}],yAxisLabel:"Storage",valueFormatter:D}),(0,i.jsx)(J,{title:"Buzz log signals",description:"Warning and error lines counted by the agent's bounded Buzz log summary.",data:r.buzz,series:[{name:"warnings",label:"Warnings",color:"yellow"},{name:"errors",label:"Errors",color:"red"}],yAxisLabel:"Lines",valueFormatter:e=>String(e)})]}):(0,i.jsx)(_.b,{color:"blue",children:"No retained monitoring samples exist for this range yet. The agent records samples once per minute."}):(0,i.jsx)(_.b,{color:"gray",children:"Historical metrics have not been loaded yet."})}function ee(){let e=(0,k.x)(),[t,r]=(0,a.useState)({}),[n,s]=(0,a.useState)("24h"),[o,c]=(0,a.useState)({loading:!1}),[h,p]=(0,a.useState)(null),y=(0,a.useRef)(0),f=(0,a.useCallback)(()=>new R(e),[e]),v=(0,a.useCallback)(async()=>{let t;if(e){try{t=f()}catch(t){let e=t instanceof Error?t.message:"The monitoring API URL is invali
1d.";r(Object.fromEntries(F.map(t=>{let{endpoint:r}=t;return[r,{loading:!1,error:e}]})));return}r(Object.fromEntries(F.map(e=>{let{endpoint:t}=e;return[t,{loading:!0}]}))),r(Object.fromEntries(await Promise.all(F.map(async e=>{let{endpoint:r}=e;try{return[r,{loading:!1,data:await t.get(r)}]}catch(e){return[r,{loading:!1,error:e instanceof Error?e.message:"Could not load monitoring data."}]}})))),p(new Date)}},[f,e]),x=(0,a.useCallback)(async t=>{if(!e)return;let r=y.current+1;y.current=r;let i=U.find(e=>e.value===t),n=Math.floor(Date.now()/1e3),s={start:n-i.seconds,end:n,resolution:i.resolution};c(e=>({...e,loading:!0,error:void 0}));try{let e=await f().getHistory(s);if(r!==y.current)return;c({loading:!1,data:e})}catch(e){if(r!==y.current)return;c(t=>({...t,loading:!1,error:e instanceof Error?e.message:"Could not load historical monitoring data."}))}},[f,e]);(0,a.useEffect)(()=>{v()},[v]),(0,a.useEffect)(()=>{x(n)},[n,x]);let S=null,P=null;try{S=N()}catch(e){P=e instanceof Error?e.message:"The monitoring API URL is invalid."}let L=F.some(e=>{var r;let{endpoint:i}=e;return null===(r=t[i])||void 0===r?void 0:r.loading});return(0,i.jsxs)(m.K,{gap:"md",children:[(0,i.jsxs)(g.Z,{justify:"space-between",align:"flex-end",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(b.D,{order:2,children:"Operations monitoring"}),(0,i.jsx)(l.x,{size:"sm",c:"dimmed",children:"Read-only, direct browser access to the authenticated VPS operations agent."}),S&&(0,i.jsxs)(l.x,{size:"xs",c:"dimmed",mt:4,children:["Connected directly to ",S]})]}),(0,i.jsx)(j.z,{leftSection:(0,i.jsx)(A.Z,{size:16}),onClick:()=>{v(),x(n)},loading:L||o.loading,children:"Refresh"})]}),P&&(0,i.jsx)(_.b,{color:"red",icon:(0,i.jsx)(z.Z,{size:16}),children:P}),(0,i.jsx)(Y,{states:t,history:o.data}),h&&(0,i.jsxs)(l.x,{size:"xs",c:"dimmed",children:["Live snapshots refreshed ",h.toLocaleTimeString(),"."]}),(0,i.jsx)(d.Z,{withBorder:!0,radius:"md",padding:"md",children:(0,i.jsxs)(m.K,{gap:"md",children:[(0,i.jsxs)(g.Z,{justify:"space-between",align:"center",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(b.D,{order:3,children:"Historical metrics"}),(0,i.jsx)(l.x,{size:"sm",c:"dimmed",children:"Bounded, authenticated SQLite history from the operations agent."})]}),(0,i.jsx)(w.s,{size:"xs",value:n,onChange:e=>s(e),data:U.map(e=>{let{value:t,label:r}=e;return{value:t,label:r}}),"aria-label":"Historical metrics range"})]}),(0,i.jsx)(V,{state:o})]})}),(0,i.jsxs)("div",{children:[(0,i.jsx)(b.D,{order:3,children:"Live details"}),(0,i.jsx)(l.x,{size:"sm",c:"dimmed",children:"Current read-only collector responses. Sensitive fields are redacted before display."})]}),(0,i.jsx)(u.M,{cols:{base:1,xl:2},spacing:"md",children:F.map(e=>(0,i.jsx)(Q,{definition:e,state:t[e.endpoint]||{loading:!1}},e.endpoint))})]})}var et=!0;function er(){return(0,i.jsx)(s.Z,{children:(0,i.jsx)(n.Z,{children:(0,i.jsx)(ee,{})})})}},86641:function(e,t,r){"use strict";r.d(t,{E:function(){return k}});var i=r(85893);r(67294);var n=r(19784),s=r(90987),a=r(9535),o=r(33583);let[l,c]=(0,r(70679).R)("Progress.Root component was not found in tree");var d={root:"m_db6d6462",section:"m_2242eb65","stripes-animation":"m_81a374bd",label:"m_91e40b74"};let u={},m=(0,a.d5)((e,t)=>{let{classNames:r,className:n,style:a,styles:l,vars:d,...m}=(0,s.w)("ProgressLabel",u,e),g=c();return(0,i.jsx)(o.x,{ref:t,...g.getStyles("label",{className:n,style:a,classNames:r,styles:l}),...m})});m.classes=d,m.displayName="@mantine/core/ProgressLabel";var g=r(69429),h=r(13637),p=r(46976);let y={},f=(0,h.Z)((e,{size:t,radius:r,transitionDuration:i})=>({root:{"--progress-size":(0,g.ap)(t,"progress-size"),"--progress-radius":void 0===r?void 0:(0,g.H5)(r),"--progress-transition-duration":"number"==typeof i?`${i}ms`:void 0}})),b=(0,a.d5)((e,t)=>{let r=(0,s.w)("ProgressRoot",y,e),{classNames:n,className:a,style:c,styles:u,unstyled:m,vars:g,autoContrast:h,transitionDuration:b,...v}=r,x=(0,p.y)({name:"Progress",classes:d,props:r,className:a,style:c,classNames:n,styles:u,unstyled:m,vars:g,varsResolver:f});return(0,i.jsx)(l,{value:{getStyles:x,autoContrast:h},children:(0,i.jsx)(o.x,{ref:t,...x("root"),...v})})});b.classes=d,b.displayName="@mantine/core/ProgressRoot";var v=r(2979),x=r(62987),_=r(95404),j=r(65984);let w={withAria:!0},z=(0,a.d5)((e,t)=>{let{classNames:r,className:n,style:a,styles:l,vars:d,value:u,withAria:m,color:g,striped:h,animated:p,mod:y,...f}=(0,s.w)("ProgressSection",w,e),b=c(),z=(0,j.rZ)(),A=m?{role:"progressbar","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":u,"aria-valuetext":`${u}%`}:{};return(0,i.jsx)(o.x,{ref:t,...b.getStyles("section",{className:n,classNames:r,styles:l,style:a}),...f,...A,mod:[{striped:h||p,animated:p},y],__vars:{"--progress-section-width":`${u}%`,"--progress-section-color":(0,v.p)(g,z),"--progress-label-color":(0,_.o)(b.autoContrast,z)?(0,x.R)({color:g,theme:z,autoContrast:b.autoContrast}):void 0}})});z.classes=d,z.displayName="@mantine/core/ProgressSection";let A={},k=(0,a.d5)((e,t)=>{let r=(0,s.w)("Progress",A,e),{value:a,classNames:o,styles:l,vars:c,color:d,striped:u,animated:m,"aria-label":g,...h}=r,{resolvedClassNames:p,resolvedStyles:y}=(0,n.h)({classNames:o,styles:l,props:r});return(0,i.jsx)(b,{ref:t,classNames:p,styles:y,vars:c,...h,children:(0,i.jsx)(z,{value:a,color:d,striped:u,animated:m,"aria-label":g})})});k.classes=d,k.displayName="@mantine/core/Progress",k.Section=z,k.Root=b,k.Label=m}},function(e){e.O(0,[47423,31748,82720,68923,93715,92888,49774,40179],function(){return e(e.s=198)}),_N_E=e.O()}]);

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.