rigscope 0.1.4 → 0.1.6

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.
Files changed (113) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +3 -3
  3. package/.next/build-manifest.json +2 -2
  4. package/.next/prerender-manifest.json +6 -6
  5. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  6. package/.next/server/app/_global-error.html +1 -1
  7. package/.next/server/app/_global-error.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/_not-found.html +1 -1
  13. package/.next/server/app/_not-found.rsc +2 -2
  14. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  15. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  16. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  17. package/.next/server/app/administration/page.js +1 -1
  18. package/.next/server/app/administration/page.js.nft.json +1 -1
  19. package/.next/server/app/administration/page_client-reference-manifest.js +1 -1
  20. package/.next/server/app/administration.html +1 -1
  21. package/.next/server/app/administration.rsc +6 -6
  22. package/.next/server/app/administration.segments/_full.segment.rsc +6 -6
  23. package/.next/server/app/administration.segments/_tree.segment.rsc +2 -2
  24. package/.next/server/app/administration.segments/administration/__PAGE__.segment.rsc +6 -6
  25. package/.next/server/app/alerts/page.js +1 -1
  26. package/.next/server/app/alerts/page.js.nft.json +1 -1
  27. package/.next/server/app/alerts/page_client-reference-manifest.js +1 -1
  28. package/.next/server/app/alerts.html +1 -1
  29. package/.next/server/app/alerts.rsc +6 -6
  30. package/.next/server/app/alerts.segments/_full.segment.rsc +6 -6
  31. package/.next/server/app/alerts.segments/_tree.segment.rsc +2 -2
  32. package/.next/server/app/alerts.segments/alerts/__PAGE__.segment.rsc +6 -6
  33. package/.next/server/app/connections/page.js +1 -1
  34. package/.next/server/app/connections/page.js.nft.json +1 -1
  35. package/.next/server/app/connections/page_client-reference-manifest.js +1 -1
  36. package/.next/server/app/connections.html +1 -1
  37. package/.next/server/app/connections.rsc +7 -7
  38. package/.next/server/app/connections.segments/_full.segment.rsc +7 -7
  39. package/.next/server/app/connections.segments/_tree.segment.rsc +2 -2
  40. package/.next/server/app/connections.segments/connections/__PAGE__.segment.rsc +7 -7
  41. package/.next/server/app/history/page.js +2 -2
  42. package/.next/server/app/history/page.js.nft.json +1 -1
  43. package/.next/server/app/history/page_client-reference-manifest.js +1 -1
  44. package/.next/server/app/history.html +1 -1
  45. package/.next/server/app/history.rsc +26 -22
  46. package/.next/server/app/history.segments/_full.segment.rsc +26 -22
  47. package/.next/server/app/history.segments/_tree.segment.rsc +2 -2
  48. package/.next/server/app/history.segments/history/__PAGE__.segment.rsc +23 -20
  49. package/.next/server/app/index.html +1 -1
  50. package/.next/server/app/index.rsc +7 -7
  51. package/.next/server/app/index.segments/__PAGE__.segment.rsc +7 -7
  52. package/.next/server/app/index.segments/_full.segment.rsc +7 -7
  53. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  54. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  55. package/.next/server/app/login.html +1 -1
  56. package/.next/server/app/login.rsc +2 -2
  57. package/.next/server/app/login.segments/_full.segment.rsc +2 -2
  58. package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  59. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  60. package/.next/server/app/machines/[machineId]/page.js +1 -1
  61. package/.next/server/app/machines/[machineId]/page.js.nft.json +1 -1
  62. package/.next/server/app/machines/[machineId]/page_client-reference-manifest.js +1 -1
  63. package/.next/server/app/page.js +1 -1
  64. package/.next/server/app/page.js.nft.json +1 -1
  65. package/.next/server/app/page_client-reference-manifest.js +1 -1
  66. package/.next/server/app/processes/page.js +2 -2
  67. package/.next/server/app/processes/page.js.nft.json +1 -1
  68. package/.next/server/app/processes/page_client-reference-manifest.js +1 -1
  69. package/.next/server/app/processes.html +1 -1
  70. package/.next/server/app/processes.rsc +21 -19
  71. package/.next/server/app/processes.segments/_full.segment.rsc +21 -19
  72. package/.next/server/app/processes.segments/_tree.segment.rsc +2 -2
  73. package/.next/server/app/processes.segments/processes/__PAGE__.segment.rsc +21 -19
  74. package/.next/server/app-paths-manifest.json +3 -3
  75. package/.next/server/chunks/168.js +1 -1
  76. package/.next/server/chunks/350.js +1 -0
  77. package/.next/server/chunks/364.js +1 -0
  78. package/.next/server/chunks/751.js +1 -1
  79. package/.next/server/chunks/894.js +2 -2
  80. package/.next/server/middleware-build-manifest.js +1 -1
  81. package/.next/server/pages/404.html +1 -1
  82. package/.next/server/pages/500.html +1 -1
  83. package/.next/static/chunks/103-976549d31902404e.js +1 -0
  84. package/.next/static/chunks/{227-417939c480f50747.js → 130-e940915010276f88.js} +1 -1
  85. package/.next/static/chunks/408-9fdba9e4e956ef08.js +1 -0
  86. package/.next/static/chunks/944-a7fe1d96f1d20531.js +1 -0
  87. package/.next/static/chunks/app/administration/page-b62f6610cda5381f.js +1 -0
  88. package/.next/static/chunks/app/alerts/{page-fe0e877778c60af8.js → page-3445bc100ee03d4e.js} +1 -1
  89. package/.next/static/chunks/app/connections/{page-99cd54d6929b3f1f.js → page-75abd16fc495fcbd.js} +1 -1
  90. package/.next/static/chunks/app/history/page-a25ba8fab7bd7cb9.js +3 -0
  91. package/.next/static/chunks/app/machines/[machineId]/{page-1a25a267563c18c0.js → page-89143e71c34b542b.js} +1 -1
  92. package/.next/static/chunks/app/{page-1ae9fc94c897785b.js → page-9c9c89166eee4c92.js} +1 -1
  93. package/.next/static/chunks/app/processes/page-3fdebd2f98b52044.js +3 -0
  94. package/.next/static/css/f5d3162842dcac31.css +1 -0
  95. package/CHANGELOG.md +26 -0
  96. package/DESIGN.md +27 -16
  97. package/dist/cli.cjs +1 -0
  98. package/dist/collector.cjs +1 -1
  99. package/dist/hub.cjs +1 -1
  100. package/docs/installation.md +6 -3
  101. package/docs/releasing.md +12 -12
  102. package/package.json +1 -1
  103. package/.next/server/chunks/721.js +0 -1
  104. package/.next/server/chunks/877.js +0 -1
  105. package/.next/static/chunks/103-c47318242b24e9ac.js +0 -1
  106. package/.next/static/chunks/157-0d36ebf66af048ac.js +0 -1
  107. package/.next/static/chunks/408-29f55984738967db.js +0 -1
  108. package/.next/static/chunks/app/administration/page-4b16b19bb6a39c36.js +0 -1
  109. package/.next/static/chunks/app/history/page-69ea64476ee5db85.js +0 -3
  110. package/.next/static/chunks/app/processes/page-0e98a4a64e829c5f.js +0 -3
  111. package/.next/static/css/3fbf75e4c471c6a8.css +0 -1
  112. /package/.next/static/{-mNveXe-cHv8irQe97wI_ → KBskG-P4uSZx1zfnYp1nL}/_buildManifest.js +0 -0
  113. /package/.next/static/{-mNveXe-cHv8irQe97wI_ → KBskG-P4uSZx1zfnYp1nL}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[900],{4546:(e,s,t)=>{Promise.resolve().then(t.bind(t,8887))},8528:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});let l=(0,t(8698).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},8887:(e,s,t)=>{"use strict";t.d(s,{MachineView:()=>ee});var l=t(5155),a=t(8500),n=t.n(a),r=t(8698);let i=(0,r.A)("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]),d=(0,r.A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]),o=(0,r.A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var c=t(4173),x=t(3440),m=t(940),u=t(802),h=t(2115),p=t(8528),j=t(4567),g=t(7726),f=t(9429),v=t(7284),N=t(4150);let y=new Set,b=new Set(["cpu.usage","memory.used","gpu.utilization","gpu.memory.used"]);function w({machine:e}){let[s,t]=(0,h.useState)(y),a=(0,j.er)(e).filter(e=>b.has(e)).join(","),{data:r,error:i}=(0,f.n)({machineId:e.machineId,metricsKey:a,range:"10m"}),d=e=>t(s=>{let t=new Set(s);return t.has(e)?t.delete(e):t.add(e),t}),o=(0,j.ue)(e,r?.result.series??[]),c=(r?.result.series??[]).map(e=>{let s=(0,j.oB)(e.metric),t=e.metric.startsWith("gpu.")?Math.max(1,o.findIndex(s=>s.id===e.resourceId)+1):0,l=(0,j.Lf)(s,t);return{key:`${e.metric}\0${e.resourceId}`,metric:e.metric,resourceId:e.resourceId,label:"cpu.usage"===e.metric?"CPU":"memory.used"===e.metric?"RAM":`GPU ${t}`,color:l.color,dash:l.dash,points:e.points}});return(0,l.jsxs)(x.Z,{title:"Recent usage \xb7 10m",action:(0,l.jsxs)(n(),{href:`/history?machineId=${encodeURIComponent(e.machineId)}`,className:"inline-flex min-h-8 items-center gap-1 text-xs text-accent hover:underline",children:["History",(0,l.jsx)(p.A,{className:"h-3.5 w-3.5","aria-hidden":!0})]}),children:[i?(0,l.jsx)("p",{role:"status",className:"mb-2 text-xs text-warn",children:r?"Refresh failed \xb7 showing saved readings":i.message}):null,r?.result.truncated?(0,l.jsx)("p",{className:"mb-2 text-xs text-warn",children:"Partial history"}):null,r?(0,l.jsx)(N._C,{children:(0,l.jsx)("div",{className:"grid gap-5 lg:grid-cols-2",children:[{title:"CPU & GPU",unit:"percent"},{title:"RAM & VRAM",unit:"bytes"}].map(({title:t,unit:a})=>(0,l.jsx)(v.t,{title:t,unit:a,series:c.filter(e=>(0,j.oB)(e.metric)?.unit===a),fromMs:r.result.fromMs,toMs:r.result.toMs,stepMs:(0,g.jl)(r.result.stepMs,r.result.tier,e.expectedIntervalMs),gaps:r.result.gaps,hiddenKeys:s,onToggleSeries:d,emptyMessage:"No readings"},a))})},e.machineId):(0,l.jsx)("div",{className:"flex min-h-48 items-center justify-center text-xs text-muted-foreground",role:"status",children:i?"History unavailable":"Loading history…"})]})}var k=t(8664),B=t(6582),$=t(6576),M=t(7586),P=t(2241);function z({label:e,valueLabel:s,percent:t,tone:a,ariaLabel:n,note:r}){let i=null===t?null:Math.min(100,Math.max(0,t));return(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-x-2 gap-y-0.5",children:[(0,l.jsx)("span",{className:"text-xs text-muted-foreground",children:e}),(0,l.jsx)("span",{className:"tnum text-xs text-foreground",children:s})]}),(0,l.jsx)("div",{role:"img","aria-label":n,className:"mt-1.5 h-1.5 w-full overflow-hidden rounded-full bg-card-strong",children:null===i?(0,l.jsx)("div",{className:"h-full w-full rounded-full border border-dashed border-border"}):(0,l.jsx)("div",{className:"h-full rounded-full",style:{width:`${i}%`,backgroundColor:"cpu"===a?"var(--cpu)":"mem"===a?"var(--mem)":"swap"===a?"var(--swap)":"gpu"===a?"var(--accent)":"var(--mem)"}})}),r?(0,l.jsx)("p",{className:"mt-1.5 text-xs text-muted-foreground",children:r}):null]})}function C({label:e,value:s}){return(0,l.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[(0,l.jsx)("dt",{className:"text-xs text-muted-foreground",children:e}),(0,l.jsx)("dd",{className:"tnum min-w-0 truncate text-right text-xs text-foreground",children:s})]})}function L({children:e}){return(0,l.jsx)("p",{className:"text-xs text-muted-foreground",children:e})}function U({reason:e}){return(0,l.jsxs)("p",{className:"text-xs text-warn",children:["Unavailable — ",e]})}function I({children:e}){return(0,l.jsx)("h3",{className:"text-xs font-medium text-muted-foreground",children:e})}function S({stale:e}){return e?(0,l.jsx)($.vw,{text:"last known",title:"Retained from the last accepted sample"}):null}function T(e,s){return Number.isFinite(e)&&Number.isFinite(s)&&!(s<=0)?e/s*100:null}function A(e,s){return"available"===e.state?s:e.reason}function R({readings:e,className:s=""}){let t=new Map;for(let s of e){if("value"===s.reading.state)continue;let e=t.get(s.reading.reason)??[];e.push(s.label),t.set(s.reading.reason,e)}return(0,l.jsxs)("div",{className:s,children:[(0,l.jsx)("dl",{className:"grid grid-cols-2 gap-x-4 gap-y-2 sm:grid-cols-4",children:e.map(({label:e,reading:s,format:t})=>{let a="value"===s.state;return(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("dt",{className:"text-xs text-muted-foreground",children:e}),(0,l.jsxs)("dd",{className:"tnum text-xs text-foreground",title:a?void 0:s.reason,children:[a?t(s.value):"—",a&&s.stale?(0,l.jsx)("span",{className:"ml-1 text-muted-foreground",children:"last known"}):null]})]},e)})}),t.size>0?(0,l.jsx)("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:[...t].map(([e,s])=>`${s.join(", ")} — ${e}`).join(" \xb7 ")}):null]})}function F({view:e,ageLabel:s,held:t,className:a}){var n;let r=e.cpu.perCore;return(0,l.jsxs)(x.Z,{title:"CPU",className:a,action:(0,l.jsx)(S,{stale:e.stale}),children:[(0,l.jsxs)("div",{className:"grid gap-6 lg:grid-cols-[minmax(0,13rem)_minmax(0,1fr)] lg:items-start",children:[(0,l.jsx)("div",{className:"flex flex-col items-center",children:(0,l.jsx)($.iL,{metricName:"CPU",field:"value"===(n=e.cpu.total).state?n.stale?{out:"stale",value:n.value}:{out:"value",value:n.value}:"unavailable"===n.state?{out:"unavailable",reason:n.reason}:{out:"absent"},ageLabel:s,isHeld:t,thresholdMs:e.thresholdMs})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[(0,l.jsx)(I,{children:"Per logical core"}),"value"===r.state?(0,l.jsxs)("span",{className:"tnum text-xs text-muted-foreground",children:[(0,P.B4)(r.value.length)," cores"]}):null]}),"value"===r.state?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("ul",{className:"mt-2 grid grid-cols-[repeat(auto-fit,minmax(3.5rem,1fr))] gap-1.5",children:r.value.map((e,s)=>{let t=null!==e,a=t?Math.min(100,Math.max(0,e)):0;return(0,l.jsxs)("li",{className:"rounded-md border border-border bg-card-strong/40 px-1.5 py-1",title:t?`Core ${s}: ${(0,M.l9)(e)}`:`Core ${s}: counter regressed or was missing for this interval`,children:[(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,l.jsxs)("span",{className:"tnum text-xs text-muted-foreground",children:["C",s]}),(0,l.jsx)("span",{className:"tnum text-xs text-foreground",children:t?(0,M.l9)(e):"—"})]}),(0,l.jsx)("div",{"aria-hidden":!0,className:"mt-1 h-0.5 w-full overflow-hidden rounded-full bg-border",children:t?(0,l.jsx)("div",{className:"h-full rounded-full",style:{width:`${a}%`,backgroundColor:"var(--cpu)"}}):null}),(0,l.jsx)("span",{className:"sr-only",children:t?`Core ${s} at ${(0,M.l9)(e)}`:`Core ${s} unavailable this interval`})]},s)})})}):"unavailable"===r.state?(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsx)(U,{reason:r.reason})}):(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsx)(L,{children:r.reason})})]})]}),(0,l.jsxs)("div",{className:"mt-4 border-t border-border pt-3",children:[(0,l.jsx)(I,{children:"Heat, power and stalls"}),(0,l.jsx)(R,{className:"mt-1",readings:[{label:"Temperature",reading:e.bottlenecks.cpuTemperature,format:P.cH},{label:"Package power",reading:e.bottlenecks.cpuPower,format:P.d5},{label:"I/O wait",reading:e.bottlenecks.cpuIowait,format:M.l9},{label:"Pressure",reading:e.bottlenecks.cpuPressure,format:M.l9}]})]})]})}function Z({view:e,ageLabel:s,held:t,className:a}){var n;let r=e.swap;return(0,l.jsx)(x.Z,{title:"Memory and swap",className:a,action:(0,l.jsx)(S,{stale:e.stale}),children:(0,l.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(I,{children:"Memory"}),(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsx)($.jB,{field:"value"===(n=e.memory).state?n.stale?{out:"stale",usedBytes:n.value.usedBytes,totalBytes:n.value.totalBytes}:{out:"value",usedBytes:n.value.usedBytes,totalBytes:n.value.totalBytes}:"unavailable"===n.state?{out:"unavailable",reason:n.reason}:{out:"absent"},ageLabel:s,isHeld:t,thresholdMs:e.thresholdMs})})]}),(0,l.jsxs)("div",{className:"border-t border-border pt-4",children:[(0,l.jsx)(I,{children:"Pressure"}),(0,l.jsx)(R,{className:"mt-1",readings:[{label:"Some tasks",reading:e.bottlenecks.memoryPressureSome,format:M.l9},{label:"Full",reading:e.bottlenecks.memoryPressureFull,format:M.l9}]})]}),(0,l.jsxs)("div",{className:"border-t border-border pt-4",children:[(0,l.jsx)(I,{children:"Swap"}),"value"===r.state?0===r.value.totalBytes?(0,l.jsxs)("div",{className:"mt-2 flex flex-col gap-1",children:[(0,l.jsx)("p",{className:"text-sm",children:"No swap configured."}),(0,l.jsx)(L,{children:"SwapTotal is zero; this is a valid configuration, not a missing reading."})]}):(0,l.jsxs)("div",{className:"mt-2 flex flex-col gap-2",children:[(0,l.jsx)(z,{label:"Used",valueLabel:`${(0,M.z3)(r.value.usedBytes)} / ${(0,M.z3)(r.value.totalBytes)}`,percent:T(r.value.usedBytes,r.value.totalBytes),tone:"swap",ariaLabel:`Swap ${(0,M.z3)(r.value.usedBytes)} of ${(0,M.z3)(r.value.totalBytes)}`}),(0,l.jsxs)("p",{className:"tnum text-xs text-muted-foreground",children:[(0,M.l9)(T(r.value.usedBytes,r.value.totalBytes))," used",r.stale?" \xb7 last known":""]})]}):"unavailable"===r.state?(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsx)(U,{reason:r.reason})}):(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsx)(L,{children:r.reason})})]})]})})}function H({card:e}){let s="supported"===e.telemetry;return(0,l.jsxs)("article",{className:"flex min-w-0 flex-col gap-3 rounded-lg border border-border bg-card-strong/25 p-3",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("h3",{className:"truncate text-sm font-medium",children:e.name}),(0,l.jsxs)("p",{className:"tnum truncate text-xs text-muted-foreground",children:[e.vendor,e.pciBusId?` \xb7 ${e.pciBusId}`:""]})]}),(0,l.jsxs)("div",{className:"flex shrink-0 flex-wrap items-center gap-1.5",children:[s?null:(0,l.jsx)($.vw,{text:"no telemetry",title:e.reason??"Management adapter"}),e.stale&&"ok"===e.state?(0,l.jsx)($.vw,{text:"last known",title:"Retained from the last accepted sample"}):null]})]}),"ok"===e.state?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(z,{label:"GPU utilization",valueLabel:null===e.utilizationPercent?"Not reported":(0,M.l9)(e.utilizationPercent),percent:e.utilizationPercent,tone:"gpu",ariaLabel:null===e.utilizationPercent?`${e.name} utilization not reported`:`${e.name} utilization ${(0,M.l9)(e.utilizationPercent)}`}),(0,l.jsx)(z,{label:"VRAM",valueLabel:null===e.memoryUsedBytes||null===e.memoryTotalBytes?"Not reported":`${(0,M.z3)(e.memoryUsedBytes)} / ${(0,M.z3)(e.memoryTotalBytes)}`,percent:null!==e.memoryUsedBytes&&null!==e.memoryTotalBytes?T(e.memoryUsedBytes,e.memoryTotalBytes):null,tone:"gpu",ariaLabel:null===e.memoryUsedBytes||null===e.memoryTotalBytes?`${e.name} VRAM not reported`:`${e.name} VRAM ${(0,M.z3)(e.memoryUsedBytes)} of ${(0,M.z3)(e.memoryTotalBytes)}`}),(0,l.jsxs)("dl",{className:"grid grid-cols-2 gap-x-4 gap-y-1",children:[(0,l.jsx)(C,{label:"Temperature",value:null===e.temperatureC?"Not reported":(0,P.cH)(e.temperatureC)}),(0,l.jsx)(C,{label:"Power",value:null===e.powerWatts?"Not reported":(0,P.d5)(e.powerWatts)})]})]}):(0,l.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,l.jsx)("p",{className:"text-xs text-muted-foreground",children:"unsupported"===e.state?"No telemetry.":"No readings for this device."}),e.reason?(0,l.jsx)("p",{className:"text-xs text-warn",children:e.reason}):null,null!==e.memoryTotalBytes?(0,l.jsx)("dl",{className:"mt-1",children:(0,l.jsx)(C,{label:"VRAM total",value:(0,M.z3)(e.memoryTotalBytes)})}):null]})]})}function V({view:e,className:s}){let t=e.gpus.cards;return(0,l.jsx)(x.Z,{title:"GPUs",className:s,action:(0,l.jsxs)("span",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"tnum",children:0===t.length?"0 devices":`${t.length} device${1===t.length?"":"s"}`}),(0,l.jsx)(S,{stale:e.stale})]}),children:0===t.length?"unavailable"===e.gpus.family.state?(0,l.jsx)(U,{reason:e.gpus.family.reason}):(0,l.jsx)(L,{children:A(e.gpus.family,"No GPU devices were reported.")}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-3",children:t.map(e=>(0,l.jsx)(H,{card:e},e.id))}),"unavailable"===e.gpus.family.state?(0,l.jsxs)("p",{className:"mt-3 text-xs text-warn",children:["GPU unavailable \xb7 ",e.gpus.family.reason]}):e.gpus.partial?(0,l.jsx)("p",{className:"mt-3 text-xs text-warn",children:"Some GPUs are not reporting."}):null]})})}function E({filesystem:e}){let s="ok"===e.state&&null!==e.usedBytes&&null!==e.totalBytes?T(e.usedBytes,e.totalBytes):null,t="ok"===e.state&&null!==e.usedBytes&&null!==e.totalBytes?`${(0,M.z3)(e.usedBytes)} / ${(0,M.z3)(e.totalBytes)}`:null!==e.totalBytes?`${(0,M.z3)(e.totalBytes)} total`:"Unavailable",a="ok"===e.state&&null!==e.inodesUsed&&null!==e.inodesTotal&&e.inodesTotal>0?T(e.inodesUsed,e.inodesTotal):null;return(0,l.jsxs)("li",{className:"py-2.5",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-x-3 gap-y-1",children:[(0,l.jsx)("span",{className:"break-all font-mono text-xs text-foreground",children:e.mountPoint}),(0,l.jsxs)("span",{className:"tnum break-all text-xs text-muted-foreground",children:[e.fsType,e.device?` \xb7 ${e.device}`:""]})]}),(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsx)(z,{label:"Capacity",valueLabel:t,percent:s,tone:"disk",ariaLabel:`${e.mountPoint} ${t}`})}),"ok"===e.state?(0,l.jsx)("p",{className:"tnum mt-1 text-xs text-muted-foreground",title:null===a?"Inode usage was not reported for this filesystem.":void 0,children:null===a?"Inodes not reported":`Inodes ${(0,M.l9)(a)} used \xb7 ${(0,P.B4)(e.inodesUsed)} / ${(0,P.B4)(e.inodesTotal)}`}):null,"unavailable"===e.state&&e.reason?(0,l.jsx)("p",{className:"mt-1.5 text-xs text-warn",children:e.reason}):"inventory"===e.state&&e.reason?(0,l.jsx)("p",{className:"mt-1.5 text-xs text-muted-foreground",children:e.reason}):e.stale?(0,l.jsx)("p",{className:"mt-1.5 text-xs text-muted-foreground",children:"Last known usage."}):null]})}function G({disk:e}){let s=null===e.rotational?"Unknown media":e.rotational?"Rotational":"Solid state",t=[null===e.readLatencyMs?"read latency":null,null===e.writeLatencyMs?"write latency":null,null===e.ioUtilizationPercent?"utilization":null].filter(e=>null!==e);return(0,l.jsxs)("li",{className:"py-2.5",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-x-3 gap-y-1",children:[(0,l.jsx)("span",{className:"font-mono text-xs text-foreground",children:e.name}),(0,l.jsxs)("span",{className:"tnum text-xs text-muted-foreground",children:[s,null!==e.sizeBytes?` \xb7 ${(0,M.z3)(e.sizeBytes)}`:""]})]}),e.model?(0,l.jsx)("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:e.model}):null,"ok"===e.state?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("dl",{className:"mt-1.5 grid grid-cols-2 gap-x-4 gap-y-1 sm:grid-cols-4",children:[(0,l.jsx)(C,{label:"Read",value:(0,P.CE)(e.readBytesPerSec)}),(0,l.jsx)(C,{label:"Write",value:(0,P.CE)(e.writeBytesPerSec)}),(0,l.jsx)(C,{label:"Read latency",value:(0,P.YL)(e.readLatencyMs)}),(0,l.jsx)(C,{label:"Write latency",value:(0,P.YL)(e.writeLatencyMs)}),(0,l.jsx)(C,{label:"Utilization",value:null===e.ioUtilizationPercent?"—":(0,M.l9)(e.ioUtilizationPercent)})]}),t.length>0?(0,l.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:["Not reported: ",t.join(", "),"."]}):null]}):(0,l.jsx)("p",{className:`mt-1.5 text-xs ${"unavailable"===e.state?"text-warn":"text-muted-foreground"}`,children:e.reason??"No current I/O reading."}),"ok"===e.state&&e.stale?(0,l.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Last known rates."}):null]})}function _({view:e,className:s}){let t=e.filesystems.items,a=e.disks.items;return(0,l.jsxs)(x.Z,{title:"Disks",className:s,action:(0,l.jsx)(S,{stale:e.stale}),children:[0===t.length&&0===a.length?"unavailable"===e.disks.family.state?(0,l.jsx)(U,{reason:e.disks.family.reason}):(0,l.jsx)(L,{children:A(e.disks.family,"No disks or filesystems were reported.")}):null,(0,l.jsxs)("div",{className:"mt-5 flex flex-col gap-5",children:[t.length>0?(0,l.jsxs)("div",{children:[(0,l.jsx)(I,{children:"Filesystems"}),(0,l.jsx)("ul",{className:"mt-1 divide-y divide-border",children:t.map(e=>(0,l.jsx)(E,{filesystem:e},e.id))})]}):null,a.length>0?(0,l.jsxs)("div",{className:t.length>0?"border-t border-border pt-4":"",children:[(0,l.jsx)(I,{children:"Devices"}),(0,l.jsx)("ul",{className:"mt-1 divide-y divide-border",children:a.map(e=>(0,l.jsx)(G,{disk:e},e.id))})]}):null,"unavailable"!==e.disks.family.state?(0,l.jsxs)("div",{className:t.length>0||a.length>0?"border-t border-border pt-4":"",children:[(0,l.jsx)(I,{children:"I/O pressure"}),(0,l.jsx)(R,{className:"mt-1",readings:[{label:"Some tasks",reading:e.bottlenecks.ioPressureSome,format:M.l9},{label:"Full",reading:e.bottlenecks.ioPressureFull,format:M.l9}]})]}):null]})]})}function D({iface:e}){let s="up"===e.linkState?"Link up":"down"===e.linkState?"Link down":"Link state unknown";return(0,l.jsxs)("li",{className:"py-3",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-x-3 gap-y-1",children:[(0,l.jsx)("span",{className:"font-mono text-xs text-foreground",children:e.name}),(0,l.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5",children:[e.virtual?(0,l.jsx)($.vw,{text:"virtual",title:"Virtual interface, not physical hardware"}):null,(0,l.jsx)("span",{className:"tnum text-xs text-muted-foreground",children:s}),null!==e.speedMbps?(0,l.jsx)("span",{className:"tnum text-xs text-muted-foreground",children:(0,P.Zf)(e.speedMbps)}):null]})]}),e.addresses.length>0?(0,l.jsx)("ul",{className:"mt-1 flex flex-wrap gap-x-3 gap-y-1",children:e.addresses.map((e,s)=>(0,l.jsxs)("li",{className:"tnum break-all font-mono text-xs text-muted-foreground",children:[e.address,"/",e.prefix,(0,l.jsx)("span",{className:"ml-1 font-sans text-xs uppercase tracking-wide",children:"ipv4"===e.family?"v4":"v6"})]},`${e.family}:${e.address}/${e.prefix}:${s}`))}):(0,l.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"No addresses reported."}),"ok"===e.state?(0,l.jsxs)("dl",{className:"mt-1.5 grid grid-cols-2 gap-x-4 gap-y-1",children:[(0,l.jsx)(C,{label:"Receive",value:(0,P.CE)(e.rxBytesPerSec)}),(0,l.jsx)(C,{label:"Transmit",value:(0,P.CE)(e.txBytesPerSec)})]}):(0,l.jsx)("p",{className:`mt-1.5 text-xs ${"unavailable"===e.state?"text-warn":"text-muted-foreground"}`,children:e.reason??"No current rate reading."}),"ok"===e.state&&e.stale?(0,l.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Last known rates."}):null]})}function O({view:e,className:s}){let t=e.network.items;return(0,l.jsx)(x.Z,{title:"Network",className:s,action:(0,l.jsx)(S,{stale:e.stale}),children:0===t.length?"unavailable"===e.network.family.state?(0,l.jsx)(U,{reason:e.network.family.reason}):(0,l.jsx)(L,{children:A(e.network.family,"No network interfaces were reported.")}):(0,l.jsx)("ul",{className:"divide-y divide-border",children:t.map(e=>(0,l.jsx)(D,{iface:e},e.id))})})}var W=t(9939),q=t(7348);function Y(e){let s,t,{iso:a}=e;return null===a?(0,l.jsx)("span",{className:"text-xs text-muted-foreground",children:"—"}):(0,l.jsxs)("span",{className:"tnum text-sm",children:[Number.isFinite((s=new Date(a)).getTime())?s.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}):a,(0,l.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:Number.isFinite((t=new Date(a)).getTime())?t.toLocaleDateString(void 0,{dateStyle:"medium"}):""})]})}function J({state:e}){var s;let t=(0,M.L_)(e);return"ahead"!==t.kind&&"behind"!==t.kind?null:(0,l.jsxs)("p",{role:"status",className:"tnum flex items-start gap-2 rounded-lg bg-warn-soft px-3 py-2 text-xs text-foreground",children:[(0,l.jsx)(i,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-warn","aria-hidden":!0}),(0,l.jsxs)("span",{children:["Collector clock:"," ",(0,l.jsx)("strong",{className:"font-medium",children:Math.abs(s=t.skewMs)>=6e4?`${Math.abs(Math.round(s/6e4))} min`:`${Math.abs(Math.round(s/1e3))} s`})," ","ahead"===t.kind?"ahead of":"behind"," hub time."]})]})}function K({state:e}){return(0,l.jsx)(x.Z,{title:"Collector",children:(0,l.jsxs)("div",{className:"flex flex-col gap-3 py-1",children:[(0,l.jsxs)("p",{className:"flex items-center gap-2 text-sm",children:[(0,l.jsx)("span",{"aria-hidden":!0,className:`inline-block h-2 w-2 shrink-0 rounded-full ${e.connected?"bg-ok":"bg-crit"}`}),e.connected?"Connected to the hub":"Not connected to the hub"]}),(0,l.jsxs)("dl",{className:"flex flex-col gap-1 text-xs",children:[(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)("dt",{className:"shrink-0 text-muted-foreground",children:"Collector"}),(0,l.jsx)("dd",{className:"tnum truncate",children:e.collectorId})]}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)("dt",{className:"shrink-0 text-muted-foreground",children:"Machine"}),(0,l.jsx)("dd",{className:"tnum truncate",children:e.machineId})]})]}),(0,l.jsx)(n(),{href:"/connections",className:"w-fit rounded-md text-xs text-accent transition-colors hover:underline",children:"Connections"})]})})}function Q({state:e,now:s}){let t=e.metrics,a=t?.capturedAt??null,n=t?.receivedAt??e.lastReceivedAt,r=null!=e.expectedIntervalMs,i=r?e.expectedIntervalMs:null,d=(0,M.Cj)(e.expectedIntervalMs);return(0,l.jsx)(x.Z,{title:"Sample times",children:(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("dl",{className:"grid gap-x-8 gap-y-3 sm:grid-cols-2",children:[(0,l.jsx)("dt",{className:"text-xs text-muted-foreground",children:"Captured"}),(0,l.jsx)("dd",{children:(0,l.jsx)(Y,{iso:a})}),(0,l.jsx)("dt",{className:"text-xs text-muted-foreground",children:"Received"}),(0,l.jsx)("dd",{children:(0,l.jsxs)("span",{className:"flex flex-wrap items-baseline gap-2",children:[(0,l.jsx)(Y,{iso:n}),null!==n?(0,l.jsxs)("span",{className:"tnum text-xs text-muted-foreground",children:["\xb7 updated ",(0,M.nV)((0,M.A4)(n,s))]}):null]})}),(0,l.jsx)("dt",{className:"text-xs text-muted-foreground",children:"Sample interval"}),(0,l.jsx)("dd",{children:r?(0,l.jsx)("span",{className:"tnum text-sm",children:(0,M.$)(i)}):(0,l.jsx)("span",{className:"text-sm text-muted-foreground",children:"Unknown"})}),(0,l.jsx)("dt",{className:"text-xs text-muted-foreground",children:"Stale after"}),(0,l.jsx)("dd",{children:(0,l.jsxs)("span",{className:"tnum text-sm",children:[(0,M.$)(d),r?null:(0,l.jsx)("span",{className:"text-muted-foreground",children:" (fallback)"})]})})]}),(0,l.jsx)(J,{state:e})]})})}function X({machineId:e,machineCount:s}){return 0===s?(0,l.jsx)(x.Z,{title:"No machines",className:"mt-8",children:(0,l.jsx)(x.p,{icon:d,note:"No machines are available in your authorized fleet."})}):(0,l.jsxs)(x.Z,{title:"Machine not found",className:"mt-8",children:[(0,l.jsx)(x.p,{icon:d,note:"This machine is unavailable or outside your access."}),(0,l.jsxs)("p",{className:"tnum mt-2 text-center text-xs text-muted-foreground",children:["Requested identifier: ",e]}),(0,l.jsx)("div",{className:"flex justify-center",children:(0,l.jsxs)(n(),{href:"/",className:"mt-2 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,l.jsx)(o,{className:"h-3.5 w-3.5","aria-hidden":!0}),"Back to fleet"]})})]})}function ee({machineId:e}){let{phase:s,machines:t}=(0,W.M)(),{machine:a}=(0,k.JG)("overview",e),n=(0,B.x)(),r=(0,q.c)(),i="live"===s||"reconnecting"===s||"disconnected"===s,d=i?a:void 0,o="reconnecting"===s||"disconnected"===s,x=d?(0,P.hL)(d,r):null,h=d?d.metrics?.receivedAt??d.lastReceivedAt:null,p=h?(0,M.nV)((0,M.A4)(h,r)):null;return(0,l.jsx)(c.G,{title:"Overview",machineId:e,machineView:"overview",headerRight:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(m.$E,{}),(0,l.jsx)(u.B,{})]}),children:n||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(B.E,{}),d&&x?(0,l.jsxs)(l.Fragment,{children:[x.tags.length>0?(0,l.jsx)("ul",{className:"mb-4 flex flex-wrap gap-1.5","aria-label":"Machine tags",children:x.tags.map(e=>(0,l.jsx)("li",{className:"rounded-full border border-border px-2 py-0.5 text-xs text-muted-foreground",children:e},e))}):null,(0,l.jsxs)("section",{"aria-label":`${x.displayName} live overview`,className:"grid grid-cols-1 gap-5 xl:grid-cols-3",children:[(0,l.jsx)(F,{view:x,ageLabel:p,held:o,className:"xl:col-span-2"}),(0,l.jsx)(Z,{view:x,ageLabel:p,held:o}),(0,l.jsx)("div",{className:"min-w-0 xl:col-span-3",children:(0,l.jsx)(w,{machine:d},e)}),(0,l.jsx)(V,{view:x,className:"xl:col-span-3"}),(0,l.jsx)(_,{view:x,className:"xl:col-span-2"}),(0,l.jsx)(O,{view:x})]}),(0,l.jsxs)("details",{className:"mt-5 max-w-4xl text-xs text-muted-foreground",children:[(0,l.jsx)("summary",{className:"inline-flex min-h-9 cursor-pointer items-center rounded-md hover:text-foreground",children:"Collector details"}),(0,l.jsxs)("div",{className:"mt-3 grid gap-4 lg:grid-cols-2",children:[(0,l.jsx)(K,{state:d}),(0,l.jsx)(Q,{state:d,now:r})]})]})]}):i?(0,l.jsx)(X,{machineId:e,machineCount:t.length}):null]})})}}},e=>{e.O(0,[157,939,103,227,408,441,794,358],()=>e(e.s=4546)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[900],{4546:(e,s,t)=>{Promise.resolve().then(t.bind(t,8887))},8528:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});let l=(0,t(8698).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},8887:(e,s,t)=>{"use strict";t.d(s,{MachineView:()=>ee});var l=t(5155),a=t(8500),n=t.n(a),r=t(8698);let i=(0,r.A)("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]),d=(0,r.A)("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]),o=(0,r.A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var c=t(4173),x=t(3440),m=t(940),u=t(802),h=t(2115),p=t(8528),j=t(4567),g=t(7726),f=t(9429),v=t(7284),N=t(4150);let y=new Set,b=new Set(["cpu.usage","memory.used","gpu.utilization","gpu.memory.used"]);function w({machine:e}){let[s,t]=(0,h.useState)(y),a=(0,j.er)(e).filter(e=>b.has(e)).join(","),{data:r,error:i}=(0,f.n)({machineId:e.machineId,metricsKey:a,range:"10m"}),d=e=>t(s=>{let t=new Set(s);return t.has(e)?t.delete(e):t.add(e),t}),o=(0,j.ue)(e,r?.result.series??[]),c=(r?.result.series??[]).map(e=>{let s=(0,j.oB)(e.metric),t=e.metric.startsWith("gpu.")?Math.max(1,o.findIndex(s=>s.id===e.resourceId)+1):0,l=(0,j.Lf)(s,t);return{key:`${e.metric}\0${e.resourceId}`,metric:e.metric,resourceId:e.resourceId,label:"cpu.usage"===e.metric?"CPU":"memory.used"===e.metric?"RAM":`GPU ${t}`,color:l.color,dash:l.dash,points:e.points}});return(0,l.jsxs)(x.Z,{title:"Recent usage \xb7 10m",action:(0,l.jsxs)(n(),{href:`/history?machineId=${encodeURIComponent(e.machineId)}`,className:"inline-flex min-h-8 items-center gap-1 text-xs text-accent hover:underline",children:["History",(0,l.jsx)(p.A,{className:"h-3.5 w-3.5","aria-hidden":!0})]}),children:[i?(0,l.jsx)("p",{role:"status",className:"mb-2 text-xs text-warn",children:r?"Refresh failed \xb7 showing saved readings":i.message}):null,r?.result.truncated?(0,l.jsx)("p",{className:"mb-2 text-xs text-warn",children:"Partial history"}):null,r?(0,l.jsx)(N._C,{children:(0,l.jsx)("div",{className:"grid gap-5 lg:grid-cols-2",children:[{title:"CPU & GPU",unit:"percent"},{title:"RAM & VRAM",unit:"bytes"}].map(({title:t,unit:a})=>(0,l.jsx)(v.t,{title:t,unit:a,series:c.filter(e=>(0,j.oB)(e.metric)?.unit===a),fromMs:r.result.fromMs,toMs:r.result.toMs,stepMs:(0,g.jl)(r.result.stepMs,r.result.tier,e.expectedIntervalMs),gaps:r.result.gaps,hiddenKeys:s,onToggleSeries:d,emptyMessage:"No readings"},a))})},e.machineId):(0,l.jsx)("div",{className:"flex min-h-48 items-center justify-center text-xs text-muted-foreground",role:"status",children:i?"History unavailable":"Loading history…"})]})}var k=t(8664),B=t(6582),$=t(6576),M=t(7586),P=t(2241);function z({label:e,valueLabel:s,percent:t,tone:a,ariaLabel:n,note:r}){let i=null===t?null:Math.min(100,Math.max(0,t));return(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-x-2 gap-y-0.5",children:[(0,l.jsx)("span",{className:"text-xs text-muted-foreground",children:e}),(0,l.jsx)("span",{className:"tnum text-xs text-foreground",children:s})]}),(0,l.jsx)("div",{role:"img","aria-label":n,className:"mt-1.5 h-1.5 w-full overflow-hidden rounded-full bg-card-strong",children:null===i?(0,l.jsx)("div",{className:"h-full w-full rounded-full border border-dashed border-border"}):(0,l.jsx)("div",{className:"h-full rounded-full",style:{width:`${i}%`,backgroundColor:"cpu"===a?"var(--cpu)":"mem"===a?"var(--mem)":"swap"===a?"var(--swap)":"gpu"===a?"var(--accent)":"var(--mem)"}})}),r?(0,l.jsx)("p",{className:"mt-1.5 text-xs text-muted-foreground",children:r}):null]})}function C({label:e,value:s}){return(0,l.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[(0,l.jsx)("dt",{className:"text-xs text-muted-foreground",children:e}),(0,l.jsx)("dd",{className:"tnum min-w-0 truncate text-right text-xs text-foreground",children:s})]})}function L({children:e}){return(0,l.jsx)("p",{className:"text-xs text-muted-foreground",children:e})}function U({reason:e}){return(0,l.jsxs)("p",{className:"text-xs text-warn",children:["Unavailable — ",e]})}function I({children:e}){return(0,l.jsx)("h3",{className:"text-xs font-medium text-muted-foreground",children:e})}function S({stale:e}){return e?(0,l.jsx)($.vw,{text:"last known",title:"Retained from the last accepted sample"}):null}function T(e,s){return Number.isFinite(e)&&Number.isFinite(s)&&!(s<=0)?e/s*100:null}function A(e,s){return"available"===e.state?s:e.reason}function R({readings:e,className:s=""}){let t=new Map;for(let s of e){if("value"===s.reading.state)continue;let e=t.get(s.reading.reason)??[];e.push(s.label),t.set(s.reading.reason,e)}return(0,l.jsxs)("div",{className:s,children:[(0,l.jsx)("dl",{className:"grid grid-cols-2 gap-x-4 gap-y-2 sm:grid-cols-4",children:e.map(({label:e,reading:s,format:t})=>{let a="value"===s.state;return(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("dt",{className:"text-xs text-muted-foreground",children:e}),(0,l.jsxs)("dd",{className:"tnum text-xs text-foreground",title:a?void 0:s.reason,children:[a?t(s.value):"—",a&&s.stale?(0,l.jsx)("span",{className:"ml-1 text-muted-foreground",children:"last known"}):null]})]},e)})}),t.size>0?(0,l.jsx)("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:[...t].map(([e,s])=>`${s.join(", ")} — ${e}`).join(" \xb7 ")}):null]})}function F({view:e,ageLabel:s,held:t,className:a}){var n;let r=e.cpu.perCore;return(0,l.jsxs)(x.Z,{title:"CPU",className:a,action:(0,l.jsx)(S,{stale:e.stale}),children:[(0,l.jsxs)("div",{className:"grid gap-6 lg:grid-cols-[minmax(0,13rem)_minmax(0,1fr)] lg:items-start",children:[(0,l.jsx)("div",{className:"flex flex-col items-center",children:(0,l.jsx)($.iL,{metricName:"CPU",field:"value"===(n=e.cpu.total).state?n.stale?{out:"stale",value:n.value}:{out:"value",value:n.value}:"unavailable"===n.state?{out:"unavailable",reason:n.reason}:{out:"absent"},ageLabel:s,isHeld:t,thresholdMs:e.thresholdMs})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[(0,l.jsx)(I,{children:"Per logical core"}),"value"===r.state?(0,l.jsxs)("span",{className:"tnum text-xs text-muted-foreground",children:[(0,P.B4)(r.value.length)," cores"]}):null]}),"value"===r.state?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("ul",{className:"mt-2 grid grid-cols-[repeat(auto-fit,minmax(3.5rem,1fr))] gap-1.5",children:r.value.map((e,s)=>{let t=null!==e,a=t?Math.min(100,Math.max(0,e)):0;return(0,l.jsxs)("li",{className:"rounded-md border border-border bg-card-strong/40 px-1.5 py-1",title:t?`Core ${s}: ${(0,M.l9)(e)}`:`Core ${s}: counter regressed or was missing for this interval`,children:[(0,l.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,l.jsxs)("span",{className:"tnum text-xs text-muted-foreground",children:["C",s]}),(0,l.jsx)("span",{className:"tnum text-xs text-foreground",children:t?(0,M.l9)(e):"—"})]}),(0,l.jsx)("div",{"aria-hidden":!0,className:"mt-1 h-0.5 w-full overflow-hidden rounded-full bg-border",children:t?(0,l.jsx)("div",{className:"h-full rounded-full",style:{width:`${a}%`,backgroundColor:"var(--cpu)"}}):null}),(0,l.jsx)("span",{className:"sr-only",children:t?`Core ${s} at ${(0,M.l9)(e)}`:`Core ${s} unavailable this interval`})]},s)})})}):"unavailable"===r.state?(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsx)(U,{reason:r.reason})}):(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsx)(L,{children:r.reason})})]})]}),(0,l.jsxs)("div",{className:"mt-4 border-t border-border pt-3",children:[(0,l.jsx)(I,{children:"Heat, power and stalls"}),(0,l.jsx)(R,{className:"mt-1",readings:[{label:"Temperature",reading:e.bottlenecks.cpuTemperature,format:P.cH},{label:"Package power",reading:e.bottlenecks.cpuPower,format:P.d5},{label:"I/O wait",reading:e.bottlenecks.cpuIowait,format:M.l9},{label:"Pressure",reading:e.bottlenecks.cpuPressure,format:M.l9}]})]})]})}function Z({view:e,ageLabel:s,held:t,className:a}){var n;let r=e.swap;return(0,l.jsx)(x.Z,{title:"Memory and swap",className:a,action:(0,l.jsx)(S,{stale:e.stale}),children:(0,l.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(I,{children:"Memory"}),(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsx)($.jB,{field:"value"===(n=e.memory).state?n.stale?{out:"stale",usedBytes:n.value.usedBytes,totalBytes:n.value.totalBytes}:{out:"value",usedBytes:n.value.usedBytes,totalBytes:n.value.totalBytes}:"unavailable"===n.state?{out:"unavailable",reason:n.reason}:{out:"absent"},ageLabel:s,isHeld:t,thresholdMs:e.thresholdMs})})]}),(0,l.jsxs)("div",{className:"border-t border-border pt-4",children:[(0,l.jsx)(I,{children:"Pressure"}),(0,l.jsx)(R,{className:"mt-1",readings:[{label:"Some tasks",reading:e.bottlenecks.memoryPressureSome,format:M.l9},{label:"Full",reading:e.bottlenecks.memoryPressureFull,format:M.l9}]})]}),(0,l.jsxs)("div",{className:"border-t border-border pt-4",children:[(0,l.jsx)(I,{children:"Swap"}),"value"===r.state?0===r.value.totalBytes?(0,l.jsxs)("div",{className:"mt-2 flex flex-col gap-1",children:[(0,l.jsx)("p",{className:"text-sm",children:"No swap configured."}),(0,l.jsx)(L,{children:"SwapTotal is zero; this is a valid configuration, not a missing reading."})]}):(0,l.jsxs)("div",{className:"mt-2 flex flex-col gap-2",children:[(0,l.jsx)(z,{label:"Used",valueLabel:`${(0,M.z3)(r.value.usedBytes)} / ${(0,M.z3)(r.value.totalBytes)}`,percent:T(r.value.usedBytes,r.value.totalBytes),tone:"swap",ariaLabel:`Swap ${(0,M.z3)(r.value.usedBytes)} of ${(0,M.z3)(r.value.totalBytes)}`}),(0,l.jsxs)("p",{className:"tnum text-xs text-muted-foreground",children:[(0,M.l9)(T(r.value.usedBytes,r.value.totalBytes))," used",r.stale?" \xb7 last known":""]})]}):"unavailable"===r.state?(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsx)(U,{reason:r.reason})}):(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsx)(L,{children:r.reason})})]})]})})}function H({card:e}){let s="supported"===e.telemetry;return(0,l.jsxs)("article",{className:"flex min-w-0 flex-col gap-3 rounded-lg border border-border bg-card-strong/25 p-3",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("h3",{className:"truncate text-sm font-medium",children:e.name}),(0,l.jsxs)("p",{className:"tnum truncate text-xs text-muted-foreground",children:[e.vendor,e.pciBusId?` \xb7 ${e.pciBusId}`:""]})]}),(0,l.jsxs)("div",{className:"flex shrink-0 flex-wrap items-center gap-1.5",children:[s?null:(0,l.jsx)($.vw,{text:"no telemetry",title:e.reason??"Management adapter"}),e.stale&&"ok"===e.state?(0,l.jsx)($.vw,{text:"last known",title:"Retained from the last accepted sample"}):null]})]}),"ok"===e.state?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(z,{label:"GPU utilization",valueLabel:null===e.utilizationPercent?"Not reported":(0,M.l9)(e.utilizationPercent),percent:e.utilizationPercent,tone:"gpu",ariaLabel:null===e.utilizationPercent?`${e.name} utilization not reported`:`${e.name} utilization ${(0,M.l9)(e.utilizationPercent)}`}),(0,l.jsx)(z,{label:"VRAM",valueLabel:null===e.memoryUsedBytes||null===e.memoryTotalBytes?"Not reported":`${(0,M.z3)(e.memoryUsedBytes)} / ${(0,M.z3)(e.memoryTotalBytes)}`,percent:null!==e.memoryUsedBytes&&null!==e.memoryTotalBytes?T(e.memoryUsedBytes,e.memoryTotalBytes):null,tone:"gpu",ariaLabel:null===e.memoryUsedBytes||null===e.memoryTotalBytes?`${e.name} VRAM not reported`:`${e.name} VRAM ${(0,M.z3)(e.memoryUsedBytes)} of ${(0,M.z3)(e.memoryTotalBytes)}`}),(0,l.jsxs)("dl",{className:"grid grid-cols-2 gap-x-4 gap-y-1",children:[(0,l.jsx)(C,{label:"Temperature",value:null===e.temperatureC?"Not reported":(0,P.cH)(e.temperatureC)}),(0,l.jsx)(C,{label:"Power",value:null===e.powerWatts?"Not reported":(0,P.d5)(e.powerWatts)})]})]}):(0,l.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,l.jsx)("p",{className:"text-xs text-muted-foreground",children:"unsupported"===e.state?"No telemetry.":"No readings for this device."}),e.reason?(0,l.jsx)("p",{className:"text-xs text-warn",children:e.reason}):null,null!==e.memoryTotalBytes?(0,l.jsx)("dl",{className:"mt-1",children:(0,l.jsx)(C,{label:"VRAM total",value:(0,M.z3)(e.memoryTotalBytes)})}):null]})]})}function V({view:e,className:s}){let t=e.gpus.cards;return(0,l.jsx)(x.Z,{title:"GPUs",className:s,action:(0,l.jsxs)("span",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"tnum",children:0===t.length?"0 devices":`${t.length} device${1===t.length?"":"s"}`}),(0,l.jsx)(S,{stale:e.stale})]}),children:0===t.length?"unavailable"===e.gpus.family.state?(0,l.jsx)(U,{reason:e.gpus.family.reason}):(0,l.jsx)(L,{children:A(e.gpus.family,"No GPU devices were reported.")}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-3",children:t.map(e=>(0,l.jsx)(H,{card:e},e.id))}),"unavailable"===e.gpus.family.state?(0,l.jsxs)("p",{className:"mt-3 text-xs text-warn",children:["GPU unavailable \xb7 ",e.gpus.family.reason]}):e.gpus.partial?(0,l.jsx)("p",{className:"mt-3 text-xs text-warn",children:"Some GPUs are not reporting."}):null]})})}function E({filesystem:e}){let s="ok"===e.state&&null!==e.usedBytes&&null!==e.totalBytes?T(e.usedBytes,e.totalBytes):null,t="ok"===e.state&&null!==e.usedBytes&&null!==e.totalBytes?`${(0,M.z3)(e.usedBytes)} / ${(0,M.z3)(e.totalBytes)}`:null!==e.totalBytes?`${(0,M.z3)(e.totalBytes)} total`:"Unavailable",a="ok"===e.state&&null!==e.inodesUsed&&null!==e.inodesTotal&&e.inodesTotal>0?T(e.inodesUsed,e.inodesTotal):null;return(0,l.jsxs)("li",{className:"py-2.5",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-x-3 gap-y-1",children:[(0,l.jsx)("span",{className:"break-all font-mono text-xs text-foreground",children:e.mountPoint}),(0,l.jsxs)("span",{className:"tnum break-all text-xs text-muted-foreground",children:[e.fsType,e.device?` \xb7 ${e.device}`:""]})]}),(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsx)(z,{label:"Capacity",valueLabel:t,percent:s,tone:"disk",ariaLabel:`${e.mountPoint} ${t}`})}),"ok"===e.state?(0,l.jsx)("p",{className:"tnum mt-1 text-xs text-muted-foreground",title:null===a?"Inode usage was not reported for this filesystem.":void 0,children:null===a?"Inodes not reported":`Inodes ${(0,M.l9)(a)} used \xb7 ${(0,P.B4)(e.inodesUsed)} / ${(0,P.B4)(e.inodesTotal)}`}):null,"unavailable"===e.state&&e.reason?(0,l.jsx)("p",{className:"mt-1.5 text-xs text-warn",children:e.reason}):"inventory"===e.state&&e.reason?(0,l.jsx)("p",{className:"mt-1.5 text-xs text-muted-foreground",children:e.reason}):e.stale?(0,l.jsx)("p",{className:"mt-1.5 text-xs text-muted-foreground",children:"Last known usage."}):null]})}function G({disk:e}){let s=null===e.rotational?"Unknown media":e.rotational?"Rotational":"Solid state",t=[null===e.readLatencyMs?"read latency":null,null===e.writeLatencyMs?"write latency":null,null===e.ioUtilizationPercent?"utilization":null].filter(e=>null!==e);return(0,l.jsxs)("li",{className:"py-2.5",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-x-3 gap-y-1",children:[(0,l.jsx)("span",{className:"font-mono text-xs text-foreground",children:e.name}),(0,l.jsxs)("span",{className:"tnum text-xs text-muted-foreground",children:[s,null!==e.sizeBytes?` \xb7 ${(0,M.z3)(e.sizeBytes)}`:""]})]}),e.model?(0,l.jsx)("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:e.model}):null,"ok"===e.state?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("dl",{className:"mt-1.5 grid grid-cols-2 gap-x-4 gap-y-1 sm:grid-cols-4",children:[(0,l.jsx)(C,{label:"Read",value:(0,P.CE)(e.readBytesPerSec)}),(0,l.jsx)(C,{label:"Write",value:(0,P.CE)(e.writeBytesPerSec)}),(0,l.jsx)(C,{label:"Read latency",value:(0,P.YL)(e.readLatencyMs)}),(0,l.jsx)(C,{label:"Write latency",value:(0,P.YL)(e.writeLatencyMs)}),(0,l.jsx)(C,{label:"Utilization",value:null===e.ioUtilizationPercent?"—":(0,M.l9)(e.ioUtilizationPercent)})]}),t.length>0?(0,l.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:["Not reported: ",t.join(", "),"."]}):null]}):(0,l.jsx)("p",{className:`mt-1.5 text-xs ${"unavailable"===e.state?"text-warn":"text-muted-foreground"}`,children:e.reason??"No current I/O reading."}),"ok"===e.state&&e.stale?(0,l.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Last known rates."}):null]})}function _({view:e,className:s}){let t=e.filesystems.items,a=e.disks.items;return(0,l.jsxs)(x.Z,{title:"Disks",className:s,action:(0,l.jsx)(S,{stale:e.stale}),children:[0===t.length&&0===a.length?"unavailable"===e.disks.family.state?(0,l.jsx)(U,{reason:e.disks.family.reason}):(0,l.jsx)(L,{children:A(e.disks.family,"No disks or filesystems were reported.")}):null,(0,l.jsxs)("div",{className:"mt-5 flex flex-col gap-5",children:[t.length>0?(0,l.jsxs)("div",{children:[(0,l.jsx)(I,{children:"Filesystems"}),(0,l.jsx)("ul",{className:"mt-1 divide-y divide-border",children:t.map(e=>(0,l.jsx)(E,{filesystem:e},e.id))})]}):null,a.length>0?(0,l.jsxs)("div",{className:t.length>0?"border-t border-border pt-4":"",children:[(0,l.jsx)(I,{children:"Devices"}),(0,l.jsx)("ul",{className:"mt-1 divide-y divide-border",children:a.map(e=>(0,l.jsx)(G,{disk:e},e.id))})]}):null,"unavailable"!==e.disks.family.state?(0,l.jsxs)("div",{className:t.length>0||a.length>0?"border-t border-border pt-4":"",children:[(0,l.jsx)(I,{children:"I/O pressure"}),(0,l.jsx)(R,{className:"mt-1",readings:[{label:"Some tasks",reading:e.bottlenecks.ioPressureSome,format:M.l9},{label:"Full",reading:e.bottlenecks.ioPressureFull,format:M.l9}]})]}):null]})]})}function D({iface:e}){let s="up"===e.linkState?"Link up":"down"===e.linkState?"Link down":"Link state unknown";return(0,l.jsxs)("li",{className:"py-3",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-x-3 gap-y-1",children:[(0,l.jsx)("span",{className:"font-mono text-xs text-foreground",children:e.name}),(0,l.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5",children:[e.virtual?(0,l.jsx)($.vw,{text:"virtual",title:"Virtual interface, not physical hardware"}):null,(0,l.jsx)("span",{className:"tnum text-xs text-muted-foreground",children:s}),null!==e.speedMbps?(0,l.jsx)("span",{className:"tnum text-xs text-muted-foreground",children:(0,P.Zf)(e.speedMbps)}):null]})]}),e.addresses.length>0?(0,l.jsx)("ul",{className:"mt-1 flex flex-wrap gap-x-3 gap-y-1",children:e.addresses.map((e,s)=>(0,l.jsxs)("li",{className:"tnum break-all font-mono text-xs text-muted-foreground",children:[e.address,"/",e.prefix,(0,l.jsx)("span",{className:"ml-1 font-sans text-xs uppercase tracking-wide",children:"ipv4"===e.family?"v4":"v6"})]},`${e.family}:${e.address}/${e.prefix}:${s}`))}):(0,l.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"No addresses reported."}),"ok"===e.state?(0,l.jsxs)("dl",{className:"mt-1.5 grid grid-cols-2 gap-x-4 gap-y-1",children:[(0,l.jsx)(C,{label:"Receive",value:(0,P.CE)(e.rxBytesPerSec)}),(0,l.jsx)(C,{label:"Transmit",value:(0,P.CE)(e.txBytesPerSec)})]}):(0,l.jsx)("p",{className:`mt-1.5 text-xs ${"unavailable"===e.state?"text-warn":"text-muted-foreground"}`,children:e.reason??"No current rate reading."}),"ok"===e.state&&e.stale?(0,l.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Last known rates."}):null]})}function O({view:e,className:s}){let t=e.network.items;return(0,l.jsx)(x.Z,{title:"Network",className:s,action:(0,l.jsx)(S,{stale:e.stale}),children:0===t.length?"unavailable"===e.network.family.state?(0,l.jsx)(U,{reason:e.network.family.reason}):(0,l.jsx)(L,{children:A(e.network.family,"No network interfaces were reported.")}):(0,l.jsx)("ul",{className:"divide-y divide-border",children:t.map(e=>(0,l.jsx)(D,{iface:e},e.id))})})}var W=t(9939),q=t(7348);function Y(e){let s,t,{iso:a}=e;return null===a?(0,l.jsx)("span",{className:"text-xs text-muted-foreground",children:"—"}):(0,l.jsxs)("span",{className:"tnum text-sm",children:[Number.isFinite((s=new Date(a)).getTime())?s.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}):a,(0,l.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:Number.isFinite((t=new Date(a)).getTime())?t.toLocaleDateString(void 0,{dateStyle:"medium"}):""})]})}function J({state:e}){var s;let t=(0,M.L_)(e);return"ahead"!==t.kind&&"behind"!==t.kind?null:(0,l.jsxs)("p",{role:"status",className:"tnum flex items-start gap-2 rounded-lg bg-warn-soft px-3 py-2 text-xs text-foreground",children:[(0,l.jsx)(i,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-warn","aria-hidden":!0}),(0,l.jsxs)("span",{children:["Collector clock:"," ",(0,l.jsx)("strong",{className:"font-medium",children:Math.abs(s=t.skewMs)>=6e4?`${Math.abs(Math.round(s/6e4))} min`:`${Math.abs(Math.round(s/1e3))} s`})," ","ahead"===t.kind?"ahead of":"behind"," hub time."]})]})}function K({state:e}){return(0,l.jsx)(x.Z,{title:"Collector",children:(0,l.jsxs)("div",{className:"flex flex-col gap-3 py-1",children:[(0,l.jsxs)("p",{className:"flex items-center gap-2 text-sm",children:[(0,l.jsx)("span",{"aria-hidden":!0,className:`inline-block h-2 w-2 shrink-0 rounded-full ${e.connected?"bg-ok":"bg-crit"}`}),e.connected?"Connected to the hub":"Not connected to the hub"]}),(0,l.jsxs)("dl",{className:"flex flex-col gap-1 text-xs",children:[(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)("dt",{className:"shrink-0 text-muted-foreground",children:"Collector"}),(0,l.jsx)("dd",{className:"tnum truncate",children:e.collectorId})]}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)("dt",{className:"shrink-0 text-muted-foreground",children:"Machine"}),(0,l.jsx)("dd",{className:"tnum truncate",children:e.machineId})]})]}),(0,l.jsx)(n(),{href:"/connections",className:"w-fit rounded-md text-xs text-accent transition-colors hover:underline",children:"Connections"})]})})}function Q({state:e,now:s}){let t=e.metrics,a=t?.capturedAt??null,n=t?.receivedAt??e.lastReceivedAt,r=null!=e.expectedIntervalMs,i=r?e.expectedIntervalMs:null,d=(0,M.Cj)(e.expectedIntervalMs);return(0,l.jsx)(x.Z,{title:"Sample times",children:(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("dl",{className:"grid gap-x-8 gap-y-3 sm:grid-cols-2",children:[(0,l.jsx)("dt",{className:"text-xs text-muted-foreground",children:"Captured"}),(0,l.jsx)("dd",{children:(0,l.jsx)(Y,{iso:a})}),(0,l.jsx)("dt",{className:"text-xs text-muted-foreground",children:"Received"}),(0,l.jsx)("dd",{children:(0,l.jsxs)("span",{className:"flex flex-wrap items-baseline gap-2",children:[(0,l.jsx)(Y,{iso:n}),null!==n?(0,l.jsxs)("span",{className:"tnum text-xs text-muted-foreground",children:["\xb7 updated ",(0,M.nV)((0,M.A4)(n,s))]}):null]})}),(0,l.jsx)("dt",{className:"text-xs text-muted-foreground",children:"Sample interval"}),(0,l.jsx)("dd",{children:r?(0,l.jsx)("span",{className:"tnum text-sm",children:(0,M.$)(i)}):(0,l.jsx)("span",{className:"text-sm text-muted-foreground",children:"Unknown"})}),(0,l.jsx)("dt",{className:"text-xs text-muted-foreground",children:"Stale after"}),(0,l.jsx)("dd",{children:(0,l.jsxs)("span",{className:"tnum text-sm",children:[(0,M.$)(d),r?null:(0,l.jsx)("span",{className:"text-muted-foreground",children:" (fallback)"})]})})]}),(0,l.jsx)(J,{state:e})]})})}function X({machineId:e,machineCount:s}){return 0===s?(0,l.jsx)(x.Z,{title:"No machines",className:"mt-8",children:(0,l.jsx)(x.p,{icon:d,note:"No machines are available in your authorized fleet."})}):(0,l.jsxs)(x.Z,{title:"Machine not found",className:"mt-8",children:[(0,l.jsx)(x.p,{icon:d,note:"This machine is unavailable or outside your access."}),(0,l.jsxs)("p",{className:"tnum mt-2 text-center text-xs text-muted-foreground",children:["Requested identifier: ",e]}),(0,l.jsx)("div",{className:"flex justify-center",children:(0,l.jsxs)(n(),{href:"/",className:"mt-2 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,l.jsx)(o,{className:"h-3.5 w-3.5","aria-hidden":!0}),"Back to fleet"]})})]})}function ee({machineId:e}){let{phase:s,machines:t}=(0,W.M)(),{machine:a}=(0,k.JG)("overview",e),n=(0,B.x)(),r=(0,q.c)(),i="live"===s||"reconnecting"===s||"disconnected"===s,d=i?a:void 0,o="reconnecting"===s||"disconnected"===s,x=d?(0,P.hL)(d,r):null,h=d?d.metrics?.receivedAt??d.lastReceivedAt:null,p=h?(0,M.nV)((0,M.A4)(h,r)):null;return(0,l.jsx)(c.G,{title:"Overview",machineId:e,machineView:"overview",headerRight:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(m.$E,{}),(0,l.jsx)(u.B,{})]}),children:n||(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(B.E,{}),d&&x?(0,l.jsxs)(l.Fragment,{children:[x.tags.length>0?(0,l.jsx)("ul",{className:"mb-4 flex flex-wrap gap-1.5","aria-label":"Machine tags",children:x.tags.map(e=>(0,l.jsx)("li",{className:"rounded-full border border-border px-2 py-0.5 text-xs text-muted-foreground",children:e},e))}):null,(0,l.jsxs)("section",{"aria-label":`${x.displayName} live overview`,className:"grid grid-cols-1 gap-5 xl:grid-cols-3",children:[(0,l.jsx)(F,{view:x,ageLabel:p,held:o,className:"xl:col-span-2"}),(0,l.jsx)(Z,{view:x,ageLabel:p,held:o}),(0,l.jsx)("div",{className:"min-w-0 xl:col-span-3",children:(0,l.jsx)(w,{machine:d},e)}),(0,l.jsx)(V,{view:x,className:"xl:col-span-3"}),(0,l.jsx)(_,{view:x,className:"xl:col-span-2"}),(0,l.jsx)(O,{view:x})]}),(0,l.jsxs)("details",{className:"mt-5 max-w-4xl text-xs text-muted-foreground",children:[(0,l.jsx)("summary",{className:"inline-flex min-h-9 cursor-pointer items-center rounded-md hover:text-foreground",children:"Collector details"}),(0,l.jsxs)("div",{className:"mt-3 grid gap-4 lg:grid-cols-2",children:[(0,l.jsx)(K,{state:d}),(0,l.jsx)(Q,{state:d,now:r})]})]})]}):i?(0,l.jsx)(X,{machineId:e,machineCount:t.length}):null]})})}}},e=>{e.O(0,[944,939,103,130,408,441,794,358],()=>e(e.s=4546)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{3381:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});let a=(0,t(8698).A)("CloudOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5.782 5.782A7 7 0 0 0 9 19h8.5a4.5 4.5 0 0 0 1.307-.193",key:"yfwify"}],["path",{d:"M21.532 16.5A4.5 4.5 0 0 0 17.5 10h-1.79A7.008 7.008 0 0 0 10 5.07",key:"jlfiyv"}]])},3612:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});let a=(0,t(8698).A)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},7281:(e,s,t)=>{"use strict";t.d(s,{FleetView:()=>L});var a=t(5155),l=t(8500),n=t.n(l),r=t(3612),d=t(9926),o=t(3381),c=t(9664),i=t(2115),m=t(4173),u=t(3440),x=t(940),h=t(802),p=t(6576),j=t(6582),f=t(7586),b=t(9939),v=t(4334),N=t(7348),g=t(2241);let y={ok:"bg-ok-soft text-ok",degraded:"bg-warn-soft text-warn",stale:"bg-warn-soft text-warn",disconnected:"bg-crit-soft text-crit",unseen:"border border-border text-muted-foreground"};function w(e){return"value"===e.state?e.stale?{out:"stale",usedBytes:e.value.usedBytes,totalBytes:e.value.totalBytes}:{out:"value",usedBytes:e.value.usedBytes,totalBytes:e.value.totalBytes}:"unavailable"===e.state?{out:"unavailable",reason:e.reason}:{out:"absent"}}function k({level:e}){return(0,a.jsxs)("span",{className:`tnum inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs ${y[e]}`,children:[(0,a.jsx)("span",{"aria-hidden":!0,className:"inline-block h-1.5 w-1.5 rounded-full bg-current opacity-70"}),(0,f.fv)(e)]})}function A(e){return`No update for over ${(0,f.$)(e)} (judged by hub receipt time)`}function C({field:e,isHeld:s,thresholdMs:t}){return"value"===e.out?(0,a.jsxs)("span",{className:"tnum text-sm",children:[(0,f.l9)(e.value),s?(0,a.jsx)(U,{}):null]}):"stale"===e.out?(0,a.jsxs)("span",{className:"tnum text-sm",children:[(0,f.l9)(e.value),(0,a.jsx)("span",{className:"ml-1.5",children:(0,a.jsx)(p.vw,{text:"stale",title:A(t)})})]}):"unavailable"===e.out?(0,a.jsx)("span",{className:"text-xs text-warn",title:e.reason,children:"Unavailable"}):(0,a.jsx)("span",{className:"tnum text-sm text-muted-foreground",children:"—"})}function U(){return(0,a.jsx)("span",{className:"ml-1.5",children:(0,a.jsx)(p.vw,{text:"held",title:"Last known value, kept while the connection is down"})})}function M(e){return"value"===e.out||"stale"===e.out?`${(0,f.z3)(e.usedBytes)} / ${(0,f.z3)(e.totalBytes)}`:"unavailable"===e.out?"Unavailable":"—"}function P({summary:e}){if(null===e)return(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"No GPU data"});if(0===e.supportedCount)return(0,a.jsxs)("span",{className:"text-xs text-muted-foreground",title:e.reason??"No supported telemetry",children:[e.count," adapter",1===e.count?"":"s"," \xb7 no telemetry"]});if(e.reason)return(0,a.jsxs)("span",{className:"text-xs text-warn",title:e.reason,children:[e.supportedCount," GPU",1===e.supportedCount?"":"s"," \xb7 unavailable"]});let s=null===e.maxUtilizationPercent?"util —":`util ${(0,f.l9)(e.maxUtilizationPercent)}`,t=null!==e.memoryUsedBytes&&null!==e.memoryTotalBytes?`${(0,f.z3)(e.memoryUsedBytes)} / ${(0,f.z3)(e.memoryTotalBytes)}`:"VRAM —";return(0,a.jsx)("span",{className:"tnum text-xs",children:e.partial?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"text-warn",children:[e.okCount,"/",e.supportedCount," GPUs reporting"]}),(0,a.jsxs)("span",{className:"text-muted-foreground",children:[" \xb7 ",s," \xb7 ",t," "]}),(0,a.jsx)(p.vw,{text:"partial",title:"At least one supported GPU has no current reading"}),e.stale?(0,a.jsx)("span",{className:"ml-1.5",children:(0,a.jsx)(p.vw,{text:"last known",title:"Retained from the last accepted sample"})}):null]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-foreground",children:e.supportedCount}),(0,a.jsxs)("span",{className:"text-muted-foreground",children:[" ","GPU",1===e.supportedCount?"":"s"," \xb7 ",s," \xb7 ",t]}),e.stale?(0,a.jsx)("span",{className:"ml-1.5",children:(0,a.jsx)(p.vw,{text:"last known",title:"Retained from the last accepted sample"})}):null]})})}function B({state:e}){let s=(0,g.V5)(e);return 0===s.length?null:(0,a.jsx)("ul",{className:"mt-1 flex flex-wrap gap-1",children:s.map(e=>(0,a.jsx)("li",{className:"rounded-full border border-border px-1.5 py-0.5 text-xs text-muted-foreground",children:e},e))})}function $({state:e}){let s=(0,g.v4)(e),t=[e.hostname!==s?e.hostname:null].filter(e=>!!(e&&e!==s)).join(" \xb7 ");return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col",children:[(0,a.jsx)("span",{className:"truncate text-sm font-medium",children:s}),t?(0,a.jsx)("span",{className:"tnum truncate text-xs text-muted-foreground",children:t}):null,(0,a.jsx)(B,{state:e})]})}function F({points:e}){let s=(e.at(-1)?.receivedAtLocal??0)-6e5,t=e.filter(e=>e.receivedAtLocal>=s),l=(0,v.K)(t,160,40),n=(0,v.K)(t.map(e=>({...e,cpuPercent:e.memoryPercent})),160,40);return(0,a.jsxs)("div",{className:"w-40 max-w-full",title:"CPU and memory since sign-in",children:[(0,a.jsxs)("svg",{viewBox:"0 0 160 40",className:"h-10 w-full",role:"img","aria-label":"Recent CPU and memory usage since sign-in",children:[(0,a.jsx)("line",{x1:"4",x2:"156",y1:"36",y2:"36",stroke:"var(--border)"}),l?(0,a.jsx)("path",{d:l,fill:"none",stroke:"var(--cpu)",strokeWidth:"1.5"}):null,n?(0,a.jsx)("path",{d:n,fill:"none",stroke:"var(--mem)",strokeWidth:"1.5"}):null]}),(0,a.jsxs)("div",{className:"flex gap-3 text-xs text-muted-foreground",children:[(0,a.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-cpu"}),"CPU"]}),(0,a.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-mem"}),"RAM"]})]})]})}function R({state:e,now:s,held:t,points:l}){var r;let d=(0,g.hL)(e,s),o=(0,g.fp)(e,s),c=(0,f.F2)(e,s),i="stale"===d.freshness,m=A(d.thresholdMs),u=w(o.memory),x="unavailable"===d.cpu.total.state||"unavailable"===d.memory.state||"unavailable"===d.gpus.family.state||d.gpus.partial||"unavailable"===d.disks.family.state||"unavailable"===d.network.family.state,h="ok"===c.attention&&x?"degraded":c.attention;return(0,a.jsxs)("tr",{className:"transition-colors hover:bg-card-strong/60",children:[(0,a.jsx)("td",{className:"border-b border-border py-2.5 pr-4",children:(0,a.jsx)(n(),{href:`/machines/${encodeURIComponent(e.machineId)}`,className:"inline-flex min-w-0 flex-col rounded-sm transition-colors hover:underline",children:(0,a.jsx)($,{state:e})})}),(0,a.jsx)("td",{className:"border-b border-border py-2.5 pr-4",children:(0,a.jsxs)("span",{className:"tnum inline-flex items-center gap-1.5 text-xs",children:[(0,a.jsx)("span",{"aria-hidden":!0,className:`inline-block h-1.5 w-1.5 shrink-0 rounded-full ${e.connected?"bg-ok":"bg-crit"}`}),e.connected?"Connected":"Disconnected"]})}),(0,a.jsx)("td",{className:"border-b border-border py-2.5 pr-4",children:(0,a.jsx)(C,{field:"value"===(r=o.cpu).state?r.stale?{out:"stale",value:r.value}:{out:"value",value:r.value}:"unavailable"===r.state?{out:"unavailable",reason:r.reason}:{out:"absent"},isHeld:t,thresholdMs:d.thresholdMs})}),(0,a.jsx)("td",{className:"border-b border-border py-2.5 pr-4",children:(0,a.jsxs)("span",{className:"tnum text-sm",children:[M(u),"stale"===u.out?(0,a.jsx)("span",{className:"ml-1.5",children:(0,a.jsx)(p.vw,{text:"stale",title:m})}):"value"===u.out&&t?(0,a.jsx)(U,{}):null]})}),(0,a.jsx)("td",{className:"border-b border-border py-2.5 pr-4",children:(0,a.jsx)(P,{summary:o.gpu})}),(0,a.jsx)("td",{className:"border-b border-border py-2.5 pr-4",children:(0,a.jsxs)("span",{className:"tnum text-sm",children:[(0,f.nV)((0,f.A4)(e.lastReceivedAt,s)),i?(0,a.jsx)("span",{className:"ml-1.5",children:(0,a.jsx)(p.vw,{text:"stale",title:m})}):t?(0,a.jsx)(U,{}):null]})}),(0,a.jsx)("td",{className:"border-b border-border py-2.5 pr-4",children:(0,a.jsx)(F,{points:l})}),(0,a.jsx)("td",{className:"border-b border-border py-2.5",children:(0,a.jsx)(k,{level:h})})]})}function G({state:e,now:s,held:t,points:l}){let r=(0,g.hL)(e,s),d=(0,g.fp)(e,s),o=(0,f.F2)(e,s),c="stale"===r.freshness,i=A(r.thresholdMs),m=w(d.memory),u="unavailable"===r.cpu.total.state||"unavailable"===r.memory.state||"unavailable"===r.gpus.family.state||r.gpus.partial||"unavailable"===r.disks.family.state||"unavailable"===r.network.family.state,x="ok"===o.attention&&u?"degraded":o.attention;return(0,a.jsx)("li",{children:(0,a.jsxs)(n(),{href:`/machines/${encodeURIComponent(e.machineId)}`,className:"block rounded-xl border border-border bg-card p-4 transition-colors hover:border-muted-foreground/40",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsx)($,{state:e}),(0,a.jsx)(k,{level:x})]}),(0,a.jsxs)("dl",{className:"mt-3 grid grid-cols-2 gap-x-4 gap-y-2 text-xs",children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Collector"}),(0,a.jsx)("dd",{className:"tnum",children:e.connected?"Connected":"Disconnected"}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"CPU"}),(0,a.jsx)("dd",{className:"tnum",children:"value"===d.cpu.state?`${(0,f.l9)(d.cpu.value)}${d.cpu.stale?" \xb7 last known":""}`:"unavailable"===d.cpu.state?"Unavailable":"—"}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Memory"}),(0,a.jsxs)("dd",{className:"tnum",children:[M(m),"stale"===m.out?(0,a.jsx)("span",{className:"ml-1.5",children:(0,a.jsx)(p.vw,{text:"stale",title:i})}):null]}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"GPU"}),(0,a.jsx)("dd",{children:(0,a.jsx)(P,{summary:d.gpu})}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Last received"}),(0,a.jsxs)("dd",{className:"tnum",children:[(0,f.nV)((0,f.A4)(e.lastReceivedAt,s)),c?(0,a.jsx)("span",{className:"ml-1.5",children:(0,a.jsx)(p.vw,{text:"stale",title:i})}):null]})]}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)(F,{points:l})})]})})}function L(){let{phase:e,machines:s,history:t,session:l}=(0,b.M)(),p=(0,j.x)(),f=(0,N.c)(),[v,y]=(0,i.useState)(""),w=s.length,k="reconnecting"===e||"disconnected"===e,A=(0,g.rn)(s,v),C=w>0&&("live"===e||k);return(0,a.jsx)(m.G,{title:"Fleet",headerRight:(0,a.jsxs)(a.Fragment,{children:["signed-in"===l.kind&&l.user.admin?(0,a.jsxs)(n(),{href:"/administration#collectors",className:"inline-flex items-center gap-1.5 rounded-md border border-border px-2.5 py-1.5 text-xs hover:bg-card-strong",children:[(0,a.jsx)(r.A,{className:"h-3.5 w-3.5","aria-hidden":!0}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Add machine"}),(0,a.jsx)("span",{className:"sr-only sm:hidden",children:"Add machine"})]}):null,(0,a.jsx)(x.$E,{}),(0,a.jsx)(h.B,{})]}),children:p||(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j.E,{}),"connecting"===e&&0===w?(0,a.jsx)(u.Z,{title:"Waiting for the first snapshot",className:"mt-10",children:(0,a.jsx)(u.p,{icon:d.A,note:"Waiting for the first snapshot…"})}):null,("live"===e||k)&&0===w?(0,a.jsx)(u.Z,{title:"No machines",className:"mt-10",children:(0,a.jsx)(u.p,{icon:o.A,note:"No machines are available in your authorized fleet."})}):null,C?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-wrap items-end justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("label",{htmlFor:"fleet-search",className:"sr-only",children:"Search machines by name or tag"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(c.A,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground","aria-hidden":!0}),(0,a.jsx)("input",{id:"fleet-search",type:"search",value:v,onChange:e=>y(e.target.value),placeholder:"Search name or tag",className:"w-64 max-w-full rounded-md border border-border bg-card py-1.5 pl-8 pr-3 text-sm text-foreground placeholder:text-muted-foreground"})]})]}),(0,a.jsxs)("p",{className:"tnum text-xs text-muted-foreground",role:"status",children:[A.length," of ",w," machine",1===w?"":"s",v.trim()?` matching “${v.trim()}”`:""]})]}),0===A.length?(0,a.jsx)(u.Z,{title:"No matching machines",children:(0,a.jsx)(u.p,{icon:c.A,note:`No machines match “${v.trim()}”.`})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"hidden md:block",children:(0,a.jsx)(u.Z,{title:"Machines",action:(0,a.jsxs)("span",{children:[w," machine",1===w?"":"s"]}),children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full border-separate border-spacing-0 text-left",children:[(0,a.jsx)("caption",{className:"sr-only",children:"Fleet machines with collector connection, CPU, memory, GPU summary, and sample freshness"}),(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"text-xs text-muted-foreground",children:[(0,a.jsx)("th",{scope:"col",className:"pb-2 pr-4 font-normal",children:"Machine"}),(0,a.jsx)("th",{scope:"col",className:"pb-2 pr-4 font-normal",children:"Collector"}),(0,a.jsx)("th",{scope:"col",className:"pb-2 pr-4 font-normal",children:"CPU"}),(0,a.jsx)("th",{scope:"col",className:"pb-2 pr-4 font-normal",children:"Memory"}),(0,a.jsx)("th",{scope:"col",className:"pb-2 pr-4 font-normal",children:"GPU"}),(0,a.jsx)("th",{scope:"col",className:"pb-2 pr-4 font-normal",children:"Last received"}),(0,a.jsx)("th",{scope:"col",className:"pb-2 pr-4 font-normal",children:"Recent load"}),(0,a.jsx)("th",{scope:"col",className:"pb-2 font-normal",children:"State"})]})}),(0,a.jsx)("tbody",{children:A.map(e=>(0,a.jsx)(R,{state:e,now:f,held:k,points:t.get(e.machineId)??[]},e.machineId))})]})})})}),(0,a.jsx)("div",{className:"md:hidden",children:(0,a.jsx)(u.Z,{title:"Machines",action:(0,a.jsxs)("span",{className:"tnum",children:[A.length," machine",1===A.length?"":"s"]}),children:(0,a.jsx)("ul",{className:"flex flex-col gap-3",children:A.map(e=>(0,a.jsx)(G,{state:e,now:f,held:k,points:t.get(e.machineId)??[]},e.machineId))})})})]})]}):null]})})}},9664:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});let a=(0,t(8698).A)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},9858:(e,s,t)=>{Promise.resolve().then(t.bind(t,7281))},9926:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});let a=(0,t(8698).A)("Hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]])}},e=>{e.O(0,[157,939,103,227,441,794,358],()=>e(e.s=9858)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{3381:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});let a=(0,t(8698).A)("CloudOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5.782 5.782A7 7 0 0 0 9 19h8.5a4.5 4.5 0 0 0 1.307-.193",key:"yfwify"}],["path",{d:"M21.532 16.5A4.5 4.5 0 0 0 17.5 10h-1.79A7.008 7.008 0 0 0 10 5.07",key:"jlfiyv"}]])},3612:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});let a=(0,t(8698).A)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},7281:(e,s,t)=>{"use strict";t.d(s,{FleetView:()=>L});var a=t(5155),l=t(8500),n=t.n(l),r=t(3612),d=t(9926),o=t(3381),c=t(9664),i=t(2115),m=t(4173),u=t(3440),x=t(940),h=t(802),p=t(6576),j=t(6582),f=t(7586),b=t(9939),v=t(4334),N=t(7348),g=t(2241);let y={ok:"bg-ok-soft text-ok",degraded:"bg-warn-soft text-warn",stale:"bg-warn-soft text-warn",disconnected:"bg-crit-soft text-crit",unseen:"border border-border text-muted-foreground"};function w(e){return"value"===e.state?e.stale?{out:"stale",usedBytes:e.value.usedBytes,totalBytes:e.value.totalBytes}:{out:"value",usedBytes:e.value.usedBytes,totalBytes:e.value.totalBytes}:"unavailable"===e.state?{out:"unavailable",reason:e.reason}:{out:"absent"}}function k({level:e}){return(0,a.jsxs)("span",{className:`tnum inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs ${y[e]}`,children:[(0,a.jsx)("span",{"aria-hidden":!0,className:"inline-block h-1.5 w-1.5 rounded-full bg-current opacity-70"}),(0,f.fv)(e)]})}function A(e){return`No update for over ${(0,f.$)(e)} (judged by hub receipt time)`}function C({field:e,isHeld:s,thresholdMs:t}){return"value"===e.out?(0,a.jsxs)("span",{className:"tnum text-sm",children:[(0,f.l9)(e.value),s?(0,a.jsx)(U,{}):null]}):"stale"===e.out?(0,a.jsxs)("span",{className:"tnum text-sm",children:[(0,f.l9)(e.value),(0,a.jsx)("span",{className:"ml-1.5",children:(0,a.jsx)(p.vw,{text:"stale",title:A(t)})})]}):"unavailable"===e.out?(0,a.jsx)("span",{className:"text-xs text-warn",title:e.reason,children:"Unavailable"}):(0,a.jsx)("span",{className:"tnum text-sm text-muted-foreground",children:"—"})}function U(){return(0,a.jsx)("span",{className:"ml-1.5",children:(0,a.jsx)(p.vw,{text:"held",title:"Last known value, kept while the connection is down"})})}function M(e){return"value"===e.out||"stale"===e.out?`${(0,f.z3)(e.usedBytes)} / ${(0,f.z3)(e.totalBytes)}`:"unavailable"===e.out?"Unavailable":"—"}function P({summary:e}){if(null===e)return(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"No GPU data"});if(0===e.supportedCount)return(0,a.jsxs)("span",{className:"text-xs text-muted-foreground",title:e.reason??"No supported telemetry",children:[e.count," adapter",1===e.count?"":"s"," \xb7 no telemetry"]});if(e.reason)return(0,a.jsxs)("span",{className:"text-xs text-warn",title:e.reason,children:[e.supportedCount," GPU",1===e.supportedCount?"":"s"," \xb7 unavailable"]});let s=null===e.maxUtilizationPercent?"util —":`util ${(0,f.l9)(e.maxUtilizationPercent)}`,t=null!==e.memoryUsedBytes&&null!==e.memoryTotalBytes?`${(0,f.z3)(e.memoryUsedBytes)} / ${(0,f.z3)(e.memoryTotalBytes)}`:"VRAM —";return(0,a.jsx)("span",{className:"tnum text-xs",children:e.partial?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"text-warn",children:[e.okCount,"/",e.supportedCount," GPUs reporting"]}),(0,a.jsxs)("span",{className:"text-muted-foreground",children:[" \xb7 ",s," \xb7 ",t," "]}),(0,a.jsx)(p.vw,{text:"partial",title:"At least one supported GPU has no current reading"}),e.stale?(0,a.jsx)("span",{className:"ml-1.5",children:(0,a.jsx)(p.vw,{text:"last known",title:"Retained from the last accepted sample"})}):null]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-foreground",children:e.supportedCount}),(0,a.jsxs)("span",{className:"text-muted-foreground",children:[" ","GPU",1===e.supportedCount?"":"s"," \xb7 ",s," \xb7 ",t]}),e.stale?(0,a.jsx)("span",{className:"ml-1.5",children:(0,a.jsx)(p.vw,{text:"last known",title:"Retained from the last accepted sample"})}):null]})})}function B({state:e}){let s=(0,g.V5)(e);return 0===s.length?null:(0,a.jsx)("ul",{className:"mt-1 flex flex-wrap gap-1",children:s.map(e=>(0,a.jsx)("li",{className:"rounded-full border border-border px-1.5 py-0.5 text-xs text-muted-foreground",children:e},e))})}function $({state:e}){let s=(0,g.v4)(e),t=[e.hostname!==s?e.hostname:null].filter(e=>!!(e&&e!==s)).join(" \xb7 ");return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col",children:[(0,a.jsx)("span",{className:"truncate text-sm font-medium",children:s}),t?(0,a.jsx)("span",{className:"tnum truncate text-xs text-muted-foreground",children:t}):null,(0,a.jsx)(B,{state:e})]})}function F({points:e}){let s=(e.at(-1)?.receivedAtLocal??0)-6e5,t=e.filter(e=>e.receivedAtLocal>=s),l=(0,v.K)(t,160,40),n=(0,v.K)(t.map(e=>({...e,cpuPercent:e.memoryPercent})),160,40);return(0,a.jsxs)("div",{className:"w-40 max-w-full",title:"CPU and memory since sign-in",children:[(0,a.jsxs)("svg",{viewBox:"0 0 160 40",className:"h-10 w-full",role:"img","aria-label":"Recent CPU and memory usage since sign-in",children:[(0,a.jsx)("line",{x1:"4",x2:"156",y1:"36",y2:"36",stroke:"var(--border)"}),l?(0,a.jsx)("path",{d:l,fill:"none",stroke:"var(--cpu)",strokeWidth:"1.5"}):null,n?(0,a.jsx)("path",{d:n,fill:"none",stroke:"var(--mem)",strokeWidth:"1.5"}):null]}),(0,a.jsxs)("div",{className:"flex gap-3 text-xs text-muted-foreground",children:[(0,a.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-cpu"}),"CPU"]}),(0,a.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-mem"}),"RAM"]})]})]})}function R({state:e,now:s,held:t,points:l}){var r;let d=(0,g.hL)(e,s),o=(0,g.fp)(e,s),c=(0,f.F2)(e,s),i="stale"===d.freshness,m=A(d.thresholdMs),u=w(o.memory),x="unavailable"===d.cpu.total.state||"unavailable"===d.memory.state||"unavailable"===d.gpus.family.state||d.gpus.partial||"unavailable"===d.disks.family.state||"unavailable"===d.network.family.state,h="ok"===c.attention&&x?"degraded":c.attention;return(0,a.jsxs)("tr",{className:"transition-colors hover:bg-card-strong/60",children:[(0,a.jsx)("td",{className:"border-b border-border py-2.5 pr-4",children:(0,a.jsx)(n(),{href:`/machines/${encodeURIComponent(e.machineId)}`,className:"inline-flex min-w-0 flex-col rounded-sm transition-colors hover:underline",children:(0,a.jsx)($,{state:e})})}),(0,a.jsx)("td",{className:"border-b border-border py-2.5 pr-4",children:(0,a.jsxs)("span",{className:"tnum inline-flex items-center gap-1.5 text-xs",children:[(0,a.jsx)("span",{"aria-hidden":!0,className:`inline-block h-1.5 w-1.5 shrink-0 rounded-full ${e.connected?"bg-ok":"bg-crit"}`}),e.connected?"Connected":"Disconnected"]})}),(0,a.jsx)("td",{className:"border-b border-border py-2.5 pr-4",children:(0,a.jsx)(C,{field:"value"===(r=o.cpu).state?r.stale?{out:"stale",value:r.value}:{out:"value",value:r.value}:"unavailable"===r.state?{out:"unavailable",reason:r.reason}:{out:"absent"},isHeld:t,thresholdMs:d.thresholdMs})}),(0,a.jsx)("td",{className:"border-b border-border py-2.5 pr-4",children:(0,a.jsxs)("span",{className:"tnum text-sm",children:[M(u),"stale"===u.out?(0,a.jsx)("span",{className:"ml-1.5",children:(0,a.jsx)(p.vw,{text:"stale",title:m})}):"value"===u.out&&t?(0,a.jsx)(U,{}):null]})}),(0,a.jsx)("td",{className:"border-b border-border py-2.5 pr-4",children:(0,a.jsx)(P,{summary:o.gpu})}),(0,a.jsx)("td",{className:"border-b border-border py-2.5 pr-4",children:(0,a.jsxs)("span",{className:"tnum text-sm",children:[(0,f.nV)((0,f.A4)(e.lastReceivedAt,s)),i?(0,a.jsx)("span",{className:"ml-1.5",children:(0,a.jsx)(p.vw,{text:"stale",title:m})}):t?(0,a.jsx)(U,{}):null]})}),(0,a.jsx)("td",{className:"border-b border-border py-2.5 pr-4",children:(0,a.jsx)(F,{points:l})}),(0,a.jsx)("td",{className:"border-b border-border py-2.5",children:(0,a.jsx)(k,{level:h})})]})}function G({state:e,now:s,held:t,points:l}){let r=(0,g.hL)(e,s),d=(0,g.fp)(e,s),o=(0,f.F2)(e,s),c="stale"===r.freshness,i=A(r.thresholdMs),m=w(d.memory),u="unavailable"===r.cpu.total.state||"unavailable"===r.memory.state||"unavailable"===r.gpus.family.state||r.gpus.partial||"unavailable"===r.disks.family.state||"unavailable"===r.network.family.state,x="ok"===o.attention&&u?"degraded":o.attention;return(0,a.jsx)("li",{children:(0,a.jsxs)(n(),{href:`/machines/${encodeURIComponent(e.machineId)}`,className:"block rounded-xl border border-border bg-card p-4 transition-colors hover:border-muted-foreground/40",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsx)($,{state:e}),(0,a.jsx)(k,{level:x})]}),(0,a.jsxs)("dl",{className:"mt-3 grid grid-cols-2 gap-x-4 gap-y-2 text-xs",children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Collector"}),(0,a.jsx)("dd",{className:"tnum",children:e.connected?"Connected":"Disconnected"}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"CPU"}),(0,a.jsx)("dd",{className:"tnum",children:"value"===d.cpu.state?`${(0,f.l9)(d.cpu.value)}${d.cpu.stale?" \xb7 last known":""}`:"unavailable"===d.cpu.state?"Unavailable":"—"}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Memory"}),(0,a.jsxs)("dd",{className:"tnum",children:[M(m),"stale"===m.out?(0,a.jsx)("span",{className:"ml-1.5",children:(0,a.jsx)(p.vw,{text:"stale",title:i})}):null]}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"GPU"}),(0,a.jsx)("dd",{children:(0,a.jsx)(P,{summary:d.gpu})}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Last received"}),(0,a.jsxs)("dd",{className:"tnum",children:[(0,f.nV)((0,f.A4)(e.lastReceivedAt,s)),c?(0,a.jsx)("span",{className:"ml-1.5",children:(0,a.jsx)(p.vw,{text:"stale",title:i})}):null]})]}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)(F,{points:l})})]})})}function L(){let{phase:e,machines:s,history:t,session:l}=(0,b.M)(),p=(0,j.x)(),f=(0,N.c)(),[v,y]=(0,i.useState)(""),w=s.length,k="reconnecting"===e||"disconnected"===e,A=(0,g.rn)(s,v),C=w>0&&("live"===e||k);return(0,a.jsx)(m.G,{title:"Fleet",headerRight:(0,a.jsxs)(a.Fragment,{children:["signed-in"===l.kind&&l.user.admin?(0,a.jsxs)(n(),{href:"/administration#collectors",className:"inline-flex items-center gap-1.5 rounded-md border border-border px-2.5 py-1.5 text-xs hover:bg-card-strong",children:[(0,a.jsx)(r.A,{className:"h-3.5 w-3.5","aria-hidden":!0}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Add machine"}),(0,a.jsx)("span",{className:"sr-only sm:hidden",children:"Add machine"})]}):null,(0,a.jsx)(x.$E,{}),(0,a.jsx)(h.B,{})]}),children:p||(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j.E,{}),"connecting"===e&&0===w?(0,a.jsx)(u.Z,{title:"Waiting for the first snapshot",className:"mt-10",children:(0,a.jsx)(u.p,{icon:d.A,note:"Waiting for the first snapshot…"})}):null,("live"===e||k)&&0===w?(0,a.jsx)(u.Z,{title:"No machines",className:"mt-10",children:(0,a.jsx)(u.p,{icon:o.A,note:"No machines are available in your authorized fleet."})}):null,C?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-wrap items-end justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("label",{htmlFor:"fleet-search",className:"sr-only",children:"Search machines by name or tag"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(c.A,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground","aria-hidden":!0}),(0,a.jsx)("input",{id:"fleet-search",type:"search",value:v,onChange:e=>y(e.target.value),placeholder:"Search name or tag",className:"w-64 max-w-full rounded-md border border-border bg-card py-1.5 pl-8 pr-3 text-sm text-foreground placeholder:text-muted-foreground"})]})]}),(0,a.jsxs)("p",{className:"tnum text-xs text-muted-foreground",role:"status",children:[A.length," of ",w," machine",1===w?"":"s",v.trim()?` matching “${v.trim()}”`:""]})]}),0===A.length?(0,a.jsx)(u.Z,{title:"No matching machines",children:(0,a.jsx)(u.p,{icon:c.A,note:`No machines match “${v.trim()}”.`})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"hidden md:block",children:(0,a.jsx)(u.Z,{title:"Machines",action:(0,a.jsxs)("span",{children:[w," machine",1===w?"":"s"]}),children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full border-separate border-spacing-0 text-left",children:[(0,a.jsx)("caption",{className:"sr-only",children:"Fleet machines with collector connection, CPU, memory, GPU summary, and sample freshness"}),(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"text-xs text-muted-foreground",children:[(0,a.jsx)("th",{scope:"col",className:"pb-2 pr-4 font-normal",children:"Machine"}),(0,a.jsx)("th",{scope:"col",className:"pb-2 pr-4 font-normal",children:"Collector"}),(0,a.jsx)("th",{scope:"col",className:"pb-2 pr-4 font-normal",children:"CPU"}),(0,a.jsx)("th",{scope:"col",className:"pb-2 pr-4 font-normal",children:"Memory"}),(0,a.jsx)("th",{scope:"col",className:"pb-2 pr-4 font-normal",children:"GPU"}),(0,a.jsx)("th",{scope:"col",className:"pb-2 pr-4 font-normal",children:"Last received"}),(0,a.jsx)("th",{scope:"col",className:"pb-2 pr-4 font-normal",children:"Recent load"}),(0,a.jsx)("th",{scope:"col",className:"pb-2 font-normal",children:"State"})]})}),(0,a.jsx)("tbody",{children:A.map(e=>(0,a.jsx)(R,{state:e,now:f,held:k,points:t.get(e.machineId)??[]},e.machineId))})]})})})}),(0,a.jsx)("div",{className:"md:hidden",children:(0,a.jsx)(u.Z,{title:"Machines",action:(0,a.jsxs)("span",{className:"tnum",children:[A.length," machine",1===A.length?"":"s"]}),children:(0,a.jsx)("ul",{className:"flex flex-col gap-3",children:A.map(e=>(0,a.jsx)(G,{state:e,now:f,held:k,points:t.get(e.machineId)??[]},e.machineId))})})})]})]}):null]})})}},9664:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});let a=(0,t(8698).A)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},9858:(e,s,t)=>{Promise.resolve().then(t.bind(t,7281))},9926:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});let a=(0,t(8698).A)("Hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]])}},e=>{e.O(0,[944,939,103,130,441,794,358],()=>e(e.s=9858)),_N_E=e.O()}]);
@@ -0,0 +1,3 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[952],{1:(e,t,r)=>{"use strict";r.d(t,{PE:()=>o,UR:()=>c,kg:()=>l,uW:()=>d});let s=/^[\u0009\u000a\u000d ]*[=+\-@]/,n=/^[\u0009\u000a\u000d]/;function a(e){if(null==e)return"";if("number"==typeof e)return Number.isFinite(e)?String(e):"";if("boolean"==typeof e)return e?"true":"false";let t=0===e.length?e:s.test(e)||n.test(e)?`'${e}`:e;return/[",\t\r\n]/.test(t)?`"${t.replace(/"/g,'""')}"`:t}function i(e){return e.map(a).join(",")}function l(e){return`${e.map(i).join("\r\n")}\r
2
+ `}function o(e,t,r){if("u"<typeof document)return;let s=new Blob([t],{type:r}),n=URL.createObjectURL(s),a=document.createElement("a");a.href=n,a.download=e,a.rel="noopener",a.style.display="none",document.body.append(a),a.click(),a.remove(),globalThis.setTimeout(()=>URL.revokeObjectURL(n),0)}let c="text/csv;charset=utf-8",d="application/json;charset=utf-8"},62:(e,t,r)=>{Promise.resolve().then(r.bind(r,1721)),Promise.resolve().then(r.bind(r,7339)),Promise.resolve().then(r.bind(r,9904)),Promise.resolve().then(r.bind(r,2701)),Promise.resolve().then(r.bind(r,2394))},438:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(8698).A)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},2910:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(8698).A)("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]])},3381:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(8698).A)("CloudOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5.782 5.782A7 7 0 0 0 9 19h8.5a4.5 4.5 0 0 0 1.307-.193",key:"yfwify"}],["path",{d:"M21.532 16.5A4.5 4.5 0 0 0 17.5 10h-1.79A7.008 7.008 0 0 0 10 5.07",key:"jlfiyv"}]])},6582:(e,t,r)=>{"use strict";r.d(t,{E:()=>x,x:()=>g});var s=r(5155),n=r(8500),a=r.n(n),i=r(828),l=r(6914),o=r(7029),c=r(438),d=r(7422),u=r(1735),p=r(3440),h=r(9939);function m(e){return(0,s.jsxs)("button",{type:"button",onClick:e.onClick,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,s.jsx)(i.A,{className:"h-3.5 w-3.5","aria-hidden":!0}),e.children]})}function f(e){return(0,s.jsx)(a(),{href:e.href,className:e.primary?"inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-accent-foreground transition-colors hover:bg-accent/90":"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:e.children})}function g(){let{session:e,phase:t,retryConnection:r}=(0,h.M)();switch(e.kind){case"restoring":return(0,s.jsx)(p.Z,{title:"Checking session",className:"mx-auto my-12 max-w-md",children:(0,s.jsx)(p.p,{icon:l.A,note:"Checking your session…"})});case"restore-failed":return(0,s.jsxs)(p.Z,{title:"Hub unreachable",className:"mx-auto my-12 max-w-md",children:[(0,s.jsx)(p.p,{icon:o.A,note:"The hub is unreachable right now."}),(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(m,{onClick:r,children:"Check again"})})]});case"signed-out":if("expired"===t)return(0,s.jsxs)(p.Z,{title:"Session ended",className:"mx-auto my-12 max-w-md",children:[(0,s.jsx)(p.p,{icon:c.A,note:"Your session ended."}),(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(f,{href:"/login",primary:!0,children:"Sign in"})})]});return(0,s.jsxs)(p.Z,{title:"Sign in required",className:"mx-auto my-12 max-w-md",children:[(0,s.jsx)(p.p,{icon:l.A,note:"Sign in required."}),(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(f,{href:"/login",primary:!0,children:"Sign in"})})]});case"auth-unavailable":return(0,s.jsx)(p.Z,{title:"Sign-in unavailable",className:"mx-auto my-12 max-w-md",children:(0,s.jsx)(p.p,{icon:d.A,note:"Browser sign-in is not configured on this hub."})})}return"expired"===t?(0,s.jsxs)(p.Z,{title:"Session ended",className:"mx-auto my-12 max-w-md",children:[(0,s.jsx)(p.p,{icon:c.A,note:"Your session ended."}),(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(f,{href:"/login",primary:!0,children:"Sign in"})})]}):"no-permission"===t?(0,s.jsxs)(p.Z,{title:"No permission",className:"mx-auto my-12 max-w-md",children:[(0,s.jsx)(p.p,{icon:d.A,note:`You are signed in as ${e.user.username}, but this hub grants no machine view to this account.`}),(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(m,{onClick:r,children:"Check again"})})]}):null}function x(){let{phase:e,retryConnection:t}=(0,h.M)();return"reconnecting"!==e&&"disconnected"!==e&&"connecting"!==e?null:"connecting"===e?(0,s.jsxs)("div",{role:"status",className:"mb-5 flex items-center gap-2 rounded-lg border border-border bg-card px-4 py-2.5 text-xs text-muted-foreground",children:[(0,s.jsx)(i.A,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),"Connecting to the live feed — waiting for the first snapshot."]}):(0,s.jsxs)("div",{role:"status",className:"mb-5 flex flex-wrap items-center gap-x-3 gap-y-2 rounded-lg border border-border bg-card px-4 py-2.5 text-xs text-muted-foreground",children:[(0,s.jsx)(u.A,{className:"h-3.5 w-3.5 shrink-0 text-warn","aria-hidden":!0}),(0,s.jsxs)("span",{children:["Connection lost — values below are ",(0,s.jsx)("strong",{className:"font-medium text-foreground",children:"last known"}),", not live measurements","reconnecting"===e?" — retrying with backoff…":" — retries stopped."]}),"disconnected"===e?(0,s.jsx)(m,{onClick:t,children:"Retry now"}):null]})}},7339:(e,t,r)=>{"use strict";r.d(t,{ProcessesView:()=>eJ});var s=r(5155),n=r(8500),a=r.n(n),i=r(9926),l=r(3381),o=r(8731),c=r(4173),d=r(3440),u=r(940),p=r(802),h=r(6582),m=r(9939),f=r(8664),g=r(2115),x=r(828),b=r(7422),y=r(7029),w=r(2910),v=r(1735),j=r(9764),k=r(9664),M=r(4268),N=r(9942);let P=new Set(["bash","zsh","fish","sh","dash","ksh","mksh","tcsh","csh","ash","busybox"]),A=new Set(["sshd","sshd-session","dropbear","tmux","screen","systemd"]),S=["cpuPercent","memoryRssBytes","gpuMemoryBytes","ioReadBytesPerSec","ioWriteBytesPerSec"];function $(e,t,r){return e.slice().sort((e,s)=>D(W(e,t),W(s,t),r))}function R(e){return null!==e&&!!("init.scope"===e||/^session-.+\.scope$/.test(e)||/^user@.+\.service$/.test(e))}function C(e){return null===e||!e.endsWith(".scope")&&!e.endsWith(".service")||R(e)?null:e}function B(e){let t=e.replace(/\.(scope|service)$/,"");return t.startsWith("app-gnome-")?t=t.slice(10):t.startsWith("app-")&&(t=t.slice(4)),(t=t.replace(/-\d+$/,"")).length>0?t:e}function T(e){return{key:`tree:${e.pid}:${e.startTicks}`,label:e.name,kind:"tree",leader:e}}function U(e,t){switch(t){case"cpu":return e.cpuPercent;case"memory":return e.memoryRssBytes;case"gpuMemory":return e.gpuMemoryBytes;case"ioRead":return e.ioReadBytesPerSec;case"ioWrite":return e.ioWriteBytesPerSec;case"name":return e.label;case"count":return e.count;case"pid":var r=e.members;let s=null;for(let e of r)(null===s||e.pid<s)&&(s=e.pid);return s;case"user":return e.users.length>0?e.users[0]:null}}function W(e,t){switch(t){case"cpu":return e.cpuPercent;case"memory":return e.memoryRssBytes;case"gpuMemory":return e.gpuMemoryBytes;case"ioRead":return e.ioReadBytesPerSec;case"ioWrite":return e.ioWriteBytesPerSec;case"name":return e.name;case"count":return 1;case"pid":return e.pid;case"user":return e.user}}function D(e,t,r){let s,n=null==e,a=null==t;if(n&&a)return 0;if(n)return 1;if(a)return -1;if("number"==typeof e&&"number"==typeof t)s=e-t;else{let r=String(e).toLowerCase(),n=String(t).toLowerCase();s=r<n?-1:+(r>n)}return"asc"===r?s:-s}var I=r(592),L=r(7586);let q={key:"cpu",dir:"desc"};function K(e,t,r){return null!==e&&t-e>=(!Number.isFinite(r)||r<=0?1e4:Math.max(1e4,3*r))}let _=[{value:"applications",label:"Applications"},{value:"processes",label:"Processes"},{value:"tree",label:"Tree"}];function F(e){return`${e.pid}:${e.startTicks}`}function E(e){if(void 0===e.command)return e;let{command:t,...r}=e;return r}function z(e){return null!=e&&Number.isFinite(e)?Math.round(e).toString().replace(/\B(?=(\d{3})+(?!\d))/g,","):"—"}function O(e){switch(e){case"idle":return{label:"Not connected",tone:"muted",description:"Select a machine to request process detail.",retryable:!1};case"acquiring":return{label:"Connecting",tone:"warn",description:"Requesting process detail…",retryable:!1};case"loading":return{label:"Waiting",tone:"warn",description:"Waiting for the collector's first process snapshot…",retryable:!1};case"ready":return{label:"Live",tone:"ok",description:"Process detail is live.",retryable:!1};case"paused":return{label:"Paused",tone:"muted",description:"Process updates are paused.",retryable:!1};case"stale":return{label:"Not refreshing",tone:"warn",description:"The last snapshot is retained, but new snapshots are not arriving.",retryable:!0};case"disconnected":return{label:"Disconnected",tone:"crit",description:"The collector is disconnected; the last snapshot is not live.",retryable:!0};case"withheld":return{label:"Withheld",tone:"warn",description:"Process detail is withheld for this hub.",retryable:!0};case"unsupported":return{label:"Unsupported",tone:"warn",description:"This collector cannot provide process detail.",retryable:!0};case"busy":return{label:"Busy",tone:"warn",description:"Too many process views are open for this hub.",retryable:!0};case"expired":return{label:"Expired",tone:"warn",description:"Process detail expired before a fresh snapshot arrived.",retryable:!0};case"failed":return{label:"Scan failed",tone:"crit",description:"The process scan failed repeatedly.",retryable:!0};case"cancelled":return{label:"Stopped",tone:"muted",description:"The process detail view was stopped.",retryable:!0};case"error":return{label:"Unavailable",tone:"crit",description:"Process detail is unavailable right now.",retryable:!0}}}function V(e){return"number"==typeof e&&Number.isFinite(e)&&e>0}var Z=r(7348);class G{maxAgeMs;limit;session=null;entries=new Map;constructor(e=3e5,t=32){this.maxAgeMs=e,this.limit=t}scope(e){(this.session!==e||null===e)&&this.entries.clear(),this.session=e}get(e,t,r=Date.now()){this.scope(t);let s=this.entries.get(e);return s&&r-s.lastReceivedMs>=this.maxAgeMs?void this.entries.delete(e):s}set(e,t,r){this.scope(t),this.entries.delete(e),this.entries.set(e,r),this.entries.size>this.limit&&this.entries.delete(this.entries.keys().next().value)}delete(e,t){this.scope(t),this.entries.delete(e)}}let Y=new G;function J(e,t){let r=Y.get(e??"",t);return void 0!==r?{phase:"stale",message:"Resuming process updates…",...r}:{phase:null===e?"idle":"acquiring",detail:null,message:null,intervalMs:1e3,leaseMs:15e3,lastReceivedMs:null}}async function X(e){try{let t=await e.json();if(t&&"object"==typeof t&&"error"in t){let e=t.error;if("string"==typeof e&&e.length>0)return e}}catch{}return e.statusText||null}var H=r(8698);let Q=(0,H.A)("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),ee=(0,H.A)("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),et=(0,H.A)("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var er=r(8528),es=r(6114);let en=[{id:"name",label:"Application",sortKey:"name",align:"left",width:300},{id:"count",label:"Procs",sortKey:"count",align:"right",width:76},{id:"cpu",label:"CPU / core",sortKey:"cpu",align:"right",width:104},{id:"memory",label:"RSS",sortKey:"memory",align:"right",width:96},{id:"gpuMemory",label:"VRAM",sortKey:"gpuMemory",align:"right",width:96},{id:"ioRead",label:"Read",sortKey:"ioRead",align:"right",width:104},{id:"ioWrite",label:"Write",sortKey:"ioWrite",align:"right",width:104},{id:"users",label:"Users",sortKey:"user",align:"left",width:160}],ea=[{id:"name",label:"Process",sortKey:"name",align:"left",width:300},{id:"pid",label:"PID",sortKey:"pid",align:"right",width:84},{id:"user",label:"User",sortKey:"user",align:"left",width:120},{id:"cpu",label:"CPU / core",sortKey:"cpu",align:"right",width:104},{id:"memory",label:"RSS",sortKey:"memory",align:"right",width:96},{id:"gpuMemory",label:"VRAM",sortKey:"gpuMemory",align:"right",width:96},{id:"ioRead",label:"Read",sortKey:"ioRead",align:"right",width:104},{id:"ioWrite",label:"Write",sortKey:"ioWrite",align:"right",width:104},{id:"threads",label:"Threads",align:"right",width:84}],ei=Object.freeze({}),el=Object.freeze([]),eo=new Set(["cpu","memory","gpuMemory","ioRead","ioWrite","name","count","pid","user"]);function ec(e){return Math.round(Math.min(1200,Math.max(56,e)))}function ed(e){return"applications"===e||"processes"===e||"tree"===e?e:null}function eu(e){if(null===e||"object"!=typeof e)return null;let{key:t,dir:r}=e;return"string"==typeof t&&eo.has(t)&&("asc"===r||"desc"===r)?{key:t,dir:r}:null}function ep(e){if(null===e||"object"!=typeof e||Array.isArray(e))return null;let t={};for(let[r,s]of Object.entries(e))"number"==typeof s&&Number.isFinite(s)&&(t[r]=ec(s));return t}function eh(e){return"string"==typeof e?e.slice(0,200):null}function em(e){return"boolean"==typeof e?e:null}function ef(e){return Array.isArray(e)&&e.every(e=>"string"==typeof e)?e.slice(0,500):null}let eg="overflow-hidden text-ellipsis whitespace-nowrap border-b border-border px-2 py-2 align-middle",ex=`${eg} tnum text-right text-xs`,eb="relative overflow-hidden whitespace-nowrap border-b border-border px-2 py-2 text-left text-xs font-normal text-muted-foreground";function ey(e,t){return t[e.id]??e.width}function ew({label:e,width:t,onChange:r,onReset:n}){let a=(0,g.useRef)(null);return(0,s.jsx)("div",{role:"separator","aria-orientation":"vertical","aria-label":`Resize ${e} column`,"aria-valuenow":t,"aria-valuemin":56,"aria-valuemax":1200,tabIndex:0,title:"Drag to resize \xb7 double-click to reset",onPointerDown:e=>{0===e.button&&(e.preventDefault(),e.stopPropagation(),e.currentTarget.setPointerCapture(e.pointerId),a.current={x:e.clientX,width:t})},onPointerMove:e=>{null!==a.current&&r(ec(a.current.width+e.clientX-a.current.x))},onPointerUp:e=>{null!==a.current&&r(ec(a.current.width+e.clientX-a.current.x)),a.current=null,e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId)},onPointerCancel:()=>{a.current=null},onLostPointerCapture:()=>{a.current=null},onClick:e=>e.stopPropagation(),onDoubleClick:e=>{e.stopPropagation(),n()},onKeyDown:e=>{"ArrowLeft"===e.key?(e.preventDefault(),r(ec(t-16))):"ArrowRight"===e.key&&(e.preventDefault(),r(ec(t+16)))},className:"group/handle absolute inset-y-0 right-0 z-10 flex w-2.5 cursor-col-resize touch-none select-none justify-end",children:(0,s.jsx)("span",{"aria-hidden":!0,className:"my-2 w-px bg-border transition-colors group-hover/handle:bg-accent group-focus-visible/handle:bg-accent"})})}function ev({column:e,sort:t,onSort:r,width:n,onResize:a,onReset:i}){let l="right"===e.align,o=e.sortKey,c=void 0!==o?t.key!==o?"none":"asc"===t.dir?"ascending":"descending":"none",d="none"!==c,u=d?"asc"===t.dir?ee:et:Q;return(0,s.jsxs)("th",{scope:"col","aria-sort":void 0!==o?c:void 0,className:l?`${eb} text-right`:eb,children:[void 0!==o?(0,s.jsxs)("button",{type:"button",onClick:()=>r(o),className:["inline-flex min-h-6 max-w-full items-center gap-1 rounded-sm transition-colors hover:text-foreground",l?"w-full justify-end pr-1":"",d?"text-foreground":""].filter(Boolean).join(" "),children:[(0,s.jsx)("span",{className:"truncate",children:e.label}),(0,s.jsx)(u,{className:d?"h-3 w-3 shrink-0":"h-3 w-3 shrink-0 opacity-40","aria-hidden":!0})]}):(0,s.jsx)("span",{className:l?"block truncate pr-1":"block truncate",children:e.label}),(0,s.jsx)(ew,{label:e.label,width:n,onChange:a,onReset:i})]})}function ej({table:e,columns:t,label:r,caption:n,sort:a,onSort:i,children:l}){let[o,c]=(0,es.u)(`processes.widths.${e}`,ei,ep),d=(0,g.useRef)(null),[u,p]=(0,g.useState)(0);(0,g.useEffect)(()=>{let e=d.current;if(!e)return;let t=new ResizeObserver(([e])=>p(e.contentRect.width));return t.observe(e),()=>t.disconnect()},[]);let h=e=>"name"===e.id?160:56,m=t.reduce((e,t)=>e+h(t),0),f=t.reduce((e,t)=>e+ey(t,o),0),x={},b=Math.max(u||f,m),y=[...t];for(;y.length>0;){let e=y.reduce((e,t)=>e+ey(t,o),0),t=y.filter(t=>b*ey(t,o)/e<h(t));if(0===t.length){for(let t of y)x[t.id]=b*ey(t,o)/e;break}for(let e of t)x[e.id]=h(e),b-=h(e);y=y.filter(e=>!t.includes(e))}return(0,s.jsx)("div",{ref:d,className:"relative min-h-0 w-full min-w-0 flex-1 overflow-auto overscroll-contain",tabIndex:0,role:"region","aria-label":r,children:(0,s.jsxs)("table",{className:"table-fixed border-separate border-spacing-0 text-left",style:{width:"100%",minWidth:m},children:[(0,s.jsx)("caption",{className:"sr-only",children:n}),(0,s.jsx)("colgroup",{children:t.map(e=>(0,s.jsx)("col",{style:{width:x[e.id]}},e.id))}),(0,s.jsx)("thead",{className:"sticky top-0 z-20 bg-card",children:(0,s.jsx)("tr",{children:t.map(e=>(0,s.jsx)(ev,{column:e,sort:a,onSort:i,width:x[e.id],onResize:r=>{let s,n,a;return s=t.indexOf(e),n=t[s+1]??t[s-1],a=Math.max(h(e)-x[e.id],Math.min(r-x[e.id],x[n.id]-h(n))),void c({...x,[e.id]:x[e.id]+a,[n.id]:x[n.id]-a})},onReset:()=>c(t=>{let{[e.id]:r,...s}=t;return s})},e.id))})}),(0,s.jsx)("tbody",{children:l})]})})}function ek({value:e,kind:t,partial:r=!1}){let n=function(e,t,r=!1){let s;if(null===e||!Number.isFinite(e)||e<0)return{text:"—",atLeast:!1,title:null};switch(t){case"percent":s=(0,L.l9)(e);break;case"bytes":s=(0,L.z3)(e);break;case"rate":s=`${(0,L.z3)(e)}/s`;break;case"count":s=z(e)}return{text:s,atLeast:r,title:r?`At least ${s}: some processes in this group did not report this metric.`:null}}(e,t,r);return(0,s.jsxs)("td",{className:"—"===n.text?`${ex} text-muted-foreground`:ex,title:n.title??void 0,children:[n.atLeast?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{"aria-hidden":!0,children:"≥ "}),(0,s.jsx)("span",{className:"sr-only",children:"at least "})]}):null,n.text]})}function eM(e){let t=e.name.length>0?e.name:"Unnamed process";return null!==e.unit?`${t} \xb7 ${e.unit}`:t}function eN({row:e,depth:t=0}){return(0,s.jsx)("th",{scope:"row",className:`${eg} text-left text-sm font-medium`,title:eM(e),children:(0,s.jsxs)("span",{style:t>0?{paddingLeft:`${14*t}px`}:void 0,children:[t>0?(0,s.jsx)("span",{className:"sr-only",children:`Nested level ${t+1}. `}):null,e.name.length>0?e.name:(0,s.jsx)("span",{className:"text-muted-foreground",children:"Unnamed process"})]})})}function eP({entries:e,sort:t,onSort:r,mode:n}){return(0,s.jsx)(ej,{table:"processes",columns:ea,label:"tree"===n?"Process tree":"Process list",caption:"tree"===n?"Process tree with nesting depth, PID, user, CPU per core, resident memory, GPU memory, read and write rates, and threads":"Processes with PID, user, CPU per core, resident memory, GPU memory, read and write rates, and threads",sort:t,onSort:r,children:e.map(({row:e,depth:t})=>(0,s.jsxs)("tr",{className:"transition-colors hover:bg-card-strong/60",children:[(0,s.jsx)(eN,{row:e,depth:t}),(0,s.jsx)("td",{className:ex,children:e.pid}),(0,s.jsx)("td",{className:`${eg} text-xs text-muted-foreground`,title:e.user??void 0,children:e.user??"—"}),(0,s.jsx)(ek,{value:e.cpuPercent,kind:"percent"}),(0,s.jsx)(ek,{value:e.memoryRssBytes,kind:"bytes"}),(0,s.jsx)(ek,{value:e.gpuMemoryBytes,kind:"bytes"}),(0,s.jsx)(ek,{value:e.ioReadBytesPerSec,kind:"rate"}),(0,s.jsx)(ek,{value:e.ioWriteBytesPerSec,kind:"rate"}),(0,s.jsx)("td",{className:ex,children:z(e.threads)})]},F(e)))})}function eA({group:e}){return(0,s.jsx)(s.Fragment,{children:e.members.map(e=>(0,s.jsxs)("tr",{className:"bg-card-strong/40 transition-colors hover:bg-card-strong/70",children:[(0,s.jsx)("th",{scope:"row",className:`${eg} text-left text-xs font-normal`,title:`${eM(e)} \xb7 PID ${e.pid}`,children:(0,s.jsxs)("span",{className:"pl-5",children:[e.name.length>0?e.name:"Unnamed process",(0,s.jsx)("span",{className:"tnum ml-2 text-muted-foreground",children:e.pid})]})}),(0,s.jsx)("td",{className:ex}),(0,s.jsx)(ek,{value:e.cpuPercent,kind:"percent"}),(0,s.jsx)(ek,{value:e.memoryRssBytes,kind:"bytes"}),(0,s.jsx)(ek,{value:e.gpuMemoryBytes,kind:"bytes"}),(0,s.jsx)(ek,{value:e.ioReadBytesPerSec,kind:"rate"}),(0,s.jsx)(ek,{value:e.ioWriteBytesPerSec,kind:"rate"}),(0,s.jsx)("td",{className:`${eg} text-xs text-muted-foreground`,title:e.user??void 0,children:e.user??"—"})]},F(e)))})}function eS({groups:e,sort:t,onSort:r,expanded:n,onToggleGroup:a}){return(0,s.jsx)(ej,{table:"applications",columns:en,label:"Applications",caption:"Applications grouped by systemd unit, process tree, or kernel, with process count, aggregate CPU per core, resident memory, GPU memory, read and write rates, and users",sort:t,onSort:r,children:e.map(e=>{var t;let r=n.has(e.key),i=e.label.length>0?e.label:"Unnamed application",l=e.users.length>0?e.users.join(", "):"—";return(0,s.jsxs)(g.Fragment,{children:[(0,s.jsxs)("tr",{className:"transition-colors hover:bg-card-strong/60",children:[(0,s.jsx)("th",{scope:"row",className:`${eg} text-left font-normal`,title:`${i} \xb7 ${"unit"===(t=e.kind)?"systemd unit":"kernel"===t?"kernel":"process tree"}`,children:(0,s.jsxs)("button",{type:"button","aria-expanded":r,onClick:()=>a(e.key),className:"inline-flex min-h-6 max-w-full items-center gap-1.5 rounded-sm text-left",children:[(0,s.jsx)(er.A,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform ${r?"rotate-90":""}`,"aria-hidden":!0}),(0,s.jsx)("span",{className:"truncate text-sm font-medium",children:i})]})}),(0,s.jsx)("td",{className:ex,children:z(e.count)}),(0,s.jsx)(ek,{value:e.cpuPercent,kind:"percent",partial:e.partial.cpuPercent}),(0,s.jsx)(ek,{value:e.memoryRssBytes,kind:"bytes",partial:e.partial.memoryRssBytes}),(0,s.jsx)(ek,{value:e.gpuMemoryBytes,kind:"bytes",partial:e.partial.gpuMemoryBytes}),(0,s.jsx)(ek,{value:e.ioReadBytesPerSec,kind:"rate",partial:e.partial.ioReadBytesPerSec}),(0,s.jsx)(ek,{value:e.ioWriteBytesPerSec,kind:"rate",partial:e.partial.ioWriteBytesPerSec}),(0,s.jsx)("td",{className:`${eg} text-xs text-muted-foreground`,title:l,children:l})]}),r?(0,s.jsx)(eA,{group:e}):null]},e.key)})})}function e$({mode:e,groups:t,rows:r,tree:n,sort:a,onSort:i,expanded:l,onToggleGroup:o}){if("applications"===e)return(0,s.jsx)(eS,{groups:t,sort:a,onSort:i,expanded:l,onToggleGroup:o});let c="tree"===e?n.map(e=>({row:e.row,depth:e.depth})):r.map(e=>({row:e,depth:0}));return(0,s.jsx)(eP,{entries:c,mode:e,sort:a,onSort:i})}var eR=r(1),eC=r(7499);let eB=[{key:"cpuPercent",label:"cpu"},{key:"memoryRssBytes",label:"memory"},{key:"gpuMemoryBytes",label:"vram"},{key:"ioReadBytesPerSec",label:"read"},{key:"ioWriteBytesPerSec",label:"write"},{key:"threads",label:"threads"}];function eT(e){return new Date(e).toISOString()}function eU(e){return e.displayName?.trim()||e.hostname.trim()||e.machineId}function eW(e){return"applications"===e.mode?e.groups.flatMap(t=>$([...t.members],e.sort.key,e.sort.dir).map(e=>({row:e,application:t.label,applicationKind:t.kind,depth:0}))):"tree"===e.mode?e.tree.map(e=>({row:e.row,application:null,applicationKind:null,depth:e.depth})):e.sortedRows.map(e=>({row:e,application:null,applicationKind:null,depth:0}))}function eD(e){let t=e.now??Date.now(),r=null===e.receivedAtMs?null:Math.max(0,t-e.receivedAtMs),s=null===r?"receipt time unknown":`${Math.round(r/1e3)}s old`;return null===e.receivedAtMs?{label:"unknown",ageMs:null,stale:!0,note:"No browser receipt time is available for this snapshot."}:"paused"===e.phase?{label:"paused",ageMs:r,stale:!1,note:`Paused \xb7 ${s}. Not live.`}:"disconnected"===e.phase?{label:"disconnected",ageMs:r,stale:!0,note:`Collector disconnected \xb7 last snapshot ${s}. Not live.`}:"withheld"===e.phase||"unsupported"===e.phase?{label:"not live",ageMs:r,stale:!0,note:`Process detail is ${e.phase} \xb7 last snapshot ${s}.`}:"failed"===e.phase||"expired"===e.phase||"busy"===e.phase||"cancelled"===e.phase||"error"===e.phase?{label:"not live",ageMs:r,stale:!0,note:`Refresh problem \xb7 last snapshot ${s}. Not live.`}:"acquiring"===e.phase||"loading"===e.phase||"idle"===e.phase?{label:"waiting",ageMs:r,stale:!0,note:`Waiting for a fresh snapshot \xb7 ${s}.`}:K(e.receivedAtMs,t,e.intervalMs)?{label:"stale",ageMs:r,stale:!0,note:`No new snapshot has arrived \xb7 ${s}. Not live.`}:{label:"live",ageMs:r,stale:!1,note:`Live \xb7 updated ${s}.`}}function eI(e){return eB.filter(({key:t})=>null===e[t]).map(({label:e})=>e).join(" ")}function eL(e,t){let r=eD({phase:e.phase,receivedAtMs:e.receivedAtMs,intervalMs:e.intervalMs,now:t}),s=null===e.receivedAtMs?"unknown":eT(e.receivedAtMs),n=e.query.trim();return[`Filtered process snapshot from the loaded view \xb7 ${r.note}`,`Search: ${n.length>0?n:"(none)"} \xb7 view: ${e.mode} \xb7 sort: ${e.sort.key} ${e.sort.dir}`,`Snapshot ${e.snapshot.processes.length} shown of ${e.snapshot.totalProcesses} processes \xb7 ${e.snapshot.inaccessible} unreadable${e.snapshot.truncated?" \xb7 collector kept the highest-CPU rows":""}`,`Captured ${e.capturedAt} \xb7 received ${s}`]}let eq=["name","pid","user","application","application_kind","tree_depth","cpu_percent","memory_rss_bytes","gpu_memory_bytes","io_read_bytes_per_sec","io_write_bytes_per_sec","threads","unavailable_metrics"],eK="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 e_(e){let[t,r]=(0,g.useState)(null),n=null!==e.snapshot&&null!==e.capturedAt,a=n?"applications"===e.mode?e.filteredRows.length:"tree"===e.mode?e.tree.length:e.sortedRows.length:0,i=!n||0===a,l=t=>{if(null===e.snapshot||null===e.capturedAt)return;let s=Date.now(),n={...e,snapshot:e.snapshot,capturedAt:e.capturedAt,exportedAt:s};try{let e,i,l,o=function(e,t,r=Date.now()){let s=Date.parse(e.capturedAt);return(0,eC.Y8)("processes",eU(e.machine),Number.isFinite(s)?s:r,t)}(n,t,s),c="csv"===t?function(e){let t,r,s=e.exportedAt??Date.now(),n=(t=eW(e),r=eD({phase:e.phase,receivedAtMs:e.receivedAtMs,intervalMs:e.intervalMs,now:s}),[["Rigscope process snapshot"],["Scope",eL(e,s)[0]],["Machine",eU(e.machine)],["Machine ID",e.machine.machineId],["Snapshot captured",e.capturedAt],["Snapshot received",null===e.receivedAtMs?"unknown":eT(e.receivedAtMs)],["Freshness",`${r.label}${null===r.ageMs?"":` \xb7 ${Math.round(r.ageMs/1e3)}s old`}`],["Search",e.query.trim()||"(none)"],["View",e.mode],["Sort",`${e.sort.key} ${e.sort.dir}`],["Snapshot rows",`${e.snapshot.processes.length} shown of ${e.snapshot.totalProcesses}`],["Unreadable",String(e.snapshot.inaccessible)],["Collector truncated",e.snapshot.truncated?"true":"false"],["Exported rows",String(t.length)],["Note",eL(e,s).slice(1).join(" ")],[]]);for(let t of(n.push([...eq]),eW(e)))n.push(function(e){let{row:t}=e;return[t.name,t.pid,t.user,e.application,e.applicationKind,e.depth,t.cpuPercent,t.memoryRssBytes,t.gpuMemoryBytes,t.ioReadBytesPerSec,t.ioWriteBytesPerSec,t.threads,eI(t)]}(t));return(0,eR.kg)(n)}(n):(e=n.exportedAt??Date.now(),i=eD({phase:n.phase,receivedAtMs:n.receivedAtMs,intervalMs:n.intervalMs,now:e}),l={app:"Rigscope",kind:"processes",exportedAt:eT(e),scope:{description:"Filtered process snapshot from the loaded view",machine:{id:n.machine.machineId,name:eU(n.machine),hostname:n.machine.hostname,connected:n.machine.connected},query:n.query.trim(),view:n.mode,sort:n.sort},snapshot:{capturedAt:n.capturedAt,receivedAt:null===n.receivedAtMs?null:eT(n.receivedAtMs),ageMs:i.ageMs,freshness:i.label,live:!i.stale&&"live"===i.label,note:i.note,totalProcesses:n.snapshot.totalProcesses,shownProcesses:n.snapshot.processes.length,inaccessible:n.snapshot.inaccessible,truncated:n.snapshot.truncated},exportedRows:eW(n).length,notes:eL(n,e),processes:eW(n).map(e=>({name:e.row.name,pid:e.row.pid,user:e.row.user,application:e.application,applicationKind:e.applicationKind,treeDepth:e.depth,cpuPercent:e.row.cpuPercent,memoryRssBytes:e.row.memoryRssBytes,gpuMemoryBytes:e.row.gpuMemoryBytes,ioReadBytesPerSec:e.row.ioReadBytesPerSec,ioWriteBytesPerSec:e.row.ioWriteBytesPerSec,threads:e.row.threads,unavailableMetrics:eI(e.row).split(" ").filter(Boolean)}))},`${JSON.stringify(l,null,2)}
3
+ `);(0,eR.PE)(o,c,"csv"===t?eR.UR:eR.uW),r(`${t.toUpperCase()} downloaded \xb7 ${a} ${1===a?"process":"processes"}`)}catch{r("The process export could not be created.")}},o=n?0===a?"No processes match the current search":void 0:"A process snapshot is not available yet";return(0,s.jsxs)("div",{className:"flex min-w-0 shrink-0 items-center gap-1.5",children:[(0,s.jsx)("span",{className:"hidden text-xs text-muted-foreground sm:inline",children:"Export"}),(0,s.jsx)("button",{type:"button",onClick:()=>l("csv"),disabled:i,"aria-label":"Download current process snapshot as CSV",title:o??"Download the filtered process snapshot as CSV",className:eK,children:"CSV"}),(0,s.jsx)("button",{type:"button",onClick:()=>l("json"),disabled:i,"aria-label":"Download current process snapshot as JSON",title:o??"Download the filtered process snapshot as JSON",className:eK,children:"JSON"}),(0,s.jsxs)("span",{role:"status",className:t?.includes("could not")?"inline-flex items-center gap-1 text-xs text-warn":"sr-only",children:[t?.includes("could not")?(0,s.jsx)(v.A,{className:"h-3 w-3","aria-hidden":!0}):null,t??""]})]})}let eF={ok:"bg-ok-soft text-ok",warn:"bg-warn-soft text-warn",crit:"bg-crit-soft text-crit",muted:"border border-border text-muted-foreground"};function eE({phase:e,message:t}){return(0,s.jsxs)("span",{title:t??e.description,className:`inline-flex h-6 w-32 shrink-0 items-center gap-1.5 rounded-full px-2 py-0.5 text-xs ${eF[e.tone]}`,children:[(0,s.jsx)("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-current","aria-hidden":!0}),e.label]})}function ez({onClick:e,label:t="Check again"}){return(0,s.jsxs)("button",{type:"button",onClick:e,className:"inline-flex min-h-5 items-center gap-1.5 rounded-md border border-border bg-card px-2 py-1 text-xs text-foreground transition-colors hover:bg-card-strong",children:[(0,s.jsx)(x.A,{className:"h-3 w-3","aria-hidden":!0}),t]})}function eO({phase:e,info:t,message:r,onRetry:n}){let a="withheld"===e||"unsupported"===e?b.A:"disconnected"===e||"error"===e?y.A:"paused"===e?w.A:"acquiring"===e||"loading"===e?i.A:"busy"===e||"expired"===e||"failed"===e||"stale"===e?v.A:j.A;return(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2 break-words",children:[(0,s.jsx)(d.p,{icon:a,note:r??t.description,className:"min-h-64 w-full"}),"paused"!==e&&t.retryable?(0,s.jsx)(ez,{onClick:n,label:"Retry process detail"}):null]})}function eV({summary:e,lastReceivedMs:t,intervalMs:r,message:n,phase:a,hasSnapshot:i}){let l=(0,Z.c)(1e3),o="ready"===a&&K(t,l,r),c=o?"stale":a,d="paused"===c,u=O(c),p=null===t?null:(0,L.nV)(Math.max(0,l-t)),h=null===p?null:"ready"===c?`Updated ${p}`:`Last snapshot ${p}`,m=d?i?"Paused. This snapshot is not live.":"Paused. Use Resume to request a fresh snapshot.":`${u.label}${o?". No new snapshot has arrived.":""}${n?`. ${n}`:""}`;return d&&!i?(0,s.jsx)("p",{role:"status",className:"sr-only",children:m}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{role:"status",className:"sr-only",children:m}),(0,s.jsxs)("div",{className:"flex min-h-6 flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[d?(0,s.jsx)("span",{children:"Paused — not live"}):(0,s.jsx)(eE,{phase:u,message:n}),i&&null!==h?(0,s.jsx)("span",{className:"tnum",children:h}):null,i&&e.truncated?(0,s.jsxs)("span",{className:"tnum",title:"The collector kept the highest-CPU rows",children:["top ",z(e.shown)," of ",z(e.total)]}):null,i&&e.inaccessible>0?(0,s.jsxs)("span",{className:"tnum text-warn",children:[z(e.inaccessible)," unreadable"]}):null]})]})}function eZ({machine:e,csrfToken:t,paused:r,onPausedChange:n}){var a;let[i,l]=(0,es.u)("processes.query","",eh,"session"),o=(0,g.useDeferredValue)(i),[c,u]=(0,es.u)("processes.mode","applications",ed),[p,h]=(a="applications"===c?"applications":"processes",(0,es.u)(`processes.sort.${a}`,q,eu)),[m,f]=(0,es.u)("processes.expanded",el,ef,"session"),x=(0,g.useMemo)(()=>new Set(m),[m]),{state:b,refresh:y}=function(e){let{machineId:t,csrfToken:r,paused:s}=e,[n,a]=(0,g.useState)(()=>"u">typeof document&&document.hidden),[i,l]=(0,g.useState)(0),[o,c]=(0,g.useState)(()=>J(t,r)),d=(0,g.useRef)(o),u=(0,g.useRef)({machineId:t,csrfToken:r}),p=(0,g.useRef)(0),h=(0,g.useCallback)(()=>{p.current+=1,l(p.current)},[]);return(0,g.useEffect)(()=>{if("u"<typeof document)return;let e=()=>a(document.hidden);return e(),document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[]),(0,g.useEffect)(()=>{let e;if(u.current.machineId!==t||u.current.csrfToken!==r){u.current={machineId:t,csrfToken:r};let e=J(t,r);d.current=e,c(e)}if(!(null!==t&&null!==r&&!s&&!n)){if(t&&r){let e={...d.current,phase:"paused",message:n?"This tab is hidden — process updates are stopped until it is visible again.":"Paused — process updates are stopped until you resume."};d.current=e,c(e)}else{let e=J(t,r);d.current=e,c(e)}return}let a=!1,i=new AbortController,l=(e=globalThis.crypto)&&"function"==typeof e.randomUUID?e.randomUUID():`viewer-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,o=`/api/processes?machineId=${encodeURIComponent(t)}&viewerId=${encodeURIComponent(l)}`,p=d.current.intervalMs||1e3,h=d.current.leaseMs||15e3,m=null!==d.current.detail,f=!1,g=!1,x=!1,b=null,y=null,w=null,v=e=>{if(a)return;let s=d.current,n="function"==typeof e?e(s):e,i={...s,...n};d.current=i,null!==i.detail&&null!==i.lastReceivedMs&&Y.set(t,r,{detail:i.detail,intervalMs:i.intervalMs,leaseMs:i.leaseMs,lastReceivedMs:i.lastReceivedMs}),c(i)},j=()=>{null!==b&&(clearTimeout(b),b=null),null!==y&&(clearTimeout(y),y=null),w?.abort(),w=null},k=()=>{try{fetch(o,{method:"DELETE",cache:"no-store",keepalive:!0,headers:{"X-CSRF-Token":r,Accept:"application/json"}}).catch(()=>void 0)}catch{}},M=()=>{g=!1,null!==b&&(clearTimeout(b),b=null)},N=(e,s)=>{x=!0,j(),m=!1,Y.delete(t,r),v({phase:e,detail:null,message:s,lastReceivedMs:null}),k()},P=e=>{let t="u">typeof navigator&&!1===navigator.onLine;v({phase:m?t?"disconnected":"stale":"error",message:e})},A=async()=>{try{let e=await fetch(o,{method:"POST",cache:"no-store",signal:i.signal,headers:{"X-CSRF-Token":r,Accept:"application/json"}});if(a||i.signal.aborted)return!1;if(!e.ok){M();let t=await X(e);return 401===e.status?N("error","Your session ended. Sign in again to inspect processes."):403===e.status?N("withheld",t??"Processes are not available to this hub."):409===e.status?N("unsupported",t??"This collector requires an upgrade before Processes is available."):(429===e.status||503===e.status)&&/budget/i.test(t??"")?v({phase:"busy",message:t??"Too many process views are open for this hub."}):P(t??`Could not request process detail (HTTP ${e.status}).`),!1}g=!0;let t=null;try{t=await e.json()}catch{t=null}let s=function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return null;let t=e.leaseMs,r=e.intervalMs;return V(t)&&V(r)?{leaseMs:Math.round(t),intervalMs:Math.round(r)}:null}(t);if(null===s)return M(),k(),P("The hub returned an unexpected response."),!1;if(a||i.signal.aborted)return!1;return p=s.intervalMs,h=s.leaseMs,v(e=>({intervalMs:s.intervalMs,leaseMs:s.leaseMs,phase:null===e.detail?"loading":e.phase,message:null})),!0}catch(e){if(a||i.signal.aborted)return!1;return M(),P(m?"Could not refresh process detail. Showing the last snapshot, which is not live.":"Could not reach the hub for process detail."),!1}},S=()=>{a||x||null!==y||(y=setTimeout(()=>{y=null,$()},Math.max(1e3,Math.min(5e3,Math.floor(h/3)))))},$=async()=>{a||x||(await A(),a||x||(g&&!f&&null===b&&R(),S()))},R=async()=>{if(a||x||f)return;f=!0;let e=new AbortController;w=e;let t=()=>e.abort();i.signal.addEventListener("abort",t,{once:!0});try{let t=await fetch(o,{cache:"no-store",signal:e.signal,headers:{Accept:"application/json"}});if(a||e.signal.aborted)return;if(410===t.status){v({phase:m?"stale":"loading",message:"Process detail expired. Renewing…"}),await A();return}if(!t.ok){let e=await X(t);401===t.status?N("error","Your session ended. Sign in again to inspect processes."):403===t.status?N("withheld",e??"Processes are not available to this machine."):P(e??`Could not refresh processes (HTTP ${t.status}).`);return}let r=null;try{r=await t.json()}catch{r=null}let s=function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return null;let t=e.state;if("string"!=typeof t||0===t.length)return null;let r=e.result;if(null==r)return{state:t,result:null};try{let e=(0,I.Q_)(r);if("detail.result"!==e.type)return null;return{state:t,result:e}}catch{return null}}(r);if(a||e.signal.aborted)return;if(null===s)return void P(m?"Unable to read the process update. Showing the last snapshot.":"Unable to read the process update from the hub.");((e,t)=>{if(null!==t){m=!0;let e=d.current;if(null!==e.detail&&e.detail.subscriptionId===t.subscriptionId&&e.detail.capturedAt===t.capturedAt&&"ready"===e.phase&&null===e.message)return;v(e=>{let r=null!==e.detail&&e.detail.subscriptionId===t.subscriptionId&&e.detail.capturedAt===t.capturedAt;return{phase:"ready",detail:r?e.detail:t,message:null,lastReceivedMs:r?e.lastReceivedMs:Date.now()}});return}let r=function(e){switch(e){case"ready":return"ready";case"loading":return"loading";case"paused":return"paused";case"disconnected":return"disconnected";case"withheld":return"withheld";case"unsupported":return"unsupported";case"busy":return"busy";case"expired":return"expired";case"failed":return"failed";case"cancelled":return"cancelled";default:return"error"}}(e);switch(r){case"ready":case"loading":return v({phase:m?"stale":"loading",message:m?"Waiting for a fresh snapshot. The values shown are from the last received snapshot.":"Waiting for the collector to report processes…"});case"disconnected":return v({phase:"disconnected",message:m?"The collector is disconnected. Showing the last received snapshot; it is not live.":"The collector is disconnected."});case"withheld":case"unsupported":case"cancelled":return N(r,O(r).description);case"busy":case"expired":case"failed":return v({phase:r,message:m?`${O(r).description} Showing the last received snapshot.`:O(r).description});case"paused":return v({phase:"paused",message:"Process updates are paused."});default:v({phase:m?"stale":"error",message:"Unable to read the process status from the hub."})}})(s.state,s.result)}catch{if(a||e.signal.aborted)return;P(m?"Process refresh failed. Showing the last snapshot, which is not live.":"Could not reach the hub for process detail.")}finally{i.signal.removeEventListener("abort",t),w===e&&(w=null),f=!1,a||x||a||x||!g||null!==b||(b=setTimeout(()=>{b=null,R()},p))}};return v(e=>null===e.detail?{phase:"acquiring",message:null}:"ready"===e.phase&&null===e.message?{}:{phase:"stale",message:"Resuming process updates…"}),(async()=>{let e=await A();a||x||(S(),e&&R())})(),()=>{a=!0,x=!0,j(),k()}},[t,r,s,n,i]),{state:u.current.machineId===t&&u.current.csrfToken===r?o:J(t,r),hidden:n,refresh:h}}({machineId:e.machineId,csrfToken:t,paused:r}),v=(0,g.useMemo)(()=>b.detail?.snapshot.processes??[],[b.detail]),j=(0,g.useMemo)(()=>(function(e){if(null===e)return{total:0,shown:0,inaccessible:0,truncated:!1};let t=e.processes.length;return{total:e.totalProcesses,shown:t,inaccessible:e.inaccessible,truncated:e.truncated}})(b.detail?.snapshot??null),[b.detail]),W=(0,g.useMemo)(()=>{var e,t,r;let s;return e=v,t=o,r=e.map(E),0===(s=t.trim().toLowerCase()).length?r.slice():r.filter(e=>!!(e.name.toLowerCase().includes(s)||null!==e.user&&e.user.toLowerCase().includes(s)||String(e.pid).includes(s)||null!==e.unit&&e.unit.toLowerCase().includes(s)||void 0!==e.command&&e.command.toLowerCase().includes(s)))},[v,o]),L=(0,g.useMemo)(()=>$(W,p.key,p.dir),[W,p]),K=(0,g.useMemo)(()=>{var e,t,r;return"applications"===c?(e=function(e){let t=new Map;for(let r of e)t.has(r.pid)||t.set(r.pid,r);let r=new Map;for(let s of e){let e=function(e,t){if(function(e,t){if(2===e.pid||2===e.ppid)return!0;let r=e,s=new Set;for(;r&&!s.has(r.pid);){if(2===r.pid)return!0;s.add(r.pid),r=t.get(r.ppid)}return!1}(e,t))return{key:"kernel",label:"kernel",kind:"kernel",leader:e};let r=C(e.unit);if(null!==r)return{key:`unit:${r}`,label:B(r),kind:"unit",leader:e};let s=e,n=new Set;for(;;){if(n.has(s.pid)){let e=s;for(let r of n){let s=t.get(r);s&&(s.pid<e.pid||s.pid===e.pid&&s.startTicks<e.startTicks)&&(e=s)}return T(e)}n.add(s.pid);let e=t.get(s.ppid);if(!e||function(e,t){if(1===e.pid)return!0;let r=e.name.toLowerCase();if(P.has(r)||A.has(r)||r.startsWith("tmux:"))return!0;if(R(e.unit)){let r=t.get(e.ppid);return void 0===r||r.unit!==e.unit}return!1}(e,t))return T(s);let r=C(e.unit);if(null!==r)return{key:`unit:${r}`,label:B(r),kind:"unit",leader:e};s=e}}(s,t),n=r.get(e.key);n?n.members.push(s):r.set(e.key,{descriptor:e,members:[s]})}return[...r.values()].map(({descriptor:e,members:t})=>(function(e,t){let r={cpuPercent:{sum:0,known:0},memoryRssBytes:{sum:0,known:0},gpuMemoryBytes:{sum:0,known:0},ioReadBytesPerSec:{sum:0,known:0},ioWriteBytesPerSec:{sum:0,known:0}},s=new Set;for(let e of t)for(let t of(null!==e.user&&s.add(e.user),S)){let s=e[t];null!==s&&Number.isFinite(s)&&(r[t].sum+=s,r[t].known++)}let n=e=>0===r[e].known?null:r[e].sum,a={};for(let e of S)a[e]=r[e].known>0&&r[e].known<t.length;return{key:e.key,label:e.label,kind:e.kind,members:e.leader!==t[0]?[e.leader,...t.filter(t=>t!==e.leader)]:t,cpuPercent:n("cpuPercent"),memoryRssBytes:n("memoryRssBytes"),gpuMemoryBytes:n("gpuMemoryBytes"),ioReadBytesPerSec:n("ioReadBytesPerSec"),ioWriteBytesPerSec:n("ioWriteBytesPerSec"),count:t.length,users:[...s].sort(),partial:a}})(e,t))}(W),t=p.key,r=p.dir,e.slice().sort((e,s)=>D(U(e,t),U(s,t),r))):[]},[W,c,p]),F=(0,g.useMemo)(()=>"tree"===c?function(e){let t=e.length,r=new Map;for(let s=0;s<t;s++)r.has(e[s].pid)||r.set(e[s].pid,s);let s=e.map(e=>{let t=r.get(e.ppid);return void 0===t?null:t}),n=new Uint8Array(t);for(let e=0;e<t;e++){if(0!==n[e])continue;let t=[],r=e;for(;null!==r&&0===n[r];)n[r]=1,t.push(r),r=s[r];for(let e of(null!==r&&1===n[r]&&(s[t[t.length-1]]=null),t))n[e]=2}let a=Array.from({length:t},()=>[]),i=[];for(let e=0;e<t;e++){let t=s[e];null===t?i.push(e):a[t].push(e)}let l=[],o=[];for(let e=i.length-1;e>=0;e--)o.push({index:i[e],depth:0});for(;o.length>0;){let{index:t,depth:r}=o.pop();l.push({row:e[t],depth:r,children:a[t].length});let s=a[t];for(let e=s.length-1;e>=0;e--)o.push({index:s[e],depth:r+1})}return l}(L):[],[c,L]),z=O(b.phase),Z=null!==b.detail,G=!Z&&("acquiring"===b.phase||"loading"===b.phase),H=o.trim().slice(0,80),Q=(0,g.useMemo)(()=>{let e=W.length,t=o.trim().length>0,r=1!==e||t?"processes":"process";return"applications"===c?`${K.length} app${1===K.length?"":"s"} \xb7 ${e}${t?` of ${j.shown}`:""} ${r}`:`${e}${t?` of ${j.shown}`:""} ${r}`},[o,W.length,K.length,c,j.shown]);return(0,s.jsx)(d.Z,{title:"Process detail",action:Z?(0,s.jsx)("span",{className:"tnum hidden max-w-[18rem] truncate text-muted-foreground sm:block",children:Q}):void 0,className:"min-h-0 flex-1",children:(0,s.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:[(0,s.jsxs)("div",{className:"relative min-w-0 flex-1 basis-52",children:[(0,s.jsx)("label",{htmlFor:"process-search",className:"sr-only",children:"Search processes"}),(0,s.jsx)(k.A,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground","aria-hidden":!0}),(0,s.jsx)("input",{id:"process-search",type:"search",value:i,onChange:e=>l(e.target.value),placeholder:"Search name, user, PID, or unit",autoComplete:"off",spellCheck:!1,className:"h-9 w-full rounded-md border border-border bg-card-strong py-1.5 pl-8 pr-8 text-sm text-foreground placeholder:text-muted-foreground [&::-webkit-search-cancel-button]:hidden [&::-webkit-search-cancel-button]:[-webkit-appearance:none]"}),i.length>0?(0,s.jsx)("button",{type:"button",onClick:()=>l(""),"aria-label":"Clear search",className:"absolute right-0.5 top-1/2 flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-card hover:text-foreground",children:(0,s.jsx)(M.A,{className:"h-3.5 w-3.5","aria-hidden":!0})}):null]}),(0,s.jsx)("div",{role:"group","aria-label":"Process view",className:"inline-flex shrink-0 rounded-md border border-border p-0.5",children:_.map(e=>{let t=c===e.value;return(0,s.jsx)("button",{type:"button","aria-pressed":t,onClick:()=>u(e.value),className:["rounded px-2.5 py-1 text-xs transition-colors",t?"bg-selected font-medium text-foreground":"text-muted-foreground hover:bg-card-strong hover:text-foreground"].join(" "),children:e.label},e.value)})}),(0,s.jsxs)("button",{type:"button",onClick:()=>n(!r),title:r?"Resume process updates":"Pause process updates",className:"inline-flex min-h-9 shrink-0 items-center gap-1.5 rounded-md border border-border px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-card-strong",children:[r?(0,s.jsx)(N.A,{className:"h-3.5 w-3.5","aria-hidden":!0}):(0,s.jsx)(w.A,{className:"h-3.5 w-3.5","aria-hidden":!0}),r?"Resume":"Pause"]}),(0,s.jsx)(e_,{machine:e,snapshot:b.detail?.snapshot??null,capturedAt:b.detail?.capturedAt??null,receivedAtMs:b.lastReceivedMs,intervalMs:b.intervalMs,phase:b.phase,query:o,mode:c,sort:p,filteredRows:W,sortedRows:L,groups:K,tree:F})]}),(0,s.jsx)(eV,{summary:j,lastReceivedMs:b.lastReceivedMs,intervalMs:b.intervalMs,message:b.message,phase:b.phase,hasSnapshot:Z}),(0,s.jsx)("div",{"aria-busy":G||"acquiring"===b.phase,className:"flex min-h-0 flex-1 flex-col overflow-auto",children:Z?0===W.length?(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2 break-words",children:[(0,s.jsx)(d.p,{icon:k.A,note:0===j.shown?"The collector reported no processes in this snapshot.":o.trim().length>0?`No processes match “${H}”.`:"No processes to show.",className:"min-h-64 w-full"}),o.trim().length>0?(0,s.jsxs)("button",{type:"button",onClick:()=>l(""),className:"inline-flex min-h-6 items-center gap-1.5 rounded-md border border-border px-2 py-1 text-xs text-foreground transition-colors hover:bg-card-strong",children:[(0,s.jsx)(M.A,{className:"h-3 w-3","aria-hidden":!0}),"Clear search"]}):null]}):(0,s.jsx)(e$,{mode:c,groups:K,rows:L,tree:F,sort:p,onSort:e=>h(t=>(function(e,t){return e.key===t?{key:t,dir:"asc"===e.dir?"desc":"asc"}:{key:t,dir:"name"===t||"user"===t||"pid"===t?"asc":"desc"}})(t,e)),expanded:x,onToggleGroup:e=>{f(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])}}):(0,s.jsx)(eO,{phase:b.phase,info:z,message:b.message,onRetry:y})})]})})}function eG({waiting:e}){return(0,s.jsx)(d.Z,{title:e?"Waiting for machines":"No machines",className:"mt-2",children:(0,s.jsx)(d.p,{icon:e?i.A:l.A,note:e?"Waiting for the fleet snapshot…":"No machines are available in your authorized fleet."})})}function eY({requested:e}){return(0,s.jsxs)(d.Z,{title:"Machine not found",className:"mt-2",children:[(0,s.jsx)(d.p,{icon:o.A,note:"This machine is unavailable or outside your access."}),(0,s.jsxs)("p",{className:"tnum mt-2 break-all text-center text-xs text-muted-foreground",children:["Requested identifier: ",e]}),(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(a(),{href:"/",className:"mt-2 inline-flex items-center gap-1.5 rounded-md border border-border px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-card-strong",children:"Back to fleet"})})]})}function eJ(){let{session:e,phase:t,machines:r}=(0,m.M)(),n=(0,h.x)(),[a,i]=(0,es.u)("processes.paused",!1,em,"session"),{machine:l,navMachineId:o,requestedMachineId:d}=(0,f.JG)("processes"),g="signed-in"===e.kind?e.user.csrfToken:null,x=0===r.length&&("connecting"===t||"idle"===t);return(0,s.jsx)(c.G,{title:"Processes",machineId:o,machineView:"processes",workspace:!0,headerRight:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.$E,{}),(0,s.jsx)(p.B,{})]}),children:n||(0,s.jsx)(s.Fragment,{children:0===r.length?(0,s.jsx)(eG,{waiting:x}):l?(0,s.jsx)(eZ,{machine:l,csrfToken:g,paused:a,onPausedChange:i},`${l.machineId}:${g}`):(0,s.jsx)(eY,{requested:d??""})})})}},7499:(e,t,r)=>{"use strict";function s(e,t,r,s){return`rigscope-${e}-${function(e,t="machine"){let r=e.normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48).replace(/-+$/g,"");return r.length>0?r:t}(t)}-${!Number.isFinite(r)?"unknown-time":new Date(r).toISOString().replace(/[-:]/g,"").replace(/\.\d{3}Z$/,"Z")}.${s}`}r.d(t,{Y8:()=>s})},8528:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(8698).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},9664:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(8698).A)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},9926:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(8698).A)("Hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]])},9942:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(8698).A)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])}},e=>{e.O(0,[944,939,103,441,794,358],()=>e(e.s=62)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-outline-style:solid}}}@layer theme{:host,:root{--font-sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-black:#000;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-wide:.025em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-background:var(--background);--color-foreground:var(--foreground)}}@layer base{*,::backdrop,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}:host,html{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,optgroup,select,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden}.absolute,.sr-only{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-y-0{inset-block:0}.top-0{top:0}.top-1\.5{top:calc(var(--spacing) * 1.5)}.top-1\/2{top:50%}.right-0{right:0}.right-0\.5{right:calc(var(--spacing) * .5)}.right-2{right:calc(var(--spacing) * 2)}.bottom-full{bottom:100%}.left-0{left:0}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.order-first{order:-9999}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:0}.m-1{margin:var(--spacing)}.m-2{margin:calc(var(--spacing) * 2)}.m-3{margin:calc(var(--spacing) * 3)}.m-74{margin:calc(var(--spacing) * 74)}.mx-auto{margin-inline:auto}.my-2{margin-block:calc(var(--spacing) * 2)}.my-3{margin-block:calc(var(--spacing) * 3)}.my-12{margin-block:calc(var(--spacing) * 12)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-10{margin-top:calc(var(--spacing) * 10)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.ml-1{margin-left:var(--spacing)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-0\.5{height:calc(var(--spacing) * .5)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-4\.5{height:calc(var(--spacing) * 4.5)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-14{height:calc(var(--spacing) * 14)}.h-40{height:calc(var(--spacing) * 40)}.h-dvh{height:100dvh}.h-full{height:100%}.h-px{height:1px}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[min\(30dvh\,20rem\)\]{max-height:min(30dvh,20rem)}.max-h-none{max-height:none}.min-h-0{min-height:0}.min-h-4{min-height:calc(var(--spacing) * 4)}.min-h-5{min-height:calc(var(--spacing) * 5)}.min-h-6{min-height:calc(var(--spacing) * 6)}.min-h-7{min-height:calc(var(--spacing) * 7)}.min-h-8{min-height:calc(var(--spacing) * 8)}.min-h-9{min-height:calc(var(--spacing) * 9)}.min-h-11{min-height:calc(var(--spacing) * 11)}.min-h-14{min-height:calc(var(--spacing) * 14)}.min-h-32{min-height:calc(var(--spacing) * 32)}.min-h-48{min-height:calc(var(--spacing) * 48)}.min-h-64{min-height:calc(var(--spacing) * 64)}.min-h-dvh{min-height:100dvh}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-4\.5{width:calc(var(--spacing) * 4.5)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-9{width:calc(var(--spacing) * 9)}.w-11{width:calc(var(--spacing) * 11)}.w-14{width:calc(var(--spacing) * 14)}.w-32{width:calc(var(--spacing) * 32)}.w-40{width:calc(var(--spacing) * 40)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-\[min\(20rem\,90vw\)\]{width:min(20rem,90vw)}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-32{max-width:calc(var(--spacing) * 32)}.max-w-48{max-width:calc(var(--spacing) * 48)}.max-w-64{max-width:calc(var(--spacing) * 64)}.max-w-\[12rem\]{max-width:12rem}.max-w-\[16rem\]{max-width:16rem}.max-w-\[18rem\]{max-width:18rem}.max-w-\[1500px\]{max-width:1500px}.max-w-\[calc\(100\%-1rem\)\]{max-width:calc(100% - 1rem)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.basis-52{flex-basis:calc(var(--spacing) * 52)}.table-fixed{table-layout:fixed}.border-separate{border-collapse:separate}.border-spacing-0{--tw-border-spacing-x:0px;--tw-border-spacing-y:0px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-crosshair{cursor:crosshair}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-pan-y{--tw-pan-y:pan-y;touch-action:var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)}.touch-none{touch-action:none}.resize{resize:both}.scroll-mt-6{scroll-margin-top:calc(var(--spacing) * 6)}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[3rem_minmax\(0\,1fr\)_4\.5rem\]{grid-template-columns:3rem minmax(0,1fr) 4.5rem}.grid-cols-\[minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.grid-cols-\[repeat\(auto-fit\,minmax\(3\.5rem\,1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(3.5rem,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-x-5{column-gap:calc(var(--spacing) * 5)}.gap-x-6{column-gap:calc(var(--spacing) * 6)}.gap-x-8{column-gap:calc(var(--spacing) * 8)}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.gap-y-3{row-gap:calc(var(--spacing) * 3)}.gap-y-4{row-gap:calc(var(--spacing) * 4)}.gap-y-5{row-gap:calc(var(--spacing) * 5)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border>:not(:last-child)){border-color:var(--border)}.self-center{align-self:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overflow-y-hidden{overflow-y:hidden}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e+38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-\[5px\]{border-style:var(--tw-border-style);border-width:5px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-accent\/40{border-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\/40{border-color:color-mix(in oklab,var(--accent) 40%,transparent)}}.border-accent\/60{border-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\/60{border-color:color-mix(in oklab,var(--accent) 60%,transparent)}}.border-border,.border-border\/40{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/40{border-color:color-mix(in oklab,var(--border) 40%,transparent)}}.border-crit{border-color:var(--crit)}.border-current{border-color:currentColor}.border-transparent{border-color:#0000}.bg-accent{background-color:var(--accent)}.bg-background{background-color:var(--background)}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-card-strong,.bg-card-strong\/25{background-color:var(--card-strong)}@supports (color:color-mix(in lab,red,red)){.bg-card-strong\/25{background-color:color-mix(in oklab,var(--card-strong) 25%,transparent)}}.bg-card-strong\/30{background-color:var(--card-strong)}@supports (color:color-mix(in lab,red,red)){.bg-card-strong\/30{background-color:color-mix(in oklab,var(--card-strong) 30%,transparent)}}.bg-card-strong\/40{background-color:var(--card-strong)}@supports (color:color-mix(in lab,red,red)){.bg-card-strong\/40{background-color:color-mix(in oklab,var(--card-strong) 40%,transparent)}}.bg-cpu{background-color:var(--cpu)}.bg-crit{background-color:var(--crit)}.bg-crit-soft{background-color:var(--crit-soft)}.bg-current{background-color:currentColor}.bg-mem{background-color:var(--mem)}.bg-muted-foreground,.bg-muted-foreground\/50{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/50{background-color:color-mix(in oklab,var(--muted-foreground) 50%,transparent)}}.bg-ok{background-color:var(--ok)}.bg-ok-soft{background-color:var(--ok-soft)}.bg-selected{background-color:var(--selected)}.bg-warn{background-color:var(--warn)}.bg-warn-soft{background-color:var(--warn-soft)}.fill-foreground{fill:var(--foreground)}.fill-muted-foreground{fill:var(--muted-foreground)}.fill-warn{fill:var(--warn)}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pr-1{padding-right:var(--spacing)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent{color:var(--accent)}.text-accent-foreground{color:var(--accent-foreground)}.text-crit{color:var(--crit)}.text-foreground,.text-foreground\/80{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\/80{color:color-mix(in oklab,var(--foreground) 80%,transparent)}}.text-muted-foreground{color:var(--muted-foreground)}.text-ok{color:var(--ok)}.text-warn{color:var(--warn)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.accent-\[var\(--accent\)\]{accent-color:var(--accent)}.accent-foreground{accent-color:var(--foreground)}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline-offset-\[-2px\]{outline-offset:-2px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.group-hover\/handle\:bg-accent:is(:where(.group\/handle):hover *){background-color:var(--accent)}}.group-focus-visible\/handle\:bg-accent:is(:where(.group\/handle):focus-visible *){background-color:var(--accent)}.peer-focus-visible\:outline:is(:where(.peer):focus-visible~*){outline-style:var(--tw-outline-style);outline-width:1px}.peer-focus-visible\:outline-2:is(:where(.peer):focus-visible~*){outline-style:var(--tw-outline-style);outline-width:2px}.peer-focus-visible\:outline-offset-2:is(:where(.peer):focus-visible~*){outline-offset:2px}.peer-focus-visible\:\[outline-color\:var\(--focus\)\]:is(:where(.peer):focus-visible~*){outline-color:var(--focus)}.peer-focus-visible\:outline-accent:is(:where(.peer):focus-visible~*){outline-color:var(--accent)}.placeholder\:text-muted-foreground::placeholder,.placeholder\:text-muted-foreground\/70::placeholder{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.placeholder\:text-muted-foreground\/70::placeholder{color:color-mix(in oklab,var(--muted-foreground) 70%,transparent)}}.backdrop\:bg-black\/50::backdrop{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.backdrop\:bg-black\/50::backdrop{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){.hover\:border-muted-foreground\/40:hover{border-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.hover\:border-muted-foreground\/40:hover{border-color:color-mix(in oklab,var(--muted-foreground) 40%,transparent)}}.hover\:bg-accent\/90:hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-accent\/90:hover{background-color:color-mix(in oklab,var(--accent) 90%,transparent)}}.hover\:bg-card:hover{background-color:var(--card)}.hover\:bg-card-strong:hover,.hover\:bg-card-strong\/60:hover{background-color:var(--card-strong)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card-strong\/60:hover{background-color:color-mix(in oklab,var(--card-strong) 60%,transparent)}}.hover\:bg-card-strong\/70:hover{background-color:var(--card-strong)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-card-strong\/70:hover{background-color:color-mix(in oklab,var(--card-strong) 70%,transparent)}}.hover\:bg-crit-soft:hover{background-color:var(--crit-soft)}.hover\:bg-selected:hover{background-color:var(--selected)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:underline:hover{text-decoration-line:underline}}.focus\:not-sr-only:focus{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.focus\:absolute:focus{position:absolute}.focus\:start-2:focus{inset-inline-start:calc(var(--spacing) * 2)}.focus\:top-2:focus{top:calc(var(--spacing) * 2)}.focus\:outline-2:focus{outline-style:var(--tw-outline-style);outline-width:2px}.focus\:outline-accent:focus{outline-color:var(--accent)}.focus-visible\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-offset-\[-2px\]:focus-visible{outline-offset:-2px}.focus-visible\:outline-accent:focus-visible{outline-color:var(--accent)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.aria-\[invalid\=true\]\:border-crit[aria-invalid=true]{border-color:var(--crit)}@media (min-width:40rem){.sm\:order-none{order:0}.sm\:col-span-2{grid-column:span 2/span 2}.sm\:ml-auto{margin-left:auto}.sm\:block{display:block}.sm\:hidden{display:none}.sm\:inline{display:inline}.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-\[3\.5rem_minmax\(0\,1fr\)_4\.5rem_3rem\]{grid-template-columns:3.5rem minmax(0,1fr) 4.5rem 3rem}.sm\:flex-row{flex-direction:row}.sm\:items-end{align-items:flex-end}.sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (min-width:48rem){.md\:pointer-events-auto{pointer-events:auto}.md\:top-2{top:calc(var(--spacing) * 2)}.md\:bottom-auto{bottom:auto}.md\:col-span-2{grid-column:span 2/span 2}.md\:mb-0{margin-bottom:0}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:inline{display:inline}.md\:min-h-9{min-height:calc(var(--spacing) * 9)}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:p-3{padding:calc(var(--spacing) * 3)}.md\:p-5{padding:calc(var(--spacing) * 5)}.md\:p-6{padding:calc(var(--spacing) * 6)}.md\:px-3{padding-inline:calc(var(--spacing) * 3)}.md\:px-5{padding-inline:calc(var(--spacing) * 5)}.md\:px-6{padding-inline:calc(var(--spacing) * 6)}}@media (min-width:64rem){.lg\:col-span-full{grid-column:1/-1}.lg\:inline{display:inline}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-\[minmax\(0\,13rem\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,13rem) minmax(0,1fr)}.lg\:items-start{align-items:flex-start}.lg\:border-t-0{border-top-style:var(--tw-border-style);border-top-width:0}.lg\:border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.lg\:pt-0{padding-top:0}.lg\:pl-6{padding-left:calc(var(--spacing) * 6)}}@media (min-width:80rem){.xl\:col-span-2{grid-column:span 2/span 2}.xl\:col-span-3{grid-column:span 3/span 3}.xl\:col-span-5{grid-column:span 5/span 5}.xl\:col-span-7{grid-column:span 7/span 7}.xl\:col-span-12{grid-column:span 12/span 12}.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.xl\:grid-cols-\[minmax\(0\,1fr\)_24rem\]{grid-template-columns:minmax(0,1fr) 24rem}.xl\:grid-cols-\[repeat\(auto-fit\,minmax\(30rem\,1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(30rem,1fr))}}.dark\:block:is(.dark *){display:block}.dark\:hidden:is(.dark *){display:none}.\[\&\:\:-webkit-search-cancel-button\]\:hidden::-webkit-search-cancel-button{display:none}.\[\&\:\:-webkit-search-cancel-button\]\:\[-webkit-appearance\:none\]::-webkit-search-cancel-button{-webkit-appearance:none}}:root{color-scheme:light;--background:#f4f5f7;--card:#fff;--card-strong:#f9fafb;--border:#e2e4e9;--foreground:#1a1b1e;--muted-foreground:#5d5f64;--accent:#1c71d8;--accent-foreground:#fff;--selected:#e8f0fb;--component-selected:#1c71d8;--ok:#2a9134;--ok-soft:#2a913421;--warn:#c67b00;--warn-soft:#c67b0024;--crit:#c33c3c;--crit-soft:#c33c3c24;--cpu:#3584e4;--mem:#33a06f;--swap:#d8a23a;--scrollbar:#c7cad0;--focus:oklab(55.8192% -.0413209 -.171246/.6)}.dark{color-scheme:dark;--background:#181a1e;--card:#22252a;--card-strong:#2d3036;--border:#3a3e45;--foreground:#f1f2f4;--muted-foreground:#afb4bd;--accent:#3584e4;--accent-foreground:#fff;--selected:#1e3a5c;--component-selected:#3584e4;--ok:#58cc8b;--ok-soft:#58cc8b26;--warn:#e5b45e;--warn-soft:#e5b45e26;--crit:#e05e5e;--crit-soft:#e05e5e26;--cpu:#4c9bf5;--mem:#58cc8b;--swap:#e5b45e;--scrollbar:#3a3e45;--focus:#4c9bf5}body,html{overscroll-behavior:none}body{background-color:var(--color-background);color:var(--color-foreground);-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;font-family:ui-sans-serif,system-ui,Noto Sans,Inter,sans-serif}.tnum{font-variant-numeric:tabular-nums}::selection{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){::selection{background-color:color-mix(in oklab,var(--accent) 28%,transparent)}}::selection{color:var(--foreground)}:focus-visible{outline:2px solid var(--focus);outline-offset:2px}*{scrollbar-width:thin;scrollbar-color:var(--scrollbar) transparent}@media (prefers-reduced-motion:reduce){*,:after,:before{transition-duration:.01ms!important;animation-duration:.01ms!important}}@property --tw-border-spacing-x{syntax:"<length>";inherits:false;initial-value:0}@property --tw-border-spacing-y{syntax:"<length>";inherits:false;initial-value:0}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@keyframes spin{to{transform:rotate(1turn)}}@keyframes pulse{50%{opacity:.5}}
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Release notes
2
2
 
3
+ ## 0.1.6
4
+
5
+ - Hide navigation completely on narrow screens and open the shared sidebar in
6
+ an overlay drawer. Include full machine and navigation labels, larger touch
7
+ targets, and native dialog focus and Escape handling. Desktop navigation stays
8
+ visible; the drawer closes after a selection or when resizing to desktop.
9
+ - Start History chart inspection on touch press and capture horizontal drags,
10
+ while allowing vertical page scrolling. Preserve the cursor after touch release
11
+ and place mobile tooltips above the graph. Apply touch inspection to per-core
12
+ history rows as well as time-series charts.
13
+ - Refresh the rigscope.dev synthetic demo with the same shared mobile UI.
14
+
15
+ ## 0.1.5
16
+
17
+ - Refresh the dark console palette and replace the sidebar machine selector with
18
+ visible machine rows. Show collector status dots and CPU models, align machine
19
+ names with navigation labels, and preserve the selected view when switching
20
+ machines. Alerts, Connections and administrator-only Administration remain
21
+ below the machine views; narrow screens retain initials and status indicators.
22
+ - Add a responsive showcase website with an installation command and copy button,
23
+ documentation and contact links, and an interactive synthetic demo. The demo
24
+ renders the actual Fleet, Overview, History and Processes components and product
25
+ stylesheet through isolated routing and data adapters, without accessing a hub.
26
+ - Validate synthetic fixtures against product contracts and check the website
27
+ build and types in the manual CI workflow to catch drift from the product UI.
28
+
3
29
  ## 0.1.4
4
30
 
5
31
  - Coordinate stopping running user services and owned foreground processes for
package/DESIGN.md CHANGED
@@ -2,25 +2,25 @@
2
2
  name: Rigscope
3
3
  description: A calm remote monitoring console with clear hierarchy, useful density, and coherent dark/light themes.
4
4
  colors:
5
- background: "#1a1b1e"
6
- card: "#26272b"
7
- card-strong: "#2d2e33"
8
- border: "#3a3b3f"
9
- foreground: "#e4e5e8"
10
- muted-foreground: "#a2a4a9"
5
+ background: "#181a1e"
6
+ card: "#22252a"
7
+ card-strong: "#2d3036"
8
+ border: "#3a3e45"
9
+ foreground: "#f1f2f4"
10
+ muted-foreground: "#afb4bd"
11
11
  accent: "#3584e4"
12
12
  accent-foreground: "#ffffff"
13
13
  selected: "#1e3a5c"
14
- ok: "#3db84a"
15
- ok-soft: "rgba(61, 184, 74, 0.15)"
16
- warn: "#e5a83b"
17
- warn-soft: "rgba(229, 168, 59, 0.15)"
14
+ ok: "#58cc8b"
15
+ ok-soft: "rgba(88, 204, 139, 0.15)"
16
+ warn: "#e5b45e"
17
+ warn-soft: "rgba(229, 180, 94, 0.15)"
18
18
  crit: "#e05e5e"
19
19
  crit-soft: "rgba(224, 94, 94, 0.15)"
20
- cpu: "#3584e4"
21
- mem: "#4ec289"
22
- swap: "#d8a23a"
23
- scrollbar: "#3a3b3f"
20
+ cpu: "#4c9bf5"
21
+ mem: "#58cc8b"
22
+ swap: "#e5b45e"
23
+ scrollbar: "#3a3e45"
24
24
  typography:
25
25
  page-title:
26
26
  fontFamily: "system-ui, ui-sans-serif, 'Noto Sans', 'Inter', sans-serif"
@@ -231,8 +231,17 @@ the toolbar stays visible and table headers remain pinned while rows scroll. Dra
231
231
  divider, or double-click to reset. View mode, per-table sorting and widths persist in the
232
232
  browser; search, expanded applications, pause and machine selection last for the tab session.
233
233
  Machine selection is shared across Fleet, Overview, History and Processes for the tab.
234
- The sidebar keeps Fleet as the parent of a single machine selector and indented
235
- Overview/History/Processes links. Global hub pages follow in a separate group. Header
234
+ The 224px desktop sidebar keeps Fleet above a visible list of authorized machines,
235
+ with names and available tags. Selected machines use a blue surface, outlined row,
236
+ stronger name and check mark. Choosing a machine preserves the active machine view
237
+ and uses the shared tab-scoped selection. The list scrolls within a bounded height
238
+ so Overview/History/Processes and the separated Alerts, Connections and admin-only
239
+ Administration links remain reachable. On the 56px mobile rail, machine initials and
240
+ view icons retain native titles and accessible names; selection remains outlined.
241
+ The logo and live connection footer retain their existing roles. Dark surfaces use
242
+ the charcoal website palette, brighter text, blue CPU, green memory and amber swap;
243
+ light tokens retain their established palette. Warning and critical meanings remain
244
+ separate, and dark keyboard focus uses a solid blue outline. Header
236
245
  breadcrumbs show Fleet / machine / view; page-level tabs and pickers are omitted. Fleet
237
246
  rows show compact CPU/memory trends received since sign-in. Overview combines CPU/GPU
238
247
  and RAM/VRAM into two charts in one fixed ten-minute panel. History owns range and metric
@@ -297,3 +306,5 @@ Rigscope is a self-hosted Linux resource/process monitor for a machine owner or
297
306
  App surfaces use Operate mode: precise data, quiet surfaces, stable live updates and familiar controls. Freshness changes update existing status indicators without inserting banners above data. Interface copy consists of labels, values and actionable errors; omit redundant explanatory paragraphs.
298
307
 
299
308
  The identity is an open rack frame around a rising trace and two sample points. `BrandMark` is the shared, decorative 24-unit SVG in the sidebar and sign-in row; the neighboring Rigscope text/link provides its accessible name. The app icon uses the same geometry with a dark backing and bright blue stroke for light/dark browser chrome. It is legible at 16–32px, with no animation, raster assets or layout changes. Keep this small brand gesture separate from metric semantics.
309
+
310
+ Machine rows use a fixed 16px status column and the same 12px gap and horizontal inset as navigation links, so every desktop label aligns. The status dot is green for fresh live samples, amber for stale or unavailable feeds, red for disconnected collectors, and muted before the first sample; the accessible name includes the status. CPU model appears below the machine name when available, with tags as the fallback. Mobile initials retain a small status dot.
package/dist/cli.cjs CHANGED
@@ -9672,6 +9672,7 @@ async function main() {
9672
9672
  for (const [key, value] of Object.entries(values)) {
9673
9673
  if (value !== void 0 && key !== "state-dir" && key !== "scope" && !(permitted[command] ?? []).includes(key)) throw new Error(`--${key} is not available for ${command}.`);
9674
9674
  }
9675
+ if (values.origin?.endsWith("/")) values.origin = values.origin.slice(0, -1);
9675
9676
  const managedState = (0, import_node_path20.basename)(ROOT) === "rigscope" && (0, import_node_path20.basename)((0, import_node_path20.dirname)(ROOT)) === "node_modules" && (0, import_node_path20.basename)((0, import_node_path20.resolve)(ROOT, "../..")) === "runtime" ? (0, import_node_path20.resolve)(ROOT, "../../..") : void 0;
9676
9677
  const dir = stateDirectory(values["state-dir"] ?? (command === "try" ? `${stateDirectory()}-trial` : process.env.RIGSCOPE_STATE_DIR ?? managedState));
9677
9678
  const explicitState = Boolean(values["state-dir"] || process.env.RIGSCOPE_STATE_DIR || managedState || command === "try" || command === "run");
@@ -5217,7 +5217,7 @@ function budget(value, fallback) {
5217
5217
  // package.json
5218
5218
  var package_default = {
5219
5219
  name: "rigscope",
5220
- version: "0.1.4",
5220
+ version: "0.1.6",
5221
5221
  private: false,
5222
5222
  engines: {
5223
5223
  node: ">=26.0.0"
package/dist/hub.cjs CHANGED
@@ -1741,7 +1741,7 @@ function describeError(error) {
1741
1741
  // package.json
1742
1742
  var package_default = {
1743
1743
  name: "rigscope",
1744
- version: "0.1.4",
1744
+ version: "0.1.6",
1745
1745
  private: false,
1746
1746
  engines: {
1747
1747
  node: ">=26.0.0"