rigscope 0.1.8 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +1 -1
- package/.next/build-manifest.json +2 -2
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +3 -3
- package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/administration/page_client-reference-manifest.js +1 -1
- package/.next/server/app/administration.html +1 -1
- package/.next/server/app/administration.rsc +3 -3
- package/.next/server/app/administration.segments/_full.segment.rsc +3 -3
- package/.next/server/app/administration.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/administration.segments/administration/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/alerts/page_client-reference-manifest.js +1 -1
- package/.next/server/app/alerts.html +1 -1
- package/.next/server/app/alerts.rsc +3 -3
- package/.next/server/app/alerts.segments/_full.segment.rsc +3 -3
- package/.next/server/app/alerts.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/alerts.segments/alerts/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/connections/page.js +1 -1
- package/.next/server/app/connections/page_client-reference-manifest.js +1 -1
- package/.next/server/app/connections.html +1 -1
- package/.next/server/app/connections.rsc +4 -4
- package/.next/server/app/connections.segments/_full.segment.rsc +4 -4
- package/.next/server/app/connections.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/connections.segments/connections/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/history/page.js +2 -2
- package/.next/server/app/history/page_client-reference-manifest.js +1 -1
- package/.next/server/app/history.html +1 -1
- package/.next/server/app/history.rsc +6 -6
- package/.next/server/app/history.segments/_full.segment.rsc +6 -6
- package/.next/server/app/history.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/history.segments/history/__PAGE__.segment.rsc +6 -6
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +3 -3
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +3 -3
- package/.next/server/app/login.segments/_full.segment.rsc +3 -3
- package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/machines/[machineId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/processes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/processes.html +1 -1
- package/.next/server/app/processes.rsc +3 -3
- package/.next/server/app/processes.segments/_full.segment.rsc +3 -3
- package/.next/server/app/processes.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/processes.segments/processes/__PAGE__.segment.rsc +3 -3
- package/.next/server/app-paths-manifest.json +1 -1
- package/.next/server/chunks/161.js +1 -1
- package/.next/server/chunks/168.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/408-351fe4a1e9a2d556.js +1 -0
- package/.next/static/chunks/939-92930fde48061e20.js +1 -0
- package/.next/static/chunks/app/connections/page-7d18b901f2338f20.js +1 -0
- package/.next/static/chunks/app/history/page-adc25194b30c689d.js +3 -0
- package/.next/static/css/{f5d3162842dcac31.css → 2abef6d49c1c2970.css} +1 -1
- package/ARCHITECTURE.md +43 -15
- package/CHANGELOG.md +62 -0
- package/README.md +10 -3
- package/dist/cli.cjs +868 -511
- package/dist/collector.cjs +603 -120
- package/dist/hub.cjs +3429 -1451
- package/dist/ops.cjs +1178 -888
- package/dist/system.cjs +1322 -363
- package/docs/configuration.md +34 -1
- package/docs/installation.md +12 -6
- package/docs/monitoring.md +60 -17
- package/docs/operations.md +78 -22
- package/docs/system-installation.md +11 -4
- package/docs/telemetry-storage.md +258 -0
- package/package.json +3 -1
- package/packaging/collector.env.example +6 -0
- package/packaging/system/rigscope-collector.service.example +3 -0
- package/.next/static/chunks/408-9fdba9e4e956ef08.js +0 -1
- package/.next/static/chunks/939-514e554087419c71.js +0 -1
- package/.next/static/chunks/app/connections/page-75abd16fc495fcbd.js +0 -1
- package/.next/static/chunks/app/history/page-a25ba8fab7bd7cb9.js +0 -3
- /package/.next/static/{ip43TIgmaByEBn2GFtvfO → JbaLjudQSxrMUD_VHPrnD}/_buildManifest.js +0 -0
- /package/.next/static/{ip43TIgmaByEBn2GFtvfO → JbaLjudQSxrMUD_VHPrnD}/_ssgManifest.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{var a={};a.id=429,a.ids=[429],a.modules={3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},30537:(a,b,c)=>{Promise.resolve().then(c.bind(c,81328)),Promise.resolve().then(c.bind(c,40015)),Promise.resolve().then(c.bind(c,85378)),Promise.resolve().then(c.bind(c,7867)),Promise.resolve().then(c.bind(c,76670))},33873:a=>{"use strict";a.exports=require("path")},38522:a=>{"use strict";a.exports=require("node:zlib")},40265:(a,b,c)=>{Promise.resolve().then(c.bind(c,79173)),Promise.resolve().then(c.bind(c,28565)),Promise.resolve().then(c.bind(c,64792)),Promise.resolve().then(c.bind(c,50369)),Promise.resolve().then(c.bind(c,46568))},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},44857:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>q,handler:()=>s,routeModule:()=>r});var d=c(21635),e=c(86315),f=c(1020),g=c(61287),h={};for(let a in g)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(h[a]=()=>g[a]);c.d(b,h);let i=(0,d.p)(()=>Promise.resolve().then(c.bind(c,76537))),j=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),k=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),l=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),m=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),n=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),o={children:["",{children:["history",{children:["__PAGE__",{},{page:[(0,d.p)(()=>Promise.resolve().then(c.bind(c,78817))),"/home/triet/Project/rigscope/src/app/history/page.tsx"]}]},{"global-error":[n,"next/dist/client/components/builtin/global-error.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,59645)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}},[]]},{layout:[i,"/home/triet/Project/rigscope/src/app/layout.tsx"],"global-error":[j,"next/dist/client/components/builtin/global-error.js"],"not-found":[k,"next/dist/client/components/builtin/not-found.js"],forbidden:[l,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[m,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,59645)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}},[]]}.children,p=(0,e.H)({tree:o,page:"/history/page",pathname:"/history",require:c,loadChunk:()=>Promise.resolve(),interopDefault:f.T}),q=p.__next_app__,r=p.routeModule,s=p.handler},46060:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external.js")},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78817:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>k,metadata:()=>i});var d=c(5735),e=c(91986),f=c(88713),g=c(35448),h=c(79173);let i={title:"History"};function j(){return(0,d.jsx)(f.G,{title:"History",children:(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-5 xl:grid-cols-2","aria-busy":"true",children:[(0,d.jsxs)(g.Z,{title:"Loading history",children:[(0,d.jsx)("div",{className:"h-40 animate-pulse rounded-lg bg-card-strong","aria-hidden":!0}),(0,d.jsx)("p",{className:"mt-3 text-xs text-muted-foreground",children:"Preparing the history view…"})]}),(0,d.jsxs)(g.Z,{title:"Preparing charts",children:[(0,d.jsx)("div",{className:"h-40 animate-pulse rounded-lg bg-card-strong","aria-hidden":!0}),(0,d.jsx)("p",{className:"mt-3 text-xs text-muted-foreground",children:"Machine and metric controls appear next."})]})]})})}function k(){return(0,d.jsx)(e.Suspense,{fallback:(0,d.jsx)(j,{}),children:(0,d.jsx)(h.HistoryView,{})})}},79173:(a,b,c)=>{"use strict";c.d(b,{HistoryView:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call HistoryView() from the server but HistoryView is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/triet/Project/rigscope/src/components/history/history-view.tsx","HistoryView")},81328:(a,b,c)=>{"use strict";c.d(b,{HistoryView:()=>aB});var d=c(48249),e=c(2116),f=c.n(e),g=c(67484),h=c(93484),i=c(51872),j=c(12421),k=c(49187),l=c(31742),m=c(22091),n=c(22338),o=c(81232),p=c(75006),q=c(4155),r=c(58910),s=c(52464),t=c(11449),u=c(25982);let v=u.U8,w=/^core:(\d+)$/;function x(a){let b=w.exec(a);if(null===b)return null;let c=Number(b[1]);return!Number.isSafeInteger(c)||c<0||c>=u.U8?null:c}function y(a){return[...new Set(a)].sort((a,b)=>(x(a)??0)-(x(b)??0))}function z(a,b=[]){var c;let d=a?.metrics?.payload.cpu,e=new Set(!Number.isFinite(c=Math.max(a?.inventory?.cpu.logicalCores??0,d?.status==="ok"?d.perCore.length:0))?[]:Array.from({length:Math.min(u.U8,Math.max(0,Math.floor(c)))},(a,b)=>`core:${b}`));for(let a of b)"cpu.core"===a.metric&&null!==x(a.resourceId)&&e.add(a.resourceId);return y([...e])}function A(a,b){let c=new Set(b);if(null===a)return y(b).slice(0,v);let d=[];for(let b of a)if(c.has(b)&&null!==x(b)&&(d.push(b),d.length>=v))break;return y(d)}function B(a){let b=x(a);return null===b?a:`Core ${b}`}var C=c(96480),D=c(66338),E=c(73742),F=c(64500),G=c(65366);let H=(0,G.A)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),I=(0,G.A)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var J=c(94054);let K=Object.freeze([]),L=new Set(t.H9.map(a=>a.metric)),M=a=>"boolean"==typeof a?a:null,N=a=>Array.isArray(a)&&a.every(a=>"string"==typeof a)?a.slice(0,1e3):null,O=a=>D.pI.some(b=>b.id===a)?a:null,P=a=>"string"==typeof a&&(""===a||a.split(",").every(a=>L.has(a)))?a:null,Q=/^core:\d+$/,R=a=>Array.isArray(a)&&a.every(a=>"string"==typeof a&&Q.test(a))?[...new Set(a)].slice(0,u.U8):null;function S(a,b){return(0,J.u)(`history.hidden.${b}.${a}`,K,N)}function T(a){return(0,J.u)(`history.cores.${a}`,null,R)}let U=a=>"bytes"===a||"percent"===a?a:null;function V(a,b){return(0,J.u)(`history.units.${b}.${a}`,"bytes",U)}let W="peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:[outline-color:var(--focus)]";function X({label:a,action:b}){return(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:a}),(0,d.jsx)("span",{"aria-hidden":!0,className:"h-px min-w-0 flex-1 bg-border"}),b]})}let Y="inline-flex min-h-8 items-center gap-1.5 rounded-md border border-transparent px-2.5 text-xs transition-colors",Z=`${Y} ${W} bg-selected text-foreground`,$=`${Y} ${W} bg-card-strong text-muted-foreground hover:text-foreground`;function _(a){let{machine:b,range:c,selectedMetrics:e,catalog:f,catalogError:g,gpuCards:h,hiddenCards:i,autoRefresh:j,loading:k,manualRefreshing:m,statusText:n,onRangeChange:o,onToggleMetric:p,onSetMetrics:q,onToggleCard:r,onToggleAutoRefresh:s,onRefresh:u}=a,[v,w]=(0,J.u)("history.controlsOpen",!1,M,"session"),x=new Set(e),y=t.H9.filter(({metric:a})=>(0,t.yv)(b,a).available&&(null===f||void 0!==f[a])).map(({metric:a})=>a),C=new Set(y),G=(a,b)=>{let c=new Set(e);for(let d of a)b&&C.has(d)?c.add(d):b||c.delete(d);q([...c])},K=e.some(a=>a.startsWith("gpu.")),L=x.has("cpu.core"),[N,O]=T(b?.machineId??""),P=L?z(b):[],Q=A(N,P),R=new Set(Q);return(0,d.jsxs)("section",{"aria-labelledby":"history-query-heading","aria-busy":k,className:"mb-5 min-w-0 rounded-xl border border-border bg-card",children:[(0,d.jsx)("h2",{id:"history-query-heading",className:"sr-only",children:"History query"}),(0,d.jsxs)("div",{className:"flex flex-wrap items-end gap-x-5 gap-y-4 p-4 md:p-5",children:[(0,d.jsxs)("fieldset",{className:"flex min-w-0 flex-col gap-1.5",children:[(0,d.jsx)("legend",{className:"mb-1.5 text-xs text-muted-foreground",children:"Time range"}),(0,d.jsx)("div",{className:"inline-flex flex-wrap rounded-lg border border-border bg-background p-0.5",children:D.pI.map(a=>{let b=c===a.id;return(0,d.jsxs)("label",{className:"cursor-pointer",children:[(0,d.jsx)("input",{type:"radio",name:"history-range",value:a.id,checked:b,onChange:()=>o(a.id),className:"peer sr-only"}),(0,d.jsxs)("span",{className:`inline-flex min-h-8 items-center rounded-md px-2.5 text-xs transition-colors ${W} ${b?"bg-selected font-medium text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[a.shortLabel,(0,d.jsxs)("span",{className:"sr-only",children:[" — ",a.label]})]})]},a.id)})})]}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 sm:ml-auto",children:[(0,d.jsx)("p",{className:"order-first w-full text-xs text-muted-foreground sm:order-none sm:w-auto",children:n}),(0,d.jsxs)("button",{type:"button",onClick:u,disabled:m,className:"inline-flex min-h-8 items-center gap-1.5 rounded-md border border-border bg-background px-2.5 text-xs text-foreground transition-colors hover:bg-card-strong disabled:opacity-60",children:[(0,d.jsx)(l.A,{className:`h-3.5 w-3.5 ${m?"animate-spin":""}`,"aria-hidden":!0}),"Refresh"]}),(0,d.jsxs)("button",{type:"button",onClick:s,"aria-pressed":j,className:`inline-flex min-h-8 items-center gap-1.5 rounded-md border px-2.5 text-xs transition-colors ${j?"border-accent/40 bg-selected text-foreground":"border-border bg-background text-muted-foreground hover:bg-card-strong hover:text-foreground"}`,children:[j?(0,d.jsx)(E.A,{className:"h-3.5 w-3.5","aria-hidden":!0}):(0,d.jsx)(F.A,{className:"h-3.5 w-3.5","aria-hidden":!0}),j?"Pause":"Resume"]})]})]}),(0,d.jsxs)("div",{className:"border-t border-border px-4 py-4 md:px-5",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,d.jsxs)("button",{type:"button","aria-expanded":v,"aria-controls":"history-metric-options",onClick:()=>w(!v),className:"inline-flex min-h-8 items-center gap-1.5 rounded-md text-sm font-medium",children:["Metrics ",(0,d.jsxs)("span",{className:"tnum text-xs font-normal text-muted-foreground",children:[x.size," selected"]}),(0,d.jsx)(H,{"aria-hidden":!0,className:`h-3.5 w-3.5 text-muted-foreground transition-transform ${v?"rotate-180":""}`})]}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,d.jsx)("button",{type:"button",onClick:()=>G(y,!0),disabled:y.every(a=>x.has(a)),className:"inline-flex min-h-8 items-center rounded-md border border-border bg-background px-2.5 text-xs text-foreground transition-colors hover:bg-card-strong disabled:opacity-50",children:"Select all"}),(0,d.jsx)("button",{type:"button",onClick:()=>q([]),disabled:0===x.size,className:"inline-flex min-h-8 items-center rounded-md border border-border bg-background px-2.5 text-xs text-foreground transition-colors hover:bg-card-strong disabled:opacity-50",children:"Unselect all"})]})]}),(0,d.jsx)("div",{id:"history-metric-options",hidden:!v,children:(0,d.jsxs)("div",{className:"mt-4 min-w-0 md:col-span-2",children:[(0,d.jsx)("div",{className:"min-w-0",children:(0,d.jsx)("div",{className:"grid gap-x-6 gap-y-5 md:grid-cols-2 xl:grid-cols-3",children:t.P$.map(a=>(0,d.jsxs)("fieldset",{className:`min-w-0 ${"disk"===a.id?"xl:col-span-2":""}`,children:[(0,d.jsx)("legend",{className:"sr-only",children:a.label}),(0,d.jsx)(X,{label:a.label,action:(0,d.jsxs)("div",{className:"flex shrink-0 gap-2",children:[(0,d.jsx)("button",{type:"button","aria-label":`Select all ${a.label} metrics`,onClick:()=>G(a.metrics,!0),disabled:a.metrics.filter(a=>C.has(a)).every(a=>x.has(a)),className:"min-h-6 rounded-sm text-xs text-muted-foreground hover:text-foreground hover:underline disabled:opacity-50",children:"All"}),(0,d.jsx)("button",{type:"button","aria-label":`Unselect all ${a.label} metrics`,onClick:()=>G(a.metrics,!1),disabled:!a.metrics.some(a=>x.has(a)),className:"min-h-6 rounded-sm text-xs text-muted-foreground hover:text-foreground hover:underline disabled:opacity-50",children:"None"})]})}),(0,d.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:a.metrics.map(a=>{var c;let e=(0,t.oB)(a);if(null===e)return null;let g=(0,t.yv)(b,a),h=null===f||void 0!==f[a],i=g.available&&h,j=x.has(a),k=(0,t.Lf)(e,0);return(0,d.jsxs)("label",{className:i?"cursor-pointer":"cursor-not-allowed",title:g.available?h?e.description:"This hub does not record this metric.":g.reason??void 0,children:[(0,d.jsx)("input",{type:"checkbox",checked:j,onChange:()=>p(a),disabled:!i&&!j,className:"peer sr-only","aria-label":e.label}),(0,d.jsxs)("span",{className:`${!i?j?`${Y} ${W} bg-card-strong text-muted-foreground line-through`:`${Y} text-muted-foreground opacity-50`:j?Z:$}`,children:[(0,d.jsx)("span",{"aria-hidden":!0,className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-sm border border-current",style:{color:k.color},children:j?(0,d.jsx)(I,{className:"h-3 w-3",strokeWidth:3}):null}),(c=e.label,({"cpu.usage":"Usage","cpu.core":"Per-core","cpu.iowait":"I/O wait","cpu.pressure":"Pressure","cpu.temperature":"Temperature","cpu.power":"Package power","memory.used":"Used bytes","memory.usage":"Usage %","swap.used":"Swap","memory.pressure.some":"Pressure (some)","memory.pressure.full":"Pressure (full)","gpu.utilization":"Utilization","gpu.memory.used":"VRAM","gpu.temperature":"Temperature","gpu.power":"Power","fs.used":"Space used","fs.usage":"Capacity %","fs.inodes.usage":"Inodes %","net.rx":"Received","net.tx":"Sent"})[a]??c)]})]},a)})}),"gpu"===a.id&&K&&h.length>0?(0,d.jsxs)("fieldset",{className:"mt-4 border-t border-border pt-3",children:[(0,d.jsx)("legend",{className:"sr-only",children:"GPU cards"}),(0,d.jsx)(X,{label:"GPU cards"}),(0,d.jsx)("div",{className:"mt-1.5 flex flex-wrap gap-1.5",children:h.map((a,b)=>{let c=a.id,e=!i.has(c);return(0,d.jsxs)("label",{className:"cursor-pointer",children:[(0,d.jsx)("input",{type:"checkbox",checked:e,onChange:()=>r(c),className:"peer sr-only"}),(0,d.jsxs)("span",{className:e?Z:$,children:[(0,d.jsx)("span",{className:"tnum text-xs text-muted-foreground",children:b+1}),a.label]})]},a.id)})})]}):null,"cpu"===a.id&&L?(0,d.jsxs)("fieldset",{className:"mt-4 border-t border-border pt-3",children:[(0,d.jsx)("legend",{className:"sr-only",children:"CPU cores"}),(0,d.jsx)(X,{label:`CPU cores \xb7 ${Q.length} / ${P.length}`,action:(0,d.jsxs)("div",{className:"flex shrink-0 gap-2",children:[(0,d.jsx)("button",{type:"button",onClick:()=>O(null),disabled:Q.length===P.length,className:"min-h-6 rounded-sm text-xs text-muted-foreground hover:text-foreground disabled:opacity-50",children:"All cores"}),(0,d.jsx)("button",{type:"button",onClick:()=>O([]),disabled:0===Q.length,"aria-label":"Unselect all CPU cores",className:"min-h-6 rounded-sm text-xs text-muted-foreground hover:text-foreground disabled:opacity-50",children:"None"})]})}),0===P.length?(0,d.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:"Core count unavailable."}):(0,d.jsxs)("details",{className:"mt-2",children:[(0,d.jsxs)("summary",{className:"inline-flex min-h-8 cursor-pointer items-center gap-1 rounded-md text-xs text-muted-foreground hover:text-foreground",children:["Choose cores ",(0,d.jsx)(H,{className:"h-3.5 w-3.5","aria-hidden":!0})]}),(0,d.jsx)("div",{className:"mt-2 grid max-h-48 grid-cols-3 gap-1.5 overflow-y-auto p-1",children:P.map(a=>{let b=R.has(a);return(0,d.jsxs)("label",{className:"min-w-0 cursor-pointer",children:[(0,d.jsx)("input",{type:"checkbox",checked:b,onChange:()=>{var c;return c=!b,void O(b=>{let d=A(b,P);return c?d.includes(a)?b:[...d,a]:d.filter(b=>b!==a)})},className:"peer sr-only"}),(0,d.jsxs)("span",{className:`${b?Z:$} w-full px-1.5`,children:[(0,d.jsx)("span",{"aria-hidden":!0,className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-sm border border-current",children:b?(0,d.jsx)(I,{className:"h-3 w-3"}):null}),B(a)]})]},a)})})]})]}):null]},a.id))})}),g?(0,d.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:g}):null]})})]})]})}var aa=c(43607),ab=c(15670),ac=c(55280),ad=c(47978);let ae="grid grid-cols-[3rem_minmax(0,1fr)_4.5rem] items-center gap-2 sm:grid-cols-[3.5rem_minmax(0,1fr)_4.5rem_3rem]";function af({title:a,series:b,fromMs:c,toMs:e,stepMs:f,gaps:h,hiddenKeys:i,onToggleSeries:j}){let[k,l]=(0,g.useState)(!1),m=(0,g.useMemo)(()=>b.filter(a=>!i.has(a.key)),[b,i]),n=(0,ad.Au)({series:m,fromMs:c,toMs:e,stepMs:f,gaps:h}),o=(0,g.useMemo)(()=>{let a=b.map(a=>{let b=Array(10).fill("");return(function(a,b,c,d=120){let e=Array(d).fill(null),f=Math.max(1,c-b);for(let g of a){if(g.t<b||g.t>c)continue;let a=g.max??g.avg;if(null===a||!Number.isFinite(a))continue;let h=Math.min(d-1,Math.floor((g.t-b)/f*d));e[h]=Math.max(e[h]??0,Math.min(100,Math.max(0,a)))}return e})(a.points,c,e,120).forEach((a,c)=>{if(null===a)return;let d=Math.min(9,Math.floor(a/10));b[d]+=`M${c},1h1v16h-1z`}),{...a,stats:(0,C.T6)(a.points),paths:b}});return k&&a.sort((a,b)=>(b.stats.max??-1)-(a.stats.max??-1)),a},[b,c,e,k]),p=o.filter(a=>!i.has(a.key)).reduce((a,b)=>null!==b.stats.max&&(a?.stats.max===null||null===a||b.stats.max>a.stats.max)?b:a,null),q=null===n.timeMs?null:(0,D.r6)(n.timeMs),r=Math.max(1,e-c),s=(0,C.$z)(h,c,e);return(0,d.jsxs)("figure",{className:"min-w-0 lg:col-span-full",onPointerLeave:a=>{"mouse"===a.pointerType&&n.clear()},children:[(0,d.jsxs)("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-2",children:[(0,d.jsx)("h3",{className:"text-xs font-medium text-foreground",children:a}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-xs",children:[p?(0,d.jsxs)("span",{className:"tnum text-muted-foreground",children:["Peak \xb7 ",p.label," ",(0,d.jsx)("span",{className:"text-foreground",children:(0,D.dd)(p.stats.max,"percent")})]}):null,(0,d.jsx)("button",{type:"button","aria-pressed":k,onClick:()=>l(!k),className:`min-h-8 rounded-md border border-border px-2 ${k?"bg-selected text-foreground":"bg-background text-muted-foreground hover:text-foreground"}`,children:"Busiest first"})]})]}),(0,d.jsxs)("div",{className:`${ae} mb-1 min-h-4 whitespace-nowrap text-xs leading-4 text-muted-foreground`,"aria-hidden":!0,children:[(0,d.jsx)("span",{children:"Core"}),(0,d.jsx)("span",{className:"truncate",children:null!==q?(0,d.jsx)("span",{className:"tnum",children:q}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"sm:hidden",children:"History"}),(0,d.jsx)("span",{className:"hidden sm:inline",children:"Peak usage over time"})]})}),(0,d.jsx)("span",{className:"hidden text-right sm:block",children:null!==q?"At cursor":"Last"}),(0,d.jsxs)("span",{className:"text-right",children:[(0,d.jsx)("span",{className:"hidden sm:inline",children:"Peak"}),(0,d.jsx)("span",{className:"sm:hidden",children:null!==q?"At cursor":"Peak"})]})]}),(0,d.jsx)("p",{id:`${n.id}-instructions`,className:"sr-only",children:"Focus a core chart and use Left and Right arrows to inspect recorded bucket peaks, Home or End to jump, and Escape to dismiss."}),(0,d.jsx)("div",{role:"region","aria-label":"Per-core history rows",tabIndex:0,className:"max-h-96 overflow-y-auto rounded-md",children:0===o.length?(0,d.jsx)("p",{className:"py-8 text-center text-xs text-muted-foreground",children:"No stored per-core readings."}):o.map(a=>{let b=!i.has(a.key),g=null===n.timeMs?null:(0,ac.bO)(a.points,n.timeMs,f,h),k=g?.max??g?.avg??null;return(0,d.jsxs)("div",{className:`${ae} min-h-7 border-b border-border/40 text-xs`,children:[(0,d.jsxs)("label",{className:"inline-flex min-h-7 cursor-pointer items-center rounded-sm",children:[(0,d.jsx)("input",{type:"checkbox",checked:b,onChange:()=>j(a.key),className:"peer sr-only"}),(0,d.jsx)("span",{className:`${b?"text-foreground":"text-muted-foreground line-through"} rounded-sm peer-focus-visible:outline-2 peer-focus-visible:outline-accent`,children:a.label})]}),(0,d.jsxs)("svg",{viewBox:"0 0 120 18",preserveAspectRatio:"none",role:"img","aria-label":`${a.label}: ${null!==q?`${(0,D.dd)(k,"percent")} at ${q}`:`latest ${(0,D.dd)(a.stats.latest,"percent")}`}, peak ${(0,D.dd)(a.stats.max,"percent")}${b?"":", hidden"}`,"aria-describedby":`${n.id}-instructions`,tabIndex:b?0:void 0,onPointerDown:b?a=>{if("mouse"===a.pointerType)return;a.currentTarget.setPointerCapture(a.pointerId);let b=a.currentTarget.getBoundingClientRect();n.inspect((0,ac.yk)(a.clientX,b.left,b.width,c,e))}:void 0,onPointerCancel:n.clear,onContextMenu:a=>a.preventDefault(),onPointerMove:b?a=>{let b=a.currentTarget.getBoundingClientRect();n.inspect((0,ac.yk)(a.clientX,b.left,b.width,c,e))}:void 0,onFocus:n.onFocus,onBlur:n.clear,onKeyDown:n.onKeyDown,className:`h-7 w-full touch-pan-y select-none cursor-crosshair rounded-sm focus-visible:outline-2 focus-visible:outline-accent ${b?"":"opacity-20"}`,children:[(0,d.jsx)("title",{children:`${a.label} \xb7 Last ${(0,D.dd)(a.stats.latest,"percent")} \xb7 Peak ${(0,D.dd)(a.stats.max,"percent")}`}),b?a.paths.map((a,b)=>a?(0,d.jsx)("path",{d:a,fill:b<5?"var(--cpu)":b<8?"var(--warn)":"var(--crit)",opacity:b<5?.15+.17*b:.65+b%5*.07},b):null):null,s.map(a=>(0,d.jsx)("rect",{x:(a.fromMs-c)/r*120,width:(a.toMs-a.fromMs)/r*120,y:0,height:18,fill:"var(--card)"},`${a.fromMs}-${a.toMs}`)),null!==n.timeMs?(0,d.jsx)("line",{"aria-hidden":!0,x1:(n.timeMs-c)/r*120,x2:(n.timeMs-c)/r*120,y1:0,y2:18,stroke:"var(--foreground)",strokeWidth:"1",vectorEffect:"non-scaling-stroke",pointerEvents:"none"}):null]}),(0,d.jsx)("span",{className:"tnum hidden text-right text-muted-foreground sm:block",children:b?(0,D.dd)(null!==n.timeMs?k:a.stats.latest,"percent"):"—"}),(0,d.jsxs)("span",{className:`tnum text-right ${b&&(a.stats.max??0)>=80?"text-crit":"text-muted-foreground"}`,children:[(0,d.jsx)("span",{className:"hidden sm:inline",children:b?(0,D.dd)(a.stats.max,"percent"):"—"}),(0,d.jsx)("span",{className:"sm:hidden",children:b?(0,D.dd)(null!==n.timeMs?k:a.stats.max,"percent"):"—"})]})]},a.key)})}),(0,d.jsxs)("div",{className:`${ae} mt-2 text-xs text-muted-foreground`,"aria-hidden":!0,children:[(0,d.jsx)("span",{}),(0,d.jsx)("div",{className:"flex justify-between gap-2 tnum",children:(0,C.Cf)(c,e,3).map((a,b)=>(0,d.jsx)("span",{className:1===b?"hidden sm:inline":"",children:(0,D.O5)(a,r)},a))}),(0,d.jsx)("span",{className:"hidden sm:block"}),(0,d.jsx)("span",{})]}),(0,d.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[[{label:"0–49%",color:"var(--cpu)"},{label:"50–79%",color:"var(--warn)"},{label:"80–100%",color:"var(--crit)"}].map(a=>(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,d.jsx)("span",{"aria-hidden":!0,className:"h-2 w-4 rounded-sm",style:{backgroundColor:a.color}}),a.label]},a.label)),(0,d.jsx)("span",{children:"No fill \xb7 no reading"})]})]})}function ag(a,b){return`${a}\0${b}`}function ah(a,b,c,d,e){let f=(0,t.oB)(c);return null===f?[]:a.series.filter(a=>a.metric===c&&(void 0===d||a.resourceId===d)).map((a,d)=>{let g=(0,t.Lf)(f,d),h=e?.(a,f,d)??(0,t.bP)(b,c,a.resourceId);return{key:ag(a.metric,a.resourceId),label:h,metric:a.metric,resourceId:a.resourceId,color:g.color,dash:g.dash,points:a.points}})}function ai(a){let{machine:b,result:c,selectedMetrics:e,hiddenCards:f,hiddenSeries:g,onToggleSeries:h}=a,[i]=T(b.machineId),j=A(i,z(b,c.series)),k=function(a){let{machine:b,result:c,selectedMetrics:d,hiddenCards:e,coreIds:f}=a,g=new Set(d),h=[];if(["cpu.usage","cpu.core","cpu.temperature","cpu.power","cpu.iowait","cpu.pressure"].filter(a=>g.has(a)).length>0){let a=[],d=["cpu.usage","cpu.iowait","cpu.pressure"].filter(a=>g.has(a));if(d.length>0&&a.push({key:"cpu.usage",title:d.length>1?"Usage & stalls":(0,t.oB)(d[0]).label,unit:"percent",series:d.flatMap(a=>ah(c,b,a,void 0,(b,c)=>"cpu.pressure"===a?"Pressure (some)":c.shortLabel)),emptyMessage:"No stored CPU readings in this range."}),g.has("cpu.core")){let d=(0,t.oB)("cpu.core"),e=z(b,c.series),g=f??A(null,e),h=function(a,b){let c=(0,t.oB)("cpu.core");if(null===c)return[];let d=new Map(a.series.filter(a=>"cpu.core"===a.metric).map(a=>[a.resourceId,a]));return b.flatMap((a,b)=>{let e=d.get(a),f=(0,t.Lf)(c,b);return[{key:ag("cpu.core",a),label:B(a),metric:"cpu.core",resourceId:a,color:f.color,dash:f.dash,points:e?.points??[]}]})}(c,g),i=e.length>g.length;a.push({key:"cpu.core",title:i?`Per-core usage \xb7 ${g.length} of ${e.length}`:"Per-core usage",unit:d.unit,series:h,emptyMessage:0===e.length?"No stored per-core readings in this range.":0===g.length?"No CPU cores are selected. Choose cores under Metrics.":"No stored per-core readings for the selected cores in this range."})}if(g.has("cpu.temperature")){let d=(0,t.oB)("cpu.temperature");a.push({key:"cpu.temperature",title:"Temperature",unit:d.unit,series:ah(c,b,"cpu.temperature"),emptyMessage:"No stored CPU temperature readings in this range."})}if(g.has("cpu.power")){let d=(0,t.oB)("cpu.power");a.push({key:"cpu.power",title:"Package power",unit:d.unit,series:ah(c,b,"cpu.power"),emptyMessage:"No stored CPU package power readings in this range."})}h.push({key:"cpu",title:"CPU",charts:a})}if(["memory.used","memory.usage","memory.pressure.some","memory.pressure.full","swap.used"].filter(a=>g.has(a)).length>0){let a=[],d=["memory.used","memory.usage"].filter(a=>g.has(a));if(d.length>0){let e=d.map(a=>({unit:(0,t.oB)(a).unit,series:ah(c,b,a,void 0,()=>"RAM")}));a.push({key:"memory.capacity",title:"RAM",...e[0],unitGroup:"memory",views:e,emptyMessage:"No stored memory readings in this range."})}g.has("swap.used")&&a.push({key:"swap.used",title:"Swap",unit:"bytes",series:ah(c,b,"swap.used"),emptyMessage:"No stored swap readings in this range."});let e=["memory.pressure.some","memory.pressure.full"].filter(a=>g.has(a));if(e.length>0){let d=(0,t.oB)(e[0]),f=e.flatMap(a=>ah(c,b,a,void 0,(b,c)=>"memory.pressure.some"===a?"Some":"memory.pressure.full"===a?"Full":c.shortLabel));a.push({key:"memory.pressure",title:"Memory pressure",unit:d.unit,series:f,emptyMessage:"No stored memory pressure in this range."})}h.push({key:"memory",title:"Memory",charts:a})}let i=["gpu.utilization","gpu.memory.used","gpu.temperature","gpu.power"].filter(a=>g.has(a));if(i.length>0){let a=(0,t.ue)(b,c.series),d=a.filter(a=>!e.has(a.id));for(let e of(0===d.length&&h.push({key:"gpu-empty",title:"GPU",charts:[{key:"gpu-empty",title:"Per-card history",unit:"percent",series:[],emptyMessage:a.length>0?"All GPU cards are hidden. Re-enable a card under Metrics to see its panels.":"No supported GPU cards or stored GPU history in this range."}]}),d)){let a=i.map(a=>{let d=(0,t.oB)(a),f=function(a,b,c,d){return ah(a,b,c,d,(a,b)=>"gpu.utilization"===c?"Utilization":"gpu.memory.used"===c?"VRAM used":b.shortLabel).map(a=>({...a}))}(c,b,a,e.id),g="gpu.memory.used"===a&&null!==e.totalBytes?`of ${(0,D.dd)(e.totalBytes,"bytes")}`:void 0;return{key:`${e.id}-${a}`,title:d.shortLabel,unit:d.unit,series:f,emptyMessage:`No stored ${d.shortLabel.toLowerCase()} readings for this card in this range.`,note:g}});h.push({key:`gpu-${e.id}`,title:`GPU ${e.index+1}${e.label?` \xb7 ${e.label}`:""}`,charts:a})}}if(["fs.used","fs.usage","fs.inodes.usage"].filter(a=>g.has(a)).length>0){let a=[],d=["fs.used","fs.usage"].filter(a=>g.has(a));if(d.length>0){let e=d.map(a=>({unit:(0,t.oB)(a).unit,series:ah(c,b,a)}));a.push({key:"fs.capacity",title:"Capacity used",...e[0],unitGroup:"filesystem",views:e,emptyMessage:"No stored filesystem usage in this range."})}if(g.has("fs.inodes.usage")){let d=(0,t.oB)("fs.inodes.usage");a.push({key:"fs.inodes.usage",title:"Inodes used",unit:d.unit,series:ah(c,b,"fs.inodes.usage"),emptyMessage:"No stored inode usage in this range."})}h.push({key:"filesystems",title:"Filesystems",charts:a})}let j=["disk.read","disk.write"].filter(a=>g.has(a));if(j.length>0){let a=j.flatMap(a=>{let d=(0,t.oB)(a);return ah(c,b,a,void 0,c=>`${(0,t.bP)(b,a,c.resourceId)} ${d.shortLabel.toLowerCase()}`)});h.push({key:"disk",title:"Disk throughput",charts:[{key:"disk",title:"Read and write",unit:"bytes_per_second",series:a,emptyMessage:"No stored disk throughput in this range."}]})}let k=["disk.read.latency","disk.write.latency"].filter(a=>g.has(a)),l=["io.pressure.some","io.pressure.full"].filter(a=>g.has(a));if(k.length>0||l.length>0||g.has("disk.utilization")){let a=[];if(k.length>0){let d=k.flatMap(a=>{let d=(0,t.oB)(a);return ah(c,b,a,void 0,c=>`${(0,t.bP)(b,a,c.resourceId)} ${d.shortLabel.toLowerCase()}`)}),e=(0,t.oB)(k[0]);a.push({key:"disk.latency",title:"Latency",unit:e.unit,series:d,emptyMessage:"No stored disk latency in this range."})}if(g.has("disk.utilization")){let d=(0,t.oB)("disk.utilization");a.push({key:"disk.utilization",title:"Utilization",unit:d.unit,series:ah(c,b,"disk.utilization"),emptyMessage:"No stored disk utilization in this range."})}if(l.length>0){let d=(0,t.oB)(l[0]),e=l.flatMap(a=>ah(c,b,a,void 0,(b,c)=>"io.pressure.some"===a?"Some":"io.pressure.full"===a?"Full":c.shortLabel));a.push({key:"io.pressure",title:"I/O pressure",unit:d.unit,series:e,emptyMessage:"No stored I/O pressure in this range."})}h.push({key:"disk-health",title:"Disk health",charts:a})}let m=["net.rx","net.tx"].filter(a=>g.has(a));if(m.length>0){let a=m.flatMap(a=>{let d=(0,t.oB)(a);return ah(c,b,a,void 0,c=>`${(0,t.bP)(b,a,c.resourceId)} ${d.shortLabel.toLowerCase()}`)});h.push({key:"network",title:"Network throughput",charts:[{key:"network",title:"Received and sent",unit:"bytes_per_second",series:a,emptyMessage:"No stored network throughput in this range."}]})}return h}({machine:b,result:c,selectedMetrics:e,hiddenCards:f,coreIds:j});return(0,d.jsx)(ad._C,{children:(0,d.jsx)("div",{className:"grid grid-cols-1 gap-5",children:k.map(e=>{let f=e.charts.find(a=>"cpu.core"===a.key&&a.series.length>4),i=f?[...e.charts.filter(a=>a!==f),f]:e.charts,j=f&&4===i.length?"grid gap-6 lg:grid-cols-2 xl:grid-cols-3":i.length>1&&!(f&&2===i.length)?"grid gap-6 lg:grid-cols-2":"flex flex-col gap-6";return(0,d.jsx)(n.Z,{title:e.title,children:(0,d.jsx)("div",{className:j,children:i.map((e,j)=>{let k=e.unitGroup,l=k?a.capacityUnits[k]:void 0,m=e.views?.find(a=>a.unit===l)??e.views?.[0]??e,n=e===f||!f&&i.length%2==1&&j===i.length-1;return"cpu.core"===e.key&&e.series.length>8?(0,d.jsx)(af,{title:e.title,series:e.series,fromMs:c.fromMs,toMs:c.toMs,gaps:c.gaps,stepMs:(0,C.jl)(c.stepMs,c.tier,b.expectedIntervalMs),hiddenKeys:g,onToggleSeries:h},e.key):(0,d.jsx)(ab.t,{title:e.title,unit:m.unit,series:m.series,fromMs:c.fromMs,toMs:c.toMs,stepMs:(0,C.jl)(c.stepMs,c.tier,b.expectedIntervalMs),gaps:c.gaps,hiddenKeys:g,onToggleSeries:h,emptyMessage:e.emptyMessage,note:e.note,action:k&&e.views&&e.views.length>1?(0,d.jsx)("div",{role:"group","aria-label":`${e.title} units`,className:"inline-flex rounded-md border border-border bg-background p-0.5",children:e.views.map(b=>(0,d.jsx)("button",{type:"button","aria-pressed":b.unit===m.unit,onClick:()=>a.onCapacityUnitChange(k,b.unit),className:`min-h-7 rounded px-2 text-xs transition-colors ${b.unit===m.unit?"bg-selected text-foreground":"text-muted-foreground hover:text-foreground"}`,children:"bytes"===b.unit?"Bytes":"%"},b.unit))}):void 0,maxDrawPoints:"cpu.core"===e.key?150:void 0,className:n?"lg:col-span-full":void 0},e.key)})})},e.key)})})},`${b.machineId}|${c.toMs-c.fromMs}`)}var aj=c(71335),ak=c(56013);let al={raw:"raw samples","1m":"1-minute rollups","1h":"1-hour rollups"};function am(a){return a.displayName?.trim()||a.hostname.trim()||a.machineId}function an(a,b){return`${a}\0${b}`}function ao(a){let b=new Set(a.selectedMetrics),c=new Set((0,t.ue)(a.machine,a.result.series).filter(b=>!a.hiddenCards.has(b.id)).map(a=>a.id));return a.result.series.filter(d=>!(!b.has(d.metric)||a.hiddenSeries.has(an(d.metric,d.resourceId))||"cpu.core"===d.metric&&void 0!==a.coreIds&&!a.coreIds.includes(d.resourceId)||d.metric.startsWith("gpu.")&&""!==d.resourceId&&!c.has(d.resourceId)))}function ap(a){return new Date(a).toISOString()}function aq(a){return(0,t.oB)(a)?.label??a}function ar(a){return ao(a).map(b=>({metric:b.metric,label:aq(b.metric),resourceId:b.resourceId,resourceLabel:(0,t.bP)(a.machine,b.metric,b.resourceId),unit:b.unit,unitLabel:(0,t.RL)(b.unit),stats:(0,C.T6)(b.points),points:b.points.map(b=>{let c=Math.min(a.result.toMs,b.t+a.result.stepMs),d=null!==b.min||null!==b.max||null!==b.avg;return{t:b.t,tIso:ap(b.t),bucketStartMs:b.t,bucketStartIso:ap(b.t),bucketEndMs:c,bucketEndIso:ap(c),min:b.min,max:b.max,avg:b.avg,state:d?"recorded":"unavailable"}})}))}function as(a){return(0,C.$z)(a.result.gaps,a.result.fromMs,a.result.toMs).map(a=>({...a,fromIso:ap(a.fromMs),toIso:ap(a.toMs)}))}function at(a){let b=new Set(a.result.series.map(a=>a.metric));return a.selectedMetrics.filter(a=>!b.has(a))}function au(a){let b=new Set(a.selectedMetrics),c=new Set(ao(a).map(a=>an(a.metric,a.resourceId)));return a.result.series.filter(a=>b.has(a.metric)&&!c.has(an(a.metric,a.resourceId))).length}function av(a,b){let c=a.result,d=["Only the visible series from the loaded History result are included; this export does not query more data."];"raw"!==c.tier&&d.push(`Values are ${al[c.tier]}, not individual raw samples.`),c.truncated&&d.push("The loaded result is partial: the hub limited or shortened this history query.");let e=as(a);e.length>0&&d.push(`${e.length} recorded data gap${1===e.length?"":"s"} included.`),b.length>0&&d.push(`Selected metrics without stored data: ${b.join(", ")}.`);let f=au(a);return f>0&&d.push(`${f} selected series hidden in this view were not exported.`),d}let aw=["record_type","metric","metric_label","resource_id","resource_label","unit","bucket_start_ms","bucket_start_iso","bucket_end_ms","bucket_end_iso","min","max","avg","value_state","gap_kind","gap_reason","gap_dropped_records"],ax="inline-flex min-h-7 items-center rounded-md border border-border bg-background px-2 text-xs text-foreground transition-colors hover:bg-card-strong disabled:cursor-not-allowed disabled:opacity-50";function ay(a){let[b,c]=(0,g.useState)(null),e=ao(a).length,f=b=>{let d=Date.now(),e={...a,exportedAt:d};try{let a,f,g,h,i,j,k,l,m=function(a,b,c=Date.now()){return(0,ak.Y8)("history",am(a.machine),c,b)}(e,b,d),n="csv"===b?function(a){let b,c,d,e,f,g,h=a.exportedAt??Date.now(),i=(b=(0,D.ly)(a.range),c=a.result,d=ao(a),e=at(a),f=as(a),g=a.selectedMetrics.map(aq).join("; "),[["Rigscope History export"],["Scope","Visible series from the loaded History result"],["Machine",am(a.machine)],["Machine ID",a.machine.machineId],["Query",g],["Range",`${b.label} (${ap(c.fromMs)} – ${ap(c.toMs)})`],["Resolution",`${al[c.tier]} \xb7 ${c.stepMs} ms buckets`],["Loaded at",ap(a.loadedAt)],["Exported at",ap(h)],["Partial",c.truncated?"true":"false"],["Gaps",String(f.length)],["Visible series",String(d.length)],["Selected without stored data",e.length>0?e.join(", "):"none"],["Note",av(a,e).join(" ")],[]]);for(let b of(i.push([...aw]),ar(a)))for(let a of b.points)i.push(["bucket",b.metric,b.label,b.resourceId,b.resourceLabel,b.unit,a.bucketStartMs,a.bucketStartIso,a.bucketEndMs,a.bucketEndIso,a.min,a.max,a.avg,a.state,"","",""]);for(let b of as(a))i.push(["gap","","","","","",b.fromMs,b.fromIso,b.toMs,b.toIso,"","","","gap",b.kind,b.reason??"",b.droppedRecords??""]);return(0,aj.kg)(i)}(e):(a=e.exportedAt??Date.now(),f=(0,D.ly)(e.range),g=e.result,h=ar(e),i=at(e),j=as(e),k=au(e),l={app:"Rigscope",kind:"history",exportedAt:ap(a),scope:{description:"Visible series from the loaded History result",machine:{id:e.machine.machineId,name:am(e.machine),hostname:e.machine.hostname,connected:e.machine.connected,lastReceivedAt:e.machine.lastReceivedAt},query:{range:{id:f.id,label:f.label,fromMs:g.fromMs,fromIso:ap(g.fromMs),toMs:g.toMs,toIso:ap(g.toMs)},selectedMetrics:[...e.selectedMetrics],visibleSeries:h.length,hiddenSeriesCount:k}},resolution:{tier:g.tier,label:al[g.tier],stepMs:g.stepMs,expectedIntervalMs:e.machine.expectedIntervalMs??null},loadedAt:ap(e.loadedAt),partial:g.truncated,gaps:j,series:h.map(a=>({metric:a.metric,label:a.label,resourceId:a.resourceId,resourceLabel:a.resourceLabel,unit:a.unit,unitLabel:a.unitLabel,summary:{points:a.stats.count,min:a.stats.min,max:a.stats.max,averageOfBucketAverages:a.stats.avg,latest:a.stats.latest,latestAt:null===a.stats.latestT?null:ap(a.stats.latestT),firstAt:null===a.stats.firstT?null:ap(a.stats.firstT),lastAt:null===a.stats.lastT?null:ap(a.stats.lastT)},points:a.points})),missingData:i.map(a=>({metric:a,label:aq(a),reason:"No stored series in the loaded result."})),notes:av(e,i)},`${JSON.stringify(l,null,2)}
|
|
2
|
-
`);(0,aj.PE)(m,n,"csv"===b?aj.UR:aj.uW),c(null)}catch{c("The history export could not be created.")}};return(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,d.jsxs)("span",{className:"text-xs text-muted-foreground",children:["Export visible",(0,d.jsx)("span",{className:"sr-only",children:` (${e} series from the loaded result)`})]}),(0,d.jsx)("button",{type:"button",onClick:()=>f("csv"),"aria-label":"Download visible history as CSV",title:"Download the visible series from this loaded result as CSV",className:ax,children:"CSV"}),(0,d.jsx)("button",{type:"button",onClick:()=>f("json"),"aria-label":"Download visible history as JSON",title:"Download the visible series from this loaded result as JSON",className:ax,children:"JSON"}),null!==b?(0,d.jsxs)("span",{role:"status",className:"inline-flex items-center gap-1 text-xs text-warn",children:[(0,d.jsx)(j.A,{className:"h-3 w-3","aria-hidden":!0}),b]}):null]})}function az(a){return a.displayName?.trim()||a.hostname.trim()||a.machineId}function aA(){return(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-5 xl:grid-cols-2","aria-busy":"true",children:[(0,d.jsx)(n.Z,{title:"Loading stored history",children:(0,d.jsx)("div",{className:"h-40 animate-pulse rounded-lg bg-card-strong","aria-hidden":!0})}),(0,d.jsx)(n.Z,{title:"Preparing charts",children:(0,d.jsx)("div",{className:"h-40 animate-pulse rounded-lg bg-card-strong","aria-hidden":!0})})]})}function aB(){let a,b,c,e,{session:u,phase:v,machines:w,retryConnection:x}=(0,r.M)(),y=(0,q.x)(),{machine:B,machineId:E,requestedMachineId:F}=(0,s.JG)("history"),[G,H]=V(E,"memory"),[I,K]=V(E,"filesystem"),L={memory:G,filesystem:I},[N,Q]=(0,J.u)("history.range","10m",O),[R,U]=(0,J.u)(`history.metrics.${E}`,null,P),[W]=T(E),X=z(B),Y=A(W,X),[Z,$]=S(E,"cards"),[ab,ac]=S(E,"series"),ad=(0,g.useMemo)(()=>new Set(Z),[Z]),ae=(0,g.useMemo)(()=>new Set(ab),[ab]),[af,ag]=(0,J.u)("history.autoRefresh",!0,M,"session"),[ah,aj]=(0,g.useState)(null),[ak,al]=(0,g.useState)(null),[am,an]=(0,g.useState)(0);(0,g.useRef)(null);let[ao,ap]=(0,g.useState)(null),[aq,ar]=(0,g.useState)(Date.now),as=(0,g.useMemo)(()=>void 0===B?"":(0,t.er)(B).join(","),[B?.machineId,B?.inventory,B?.metrics?.payload.gpus]),at=R??as,au=""===at?[]:at.split(","),av="signed-in"===u.kind&&void 0!==B&&""!==E&&""!==at,{data:aw,error:ax,loading:aB,manualRefreshing:aC}=(0,aa.n)({machineId:E,metricsKey:at,coreIdsKey:au.includes("cpu.core")&&Y.length!==X.length?Y.join(","):void 0,range:N,enabled:av,autoRefresh:af,refreshNonce:am}),aD=(0,g.useMemo)(()=>{if(!aw||ao?.machineId!==E||0===ao.outages.length)return aw;let a=aw.result,b=Math.max(a.toMs,...ao.outages.map(a=>a.toMs??aq)),c=a.fromMs+b-a.toMs;return{...aw,result:{...a,fromMs:c,toMs:b,gaps:(0,C.$z)([...a.gaps,...function(a,b,c){if(!Number.isFinite(b)||!Number.isFinite(c)||c<=b)return[];let d=[];for(let e of a){let a=Math.max(b,e.fromMs),f=Math.min(c,e.toMs??c);Number.isFinite(a)&&Number.isFinite(f)&&!(f<=a)&&d.push({fromMs:a,toMs:f,kind:"missing",reason:null===e.toMs?"collector disconnected":"collector outage"})}var e=d;let f=e.filter(a=>Number.isFinite(a.fromMs)&&Number.isFinite(a.toMs)&&a.toMs>a.fromMs).map(a=>({...a})).sort((a,b)=>a.fromMs-b.fromMs||a.toMs-b.toMs),g=[];for(let a of f){let b=g.at(-1);if(void 0!==b&&a.fromMs<=b.toMs){b.toMs=Math.max(b.toMs,a.toMs),"dropped"===a.kind&&(b.kind="dropped"),void 0===b.reason&&void 0!==a.reason&&(b.reason=a.reason),void 0===b.droppedRecords&&void 0!==a.droppedRecords&&(b.droppedRecords=a.droppedRecords);continue}g.push(a)}return g}(ao.outages,c,b)],c,b)}}},[aw,E,ao,aq]),aE=aD?.result??null,aF=void 0===B?[]:(0,t.ue)(B,aE?.series??[]),aG=(0,D.ly)(N),aH=null!==ax?null!==aD?`${"rate-limited"===ax.kind?"Refresh paused":"Refresh failed"} \xb7 ${(0,D.ei)(aD.loadedAt)}`:"History unavailable":null!==aD?`Updated ${(0,D.ei)(aD.loadedAt)}`:aB?"Loading…":"",aI=av&&null===aD&&null===ax,aJ=w.length,aK="disconnected"===v;return(0,d.jsx)(m.G,{title:"History",machineId:E,machineView:"history",headerRight:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(o.$E,{}),(0,d.jsx)(p.B,{})]}),children:y||(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{role:"status","aria-live":"polite",className:"sr-only",children:ax?.message??""}),(0,d.jsx)(_,{machine:B,range:N,selectedMetrics:au,catalog:ah,catalogError:ak,gpuCards:aF,hiddenCards:ad,autoRefresh:af,loading:aB,manualRefreshing:aC,statusText:aH,onRangeChange:Q,onToggleMetric:a=>{let b=new Set(au);b.has(a)?b.delete(a):b.add(a),U([...b].sort().join(","))},onSetMetrics:a=>U([...new Set(a)].sort().join(",")),onToggleCard:a=>{$(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),[...c]})},onToggleAutoRefresh:()=>ag(a=>!a),onRefresh:()=>an(a=>a+1)}),"reconnecting"===v||"disconnected"===v?(0,d.jsxs)("div",{role:"status",className:"mb-4 flex items-start gap-2 rounded-lg border border-border bg-card px-4 py-2.5 text-xs text-muted-foreground",children:[(0,d.jsx)(j.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-warn","aria-hidden":!0}),(0,d.jsxs)("span",{children:["Live feed ","disconnected"===v?"disconnected":"reconnecting"," \xb7 stored history available"]}),"disconnected"===v?(0,d.jsxs)("button",{type:"button",onClick:x,className:"ml-auto inline-flex min-h-8 shrink-0 items-center gap-1.5 rounded-md border border-border px-2.5 text-xs text-foreground transition-colors hover:bg-card-strong",children:[(0,d.jsx)(l.A,{className:"h-3 w-3","aria-hidden":!0}),"Retry now"]}):null]}):null,void 0===B?aK?(0,d.jsxs)(n.Z,{title:"Hub disconnected",className:"mx-auto mt-3 max-w-xl",children:[(0,d.jsx)(n.p,{icon:k.A,note:"The hub is unreachable, so the authorized machine list is unavailable."}),(0,d.jsx)("div",{className:"mt-2 flex justify-center",children:(0,d.jsxs)("button",{type:"button",onClick:x,className:"inline-flex min-h-8 items-center gap-1.5 rounded-md border border-border px-3 text-xs text-foreground transition-colors hover:bg-card-strong",children:[(0,d.jsx)(l.A,{className:"h-3.5 w-3.5","aria-hidden":!0}),"Check again"]})})]}):0!==aJ||aK||"idle"!==v&&"connecting"!==v&&"reconnecting"!==v?0===aJ?(0,d.jsx)(n.Z,{title:"No machines",className:"mx-auto mt-3 max-w-xl",children:(0,d.jsx)(n.p,{icon:i.A,note:"No machines are available in your authorized fleet."})}):(0,d.jsxs)(n.Z,{title:"Machine not found",className:"mx-auto mt-3 max-w-xl",children:[(0,d.jsx)(n.p,{icon:i.A,note:"This machine is unavailable or outside your access."}),F?(0,d.jsxs)("p",{className:"tnum mt-2 text-center text-xs text-muted-foreground",children:["Requested identifier: ",F]}):null,(0,d.jsx)("div",{className:"mt-2 flex justify-center",children:(0,d.jsx)(f(),{href:"/",className:"inline-flex items-center gap-1.5 rounded-md border border-border px-3 py-1.5 text-xs text-foreground transition-colors hover:bg-card-strong",children:"Back to fleet"})})]}):(0,d.jsx)(n.Z,{title:"Waiting for machines",className:"mx-auto mt-3 max-w-xl",children:(0,d.jsx)(n.p,{icon:i.A,note:"Waiting for the hub to report your authorized machines…"})}):0===au.length?(0,d.jsx)(n.Z,{title:"No metrics selected",className:"mx-auto mt-3 max-w-xl",children:(0,d.jsx)(n.p,{icon:i.A,note:""===as?"No metric families are shared with this hub.":"Choose at least one metric above to draw history."})}):null!==ax&&null===aD?(b=(a=function(a){switch(a.kind){case"unauthorized":return{title:"Session ended",note:"Your session is no longer accepted, so stored history is hidden.",icon:h.A};case"denied":return{title:"History access denied",note:a.message,icon:h.A};case"missing":return{title:"Machine unavailable",note:a.message,icon:i.A};case"rate-limited":return{title:"History requests limited",note:a.message,icon:j.A};case"unavailable":return{title:"History unavailable",note:a.message,icon:k.A};case"network":return{title:"Hub unreachable",note:"The hub could not be reached for stored history.",icon:k.A};case"invalid":return{title:"Unexpected history response",note:a.message,icon:j.A}}}(ax)).icon,(0,d.jsxs)(n.Z,{title:a.title,className:"mx-auto mt-3 max-w-xl",children:[(0,d.jsx)(n.p,{icon:b,note:a.note}),(0,d.jsxs)("div",{className:"mt-2 flex flex-wrap justify-center gap-2",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>an(a=>a+1),className:"inline-flex items-center gap-1.5 rounded-md border border-border px-3 py-1.5 text-xs text-foreground transition-colors hover:bg-card-strong",children:[(0,d.jsx)(l.A,{className:"h-3.5 w-3.5","aria-hidden":!0}),"Try again"]}),"unauthorized"===ax.kind?(0,d.jsx)(f(),{href:"/login",className:"inline-flex items-center rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-accent-foreground transition-colors hover:bg-accent/90",children:"Sign in"}):null]})]})):(aB||aI)&&null===aD?(0,d.jsx)(aA,{}):null===aD?(0,d.jsx)(n.Z,{title:"History",className:"mx-auto mt-3 max-w-xl",children:(0,d.jsx)(n.p,{icon:i.A,note:"No stored history has arrived yet."})}):(e="raw"===(c=aD.result).tier?"raw samples":"1m"===c.tier?"1-minute rollups":"1-hour rollups",(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"mb-3 flex flex-wrap items-baseline gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-foreground",children:[(0,d.jsx)("span",{"aria-hidden":!0,className:`inline-block h-2 w-2 shrink-0 rounded-full ${B.connected?"bg-ok":"bg-crit"}`}),az(B)]}),(0,d.jsxs)("span",{children:[(0,D.r6)(c.fromMs)," – ",(0,D.r6)(c.toMs)]}),(0,d.jsxs)("span",{className:"tnum",title:e,children:[(0,D.I_)(c.stepMs)," buckets"]}),(0,d.jsx)("div",{className:"ml-auto self-center",children:(0,d.jsx)(ay,{machine:B,result:c,range:N,selectedMetrics:(0,t.Cv)(au,L),hiddenCards:ad,hiddenSeries:ae,coreIds:Y,loadedAt:aD.loadedAt})})]}),c.truncated?(0,d.jsxs)("div",{role:"status",className:"mb-4 flex items-start gap-2 rounded-lg bg-warn-soft px-4 py-2.5 text-xs text-foreground",children:[(0,d.jsx)(j.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-warn","aria-hidden":!0}),(0,d.jsx)("span",{children:"Partial history \xb7 narrow the range for more detail."})]}):null,c.gaps.length>0?(0,d.jsxs)("details",{className:"mb-4 max-w-3xl text-xs text-muted-foreground",children:[(0,d.jsxs)("summary",{className:"inline-flex min-h-8 cursor-pointer items-center gap-2 rounded-md text-warn",children:[(0,d.jsx)(j.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-warn","aria-hidden":!0}),(0,d.jsxs)("span",{children:[(0,d.jsx)("strong",{className:"font-medium",children:"Data gaps:"})," ",(0,D.fH)(c.gaps,c.fromMs,c.toMs)]})]}),(0,d.jsxs)("ul",{className:"mt-1.5 flex flex-col gap-1",children:[c.gaps.slice(0,20).map(a=>(0,d.jsxs)("li",{className:"tnum text-xs",children:[(0,D.r6)(a.fromMs)," – ",(0,D.r6)(a.toMs)," (",(0,D.I_)(a.toMs-a.fromMs),"):"," ","dropped"===a.kind?"dropped":"missed",a.reason?` \xb7 ${a.reason}`:"",void 0!==a.droppedRecords?` \xb7 ${a.droppedRecords} record${1===a.droppedRecords?"":"s"}`:""]},`${a.fromMs}-${a.toMs}-${a.kind}`)),c.gaps.length>20?(0,d.jsxs)("li",{className:"text-xs text-muted-foreground",children:["…and ",c.gaps.length-20," more."]}):null]})]}):null,0===c.series.length?(0,d.jsx)(n.Z,{title:"No stored points",className:"mx-auto max-w-xl",children:(0,d.jsx)(n.p,{icon:i.A,note:`No stored readings for ${void 0===B?"this machine":az(B)} in ${aG.label.toLowerCase()}.`})}):(0,d.jsx)(ai,{machine:B,result:c,selectedMetrics:au,hiddenCards:ad,hiddenSeries:ae,onToggleSeries:a=>{ac(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),[...c]})},capacityUnits:L,onCapacityUnitChange:(a,b)=>("memory"===a?H:K)(b)})]}))]})})}}};var b=require("../../webpack-runtime.js");b.C(a);var c=b.X(0,[266,430,350,161,751,168,894],()=>b(b.s=44857));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=429,a.ids=[429],a.modules={3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},22685:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(65366).A)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},30537:(a,b,c)=>{Promise.resolve().then(c.bind(c,53957)),Promise.resolve().then(c.bind(c,40015)),Promise.resolve().then(c.bind(c,85378)),Promise.resolve().then(c.bind(c,7867)),Promise.resolve().then(c.bind(c,76670))},33873:a=>{"use strict";a.exports=require("path")},38522:a=>{"use strict";a.exports=require("node:zlib")},40265:(a,b,c)=>{Promise.resolve().then(c.bind(c,79173)),Promise.resolve().then(c.bind(c,28565)),Promise.resolve().then(c.bind(c,64792)),Promise.resolve().then(c.bind(c,50369)),Promise.resolve().then(c.bind(c,46568))},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},44857:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>q,handler:()=>s,routeModule:()=>r});var d=c(21635),e=c(86315),f=c(1020),g=c(61287),h={};for(let a in g)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(h[a]=()=>g[a]);c.d(b,h);let i=(0,d.p)(()=>Promise.resolve().then(c.bind(c,76537))),j=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),k=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),l=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),m=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),n=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),o={children:["",{children:["history",{children:["__PAGE__",{},{page:[(0,d.p)(()=>Promise.resolve().then(c.bind(c,78817))),"/home/triet/Project/rigscope/src/app/history/page.tsx"]}]},{"global-error":[n,"next/dist/client/components/builtin/global-error.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,59645)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}},[]]},{layout:[i,"/home/triet/Project/rigscope/src/app/layout.tsx"],"global-error":[j,"next/dist/client/components/builtin/global-error.js"],"not-found":[k,"next/dist/client/components/builtin/not-found.js"],forbidden:[l,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[m,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await (0,d.p)(()=>Promise.resolve().then(c.bind(c,59645)))()).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}},[]]}.children,p=(0,e.H)({tree:o,page:"/history/page",pathname:"/history",require:c,loadChunk:()=>Promise.resolve(),interopDefault:f.T}),q=p.__next_app__,r=p.routeModule,s=p.handler},46060:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external.js")},53957:(a,b,c)=>{"use strict";c.d(b,{HistoryView:()=>aK});var d=c(48249),e=c(2116),f=c.n(e),g=c(67484),h=c(93484),i=c(51872),j=c(12421),k=c(49187),l=c(31742),m=c(22091),n=c(22338),o=c(81232),p=c(75006),q=c(4155),r=c(58910),s=c(52464),t=c(11449),u=c(25982);let v=u.U8,w=/^core:(\d+)$/;function x(a){let b=w.exec(a);if(null===b)return null;let c=Number(b[1]);return!Number.isSafeInteger(c)||c<0||c>=u.U8?null:c}function y(a){return[...new Set(a)].sort((a,b)=>(x(a)??0)-(x(b)??0))}function z(a,b=[]){var c;let d=a?.metrics?.payload.cpu,e=new Set(!Number.isFinite(c=Math.max(a?.inventory?.cpu.logicalCores??0,d?.status==="ok"?d.perCore.length:0))?[]:Array.from({length:Math.min(u.U8,Math.max(0,Math.floor(c)))},(a,b)=>`core:${b}`));for(let a of b)"cpu.core"===a.metric&&null!==x(a.resourceId)&&e.add(a.resourceId);return y([...e])}function A(a,b){let c=new Set(b);if(null===a)return y(b).slice(0,v);let d=[];for(let b of a)if(c.has(b)&&null!==x(b)&&(d.push(b),d.length>=v))break;return y(d)}function B(a){let b=x(a);return null===b?a:`Core ${b}`}var C=c(96480),D=c(66338),E=c(73742),F=c(64500),G=c(65366);let H=(0,G.A)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),I=(0,G.A)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var J=c(94054);let K=Object.freeze([]),L=new Set(t.H9.map(a=>a.metric)),M=a=>"boolean"==typeof a?a:null,N=a=>Array.isArray(a)&&a.every(a=>"string"==typeof a)?a.slice(0,1e3):null,O=a=>D.pI.some(b=>b.id===a)?a:null,P=a=>"string"==typeof a&&(""===a||a.split(",").every(a=>L.has(a)))?a:null,Q=/^core:\d+$/,R=a=>Array.isArray(a)&&a.every(a=>"string"==typeof a&&Q.test(a))?[...new Set(a)].slice(0,u.U8):null;function S(a,b){return(0,J.u)(`history.hidden.${b}.${a}`,K,N)}function T(a){return(0,J.u)(`history.cores.${a}`,null,R)}let U=a=>"bytes"===a||"percent"===a?a:null;function V(a,b){return(0,J.u)(`history.units.${b}.${a}`,"bytes",U)}let W="peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:[outline-color:var(--focus)]";function X({label:a,action:b}){return(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:a}),(0,d.jsx)("span",{"aria-hidden":!0,className:"h-px min-w-0 flex-1 bg-border"}),b]})}let Y="inline-flex min-h-8 items-center gap-1.5 rounded-md border border-transparent px-2.5 text-xs transition-colors",Z=`${Y} ${W} bg-selected text-foreground`,$=`${Y} ${W} bg-card-strong text-muted-foreground hover:text-foreground`;function _(a){let{machine:b,range:c,selectedMetrics:e,catalog:f,catalogError:g,gpuCards:h,hiddenCards:i,autoRefresh:j,loading:k,manualRefreshing:m,statusText:n,onRangeChange:o,onToggleMetric:p,onSetMetrics:q,onToggleCard:r,onToggleAutoRefresh:s,onRefresh:u}=a,[v,w]=(0,J.u)("history.controlsOpen",!1,M,"session"),x=new Set(e),y=t.H9.filter(({metric:a})=>(0,t.yv)(b,a).available&&(null===f||void 0!==f[a])).map(({metric:a})=>a),C=new Set(y),G=(a,b)=>{let c=new Set(e);for(let d of a)b&&C.has(d)?c.add(d):b||c.delete(d);q([...c])},K=e.some(a=>a.startsWith("gpu.")),L=x.has("cpu.core"),[N,O]=T(b?.machineId??""),P=L?z(b):[],Q=A(N,P),R=new Set(Q);return(0,d.jsxs)("section",{"aria-labelledby":"history-query-heading","aria-busy":k,className:"mb-5 min-w-0 rounded-xl border border-border bg-card",children:[(0,d.jsx)("h2",{id:"history-query-heading",className:"sr-only",children:"History query"}),(0,d.jsxs)("div",{className:"flex flex-wrap items-end gap-x-5 gap-y-4 p-4 md:p-5",children:[(0,d.jsxs)("fieldset",{className:"flex min-w-0 flex-col gap-1.5",children:[(0,d.jsx)("legend",{className:"mb-1.5 text-xs text-muted-foreground",children:"Time range"}),(0,d.jsx)("div",{className:"inline-flex flex-wrap rounded-lg border border-border bg-background p-0.5",children:D.pI.map(a=>{let b=c===a.id;return(0,d.jsxs)("label",{className:"cursor-pointer",children:[(0,d.jsx)("input",{type:"radio",name:"history-range",value:a.id,checked:b,onChange:()=>o(a.id),className:"peer sr-only"}),(0,d.jsxs)("span",{className:`inline-flex min-h-8 items-center rounded-md px-2.5 text-xs transition-colors ${W} ${b?"bg-selected font-medium text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[a.shortLabel,(0,d.jsxs)("span",{className:"sr-only",children:[" — ",a.label]})]})]},a.id)})})]}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 sm:ml-auto",children:[(0,d.jsx)("p",{className:"order-first w-full text-xs text-muted-foreground sm:order-none sm:w-auto",children:n}),(0,d.jsxs)("button",{type:"button",onClick:u,disabled:m,className:"inline-flex min-h-8 items-center gap-1.5 rounded-md border border-border bg-background px-2.5 text-xs text-foreground transition-colors hover:bg-card-strong disabled:opacity-60",children:[(0,d.jsx)(l.A,{className:`h-3.5 w-3.5 ${m?"animate-spin":""}`,"aria-hidden":!0}),"Refresh"]}),(0,d.jsxs)("button",{type:"button",onClick:s,"aria-pressed":j,className:`inline-flex min-h-8 items-center gap-1.5 rounded-md border px-2.5 text-xs transition-colors ${j?"border-accent/40 bg-selected text-foreground":"border-border bg-background text-muted-foreground hover:bg-card-strong hover:text-foreground"}`,children:[j?(0,d.jsx)(E.A,{className:"h-3.5 w-3.5","aria-hidden":!0}):(0,d.jsx)(F.A,{className:"h-3.5 w-3.5","aria-hidden":!0}),j?"Pause":"Resume"]})]})]}),(0,d.jsxs)("div",{className:"border-t border-border px-4 py-4 md:px-5",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,d.jsxs)("button",{type:"button","aria-expanded":v,"aria-controls":"history-metric-options",onClick:()=>w(!v),className:"inline-flex min-h-8 items-center gap-1.5 rounded-md text-sm font-medium",children:["Metrics ",(0,d.jsxs)("span",{className:"tnum text-xs font-normal text-muted-foreground",children:[x.size," selected"]}),(0,d.jsx)(H,{"aria-hidden":!0,className:`h-3.5 w-3.5 text-muted-foreground transition-transform ${v?"rotate-180":""}`})]}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,d.jsx)("button",{type:"button",onClick:()=>G(y,!0),disabled:y.every(a=>x.has(a)),className:"inline-flex min-h-8 items-center rounded-md border border-border bg-background px-2.5 text-xs text-foreground transition-colors hover:bg-card-strong disabled:opacity-50",children:"Select all"}),(0,d.jsx)("button",{type:"button",onClick:()=>q([]),disabled:0===x.size,className:"inline-flex min-h-8 items-center rounded-md border border-border bg-background px-2.5 text-xs text-foreground transition-colors hover:bg-card-strong disabled:opacity-50",children:"Unselect all"})]})]}),(0,d.jsx)("div",{id:"history-metric-options",hidden:!v,children:(0,d.jsxs)("div",{className:"mt-4 min-w-0 md:col-span-2",children:[(0,d.jsx)("div",{className:"min-w-0",children:(0,d.jsx)("div",{className:"grid gap-x-6 gap-y-5 md:grid-cols-2 xl:grid-cols-3",children:t.P$.map(a=>(0,d.jsxs)("fieldset",{className:`min-w-0 ${"disk"===a.id?"xl:col-span-2":""}`,children:[(0,d.jsx)("legend",{className:"sr-only",children:a.label}),(0,d.jsx)(X,{label:a.label,action:(0,d.jsxs)("div",{className:"flex shrink-0 gap-2",children:[(0,d.jsx)("button",{type:"button","aria-label":`Select all ${a.label} metrics`,onClick:()=>G(a.metrics,!0),disabled:a.metrics.filter(a=>C.has(a)).every(a=>x.has(a)),className:"min-h-6 rounded-sm text-xs text-muted-foreground hover:text-foreground hover:underline disabled:opacity-50",children:"All"}),(0,d.jsx)("button",{type:"button","aria-label":`Unselect all ${a.label} metrics`,onClick:()=>G(a.metrics,!1),disabled:!a.metrics.some(a=>x.has(a)),className:"min-h-6 rounded-sm text-xs text-muted-foreground hover:text-foreground hover:underline disabled:opacity-50",children:"None"})]})}),(0,d.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:a.metrics.map(a=>{var c;let e=(0,t.oB)(a);if(null===e)return null;let g=(0,t.yv)(b,a),h=null===f||void 0!==f[a],i=g.available&&h,j=x.has(a),k=(0,t.Lf)(e,0);return(0,d.jsxs)("label",{className:i?"cursor-pointer":"cursor-not-allowed",title:g.available?h?e.description:"This hub does not record this metric.":g.reason??void 0,children:[(0,d.jsx)("input",{type:"checkbox",checked:j,onChange:()=>p(a),disabled:!i&&!j,className:"peer sr-only","aria-label":e.label}),(0,d.jsxs)("span",{className:`${!i?j?`${Y} ${W} bg-card-strong text-muted-foreground line-through`:`${Y} text-muted-foreground opacity-50`:j?Z:$}`,children:[(0,d.jsx)("span",{"aria-hidden":!0,className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-sm border border-current",style:{color:k.color},children:j?(0,d.jsx)(I,{className:"h-3 w-3",strokeWidth:3}):null}),(c=e.label,({"cpu.usage":"Usage","cpu.core":"Per-core","cpu.iowait":"I/O wait","cpu.pressure":"Pressure","cpu.temperature":"Temperature","cpu.power":"Package power","memory.used":"Used bytes","memory.usage":"Usage %","swap.used":"Swap","memory.pressure.some":"Pressure (some)","memory.pressure.full":"Pressure (full)","gpu.utilization":"Utilization","gpu.memory.used":"VRAM","gpu.temperature":"Temperature","gpu.power":"Power","fs.used":"Space used","fs.usage":"Capacity %","fs.inodes.usage":"Inodes %","net.rx":"Received","net.tx":"Sent"})[a]??c)]})]},a)})}),"gpu"===a.id&&K&&h.length>0?(0,d.jsxs)("fieldset",{className:"mt-4 border-t border-border pt-3",children:[(0,d.jsx)("legend",{className:"sr-only",children:"GPU cards"}),(0,d.jsx)(X,{label:"GPU cards"}),(0,d.jsx)("div",{className:"mt-1.5 flex flex-wrap gap-1.5",children:h.map((a,b)=>{let c=a.id,e=!i.has(c);return(0,d.jsxs)("label",{className:"cursor-pointer",children:[(0,d.jsx)("input",{type:"checkbox",checked:e,onChange:()=>r(c),className:"peer sr-only"}),(0,d.jsxs)("span",{className:e?Z:$,children:[(0,d.jsx)("span",{className:"tnum text-xs text-muted-foreground",children:b+1}),a.label]})]},a.id)})})]}):null,"cpu"===a.id&&L?(0,d.jsxs)("fieldset",{className:"mt-4 border-t border-border pt-3",children:[(0,d.jsx)("legend",{className:"sr-only",children:"CPU cores"}),(0,d.jsx)(X,{label:`CPU cores \xb7 ${Q.length} / ${P.length}`,action:(0,d.jsxs)("div",{className:"flex shrink-0 gap-2",children:[(0,d.jsx)("button",{type:"button",onClick:()=>O(null),disabled:Q.length===P.length,className:"min-h-6 rounded-sm text-xs text-muted-foreground hover:text-foreground disabled:opacity-50",children:"All cores"}),(0,d.jsx)("button",{type:"button",onClick:()=>O([]),disabled:0===Q.length,"aria-label":"Unselect all CPU cores",className:"min-h-6 rounded-sm text-xs text-muted-foreground hover:text-foreground disabled:opacity-50",children:"None"})]})}),0===P.length?(0,d.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:"Core count unavailable."}):(0,d.jsxs)("details",{className:"mt-2",children:[(0,d.jsxs)("summary",{className:"inline-flex min-h-8 cursor-pointer items-center gap-1 rounded-md text-xs text-muted-foreground hover:text-foreground",children:["Choose cores ",(0,d.jsx)(H,{className:"h-3.5 w-3.5","aria-hidden":!0})]}),(0,d.jsx)("div",{className:"mt-2 grid max-h-48 grid-cols-3 gap-1.5 overflow-y-auto p-1",children:P.map(a=>{let b=R.has(a);return(0,d.jsxs)("label",{className:"min-w-0 cursor-pointer",children:[(0,d.jsx)("input",{type:"checkbox",checked:b,onChange:()=>{var c;return c=!b,void O(b=>{let d=A(b,P);return c?d.includes(a)?b:[...d,a]:d.filter(b=>b!==a)})},className:"peer sr-only"}),(0,d.jsxs)("span",{className:`${b?Z:$} w-full px-1.5`,children:[(0,d.jsx)("span",{"aria-hidden":!0,className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-sm border border-current",children:b?(0,d.jsx)(I,{className:"h-3 w-3"}):null}),B(a)]})]},a)})})]})]}):null]},a.id))})}),g?(0,d.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:g}):null]})})]})]})}let aa=(0,G.A)("FileClock",[["path",{d:"M16 22h2a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"37hlfg"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"8",cy:"16",r:"6",key:"10v15b"}],["path",{d:"M9.5 17.5 8 16.25V14",key:"1o80t2"}]]),ab=(0,G.A)("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]),ac=(0,G.A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);var ad=c(22685);let ae=[{id:"1s",label:"1 second"},{id:"10s",label:"10 seconds"},{id:"1m",label:"1 minute"},{id:"5m",label:"5 minutes"},{id:"1h",label:"1 hour"}],af={recording:"Recording",stopped:"Stopped",completed:"Completed",interrupted:"Interrupted by restart",failed:"Failed"};function ag(a){return a<1024?`${a} B`:a<1048576?`${(a/1024).toFixed(1)} KiB`:`${(a/1048576).toFixed(1)} MiB`}function ah(a){return new Date(a).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}function ai({machine:a,selectedMetrics:b,csrfToken:c}){let[e,f]=(0,g.useState)(null),[h,i]=(0,g.useState)([]),[j,k]=(0,g.useState)(!1),[m,n]=(0,g.useState)("10s"),[o,p]=(0,g.useState)(15),[q,r]=(0,g.useState)(!0),[s,t]=(0,g.useState)(!1),[u,v]=(0,g.useState)(null),w=a?.machineId??"",x=async()=>{try{let[a,b]=await Promise.all([fetch("/api/history/status",{cache:"no-store",headers:{Accept:"application/json"}}),fetch("/api/recordings",{cache:"no-store",headers:{Accept:"application/json"}})]);if(a.ok&&f(await a.json()),b.ok){let a=await b.json();i(Array.isArray(a.recordings)?a.recordings:[])}}catch{}},y=(0,g.useMemo)(()=>h.filter(a=>a.machines.includes(w)).slice(0,8),[h,w]),z=y.find(a=>"recording"===a.status)??null,A=void 0===a||null===c||0===b.length||s,B=async(a,b)=>{if(null!==c){t(!0),v(null);try{let d=await fetch(a,{...b,headers:{...void 0===b.body?{}:{"Content-Type":"application/json"},"x-csrf-token":c,Accept:"application/json"}});if(!d.ok){let a=await d.json().catch(()=>({}));v(a.error??`Request failed (${d.status}).`);return}k(!1),await x()}catch{v("Could not reach the hub. Try again.")}finally{t(!1)}}},C=async()=>{void 0!==a&&await B("/api/recordings",{method:"POST",body:JSON.stringify({machines:[a.machineId],metrics:b,resolution:m,durationMs:6e4*Math.max(1,Math.round(o)),includeBacklog:q})})},D=async a=>{await B(`/api/recordings/${a}/stop`,{method:"POST",body:"{}"})},E=async a=>{await B(`/api/recordings/${a}`,{method:"DELETE"})};return(0,d.jsxs)("section",{"aria-labelledby":"recording-heading",className:"mb-5 rounded-xl border border-border bg-card p-4 md:p-5",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("h2",{id:"recording-heading",className:"flex items-center gap-2 text-sm font-medium text-foreground",children:[(0,d.jsx)(aa,{className:"h-4 w-4 text-muted-foreground","aria-hidden":!0}),"Recording"]}),(0,d.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:function(a){if(null===a)return"History mode unavailable";if("memory"===a.mode){let b=a.memory?.usedBytes??0,c=a.memory?.budgetBytes??0;return`Temporary RAM history \xb7 ${ag(b)} of ${ag(c)} used`}let b=a.persistence?.storageTier==="summary"?"compact 10s summaries":"raw samples";return`Persistent history \xb7 ${b} \xb7 flush ${((a.persistence?.flushIntervalMs??1e4)/1e3).toFixed(0)}s`}(e)}),e?.mode==="memory"?(0,d.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Charts and recent history are temporary and disappear when the hub restarts. Start a recording to keep a bounded snapshot on this hub."}):(0,d.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Charts use opt-in persistent summaries. A recording keeps an explicit, downloadable capture."})]}),null===z?(0,d.jsxs)("button",{type:"button",onClick:()=>k(a=>!a),disabled:A,className:"inline-flex min-h-9 items-center gap-1.5 rounded-md border border-border px-3 text-xs font-medium text-foreground transition-colors hover:bg-card-strong disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)(F.A,{className:"h-3.5 w-3.5","aria-hidden":!0}),"Start recording"]}):(0,d.jsxs)("button",{type:"button",onClick:()=>void D(z.id),disabled:s,className:"inline-flex min-h-9 items-center gap-1.5 rounded-md border border-border px-3 text-xs font-medium text-foreground transition-colors hover:bg-card-strong disabled:opacity-50",children:[(0,d.jsx)(ab,{className:"h-3.5 w-3.5","aria-hidden":!0}),"Stop recording"]})]}),j&&null===z?(0,d.jsxs)("form",{className:"mt-4 grid gap-3 border-t border-border pt-4 sm:grid-cols-2 lg:grid-cols-4",onSubmit:a=>{a.preventDefault(),C()},children:[(0,d.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:["Resolution",(0,d.jsx)("select",{value:m,onChange:a=>n(a.target.value),className:"min-h-9 rounded-md border border-border bg-background px-2 text-xs text-foreground",children:ae.map(a=>(0,d.jsx)("option",{value:a.id,children:a.label},a.id))})]}),(0,d.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:["Duration (minutes)",(0,d.jsx)("input",{type:"number",min:1,max:1440,value:o,onChange:a=>p(Number(a.target.value)),className:"min-h-9 rounded-md border border-border bg-background px-2 text-xs text-foreground"})]}),(0,d.jsxs)("label",{className:"flex min-h-9 items-end gap-2 pb-1 text-xs text-foreground",children:[(0,d.jsx)("input",{type:"checkbox",checked:q,onChange:a=>r(a.target.checked),className:"h-4 w-4 accent-[var(--accent)]"}),"Include recent RAM history"]}),(0,d.jsx)("div",{className:"flex items-end",children:(0,d.jsxs)("button",{type:"submit",disabled:A,className:"inline-flex min-h-9 w-full items-center justify-center gap-1.5 rounded-md bg-accent px-3 text-xs font-medium text-accent-foreground transition-colors hover:bg-accent/90 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,d.jsx)(F.A,{className:"h-3.5 w-3.5","aria-hidden":!0}),s?"Starting…":"Start capture"]})}),(0,d.jsxs)("p",{className:"text-xs text-muted-foreground sm:col-span-2 lg:col-span-4",children:[b.length," selected metric",1===b.length?"":"s"," will be written to a private file on the hub. Downloads are available only to your account."]})]}):null,null!==u?(0,d.jsx)("p",{role:"status",className:"mt-3 text-xs text-warn",children:u}):null,y.length>0?(0,d.jsx)("ul",{className:"mt-4 flex flex-col gap-2 border-t border-border pt-3",children:y.map(a=>(0,d.jsxs)("li",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs",children:[(0,d.jsx)("span",{className:"recording"===a.status?"text-ok":"text-foreground",children:af[a.status]}),(0,d.jsxs)("span",{className:"text-muted-foreground",children:[a.resolution," \xb7 ",ah(a.startedAt)]}),(0,d.jsx)("span",{className:"tnum text-muted-foreground",children:ag(a.bytesWritten)}),null!==a.reason?(0,d.jsxs)("span",{className:"text-muted-foreground",children:["\xb7 ",a.reason]}):null,(0,d.jsxs)("span",{className:"ml-auto flex items-center gap-1",children:[(0,d.jsxs)("a",{href:a.downloadPath,className:"inline-flex min-h-8 items-center gap-1 rounded-md border border-border px-2 text-xs text-foreground transition-colors hover:bg-card-strong","aria-label":`Download recording from ${ah(a.startedAt)}`,children:[(0,d.jsx)(ac,{className:"h-3 w-3","aria-hidden":!0}),"Download"]}),(0,d.jsxs)("button",{type:"button",onClick:()=>void E(a.id),disabled:s||"recording"===a.status,className:"inline-flex min-h-8 items-center gap-1 rounded-md border border-border px-2 text-xs text-muted-foreground transition-colors hover:bg-card-strong hover:text-crit disabled:opacity-40","aria-label":`Delete recording from ${ah(a.startedAt)}`,children:[(0,d.jsx)(ad.A,{className:"h-3 w-3","aria-hidden":!0}),"Delete"]})]})]},a.id))}):(0,d.jsxs)("p",{className:"mt-3 flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,d.jsx)(l.A,{className:"h-3 w-3","aria-hidden":!0}),"No recordings for this machine yet."]})]})}var aj=c(43607),ak=c(15670),al=c(55280),am=c(47978);let an="grid grid-cols-[3rem_minmax(0,1fr)_4.5rem] items-center gap-2 sm:grid-cols-[3.5rem_minmax(0,1fr)_4.5rem_3rem]";function ao({title:a,series:b,fromMs:c,toMs:e,stepMs:f,gaps:h,hiddenKeys:i,onToggleSeries:j}){let[k,l]=(0,g.useState)(!1),m=(0,g.useMemo)(()=>b.filter(a=>!i.has(a.key)),[b,i]),n=(0,am.Au)({series:m,fromMs:c,toMs:e,stepMs:f,gaps:h}),o=(0,g.useMemo)(()=>{let a=b.map(a=>{let b=Array(10).fill("");return(function(a,b,c,d=120){let e=Array(d).fill(null),f=Math.max(1,c-b);for(let g of a){if(g.t<b||g.t>c)continue;let a=g.max??g.avg;if(null===a||!Number.isFinite(a))continue;let h=Math.min(d-1,Math.floor((g.t-b)/f*d));e[h]=Math.max(e[h]??0,Math.min(100,Math.max(0,a)))}return e})(a.points,c,e,120).forEach((a,c)=>{if(null===a)return;let d=Math.min(9,Math.floor(a/10));b[d]+=`M${c},1h1v16h-1z`}),{...a,stats:(0,C.T6)(a.points),paths:b}});return k&&a.sort((a,b)=>(b.stats.max??-1)-(a.stats.max??-1)),a},[b,c,e,k]),p=o.filter(a=>!i.has(a.key)).reduce((a,b)=>null!==b.stats.max&&(a?.stats.max===null||null===a||b.stats.max>a.stats.max)?b:a,null),q=null===n.timeMs?null:(0,D.r6)(n.timeMs),r=Math.max(1,e-c),s=(0,C.$z)(h,c,e);return(0,d.jsxs)("figure",{className:"min-w-0 lg:col-span-full",onPointerLeave:a=>{"mouse"===a.pointerType&&n.clear()},children:[(0,d.jsxs)("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-2",children:[(0,d.jsx)("h3",{className:"text-xs font-medium text-foreground",children:a}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-xs",children:[p?(0,d.jsxs)("span",{className:"tnum text-muted-foreground",children:["Peak \xb7 ",p.label," ",(0,d.jsx)("span",{className:"text-foreground",children:(0,D.dd)(p.stats.max,"percent")})]}):null,(0,d.jsx)("button",{type:"button","aria-pressed":k,onClick:()=>l(!k),className:`min-h-8 rounded-md border border-border px-2 ${k?"bg-selected text-foreground":"bg-background text-muted-foreground hover:text-foreground"}`,children:"Busiest first"})]})]}),(0,d.jsxs)("div",{className:`${an} mb-1 min-h-4 whitespace-nowrap text-xs leading-4 text-muted-foreground`,"aria-hidden":!0,children:[(0,d.jsx)("span",{children:"Core"}),(0,d.jsx)("span",{className:"truncate",children:null!==q?(0,d.jsx)("span",{className:"tnum",children:q}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"sm:hidden",children:"History"}),(0,d.jsx)("span",{className:"hidden sm:inline",children:"Peak usage over time"})]})}),(0,d.jsx)("span",{className:"hidden text-right sm:block",children:null!==q?"At cursor":"Last"}),(0,d.jsxs)("span",{className:"text-right",children:[(0,d.jsx)("span",{className:"hidden sm:inline",children:"Peak"}),(0,d.jsx)("span",{className:"sm:hidden",children:null!==q?"At cursor":"Peak"})]})]}),(0,d.jsx)("p",{id:`${n.id}-instructions`,className:"sr-only",children:"Focus a core chart and use Left and Right arrows to inspect recorded bucket peaks, Home or End to jump, and Escape to dismiss."}),(0,d.jsx)("div",{role:"region","aria-label":"Per-core history rows",tabIndex:0,className:"max-h-96 overflow-y-auto rounded-md",children:0===o.length?(0,d.jsx)("p",{className:"py-8 text-center text-xs text-muted-foreground",children:"No stored per-core readings."}):o.map(a=>{let b=!i.has(a.key),g=null===n.timeMs?null:(0,al.bO)(a.points,n.timeMs,f,h),k=g?.max??g?.avg??null;return(0,d.jsxs)("div",{className:`${an} min-h-7 border-b border-border/40 text-xs`,children:[(0,d.jsxs)("label",{className:"inline-flex min-h-7 cursor-pointer items-center rounded-sm",children:[(0,d.jsx)("input",{type:"checkbox",checked:b,onChange:()=>j(a.key),className:"peer sr-only"}),(0,d.jsx)("span",{className:`${b?"text-foreground":"text-muted-foreground line-through"} rounded-sm peer-focus-visible:outline-2 peer-focus-visible:outline-accent`,children:a.label})]}),(0,d.jsxs)("svg",{viewBox:"0 0 120 18",preserveAspectRatio:"none",role:"img","aria-label":`${a.label}: ${null!==q?`${(0,D.dd)(k,"percent")} at ${q}`:`latest ${(0,D.dd)(a.stats.latest,"percent")}`}, peak ${(0,D.dd)(a.stats.max,"percent")}${b?"":", hidden"}`,"aria-describedby":`${n.id}-instructions`,tabIndex:b?0:void 0,onPointerDown:b?a=>{if("mouse"===a.pointerType)return;a.currentTarget.setPointerCapture(a.pointerId);let b=a.currentTarget.getBoundingClientRect();n.inspect((0,al.yk)(a.clientX,b.left,b.width,c,e))}:void 0,onPointerCancel:n.clear,onContextMenu:a=>a.preventDefault(),onPointerMove:b?a=>{let b=a.currentTarget.getBoundingClientRect();n.inspect((0,al.yk)(a.clientX,b.left,b.width,c,e))}:void 0,onFocus:n.onFocus,onBlur:n.clear,onKeyDown:n.onKeyDown,className:`h-7 w-full touch-pan-y select-none cursor-crosshair rounded-sm focus-visible:outline-2 focus-visible:outline-accent ${b?"":"opacity-20"}`,children:[(0,d.jsx)("title",{children:`${a.label} \xb7 Last ${(0,D.dd)(a.stats.latest,"percent")} \xb7 Peak ${(0,D.dd)(a.stats.max,"percent")}`}),b?a.paths.map((a,b)=>a?(0,d.jsx)("path",{d:a,fill:b<5?"var(--cpu)":b<8?"var(--warn)":"var(--crit)",opacity:b<5?.15+.17*b:.65+b%5*.07},b):null):null,s.map(a=>(0,d.jsx)("rect",{x:(a.fromMs-c)/r*120,width:(a.toMs-a.fromMs)/r*120,y:0,height:18,fill:"var(--card)"},`${a.fromMs}-${a.toMs}`)),null!==n.timeMs?(0,d.jsx)("line",{"aria-hidden":!0,x1:(n.timeMs-c)/r*120,x2:(n.timeMs-c)/r*120,y1:0,y2:18,stroke:"var(--foreground)",strokeWidth:"1",vectorEffect:"non-scaling-stroke",pointerEvents:"none"}):null]}),(0,d.jsx)("span",{className:"tnum hidden text-right text-muted-foreground sm:block",children:b?(0,D.dd)(null!==n.timeMs?k:a.stats.latest,"percent"):"—"}),(0,d.jsxs)("span",{className:`tnum text-right ${b&&(a.stats.max??0)>=80?"text-crit":"text-muted-foreground"}`,children:[(0,d.jsx)("span",{className:"hidden sm:inline",children:b?(0,D.dd)(a.stats.max,"percent"):"—"}),(0,d.jsx)("span",{className:"sm:hidden",children:b?(0,D.dd)(null!==n.timeMs?k:a.stats.max,"percent"):"—"})]})]},a.key)})}),(0,d.jsxs)("div",{className:`${an} mt-2 text-xs text-muted-foreground`,"aria-hidden":!0,children:[(0,d.jsx)("span",{}),(0,d.jsx)("div",{className:"flex justify-between gap-2 tnum",children:(0,C.Cf)(c,e,3).map((a,b)=>(0,d.jsx)("span",{className:1===b?"hidden sm:inline":"",children:(0,D.O5)(a,r)},a))}),(0,d.jsx)("span",{className:"hidden sm:block"}),(0,d.jsx)("span",{})]}),(0,d.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[[{label:"0–49%",color:"var(--cpu)"},{label:"50–79%",color:"var(--warn)"},{label:"80–100%",color:"var(--crit)"}].map(a=>(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,d.jsx)("span",{"aria-hidden":!0,className:"h-2 w-4 rounded-sm",style:{backgroundColor:a.color}}),a.label]},a.label)),(0,d.jsx)("span",{children:"No fill \xb7 no reading"})]})]})}function ap(a,b){return`${a}\0${b}`}function aq(a,b,c,d,e){let f=(0,t.oB)(c);return null===f?[]:a.series.filter(a=>a.metric===c&&(void 0===d||a.resourceId===d)).map((a,d)=>{let g=(0,t.Lf)(f,d),h=e?.(a,f,d)??(0,t.bP)(b,c,a.resourceId);return{key:ap(a.metric,a.resourceId),label:h,metric:a.metric,resourceId:a.resourceId,color:g.color,dash:g.dash,points:a.points}})}function ar(a){let{machine:b,result:c,selectedMetrics:e,hiddenCards:f,hiddenSeries:g,onToggleSeries:h}=a,[i]=T(b.machineId),j=A(i,z(b,c.series)),k=function(a){let{machine:b,result:c,selectedMetrics:d,hiddenCards:e,coreIds:f}=a,g=new Set(d),h=[];if(["cpu.usage","cpu.core","cpu.temperature","cpu.power","cpu.iowait","cpu.pressure"].filter(a=>g.has(a)).length>0){let a=[],d=["cpu.usage","cpu.iowait","cpu.pressure"].filter(a=>g.has(a));if(d.length>0&&a.push({key:"cpu.usage",title:d.length>1?"Usage & stalls":(0,t.oB)(d[0]).label,unit:"percent",series:d.flatMap(a=>aq(c,b,a,void 0,(b,c)=>"cpu.pressure"===a?"Pressure (some)":c.shortLabel)),emptyMessage:"No stored CPU readings in this range."}),g.has("cpu.core")){let d=(0,t.oB)("cpu.core"),e=z(b,c.series),g=f??A(null,e),h=function(a,b){let c=(0,t.oB)("cpu.core");if(null===c)return[];let d=new Map(a.series.filter(a=>"cpu.core"===a.metric).map(a=>[a.resourceId,a]));return b.flatMap((a,b)=>{let e=d.get(a),f=(0,t.Lf)(c,b);return[{key:ap("cpu.core",a),label:B(a),metric:"cpu.core",resourceId:a,color:f.color,dash:f.dash,points:e?.points??[]}]})}(c,g),i=e.length>g.length;a.push({key:"cpu.core",title:i?`Per-core usage \xb7 ${g.length} of ${e.length}`:"Per-core usage",unit:d.unit,series:h,emptyMessage:0===e.length?"No stored per-core readings in this range.":0===g.length?"No CPU cores are selected. Choose cores under Metrics.":"No stored per-core readings for the selected cores in this range."})}if(g.has("cpu.temperature")){let d=(0,t.oB)("cpu.temperature");a.push({key:"cpu.temperature",title:"Temperature",unit:d.unit,series:aq(c,b,"cpu.temperature"),emptyMessage:"No stored CPU temperature readings in this range."})}if(g.has("cpu.power")){let d=(0,t.oB)("cpu.power");a.push({key:"cpu.power",title:"Package power",unit:d.unit,series:aq(c,b,"cpu.power"),emptyMessage:"No stored CPU package power readings in this range."})}h.push({key:"cpu",title:"CPU",charts:a})}if(["memory.used","memory.usage","memory.pressure.some","memory.pressure.full","swap.used"].filter(a=>g.has(a)).length>0){let a=[],d=["memory.used","memory.usage"].filter(a=>g.has(a));if(d.length>0){let e=d.map(a=>({unit:(0,t.oB)(a).unit,series:aq(c,b,a,void 0,()=>"RAM")}));a.push({key:"memory.capacity",title:"RAM",...e[0],unitGroup:"memory",views:e,emptyMessage:"No stored memory readings in this range."})}g.has("swap.used")&&a.push({key:"swap.used",title:"Swap",unit:"bytes",series:aq(c,b,"swap.used"),emptyMessage:"No stored swap readings in this range."});let e=["memory.pressure.some","memory.pressure.full"].filter(a=>g.has(a));if(e.length>0){let d=(0,t.oB)(e[0]),f=e.flatMap(a=>aq(c,b,a,void 0,(b,c)=>"memory.pressure.some"===a?"Some":"memory.pressure.full"===a?"Full":c.shortLabel));a.push({key:"memory.pressure",title:"Memory pressure",unit:d.unit,series:f,emptyMessage:"No stored memory pressure in this range."})}h.push({key:"memory",title:"Memory",charts:a})}let i=["gpu.utilization","gpu.memory.used","gpu.temperature","gpu.power"].filter(a=>g.has(a));if(i.length>0){let a=(0,t.ue)(b,c.series),d=a.filter(a=>!e.has(a.id));for(let e of(0===d.length&&h.push({key:"gpu-empty",title:"GPU",charts:[{key:"gpu-empty",title:"Per-card history",unit:"percent",series:[],emptyMessage:a.length>0?"All GPU cards are hidden. Re-enable a card under Metrics to see its panels.":"No supported GPU cards or stored GPU history in this range."}]}),d)){let a=i.map(a=>{let d=(0,t.oB)(a),f=function(a,b,c,d){return aq(a,b,c,d,(a,b)=>"gpu.utilization"===c?"Utilization":"gpu.memory.used"===c?"VRAM used":b.shortLabel).map(a=>({...a}))}(c,b,a,e.id),g="gpu.memory.used"===a&&null!==e.totalBytes?`of ${(0,D.dd)(e.totalBytes,"bytes")}`:void 0;return{key:`${e.id}-${a}`,title:d.shortLabel,unit:d.unit,series:f,emptyMessage:`No stored ${d.shortLabel.toLowerCase()} readings for this card in this range.`,note:g}});h.push({key:`gpu-${e.id}`,title:`GPU ${e.index+1}${e.label?` \xb7 ${e.label}`:""}`,charts:a})}}if(["fs.used","fs.usage","fs.inodes.usage"].filter(a=>g.has(a)).length>0){let a=[],d=["fs.used","fs.usage"].filter(a=>g.has(a));if(d.length>0){let e=d.map(a=>({unit:(0,t.oB)(a).unit,series:aq(c,b,a)}));a.push({key:"fs.capacity",title:"Capacity used",...e[0],unitGroup:"filesystem",views:e,emptyMessage:"No stored filesystem usage in this range."})}if(g.has("fs.inodes.usage")){let d=(0,t.oB)("fs.inodes.usage");a.push({key:"fs.inodes.usage",title:"Inodes used",unit:d.unit,series:aq(c,b,"fs.inodes.usage"),emptyMessage:"No stored inode usage in this range."})}h.push({key:"filesystems",title:"Filesystems",charts:a})}let j=["disk.read","disk.write"].filter(a=>g.has(a));if(j.length>0){let a=j.flatMap(a=>{let d=(0,t.oB)(a);return aq(c,b,a,void 0,c=>`${(0,t.bP)(b,a,c.resourceId)} ${d.shortLabel.toLowerCase()}`)});h.push({key:"disk",title:"Disk throughput",charts:[{key:"disk",title:"Read and write",unit:"bytes_per_second",series:a,emptyMessage:"No stored disk throughput in this range."}]})}let k=["disk.read.latency","disk.write.latency"].filter(a=>g.has(a)),l=["io.pressure.some","io.pressure.full"].filter(a=>g.has(a));if(k.length>0||l.length>0||g.has("disk.utilization")){let a=[];if(k.length>0){let d=k.flatMap(a=>{let d=(0,t.oB)(a);return aq(c,b,a,void 0,c=>`${(0,t.bP)(b,a,c.resourceId)} ${d.shortLabel.toLowerCase()}`)}),e=(0,t.oB)(k[0]);a.push({key:"disk.latency",title:"Latency",unit:e.unit,series:d,emptyMessage:"No stored disk latency in this range."})}if(g.has("disk.utilization")){let d=(0,t.oB)("disk.utilization");a.push({key:"disk.utilization",title:"Utilization",unit:d.unit,series:aq(c,b,"disk.utilization"),emptyMessage:"No stored disk utilization in this range."})}if(l.length>0){let d=(0,t.oB)(l[0]),e=l.flatMap(a=>aq(c,b,a,void 0,(b,c)=>"io.pressure.some"===a?"Some":"io.pressure.full"===a?"Full":c.shortLabel));a.push({key:"io.pressure",title:"I/O pressure",unit:d.unit,series:e,emptyMessage:"No stored I/O pressure in this range."})}h.push({key:"disk-health",title:"Disk health",charts:a})}let m=["net.rx","net.tx"].filter(a=>g.has(a));if(m.length>0){let a=m.flatMap(a=>{let d=(0,t.oB)(a);return aq(c,b,a,void 0,c=>`${(0,t.bP)(b,a,c.resourceId)} ${d.shortLabel.toLowerCase()}`)});h.push({key:"network",title:"Network throughput",charts:[{key:"network",title:"Received and sent",unit:"bytes_per_second",series:a,emptyMessage:"No stored network throughput in this range."}]})}return h}({machine:b,result:c,selectedMetrics:e,hiddenCards:f,coreIds:j});return(0,d.jsx)(am._C,{children:(0,d.jsx)("div",{className:"grid grid-cols-1 gap-5",children:k.map(e=>{let f=e.charts.find(a=>"cpu.core"===a.key&&a.series.length>4),i=f?[...e.charts.filter(a=>a!==f),f]:e.charts,j=f&&4===i.length?"grid gap-6 lg:grid-cols-2 xl:grid-cols-3":i.length>1&&!(f&&2===i.length)?"grid gap-6 lg:grid-cols-2":"flex flex-col gap-6";return(0,d.jsx)(n.Z,{title:e.title,children:(0,d.jsx)("div",{className:j,children:i.map((e,j)=>{let k=e.unitGroup,l=k?a.capacityUnits[k]:void 0,m=e.views?.find(a=>a.unit===l)??e.views?.[0]??e,n=e===f||!f&&i.length%2==1&&j===i.length-1;return"cpu.core"===e.key&&e.series.length>8?(0,d.jsx)(ao,{title:e.title,series:e.series,fromMs:c.fromMs,toMs:c.toMs,gaps:c.gaps,stepMs:(0,C.jl)(c.stepMs,c.tier,b.expectedIntervalMs),hiddenKeys:g,onToggleSeries:h},e.key):(0,d.jsx)(ak.t,{title:e.title,unit:m.unit,series:m.series,fromMs:c.fromMs,toMs:c.toMs,stepMs:(0,C.jl)(c.stepMs,c.tier,b.expectedIntervalMs),gaps:c.gaps,hiddenKeys:g,onToggleSeries:h,emptyMessage:e.emptyMessage,note:e.note,action:k&&e.views&&e.views.length>1?(0,d.jsx)("div",{role:"group","aria-label":`${e.title} units`,className:"inline-flex rounded-md border border-border bg-background p-0.5",children:e.views.map(b=>(0,d.jsx)("button",{type:"button","aria-pressed":b.unit===m.unit,onClick:()=>a.onCapacityUnitChange(k,b.unit),className:`min-h-7 rounded px-2 text-xs transition-colors ${b.unit===m.unit?"bg-selected text-foreground":"text-muted-foreground hover:text-foreground"}`,children:"bytes"===b.unit?"Bytes":"%"},b.unit))}):void 0,maxDrawPoints:"cpu.core"===e.key?150:void 0,className:n?"lg:col-span-full":void 0},e.key)})})},e.key)})})},`${b.machineId}|${c.toMs-c.fromMs}`)}var as=c(71335),at=c(56013);let au={"1s":"1-second RAM summaries",raw:"raw samples","10s":"10-second summaries","1m":"1-minute rollups","1h":"1-hour rollups"};function av(a){return a.displayName?.trim()||a.hostname.trim()||a.machineId}function aw(a,b){return`${a}\0${b}`}function ax(a){let b=new Set(a.selectedMetrics),c=new Set((0,t.ue)(a.machine,a.result.series).filter(b=>!a.hiddenCards.has(b.id)).map(a=>a.id));return a.result.series.filter(d=>!(!b.has(d.metric)||a.hiddenSeries.has(aw(d.metric,d.resourceId))||"cpu.core"===d.metric&&void 0!==a.coreIds&&!a.coreIds.includes(d.resourceId)||d.metric.startsWith("gpu.")&&""!==d.resourceId&&!c.has(d.resourceId)))}function ay(a){return new Date(a).toISOString()}function az(a){return(0,t.oB)(a)?.label??a}function aA(a){return ax(a).map(b=>({metric:b.metric,label:az(b.metric),resourceId:b.resourceId,resourceLabel:(0,t.bP)(a.machine,b.metric,b.resourceId),unit:b.unit,unitLabel:(0,t.RL)(b.unit),stats:(0,C.T6)(b.points),points:b.points.map(b=>{let c=Math.min(a.result.toMs,b.t+a.result.stepMs),d=null!==b.min||null!==b.max||null!==b.avg;return{t:b.t,tIso:ay(b.t),bucketStartMs:b.t,bucketStartIso:ay(b.t),bucketEndMs:c,bucketEndIso:ay(c),min:b.min,max:b.max,avg:b.avg,state:d?"recorded":"unavailable"}})}))}function aB(a){return(0,C.$z)(a.result.gaps,a.result.fromMs,a.result.toMs).map(a=>({...a,fromIso:ay(a.fromMs),toIso:ay(a.toMs)}))}function aC(a){let b=new Set(a.result.series.map(a=>a.metric));return a.selectedMetrics.filter(a=>!b.has(a))}function aD(a){let b=new Set(a.selectedMetrics),c=new Set(ax(a).map(a=>aw(a.metric,a.resourceId)));return a.result.series.filter(a=>b.has(a.metric)&&!c.has(aw(a.metric,a.resourceId))).length}function aE(a,b){let c=a.result,d=["Only the visible series from the loaded History result are included; this export does not query more data."];"raw"!==c.tier&&d.push(`Values are ${au[c.tier]}, not individual raw samples.`),c.truncated&&d.push("The loaded result is partial: the hub limited or shortened this history query.");let e=aB(a);e.length>0&&d.push(`${e.length} recorded data gap${1===e.length?"":"s"} included.`),b.length>0&&d.push(`Selected metrics without stored data: ${b.join(", ")}.`);let f=aD(a);return f>0&&d.push(`${f} selected series hidden in this view were not exported.`),d}let aF=["record_type","metric","metric_label","resource_id","resource_label","unit","bucket_start_ms","bucket_start_iso","bucket_end_ms","bucket_end_iso","min","max","avg","value_state","gap_kind","gap_reason","gap_dropped_records"],aG="inline-flex min-h-7 items-center rounded-md border border-border bg-background px-2 text-xs text-foreground transition-colors hover:bg-card-strong disabled:cursor-not-allowed disabled:opacity-50";function aH(a){let[b,c]=(0,g.useState)(null),e=ax(a).length,f=b=>{let d=Date.now(),e={...a,exportedAt:d};try{let a,f,g,h,i,j,k,l,m=function(a,b,c=Date.now()){return(0,at.Y8)("history",av(a.machine),c,b)}(e,b,d),n="csv"===b?function(a){let b,c,d,e,f,g,h=a.exportedAt??Date.now(),i=(b=(0,D.ly)(a.range),c=a.result,d=ax(a),e=aC(a),f=aB(a),g=a.selectedMetrics.map(az).join("; "),[["Rigscope History export"],["Scope","Visible series from the loaded History result"],["Machine",av(a.machine)],["Machine ID",a.machine.machineId],["Query",g],["Range",`${b.label} (${ay(c.fromMs)} – ${ay(c.toMs)})`],["Resolution",`${au[c.tier]} \xb7 ${c.stepMs} ms buckets`],["Loaded at",ay(a.loadedAt)],["Exported at",ay(h)],["Partial",c.truncated?"true":"false"],["Gaps",String(f.length)],["Visible series",String(d.length)],["Selected without stored data",e.length>0?e.join(", "):"none"],["Note",aE(a,e).join(" ")],[]]);for(let b of(i.push([...aF]),aA(a)))for(let a of b.points)i.push(["bucket",b.metric,b.label,b.resourceId,b.resourceLabel,b.unit,a.bucketStartMs,a.bucketStartIso,a.bucketEndMs,a.bucketEndIso,a.min,a.max,a.avg,a.state,"","",""]);for(let b of aB(a))i.push(["gap","","","","","",b.fromMs,b.fromIso,b.toMs,b.toIso,"","","","gap",b.kind,b.reason??"",b.droppedRecords??""]);return(0,as.kg)(i)}(e):(a=e.exportedAt??Date.now(),f=(0,D.ly)(e.range),g=e.result,h=aA(e),i=aC(e),j=aB(e),k=aD(e),l={app:"Rigscope",kind:"history",exportedAt:ay(a),scope:{description:"Visible series from the loaded History result",machine:{id:e.machine.machineId,name:av(e.machine),hostname:e.machine.hostname,connected:e.machine.connected,lastReceivedAt:e.machine.lastReceivedAt},query:{range:{id:f.id,label:f.label,fromMs:g.fromMs,fromIso:ay(g.fromMs),toMs:g.toMs,toIso:ay(g.toMs)},selectedMetrics:[...e.selectedMetrics],visibleSeries:h.length,hiddenSeriesCount:k}},resolution:{tier:g.tier,label:au[g.tier],stepMs:g.stepMs,expectedIntervalMs:e.machine.expectedIntervalMs??null},loadedAt:ay(e.loadedAt),partial:g.truncated,gaps:j,series:h.map(a=>({metric:a.metric,label:a.label,resourceId:a.resourceId,resourceLabel:a.resourceLabel,unit:a.unit,unitLabel:a.unitLabel,summary:{points:a.stats.count,min:a.stats.min,max:a.stats.max,averageOfBucketAverages:a.stats.avg,latest:a.stats.latest,latestAt:null===a.stats.latestT?null:ay(a.stats.latestT),firstAt:null===a.stats.firstT?null:ay(a.stats.firstT),lastAt:null===a.stats.lastT?null:ay(a.stats.lastT)},points:a.points})),missingData:i.map(a=>({metric:a,label:az(a),reason:"No stored series in the loaded result."})),notes:aE(e,i)},`${JSON.stringify(l,null,2)}
|
|
2
|
+
`);(0,as.PE)(m,n,"csv"===b?as.UR:as.uW),c(null)}catch{c("The history export could not be created.")}};return(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,d.jsxs)("span",{className:"text-xs text-muted-foreground",children:["Export visible",(0,d.jsx)("span",{className:"sr-only",children:` (${e} series from the loaded result)`})]}),(0,d.jsx)("button",{type:"button",onClick:()=>f("csv"),"aria-label":"Download visible history as CSV",title:"Download the visible series from this loaded result as CSV",className:aG,children:"CSV"}),(0,d.jsx)("button",{type:"button",onClick:()=>f("json"),"aria-label":"Download visible history as JSON",title:"Download the visible series from this loaded result as JSON",className:aG,children:"JSON"}),null!==b?(0,d.jsxs)("span",{role:"status",className:"inline-flex items-center gap-1 text-xs text-warn",children:[(0,d.jsx)(j.A,{className:"h-3 w-3","aria-hidden":!0}),b]}):null]})}function aI(a){return a.displayName?.trim()||a.hostname.trim()||a.machineId}function aJ(){return(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-5 xl:grid-cols-2","aria-busy":"true",children:[(0,d.jsx)(n.Z,{title:"Loading stored history",children:(0,d.jsx)("div",{className:"h-40 animate-pulse rounded-lg bg-card-strong","aria-hidden":!0})}),(0,d.jsx)(n.Z,{title:"Preparing charts",children:(0,d.jsx)("div",{className:"h-40 animate-pulse rounded-lg bg-card-strong","aria-hidden":!0})})]})}function aK(){let a,b,c,e,{session:u,phase:v,machines:w,retryConnection:x}=(0,r.M)(),y=(0,q.x)(),{machine:B,machineId:E,requestedMachineId:F}=(0,s.JG)("history"),[G,H]=V(E,"memory"),[I,K]=V(E,"filesystem"),L={memory:G,filesystem:I},[N,Q]=(0,J.u)("history.range","10m",O),[R,U]=(0,J.u)(`history.metrics.${E}`,null,P),[W]=T(E),X=z(B),Y=A(W,X),[Z,$]=S(E,"cards"),[aa,ab]=S(E,"series"),ac=(0,g.useMemo)(()=>new Set(Z),[Z]),ad=(0,g.useMemo)(()=>new Set(aa),[aa]),[ae,af]=(0,J.u)("history.autoRefresh",!0,M,"session"),[ag,ah]=(0,g.useState)(null),[ak,al]=(0,g.useState)(null),[am,an]=(0,g.useState)(0);(0,g.useRef)(null);let[ao,ap]=(0,g.useState)(null),[aq,as]=(0,g.useState)(Date.now),at=(0,g.useMemo)(()=>void 0===B?"":(0,t.er)(B).join(","),[B?.machineId,B?.inventory,B?.metrics?.payload.gpus]),au=R??at,av=""===au?[]:au.split(","),aw="signed-in"===u.kind&&void 0!==B&&""!==E&&""!==au,{data:ax,error:ay,loading:az,manualRefreshing:aA}=(0,aj.n)({machineId:E,metricsKey:au,coreIdsKey:av.includes("cpu.core")&&Y.length!==X.length?Y.join(","):void 0,range:N,enabled:aw,autoRefresh:ae,refreshNonce:am}),aB=(0,g.useMemo)(()=>{if(!ax||ao?.machineId!==E||0===ao.outages.length)return ax;let a=ax.result,b=Math.max(a.toMs,...ao.outages.map(a=>a.toMs??aq)),c=a.fromMs+b-a.toMs;return{...ax,result:{...a,fromMs:c,toMs:b,gaps:(0,C.$z)([...a.gaps,...function(a,b,c){if(!Number.isFinite(b)||!Number.isFinite(c)||c<=b)return[];let d=[];for(let e of a){let a=Math.max(b,e.fromMs),f=Math.min(c,e.toMs??c);Number.isFinite(a)&&Number.isFinite(f)&&!(f<=a)&&d.push({fromMs:a,toMs:f,kind:"missing",reason:null===e.toMs?"collector disconnected":"collector outage"})}var e=d;let f=e.filter(a=>Number.isFinite(a.fromMs)&&Number.isFinite(a.toMs)&&a.toMs>a.fromMs).map(a=>({...a})).sort((a,b)=>a.fromMs-b.fromMs||a.toMs-b.toMs),g=[];for(let a of f){let b=g.at(-1);if(void 0!==b&&a.fromMs<=b.toMs){b.toMs=Math.max(b.toMs,a.toMs),"dropped"===a.kind&&(b.kind="dropped"),void 0===b.reason&&void 0!==a.reason&&(b.reason=a.reason),void 0===b.droppedRecords&&void 0!==a.droppedRecords&&(b.droppedRecords=a.droppedRecords);continue}g.push(a)}return g}(ao.outages,c,b)],c,b)}}},[ax,E,ao,aq]),aC=aB?.result??null,aD=void 0===B?[]:(0,t.ue)(B,aC?.series??[]),aE=(0,D.ly)(N),aF=null!==ay?null!==aB?`${"rate-limited"===ay.kind?"Refresh paused":"Refresh failed"} \xb7 ${(0,D.ei)(aB.loadedAt)}`:"History unavailable":null!==aB?`Updated ${(0,D.ei)(aB.loadedAt)}`:az?"Loading…":"",aG=aw&&null===aB&&null===ay,aK=w.length,aL="disconnected"===v;return(0,d.jsx)(m.G,{title:"History",machineId:E,machineView:"history",headerRight:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(o.$E,{}),(0,d.jsx)(p.B,{})]}),children:y||(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{role:"status","aria-live":"polite",className:"sr-only",children:ay?.message??""}),(0,d.jsx)(_,{machine:B,range:N,selectedMetrics:av,catalog:ag,catalogError:ak,gpuCards:aD,hiddenCards:ac,autoRefresh:ae,loading:az,manualRefreshing:aA,statusText:aF,onRangeChange:Q,onToggleMetric:a=>{let b=new Set(av);b.has(a)?b.delete(a):b.add(a),U([...b].sort().join(","))},onSetMetrics:a=>U([...new Set(a)].sort().join(",")),onToggleCard:a=>{$(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),[...c]})},onToggleAutoRefresh:()=>af(a=>!a),onRefresh:()=>an(a=>a+1)}),(0,d.jsx)(ai,{machine:B,selectedMetrics:av,csrfToken:"signed-in"===u.kind?u.user.csrfToken:null}),"reconnecting"===v||"disconnected"===v?(0,d.jsxs)("div",{role:"status",className:"mb-4 flex items-start gap-2 rounded-lg border border-border bg-card px-4 py-2.5 text-xs text-muted-foreground",children:[(0,d.jsx)(j.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-warn","aria-hidden":!0}),(0,d.jsxs)("span",{children:["Live feed ","disconnected"===v?"disconnected":"reconnecting"," \xb7 history available"]}),"disconnected"===v?(0,d.jsxs)("button",{type:"button",onClick:x,className:"ml-auto inline-flex min-h-8 shrink-0 items-center gap-1.5 rounded-md border border-border px-2.5 text-xs text-foreground transition-colors hover:bg-card-strong",children:[(0,d.jsx)(l.A,{className:"h-3 w-3","aria-hidden":!0}),"Retry now"]}):null]}):null,void 0===B?aL?(0,d.jsxs)(n.Z,{title:"Hub disconnected",className:"mx-auto mt-3 max-w-xl",children:[(0,d.jsx)(n.p,{icon:k.A,note:"The hub is unreachable, so the authorized machine list is unavailable."}),(0,d.jsx)("div",{className:"mt-2 flex justify-center",children:(0,d.jsxs)("button",{type:"button",onClick:x,className:"inline-flex min-h-8 items-center gap-1.5 rounded-md border border-border px-3 text-xs text-foreground transition-colors hover:bg-card-strong",children:[(0,d.jsx)(l.A,{className:"h-3.5 w-3.5","aria-hidden":!0}),"Check again"]})})]}):0!==aK||aL||"idle"!==v&&"connecting"!==v&&"reconnecting"!==v?0===aK?(0,d.jsx)(n.Z,{title:"No machines",className:"mx-auto mt-3 max-w-xl",children:(0,d.jsx)(n.p,{icon:i.A,note:"No machines are available in your authorized fleet."})}):(0,d.jsxs)(n.Z,{title:"Machine not found",className:"mx-auto mt-3 max-w-xl",children:[(0,d.jsx)(n.p,{icon:i.A,note:"This machine is unavailable or outside your access."}),F?(0,d.jsxs)("p",{className:"tnum mt-2 text-center text-xs text-muted-foreground",children:["Requested identifier: ",F]}):null,(0,d.jsx)("div",{className:"mt-2 flex justify-center",children:(0,d.jsx)(f(),{href:"/",className:"inline-flex items-center gap-1.5 rounded-md border border-border px-3 py-1.5 text-xs text-foreground transition-colors hover:bg-card-strong",children:"Back to fleet"})})]}):(0,d.jsx)(n.Z,{title:"Waiting for machines",className:"mx-auto mt-3 max-w-xl",children:(0,d.jsx)(n.p,{icon:i.A,note:"Waiting for the hub to report your authorized machines…"})}):0===av.length?(0,d.jsx)(n.Z,{title:"No metrics selected",className:"mx-auto mt-3 max-w-xl",children:(0,d.jsx)(n.p,{icon:i.A,note:""===at?"No metric families are shared with this hub.":"Choose at least one metric above to draw history."})}):null!==ay&&null===aB?(b=(a=function(a){switch(a.kind){case"unauthorized":return{title:"Session ended",note:"Your session is no longer accepted, so history is hidden.",icon:h.A};case"denied":return{title:"History access denied",note:a.message,icon:h.A};case"missing":return{title:"Machine unavailable",note:a.message,icon:i.A};case"rate-limited":return{title:"History requests limited",note:a.message,icon:j.A};case"unavailable":return{title:"History unavailable",note:a.message,icon:k.A};case"network":return{title:"Hub unreachable",note:"The hub could not be reached for stored history.",icon:k.A};case"invalid":return{title:"Unexpected history response",note:a.message,icon:j.A}}}(ay)).icon,(0,d.jsxs)(n.Z,{title:a.title,className:"mx-auto mt-3 max-w-xl",children:[(0,d.jsx)(n.p,{icon:b,note:a.note}),(0,d.jsxs)("div",{className:"mt-2 flex flex-wrap justify-center gap-2",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>an(a=>a+1),className:"inline-flex items-center gap-1.5 rounded-md border border-border px-3 py-1.5 text-xs text-foreground transition-colors hover:bg-card-strong",children:[(0,d.jsx)(l.A,{className:"h-3.5 w-3.5","aria-hidden":!0}),"Try again"]}),"unauthorized"===ay.kind?(0,d.jsx)(f(),{href:"/login",className:"inline-flex items-center rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-accent-foreground transition-colors hover:bg-accent/90",children:"Sign in"}):null]})]})):(az||aG)&&null===aB?(0,d.jsx)(aJ,{}):null===aB?(0,d.jsx)(n.Z,{title:"History",className:"mx-auto mt-3 max-w-xl",children:(0,d.jsx)(n.p,{icon:i.A,note:"No history is available for this machine in the selected range yet."})}):(e="1s"===(c=aB.result).tier?"1-second RAM summaries":"raw"===c.tier?"raw samples":"10s"===c.tier?"10-second summaries":"1m"===c.tier?"1-minute rollups":"1-hour rollups",(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"mb-3 flex flex-wrap items-baseline gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-foreground",children:[(0,d.jsx)("span",{"aria-hidden":!0,className:`inline-block h-2 w-2 shrink-0 rounded-full ${B.connected?"bg-ok":"bg-crit"}`}),aI(B)]}),(0,d.jsxs)("span",{children:[(0,D.r6)(c.fromMs)," – ",(0,D.r6)(c.toMs)]}),(0,d.jsxs)("span",{className:"tnum",title:e,children:[(0,D.I_)(c.stepMs)," buckets"]}),(0,d.jsx)("div",{className:"ml-auto self-center",children:(0,d.jsx)(aH,{machine:B,result:c,range:N,selectedMetrics:(0,t.Cv)(av,L),hiddenCards:ac,hiddenSeries:ad,coreIds:Y,loadedAt:aB.loadedAt})})]}),c.truncated?(0,d.jsxs)("div",{role:"status",className:"mb-4 flex items-start gap-2 rounded-lg bg-warn-soft px-4 py-2.5 text-xs text-foreground",children:[(0,d.jsx)(j.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-warn","aria-hidden":!0}),(0,d.jsx)("span",{children:"Partial history \xb7 narrow the range for more detail."})]}):null,c.gaps.length>0?(0,d.jsxs)("details",{className:"mb-4 max-w-3xl text-xs text-muted-foreground",children:[(0,d.jsxs)("summary",{className:"inline-flex min-h-8 cursor-pointer items-center gap-2 rounded-md text-warn",children:[(0,d.jsx)(j.A,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-warn","aria-hidden":!0}),(0,d.jsxs)("span",{children:[(0,d.jsx)("strong",{className:"font-medium",children:"Data gaps:"})," ",(0,D.fH)(c.gaps,c.fromMs,c.toMs)]})]}),(0,d.jsxs)("ul",{className:"mt-1.5 flex flex-col gap-1",children:[c.gaps.slice(0,20).map(a=>(0,d.jsxs)("li",{className:"tnum text-xs",children:[(0,D.r6)(a.fromMs)," – ",(0,D.r6)(a.toMs)," (",(0,D.I_)(a.toMs-a.fromMs),"):"," ","dropped"===a.kind?"dropped":"missed",a.reason?` \xb7 ${a.reason}`:"",void 0!==a.droppedRecords?` \xb7 ${a.droppedRecords} record${1===a.droppedRecords?"":"s"}`:""]},`${a.fromMs}-${a.toMs}-${a.kind}`)),c.gaps.length>20?(0,d.jsxs)("li",{className:"text-xs text-muted-foreground",children:["…and ",c.gaps.length-20," more."]}):null]})]}):null,0===c.series.length?(0,d.jsx)(n.Z,{title:"No stored points",className:"mx-auto max-w-xl",children:(0,d.jsx)(n.p,{icon:i.A,note:`No readings for ${void 0===B?"this machine":aI(B)} in ${aE.label.toLowerCase()}.`})}):(0,d.jsx)(ar,{machine:B,result:c,selectedMetrics:av,hiddenCards:ac,hiddenSeries:ad,onToggleSeries:a=>{ab(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),[...c]})},capacityUnits:L,onCapacityUnitChange:(a,b)=>("memory"===a?H:K)(b)})]}))]})})}},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78817:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>k,metadata:()=>i});var d=c(5735),e=c(91986),f=c(88713),g=c(35448),h=c(79173);let i={title:"History"};function j(){return(0,d.jsx)(f.G,{title:"History",children:(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-5 xl:grid-cols-2","aria-busy":"true",children:[(0,d.jsxs)(g.Z,{title:"Loading history",children:[(0,d.jsx)("div",{className:"h-40 animate-pulse rounded-lg bg-card-strong","aria-hidden":!0}),(0,d.jsx)("p",{className:"mt-3 text-xs text-muted-foreground",children:"Preparing the history view…"})]}),(0,d.jsxs)(g.Z,{title:"Preparing charts",children:[(0,d.jsx)("div",{className:"h-40 animate-pulse rounded-lg bg-card-strong","aria-hidden":!0}),(0,d.jsx)("p",{className:"mt-3 text-xs text-muted-foreground",children:"Machine and metric controls appear next."})]})]})})}function k(){return(0,d.jsx)(e.Suspense,{fallback:(0,d.jsx)(j,{}),children:(0,d.jsx)(h.HistoryView,{})})}},79173:(a,b,c)=>{"use strict";c.d(b,{HistoryView:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call HistoryView() from the server but HistoryView is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/triet/Project/rigscope/src/components/history/history-view.tsx","HistoryView")}};var b=require("../../webpack-runtime.js");b.C(a);var c=b.X(0,[266,430,350,161,751,168,894],()=>b(b.s=44857));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/history/page"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"484":{"*":{"id":"70664","name":"*","chunks":[],"async":false}},"1304":{"*":{"id":"60440","name":"*","chunks":[],"async":false}},"1461":{"*":{"id":"86673","name":"*","chunks":[],"async":false}},"1721":{"*":{"id":"40015","name":"*","chunks":[],"async":false}},"2394":{"*":{"id":"76670","name":"*","chunks":[],"async":false}},"2701":{"*":{"id":"7867","name":"*","chunks":[],"async":false}},"2737":{"*":{"id":"4833","name":"*","chunks":[],"async":false}},"
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/history/page"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"484":{"*":{"id":"70664","name":"*","chunks":[],"async":false}},"1304":{"*":{"id":"60440","name":"*","chunks":[],"async":false}},"1461":{"*":{"id":"86673","name":"*","chunks":[],"async":false}},"1721":{"*":{"id":"40015","name":"*","chunks":[],"async":false}},"2394":{"*":{"id":"76670","name":"*","chunks":[],"async":false}},"2701":{"*":{"id":"7867","name":"*","chunks":[],"async":false}},"2737":{"*":{"id":"4833","name":"*","chunks":[],"async":false}},"4581":{"*":{"id":"61335","name":"*","chunks":[],"async":false}},"4777":{"*":{"id":"82265","name":"*","chunks":[],"async":false}},"5000":{"*":{"id":"93022","name":"*","chunks":[],"async":false}},"5773":{"*":{"id":"71793","name":"*","chunks":[],"async":false}},"6869":{"*":{"id":"74661","name":"*","chunks":[],"async":false}},"7044":{"*":{"id":"9479","name":"*","chunks":[],"async":false}},"7121":{"*":{"id":"35421","name":"*","chunks":[],"async":false}},"7123":{"*":{"id":"81921","name":"*","chunks":[],"async":false}},"7281":{"*":{"id":"81931","name":"*","chunks":[],"async":false}},"7339":{"*":{"id":"30847","name":"*","chunks":[],"async":false}},"8616":{"*":{"id":"84342","name":"*","chunks":[],"async":false}},"8649":{"*":{"id":"53957","name":"*","chunks":[],"async":false}},"8887":{"*":{"id":"85909","name":"*","chunks":[],"async":false}},"9904":{"*":{"id":"85378","name":"*","chunks":[],"async":false}},"9939":{"*":{"id":"58910","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/home/triet/Project/rigscope/node_modules/next/dist/client/components/builtin/global-error.js":{"id":7123,"name":"*","chunks":[],"async":false},"/home/triet/Project/rigscope/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":7123,"name":"*","chunks":[],"async":false},"/home/triet/Project/rigscope/node_modules/next/dist/client/components/client-page.js":{"id":1304,"name":"*","chunks":[],"async":false},"/home/triet/Project/rigscope/node_modules/next/dist/esm/client/components/client-page.js":{"id":1304,"name":"*","chunks":[],"async":false},"/home/triet/Project/rigscope/node_modules/next/dist/client/components/client-segment.js":{"id":8616,"name":"*","chunks":[],"async":false},"/home/triet/Project/rigscope/node_modules/next/dist/esm/client/components/client-segment.js":{"id":8616,"name":"*","chunks":[],"async":false},"/home/triet/Project/rigscope/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":4777,"name":"*","chunks":[],"async":false},"/home/triet/Project/rigscope/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":4777,"name":"*","chunks":[],"async":false},"/home/triet/Project/rigscope/node_modules/next/dist/client/components/layout-router.js":{"id":7121,"name":"*","chunks":[],"async":false},"/home/triet/Project/rigscope/node_modules/next/dist/esm/client/components/layout-router.js":{"id":7121,"name":"*","chunks":[],"async":false},"/home/triet/Project/rigscope/node_modules/next/dist/client/components/render-from-template-context.js":{"id":4581,"name":"*","chunks":[],"async":false},"/home/triet/Project/rigscope/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":4581,"name":"*","chunks":[],"async":false},"/home/triet/Project/rigscope/node_modules/next/dist/lib/framework/boundary-components.js":{"id":484,"name":"*","chunks":[],"async":false},"/home/triet/Project/rigscope/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":484,"name":"*","chunks":[],"async":false},"/home/triet/Project/rigscope/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":6869,"name":"*","chunks":[],"async":false},"/home/triet/Project/rigscope/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":6869,"name":"*","chunks":[],"async":false},"/home/triet/Project/rigscope/src/app/globals.css":{"id":1743,"name":"*","chunks":["939","static/chunks/939-92930fde48061e20.js","177","static/chunks/app/layout-4feff677c4071745.js"],"async":false},"/home/triet/Project/rigscope/src/components/theme-provider.tsx":{"id":2737,"name":"*","chunks":["939","static/chunks/939-92930fde48061e20.js","177","static/chunks/app/layout-4feff677c4071745.js"],"async":false},"/home/triet/Project/rigscope/src/live/live-provider.tsx":{"id":9939,"name":"*","chunks":["939","static/chunks/939-92930fde48061e20.js","177","static/chunks/app/layout-4feff677c4071745.js"],"async":false},"/home/triet/Project/rigscope/src/components/alerts/alerts-view.tsx":{"id":1461,"name":"*","chunks":[],"async":false},"/home/triet/Project/rigscope/src/components/admin/administration-view.tsx":{"id":7044,"name":"*","chunks":[],"async":false},"/home/triet/Project/rigscope/src/components/resources/connections-panels.tsx":{"id":5773,"name":"*","chunks":[],"async":false},"/home/triet/Project/rigscope/src/components/live/login-view.tsx":{"id":5000,"name":"*","chunks":[],"async":false},"/home/triet/Project/rigscope/src/components/history/history-view.tsx":{"id":8649,"name":"*","chunks":["944","static/chunks/944-a7fe1d96f1d20531.js","939","static/chunks/939-92930fde48061e20.js","103","static/chunks/103-976549d31902404e.js","408","static/chunks/408-351fe4a1e9a2d556.js","429","static/chunks/app/history/page-adc25194b30c689d.js"],"async":false},"/home/triet/Project/rigscope/src/components/live/machine-navigation.tsx":{"id":1721,"name":"*","chunks":["944","static/chunks/944-a7fe1d96f1d20531.js","939","static/chunks/939-92930fde48061e20.js","103","static/chunks/103-976549d31902404e.js","408","static/chunks/408-351fe4a1e9a2d556.js","429","static/chunks/app/history/page-adc25194b30c689d.js"],"async":false},"/home/triet/Project/rigscope/src/components/shell/mobile-navigation.tsx":{"id":9904,"name":"*","chunks":["944","static/chunks/944-a7fe1d96f1d20531.js","939","static/chunks/939-92930fde48061e20.js","103","static/chunks/103-976549d31902404e.js","408","static/chunks/408-351fe4a1e9a2d556.js","429","static/chunks/app/history/page-adc25194b30c689d.js"],"async":false},"/home/triet/Project/rigscope/src/components/shell/sidebar.tsx":{"id":2701,"name":"*","chunks":["944","static/chunks/944-a7fe1d96f1d20531.js","939","static/chunks/939-92930fde48061e20.js","103","static/chunks/103-976549d31902404e.js","408","static/chunks/408-351fe4a1e9a2d556.js","429","static/chunks/app/history/page-adc25194b30c689d.js"],"async":false},"/home/triet/Project/rigscope/src/components/theme-toggle.tsx":{"id":2394,"name":"*","chunks":["944","static/chunks/944-a7fe1d96f1d20531.js","939","static/chunks/939-92930fde48061e20.js","103","static/chunks/103-976549d31902404e.js","408","static/chunks/408-351fe4a1e9a2d556.js","429","static/chunks/app/history/page-adc25194b30c689d.js"],"async":false},"/home/triet/Project/rigscope/src/components/live/fleet-view.tsx":{"id":7281,"name":"*","chunks":["944","static/chunks/944-a7fe1d96f1d20531.js","939","static/chunks/939-92930fde48061e20.js","103","static/chunks/103-976549d31902404e.js","130","static/chunks/130-e940915010276f88.js","974","static/chunks/app/page-9c9c89166eee4c92.js"],"async":false},"/home/triet/Project/rigscope/src/components/live/machine-view.tsx":{"id":8887,"name":"*","chunks":[],"async":false},"/home/triet/Project/rigscope/src/components/processes/processes-view.tsx":{"id":7339,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/home/triet/Project/rigscope/src/":[],"/home/triet/Project/rigscope/src/app/layout":[{"inlined":false,"path":"static/css/2abef6d49c1c2970.css"}],"/home/triet/Project/rigscope/src/app/page":[],"/home/triet/Project/rigscope/src/app/history/page":[]},"rscModuleMapping":{"484":{"*":{"id":"98562","name":"*","chunks":[],"async":false}},"1304":{"*":{"id":"15098","name":"*","chunks":[],"async":false}},"1461":{"*":{"id":"29953","name":"*","chunks":[],"async":false}},"1721":{"*":{"id":"28565","name":"*","chunks":[],"async":false}},"1743":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"2394":{"*":{"id":"46568","name":"*","chunks":[],"async":false}},"2701":{"*":{"id":"50369","name":"*","chunks":[],"async":false}},"2737":{"*":{"id":"65223","name":"*","chunks":[],"async":false}},"4581":{"*":{"id":"16237","name":"*","chunks":[],"async":false}},"4777":{"*":{"id":"33859","name":"*","chunks":[],"async":false}},"5000":{"*":{"id":"52604","name":"*","chunks":[],"async":false}},"5773":{"*":{"id":"37147","name":"*","chunks":[],"async":false}},"6869":{"*":{"id":"36675","name":"*","chunks":[],"async":false}},"7044":{"*":{"id":"2902","name":"*","chunks":[],"async":false}},"7121":{"*":{"id":"98099","name":"*","chunks":[],"async":false}},"7123":{"*":{"id":"95547","name":"*","chunks":[],"async":false}},"7281":{"*":{"id":"22993","name":"*","chunks":[],"async":false}},"7339":{"*":{"id":"89893","name":"*","chunks":[],"async":false}},"8616":{"*":{"id":"47644","name":"*","chunks":[],"async":false}},"8649":{"*":{"id":"79173","name":"*","chunks":[],"async":false}},"8887":{"*":{"id":"73132","name":"*","chunks":[],"async":false}},"9904":{"*":{"id":"64792","name":"*","chunks":[],"async":false}},"9939":{"*":{"id":"89604","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/f5d3162842dcac31.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-9ca43f4ce1bb8938.js"/><script src="/_next/static/chunks/4bd1b696-c7408084347438ae.js" async=""></script><script src="/_next/static/chunks/794-ceeb732a1a81bc27.js" async=""></script><script src="/_next/static/chunks/main-app-f92328c8950d2e53.js" async=""></script><script src="/_next/static/chunks/939-514e554087419c71.js" async=""></script><script src="/_next/static/chunks/app/layout-4feff677c4071745.js" async=""></script><script src="/_next/static/chunks/944-a7fe1d96f1d20531.js" async=""></script><script src="/_next/static/chunks/103-976549d31902404e.js" async=""></script><script src="/_next/static/chunks/408-9fdba9e4e956ef08.js" async=""></script><script src="/_next/static/chunks/app/history/page-a25ba8fab7bd7cb9.js" async=""></script><title>History — Rigscope</title><meta name="description" content="Self-hosted remote system monitor — a live fleet of collectors behind one authenticated hub."/><link rel="icon" href="/icon.svg?3b3fa3229e2d0d7a" type="image/svg+xml" sizes="any"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","dark",null,["light","dark"],null,true,true)</script><!--$!--><template data-dgst=""></template><div class="relative flex h-dvh overflow-hidden bg-background text-foreground"><a href="#main-content" class="sr-only z-50 rounded-md bg-card px-4 py-2 text-foreground focus:not-sr-only focus:absolute focus:start-2 focus:top-2 focus:outline-2 focus:outline-accent">Skip to content</a><div class="hidden md:flex"><aside class="flex shrink-0 flex-col border-r border-border bg-background w-56"><a aria-label="Rigscope" class="flex h-14 shrink-0 items-center gap-2.5 border-b border-border px-3 md:px-5" href="/"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="h-5 w-5 shrink-0 text-accent"><path d="M8 3H4v18h4M16 3h4v18h-4"></path><path d="m8 15 4-6 4 3M8 8h.01M16 17h.01"></path></svg><span class="hidden text-sm font-semibold tracking-tight text-foreground md:inline">Rigscope</span></a><nav aria-label="Primary" class="flex min-h-0 flex-1 flex-col overflow-y-auto p-2 md:p-3"><a title="Fleet" aria-label="Fleet" class="flex min-h-11 min-w-0 md:min-h-9 items-center gap-3 rounded-md border px-2 text-sm transition-colors md:px-3 border-transparent text-muted-foreground hover:bg-card-strong hover:text-foreground" href="/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-server h-4 w-4 shrink-0" aria-hidden="true"><rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect><rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect><line x1="6" x2="6.01" y1="6" y2="6"></line><line x1="6" x2="6.01" y1="18" y2="18"></line></svg><span class="inline">Fleet</span></a><div class="flex shrink-0 flex-col gap-1 border-t border-border pt-3"><a title="Alerts" aria-label="Alerts" class="flex min-h-11 min-w-0 md:min-h-9 items-center gap-3 rounded-md border px-2 text-sm transition-colors md:px-3 border-transparent text-muted-foreground hover:bg-card-strong hover:text-foreground" href="/alerts"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-bell h-4 w-4 shrink-0" aria-hidden="true"><path d="M10.268 21a2 2 0 0 0 3.464 0"></path><path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"></path></svg><span class="inline">Alerts</span></a><a title="Connections" aria-label="Connections" class="flex min-h-11 min-w-0 md:min-h-9 items-center gap-3 rounded-md border px-2 text-sm transition-colors md:px-3 border-transparent text-muted-foreground hover:bg-card-strong hover:text-foreground" href="/connections"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cable h-4 w-4 shrink-0" aria-hidden="true"><path d="M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1"></path><path d="M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9"></path><path d="M21 21v-2h-4"></path><path d="M3 5h4V3"></path><path d="M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3"></path></svg><span class="inline">Connections</span></a></div></nav><footer class="shrink-0 border-t border-border p-3"><div class="flex items-center gap-2 px-3 text-xs"><span class="inline-block h-2 w-2 shrink-0 rounded-full bg-muted-foreground/50" aria-hidden="true"></span><span class="truncate" role="status" aria-label="Live feed status: Checking session…">Checking session…</span></div></footer></aside></div><div class="flex min-w-0 flex-1 flex-col"><header class="flex min-h-14 shrink-0 flex-wrap items-center justify-between gap-2 border-b border-border px-4 py-2 md:px-6"><div class="flex min-w-0 items-center gap-2"><button type="button" aria-label="Open navigation" aria-haspopup="dialog" class="flex h-11 w-11 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-card-strong md:hidden"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-menu h-5 w-5" aria-hidden="true"><line x1="4" x2="20" y1="12" y2="12"></line><line x1="4" x2="20" y1="6" y2="6"></line><line x1="4" x2="20" y1="18" y2="18"></line></svg></button><dialog aria-label="Navigation" class="fixed inset-y-0 left-0 m-0 h-dvh max-h-none w-[min(20rem,90vw)] max-w-none border-r border-border bg-background p-0 text-foreground backdrop:bg-black/50"><div class="flex h-full flex-col"><button type="button" aria-label="Close navigation" autofocus="" class="absolute right-2 top-1.5 z-10 flex h-11 w-11 items-center justify-center rounded-md hover:bg-card-strong"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-x h-5 w-5" aria-hidden="true"><path d="M18 6 6 18"></path><path d="m6 6 12 12"></path></svg></button><div class="flex min-h-0 flex-1"><aside class="flex shrink-0 flex-col border-r border-border bg-background w-full"><a aria-label="Rigscope" class="flex h-14 shrink-0 items-center gap-2.5 border-b border-border px-3 md:px-5" href="/"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="h-5 w-5 shrink-0 text-accent"><path d="M8 3H4v18h4M16 3h4v18h-4"></path><path d="m8 15 4-6 4 3M8 8h.01M16 17h.01"></path></svg><span class="hidden text-sm font-semibold tracking-tight text-foreground md:inline">Rigscope</span></a><nav aria-label="Primary" class="flex min-h-0 flex-1 flex-col overflow-y-auto p-2 md:p-3"><a title="Fleet" aria-label="Fleet" class="flex min-h-11 min-w-0 md:min-h-9 items-center gap-3 rounded-md border px-2 text-sm transition-colors md:px-3 border-transparent text-muted-foreground hover:bg-card-strong hover:text-foreground" href="/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-server h-4 w-4 shrink-0" aria-hidden="true"><rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect><rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect><line x1="6" x2="6.01" y1="6" y2="6"></line><line x1="6" x2="6.01" y1="18" y2="18"></line></svg><span class="inline">Fleet</span></a><div class="flex shrink-0 flex-col gap-1 border-t border-border pt-3"><a title="Alerts" aria-label="Alerts" class="flex min-h-11 min-w-0 md:min-h-9 items-center gap-3 rounded-md border px-2 text-sm transition-colors md:px-3 border-transparent text-muted-foreground hover:bg-card-strong hover:text-foreground" href="/alerts"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-bell h-4 w-4 shrink-0" aria-hidden="true"><path d="M10.268 21a2 2 0 0 0 3.464 0"></path><path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"></path></svg><span class="inline">Alerts</span></a><a title="Connections" aria-label="Connections" class="flex min-h-11 min-w-0 md:min-h-9 items-center gap-3 rounded-md border px-2 text-sm transition-colors md:px-3 border-transparent text-muted-foreground hover:bg-card-strong hover:text-foreground" href="/connections"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cable h-4 w-4 shrink-0" aria-hidden="true"><path d="M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1"></path><path d="M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9"></path><path d="M21 21v-2h-4"></path><path d="M3 5h4V3"></path><path d="M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3"></path></svg><span class="inline">Connections</span></a></div></nav><footer class="shrink-0 border-t border-border p-3"><div class="flex items-center gap-2 px-3 text-xs"><span class="inline-block h-2 w-2 shrink-0 rounded-full bg-muted-foreground/50" aria-hidden="true"></span><span class="truncate" role="status" aria-label="Live feed status: Checking session…">Checking session…</span></div></footer></aside></div></div></dialog><h1 class="truncate text-lg font-semibold tracking-tight">History</h1></div><div class="flex items-center gap-3"><button type="button" aria-label="Toggle theme" class="flex h-9 w-9 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-selected hover:text-foreground"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sun h-4.5 w-4.5 dark:hidden"><circle cx="12" cy="12" r="4"></circle><path d="M12 2v2"></path><path d="M12 20v2"></path><path d="m4.93 4.93 1.41 1.41"></path><path d="m17.66 17.66 1.41 1.41"></path><path d="M2 12h2"></path><path d="M20 12h2"></path><path d="m6.34 17.66-1.41 1.41"></path><path d="m19.07 4.93-1.41 1.41"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon hidden h-4.5 w-4.5 dark:block"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path></svg></button></div></header><main id="main-content" tabindex="-1" class="relative min-h-0 min-w-0 flex-1 overflow-x-hidden overscroll-contain p-4 outline-offset-[-2px] md:p-6 overflow-y-auto"><div class="mx-auto flex w-full min-w-0 max-w-[1500px] flex-col"><div class="grid grid-cols-1 gap-5 xl:grid-cols-2" aria-busy="true"><section class="flex min-w-0 flex-col rounded-xl border border-border bg-card p-5"><div class="flex shrink-0 items-center justify-between gap-4"><h2 class="text-sm font-medium tracking-tight">Loading history</h2></div><div class="mt-4 flex min-h-0 flex-1 flex-col"><div class="h-40 animate-pulse rounded-lg bg-card-strong" aria-hidden="true"></div><p class="mt-3 text-xs text-muted-foreground">Preparing the history view…</p></div></section><section class="flex min-w-0 flex-col rounded-xl border border-border bg-card p-5"><div class="flex shrink-0 items-center justify-between gap-4"><h2 class="text-sm font-medium tracking-tight">Preparing charts</h2></div><div class="mt-4 flex min-h-0 flex-1 flex-col"><div class="h-40 animate-pulse rounded-lg bg-card-strong" aria-hidden="true"></div><p class="mt-3 text-xs text-muted-foreground">Machine and metric controls appear next.</p></div></section></div></div></main></div></div><!--/$--><!--$--><!--/$--><script src="/_next/static/chunks/webpack-9ca43f4ce1bb8938.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:\"static/chunks/939-514e554087419c71.js\"\n3:\"static/chunks/app/layout-4feff677c4071745.js\"\n4:I[2737,[\"939\",\"$2\",\"177\",\"$3\"],\"ThemeProvider\"]\n5:I[9939,[\"939\",\"$2\",\"177\",\"$3\"],\"LiveProvider\"]\n6:I[7121,[],\"\"]\n7:I[4581,[],\"\"]\nb:\"$Sreact.suspense\"\nc:\"static/chunks/944-a7fe1d96f1d20531.js\"\nd:\"static/chunks/103-976549d31902404e.js\"\ne:\"static/chunks/408-9fdba9e4e956ef08.js\"\nf:\"static/chunks/app/history/page-a25ba8fab7bd7cb9.js\"\n10:I[2701,[\"944\",\"$c\",\"939\",\"$2\",\"103\",\"$d\",\"408\",\"$e\",\"429\",\"$f\"],\"Sidebar\"]\n11:\"MobileNavigation\"\n12:I[9904,[\"944\",\"$c\",\"939\",\"$2\",\"103\",\"$d\",\"408\",\"$e\",\"429\",\"$f\"],\"$11\"]\n13:I[2394,[\"944\",\"$c\",\"939\",\"$2\",\"103\",\"$d\",\"408\",\"$e\",\"429\",\"$f\"],\"ThemeToggle\"]\n18:\"ViewportBoundary\"\n19:I[484,[],\"$18\"]\n1b:\"MetadataBoundary\"\n1c:I[484,[],\"$1b\"]\n1e:I[7123,[],\"default\",1]\n:HL[\"/_next/static/css/f5d3162842dcac31.css\",\"style\"]\n9:X\n"])</script><script>self.__next_f.push([1,"a:[[\"children\",{\"s\":\"__PAGE__\",\"h\":512,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$b\",null,{\"fallback\":[\"$\",\"div\",null,{\"className\":\"relative flex h-dvh overflow-hidden bg-background text-foreground\",\"children\":[[\"$\",\"a\",null,{\"href\":\"#main-content\",\"className\":\"sr-only z-50 rounded-md bg-card px-4 py-2 text-foreground focus:not-sr-only focus:absolute focus:start-2 focus:top-2 focus:outline-2 focus:outline-accent\",\"children\":\"Skip to content\"}],[\"$\",\"div\",null,{\"className\":\"hidden md:flex\",\"children\":[\"$\",\"$L10\",null,{\"machineId\":\"$undefined\",\"machineView\":\"$undefined\"}]}],[\"$\",\"div\",null,{\"className\":\"flex min-w-0 flex-1 flex-col\",\"children\":[[\"$\",\"header\",null,{\"className\":\"flex min-h-14 shrink-0 flex-wrap items-center justify-between gap-2 border-b border-border px-4 py-2 md:px-6\",\"children\":[[\"$\",\"div\",null,{\"className\":\"flex min-w-0 items-center gap-2\",\"children\":[[\"$\",\"$L12\",null,{\"machineId\":\"$undefined\",\"machineView\":\"$undefined\"}],[\"$\",\"h1\",null,{\"className\":\"truncate text-lg font-semibold tracking-tight\",\"children\":\"History\"}]]}],[\"$\",\"div\",null,{\"className\":\"flex items-center gap-3\",\"children\":[null,[\"$\",\"$L13\",null,{}]]}]]}],[\"$\",\"main\",null,{\"id\":\"main-content\",\"tabIndex\":-1,\"className\":\"relative min-h-0 min-w-0 flex-1 overflow-x-hidden overscroll-contain p-4 outline-offset-[-2px] md:p-6 overflow-y-auto\",\"children\":[\"$\",\"div\",null,{\"className\":\"mx-auto flex w-full min-w-0 max-w-[1500px] flex-col\",\"children\":[\"$\",\"div\",null,{\"className\":\"grid grid-cols-1 gap-5 xl:grid-cols-2\",\"aria-busy\":\"true\",\"children\":[[\"$\",\"section\",null,{\"className\":\"flex min-w-0 flex-col rounded-xl border border-border bg-card p-5\",\"children\":[[\"$\",\"div\",null,{\"className\":\"flex shrink-0 items-center justify-between gap-4\",\"children\":[[\"$\",\"h2\",null,{\"className\":\"text-sm font-medium tracking-tight\",\"children\":\"Loading history\"}],null]}],[\"$\",\"div\",null,{\"className\":\"mt-4 flex min-h-0 flex-1 flex-col\",\"children\":[[\"$\",\"div\",null,{\"className\":\"h-40 animate-pulse rounded-lg bg-card-strong\",\"aria-hidden\":true}],[\"$\",\"p\",null,{\"className\":\"mt-3 text-xs text-muted-foreground\",\"children\":\"Preparing the history view…\"}]]}]]}],[\"$\",\"section\",null,{\"className\":\"flex min-w-0 flex-col rounded-xl border border-border bg-card p-5\",\"children\":[[\"$\",\"div\",null,{\"className\":\"flex shrink-0 items-center justify-between gap-4\",\"children\":[[\"$\",\"h2\",null,{\"className\":\"text-sm font-medium tracking-tight\",\"children\":\"Preparing charts\"}],null]}],[\"$\",\"div\",null,{\"className\":\"mt-4 flex min-h-0 flex-1 flex-col\",\"children\":[\"$L14\",\"$L15\"]}]]}]]}]}]}]]}]]}],\"children\":\"$L16\"}],null,\"$L17\"]}],\"p\":false,\"v\":null}}]]\n"])</script><script>self.__next_f.push([1,"8:[[\"children\",{\"s\":\"history\",\"h\":512,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],\"p\":false,\"v\":\"$9\"},\"c\":\"$Qa\"}]]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"history\"],\"q\":\"\",\"i\":false,\"t\":{\"t\":{\"s\":\"\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/f5d3162842dcac31.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L4\",null,{\"attribute\":\"class\",\"defaultTheme\":\"dark\",\"enableSystem\":true,\"children\":[\"$\",\"$L5\",null,{\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}]}]]}],\"p\":false,\"v\":null},\"c\":\"$Q8\"},\"h\":{\"r\":[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L19\",null,{\"children\":\"$L1a\"}],[\"$\",\"$L1c\",null,{\"children\":[[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$b\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L1d\"}]}],null]}],null]}],\"p\":false,\"v\":null}},\"m\":\"$undefined\",\"G\":[\"$1e\",[]],\"S\":true,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"ip43TIgmaByEBn2GFtvfO\"}\n"])</script><script>self.__next_f.push([1,"1f:I[2939,[\"944\",\"$c\",\"939\",\"$2\",\"103\",\"$d\",\"408\",\"$e\",\"429\",\"$f\"],\"HistoryView\"]\n20:I[484,[],\"OutletBoundary\"]\n9:C\n14:[\"$\",\"div\",null,{\"className\":\"h-40 animate-pulse rounded-lg bg-card-strong\",\"aria-hidden\":true}]\n15:[\"$\",\"p\",null,{\"className\":\"mt-3 text-xs text-muted-foreground\",\"children\":\"Machine and metric controls appear next.\"}]\n16:[\"$\",\"$L1f\",null,{}]\n17:[\"$\",\"$L20\",null,{\"children\":[\"$\",\"$b\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@21\"}]}]\n"])</script><script>self.__next_f.push([1,"1a:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"22:I[6869,[],\"IconMark\"]\n1d:[[\"$\",\"title\",\"0\",{\"children\":\"History — Rigscope\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Self-hosted remote system monitor — a live fleet of collectors behind one authenticated hub.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/icon.svg?3b3fa3229e2d0d7a\",\"type\":\"image/svg+xml\",\"sizes\":\"any\"}],[\"$\",\"$L22\",\"3\",{}]]\n21:null\n"])</script></body></html>
|
|
1
|
+
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/2abef6d49c1c2970.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-9ca43f4ce1bb8938.js"/><script src="/_next/static/chunks/4bd1b696-c7408084347438ae.js" async=""></script><script src="/_next/static/chunks/794-ceeb732a1a81bc27.js" async=""></script><script src="/_next/static/chunks/main-app-f92328c8950d2e53.js" async=""></script><script src="/_next/static/chunks/939-92930fde48061e20.js" async=""></script><script src="/_next/static/chunks/app/layout-4feff677c4071745.js" async=""></script><script src="/_next/static/chunks/944-a7fe1d96f1d20531.js" async=""></script><script src="/_next/static/chunks/103-976549d31902404e.js" async=""></script><script src="/_next/static/chunks/408-351fe4a1e9a2d556.js" async=""></script><script src="/_next/static/chunks/app/history/page-adc25194b30c689d.js" async=""></script><title>History — Rigscope</title><meta name="description" content="Self-hosted remote system monitor — a live fleet of collectors behind one authenticated hub."/><link rel="icon" href="/icon.svg?3b3fa3229e2d0d7a" type="image/svg+xml" sizes="any"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","dark",null,["light","dark"],null,true,true)</script><!--$!--><template data-dgst=""></template><div class="relative flex h-dvh overflow-hidden bg-background text-foreground"><a href="#main-content" class="sr-only z-50 rounded-md bg-card px-4 py-2 text-foreground focus:not-sr-only focus:absolute focus:start-2 focus:top-2 focus:outline-2 focus:outline-accent">Skip to content</a><div class="hidden md:flex"><aside class="flex shrink-0 flex-col border-r border-border bg-background w-56"><a aria-label="Rigscope" class="flex h-14 shrink-0 items-center gap-2.5 border-b border-border px-3 md:px-5" href="/"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="h-5 w-5 shrink-0 text-accent"><path d="M8 3H4v18h4M16 3h4v18h-4"></path><path d="m8 15 4-6 4 3M8 8h.01M16 17h.01"></path></svg><span class="hidden text-sm font-semibold tracking-tight text-foreground md:inline">Rigscope</span></a><nav aria-label="Primary" class="flex min-h-0 flex-1 flex-col overflow-y-auto p-2 md:p-3"><a title="Fleet" aria-label="Fleet" class="flex min-h-11 min-w-0 md:min-h-9 items-center gap-3 rounded-md border px-2 text-sm transition-colors md:px-3 border-transparent text-muted-foreground hover:bg-card-strong hover:text-foreground" href="/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-server h-4 w-4 shrink-0" aria-hidden="true"><rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect><rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect><line x1="6" x2="6.01" y1="6" y2="6"></line><line x1="6" x2="6.01" y1="18" y2="18"></line></svg><span class="inline">Fleet</span></a><div class="flex shrink-0 flex-col gap-1 border-t border-border pt-3"><a title="Alerts" aria-label="Alerts" class="flex min-h-11 min-w-0 md:min-h-9 items-center gap-3 rounded-md border px-2 text-sm transition-colors md:px-3 border-transparent text-muted-foreground hover:bg-card-strong hover:text-foreground" href="/alerts"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-bell h-4 w-4 shrink-0" aria-hidden="true"><path d="M10.268 21a2 2 0 0 0 3.464 0"></path><path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"></path></svg><span class="inline">Alerts</span></a><a title="Connections" aria-label="Connections" class="flex min-h-11 min-w-0 md:min-h-9 items-center gap-3 rounded-md border px-2 text-sm transition-colors md:px-3 border-transparent text-muted-foreground hover:bg-card-strong hover:text-foreground" href="/connections"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cable h-4 w-4 shrink-0" aria-hidden="true"><path d="M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1"></path><path d="M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9"></path><path d="M21 21v-2h-4"></path><path d="M3 5h4V3"></path><path d="M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3"></path></svg><span class="inline">Connections</span></a></div></nav><footer class="shrink-0 border-t border-border p-3"><div class="flex items-center gap-2 px-3 text-xs"><span class="inline-block h-2 w-2 shrink-0 rounded-full bg-muted-foreground/50" aria-hidden="true"></span><span class="truncate" role="status" aria-label="Live feed status: Checking session…">Checking session…</span></div></footer></aside></div><div class="flex min-w-0 flex-1 flex-col"><header class="flex min-h-14 shrink-0 flex-wrap items-center justify-between gap-2 border-b border-border px-4 py-2 md:px-6"><div class="flex min-w-0 items-center gap-2"><button type="button" aria-label="Open navigation" aria-haspopup="dialog" class="flex h-11 w-11 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-card-strong md:hidden"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-menu h-5 w-5" aria-hidden="true"><line x1="4" x2="20" y1="12" y2="12"></line><line x1="4" x2="20" y1="6" y2="6"></line><line x1="4" x2="20" y1="18" y2="18"></line></svg></button><dialog aria-label="Navigation" class="fixed inset-y-0 left-0 m-0 h-dvh max-h-none w-[min(20rem,90vw)] max-w-none border-r border-border bg-background p-0 text-foreground backdrop:bg-black/50"><div class="flex h-full flex-col"><button type="button" aria-label="Close navigation" autofocus="" class="absolute right-2 top-1.5 z-10 flex h-11 w-11 items-center justify-center rounded-md hover:bg-card-strong"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-x h-5 w-5" aria-hidden="true"><path d="M18 6 6 18"></path><path d="m6 6 12 12"></path></svg></button><div class="flex min-h-0 flex-1"><aside class="flex shrink-0 flex-col border-r border-border bg-background w-full"><a aria-label="Rigscope" class="flex h-14 shrink-0 items-center gap-2.5 border-b border-border px-3 md:px-5" href="/"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="h-5 w-5 shrink-0 text-accent"><path d="M8 3H4v18h4M16 3h4v18h-4"></path><path d="m8 15 4-6 4 3M8 8h.01M16 17h.01"></path></svg><span class="hidden text-sm font-semibold tracking-tight text-foreground md:inline">Rigscope</span></a><nav aria-label="Primary" class="flex min-h-0 flex-1 flex-col overflow-y-auto p-2 md:p-3"><a title="Fleet" aria-label="Fleet" class="flex min-h-11 min-w-0 md:min-h-9 items-center gap-3 rounded-md border px-2 text-sm transition-colors md:px-3 border-transparent text-muted-foreground hover:bg-card-strong hover:text-foreground" href="/"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-server h-4 w-4 shrink-0" aria-hidden="true"><rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect><rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect><line x1="6" x2="6.01" y1="6" y2="6"></line><line x1="6" x2="6.01" y1="18" y2="18"></line></svg><span class="inline">Fleet</span></a><div class="flex shrink-0 flex-col gap-1 border-t border-border pt-3"><a title="Alerts" aria-label="Alerts" class="flex min-h-11 min-w-0 md:min-h-9 items-center gap-3 rounded-md border px-2 text-sm transition-colors md:px-3 border-transparent text-muted-foreground hover:bg-card-strong hover:text-foreground" href="/alerts"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-bell h-4 w-4 shrink-0" aria-hidden="true"><path d="M10.268 21a2 2 0 0 0 3.464 0"></path><path d="M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"></path></svg><span class="inline">Alerts</span></a><a title="Connections" aria-label="Connections" class="flex min-h-11 min-w-0 md:min-h-9 items-center gap-3 rounded-md border px-2 text-sm transition-colors md:px-3 border-transparent text-muted-foreground hover:bg-card-strong hover:text-foreground" href="/connections"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cable h-4 w-4 shrink-0" aria-hidden="true"><path d="M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1"></path><path d="M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9"></path><path d="M21 21v-2h-4"></path><path d="M3 5h4V3"></path><path d="M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3"></path></svg><span class="inline">Connections</span></a></div></nav><footer class="shrink-0 border-t border-border p-3"><div class="flex items-center gap-2 px-3 text-xs"><span class="inline-block h-2 w-2 shrink-0 rounded-full bg-muted-foreground/50" aria-hidden="true"></span><span class="truncate" role="status" aria-label="Live feed status: Checking session…">Checking session…</span></div></footer></aside></div></div></dialog><h1 class="truncate text-lg font-semibold tracking-tight">History</h1></div><div class="flex items-center gap-3"><button type="button" aria-label="Toggle theme" class="flex h-9 w-9 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-selected hover:text-foreground"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sun h-4.5 w-4.5 dark:hidden"><circle cx="12" cy="12" r="4"></circle><path d="M12 2v2"></path><path d="M12 20v2"></path><path d="m4.93 4.93 1.41 1.41"></path><path d="m17.66 17.66 1.41 1.41"></path><path d="M2 12h2"></path><path d="M20 12h2"></path><path d="m6.34 17.66-1.41 1.41"></path><path d="m19.07 4.93-1.41 1.41"></path></svg><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon hidden h-4.5 w-4.5 dark:block"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"></path></svg></button></div></header><main id="main-content" tabindex="-1" class="relative min-h-0 min-w-0 flex-1 overflow-x-hidden overscroll-contain p-4 outline-offset-[-2px] md:p-6 overflow-y-auto"><div class="mx-auto flex w-full min-w-0 max-w-[1500px] flex-col"><div class="grid grid-cols-1 gap-5 xl:grid-cols-2" aria-busy="true"><section class="flex min-w-0 flex-col rounded-xl border border-border bg-card p-5"><div class="flex shrink-0 items-center justify-between gap-4"><h2 class="text-sm font-medium tracking-tight">Loading history</h2></div><div class="mt-4 flex min-h-0 flex-1 flex-col"><div class="h-40 animate-pulse rounded-lg bg-card-strong" aria-hidden="true"></div><p class="mt-3 text-xs text-muted-foreground">Preparing the history view…</p></div></section><section class="flex min-w-0 flex-col rounded-xl border border-border bg-card p-5"><div class="flex shrink-0 items-center justify-between gap-4"><h2 class="text-sm font-medium tracking-tight">Preparing charts</h2></div><div class="mt-4 flex min-h-0 flex-1 flex-col"><div class="h-40 animate-pulse rounded-lg bg-card-strong" aria-hidden="true"></div><p class="mt-3 text-xs text-muted-foreground">Machine and metric controls appear next.</p></div></section></div></div></main></div></div><!--/$--><!--$--><!--/$--><script src="/_next/static/chunks/webpack-9ca43f4ce1bb8938.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:\"static/chunks/939-92930fde48061e20.js\"\n3:\"static/chunks/app/layout-4feff677c4071745.js\"\n4:I[2737,[\"939\",\"$2\",\"177\",\"$3\"],\"ThemeProvider\"]\n5:I[9939,[\"939\",\"$2\",\"177\",\"$3\"],\"LiveProvider\"]\n6:I[7121,[],\"\"]\n7:I[4581,[],\"\"]\nb:\"$Sreact.suspense\"\nc:\"static/chunks/944-a7fe1d96f1d20531.js\"\nd:\"static/chunks/103-976549d31902404e.js\"\ne:\"static/chunks/408-351fe4a1e9a2d556.js\"\nf:\"static/chunks/app/history/page-adc25194b30c689d.js\"\n10:I[2701,[\"944\",\"$c\",\"939\",\"$2\",\"103\",\"$d\",\"408\",\"$e\",\"429\",\"$f\"],\"Sidebar\"]\n11:\"MobileNavigation\"\n12:I[9904,[\"944\",\"$c\",\"939\",\"$2\",\"103\",\"$d\",\"408\",\"$e\",\"429\",\"$f\"],\"$11\"]\n13:I[2394,[\"944\",\"$c\",\"939\",\"$2\",\"103\",\"$d\",\"408\",\"$e\",\"429\",\"$f\"],\"ThemeToggle\"]\n18:\"ViewportBoundary\"\n19:I[484,[],\"$18\"]\n1b:\"MetadataBoundary\"\n1c:I[484,[],\"$1b\"]\n1e:I[7123,[],\"default\",1]\n:HL[\"/_next/static/css/2abef6d49c1c2970.css\",\"style\"]\n9:X\n"])</script><script>self.__next_f.push([1,"a:[[\"children\",{\"s\":\"__PAGE__\",\"h\":512,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$b\",null,{\"fallback\":[\"$\",\"div\",null,{\"className\":\"relative flex h-dvh overflow-hidden bg-background text-foreground\",\"children\":[[\"$\",\"a\",null,{\"href\":\"#main-content\",\"className\":\"sr-only z-50 rounded-md bg-card px-4 py-2 text-foreground focus:not-sr-only focus:absolute focus:start-2 focus:top-2 focus:outline-2 focus:outline-accent\",\"children\":\"Skip to content\"}],[\"$\",\"div\",null,{\"className\":\"hidden md:flex\",\"children\":[\"$\",\"$L10\",null,{\"machineId\":\"$undefined\",\"machineView\":\"$undefined\"}]}],[\"$\",\"div\",null,{\"className\":\"flex min-w-0 flex-1 flex-col\",\"children\":[[\"$\",\"header\",null,{\"className\":\"flex min-h-14 shrink-0 flex-wrap items-center justify-between gap-2 border-b border-border px-4 py-2 md:px-6\",\"children\":[[\"$\",\"div\",null,{\"className\":\"flex min-w-0 items-center gap-2\",\"children\":[[\"$\",\"$L12\",null,{\"machineId\":\"$undefined\",\"machineView\":\"$undefined\"}],[\"$\",\"h1\",null,{\"className\":\"truncate text-lg font-semibold tracking-tight\",\"children\":\"History\"}]]}],[\"$\",\"div\",null,{\"className\":\"flex items-center gap-3\",\"children\":[null,[\"$\",\"$L13\",null,{}]]}]]}],[\"$\",\"main\",null,{\"id\":\"main-content\",\"tabIndex\":-1,\"className\":\"relative min-h-0 min-w-0 flex-1 overflow-x-hidden overscroll-contain p-4 outline-offset-[-2px] md:p-6 overflow-y-auto\",\"children\":[\"$\",\"div\",null,{\"className\":\"mx-auto flex w-full min-w-0 max-w-[1500px] flex-col\",\"children\":[\"$\",\"div\",null,{\"className\":\"grid grid-cols-1 gap-5 xl:grid-cols-2\",\"aria-busy\":\"true\",\"children\":[[\"$\",\"section\",null,{\"className\":\"flex min-w-0 flex-col rounded-xl border border-border bg-card p-5\",\"children\":[[\"$\",\"div\",null,{\"className\":\"flex shrink-0 items-center justify-between gap-4\",\"children\":[[\"$\",\"h2\",null,{\"className\":\"text-sm font-medium tracking-tight\",\"children\":\"Loading history\"}],null]}],[\"$\",\"div\",null,{\"className\":\"mt-4 flex min-h-0 flex-1 flex-col\",\"children\":[[\"$\",\"div\",null,{\"className\":\"h-40 animate-pulse rounded-lg bg-card-strong\",\"aria-hidden\":true}],[\"$\",\"p\",null,{\"className\":\"mt-3 text-xs text-muted-foreground\",\"children\":\"Preparing the history view…\"}]]}]]}],[\"$\",\"section\",null,{\"className\":\"flex min-w-0 flex-col rounded-xl border border-border bg-card p-5\",\"children\":[[\"$\",\"div\",null,{\"className\":\"flex shrink-0 items-center justify-between gap-4\",\"children\":[[\"$\",\"h2\",null,{\"className\":\"text-sm font-medium tracking-tight\",\"children\":\"Preparing charts\"}],null]}],[\"$\",\"div\",null,{\"className\":\"mt-4 flex min-h-0 flex-1 flex-col\",\"children\":[\"$L14\",\"$L15\"]}]]}]]}]}]}]]}]]}],\"children\":\"$L16\"}],null,\"$L17\"]}],\"p\":false,\"v\":null}}]]\n"])</script><script>self.__next_f.push([1,"8:[[\"children\",{\"s\":\"history\",\"h\":512,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],\"p\":false,\"v\":\"$9\"},\"c\":\"$Qa\"}]]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"history\"],\"q\":\"\",\"i\":false,\"t\":{\"t\":{\"s\":\"\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/2abef6d49c1c2970.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L4\",null,{\"attribute\":\"class\",\"defaultTheme\":\"dark\",\"enableSystem\":true,\"children\":[\"$\",\"$L5\",null,{\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}]}]]}],\"p\":false,\"v\":null},\"c\":\"$Q8\"},\"h\":{\"r\":[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L19\",null,{\"children\":\"$L1a\"}],[\"$\",\"$L1c\",null,{\"children\":[[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$b\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L1d\"}]}],null]}],null]}],\"p\":false,\"v\":null}},\"m\":\"$undefined\",\"G\":[\"$1e\",[]],\"S\":true,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"JbaLjudQSxrMUD_VHPrnD\"}\n"])</script><script>self.__next_f.push([1,"1f:I[8649,[\"944\",\"$c\",\"939\",\"$2\",\"103\",\"$d\",\"408\",\"$e\",\"429\",\"$f\"],\"HistoryView\"]\n20:I[484,[],\"OutletBoundary\"]\n9:C\n14:[\"$\",\"div\",null,{\"className\":\"h-40 animate-pulse rounded-lg bg-card-strong\",\"aria-hidden\":true}]\n15:[\"$\",\"p\",null,{\"className\":\"mt-3 text-xs text-muted-foreground\",\"children\":\"Machine and metric controls appear next.\"}]\n16:[\"$\",\"$L1f\",null,{}]\n17:[\"$\",\"$L20\",null,{\"children\":[\"$\",\"$b\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@21\"}]}]\n"])</script><script>self.__next_f.push([1,"1a:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"22:I[6869,[],\"IconMark\"]\n1d:[[\"$\",\"title\",\"0\",{\"children\":\"History — Rigscope\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Self-hosted remote system monitor — a live fleet of collectors behind one authenticated hub.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/icon.svg?3b3fa3229e2d0d7a\",\"type\":\"image/svg+xml\",\"sizes\":\"any\"}],[\"$\",\"$L22\",\"3\",{}]]\n21:null\n"])</script></body></html>
|