rigscope 0.1.3 → 0.1.4

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 (97) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +4 -4
  3. package/.next/build-manifest.json +2 -2
  4. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  5. package/.next/server/app/_global-error.html +1 -1
  6. package/.next/server/app/_global-error.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  10. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/_not-found.html +1 -1
  12. package/.next/server/app/_not-found.rsc +1 -1
  13. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  14. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  15. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  16. package/.next/server/app/administration/page_client-reference-manifest.js +1 -1
  17. package/.next/server/app/administration.html +1 -1
  18. package/.next/server/app/administration.rsc +1 -1
  19. package/.next/server/app/administration.segments/_full.segment.rsc +1 -1
  20. package/.next/server/app/administration.segments/_tree.segment.rsc +1 -1
  21. package/.next/server/app/administration.segments/administration/__PAGE__.segment.rsc +1 -1
  22. package/.next/server/app/alerts/page_client-reference-manifest.js +1 -1
  23. package/.next/server/app/alerts.html +1 -1
  24. package/.next/server/app/alerts.rsc +1 -1
  25. package/.next/server/app/alerts.segments/_full.segment.rsc +1 -1
  26. package/.next/server/app/alerts.segments/_tree.segment.rsc +1 -1
  27. package/.next/server/app/alerts.segments/alerts/__PAGE__.segment.rsc +1 -1
  28. package/.next/server/app/connections/page_client-reference-manifest.js +1 -1
  29. package/.next/server/app/connections.html +1 -1
  30. package/.next/server/app/connections.rsc +1 -1
  31. package/.next/server/app/connections.segments/_full.segment.rsc +1 -1
  32. package/.next/server/app/connections.segments/_tree.segment.rsc +1 -1
  33. package/.next/server/app/connections.segments/connections/__PAGE__.segment.rsc +1 -1
  34. package/.next/server/app/history/page_client-reference-manifest.js +1 -1
  35. package/.next/server/app/history.html +1 -1
  36. package/.next/server/app/history.rsc +2 -2
  37. package/.next/server/app/history.segments/_full.segment.rsc +2 -2
  38. package/.next/server/app/history.segments/_tree.segment.rsc +1 -1
  39. package/.next/server/app/history.segments/history/__PAGE__.segment.rsc +2 -2
  40. package/.next/server/app/index.html +1 -1
  41. package/.next/server/app/index.rsc +1 -1
  42. package/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  43. package/.next/server/app/index.segments/_full.segment.rsc +1 -1
  44. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  45. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  46. package/.next/server/app/login.html +1 -1
  47. package/.next/server/app/login.rsc +1 -1
  48. package/.next/server/app/login.segments/_full.segment.rsc +1 -1
  49. package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  50. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  51. package/.next/server/app/machines/[machineId]/page.js +1 -1
  52. package/.next/server/app/machines/[machineId]/page_client-reference-manifest.js +1 -1
  53. package/.next/server/app/page_client-reference-manifest.js +1 -1
  54. package/.next/server/app/processes/page_client-reference-manifest.js +1 -1
  55. package/.next/server/app/processes.html +1 -1
  56. package/.next/server/app/processes.rsc +1 -1
  57. package/.next/server/app/processes.segments/_full.segment.rsc +1 -1
  58. package/.next/server/app/processes.segments/_tree.segment.rsc +1 -1
  59. package/.next/server/app/processes.segments/processes/__PAGE__.segment.rsc +1 -1
  60. package/.next/server/app-paths-manifest.json +4 -4
  61. package/.next/server/chunks/168.js +1 -1
  62. package/.next/server/middleware-build-manifest.js +1 -1
  63. package/.next/server/pages/404.html +1 -1
  64. package/.next/server/pages/500.html +1 -1
  65. package/.next/static/chunks/408-29f55984738967db.js +1 -0
  66. package/.next/static/chunks/app/machines/[machineId]/page-1a25a267563c18c0.js +1 -0
  67. package/CHANGELOG.md +21 -0
  68. package/README.md +2 -0
  69. package/dist/cli.cjs +2365 -1930
  70. package/dist/collector.cjs +18 -7
  71. package/dist/hub.cjs +1 -1
  72. package/docs/installation.md +74 -25
  73. package/docs/operations.md +13 -7
  74. package/docs/releasing.md +12 -12
  75. package/package.json +1 -1
  76. package/.next/server/route-cache/APP_PAGE/16d1ab46157a868f438fa01e04bf53e805c71cddec593ea1535905c59625cd42/$/login.html +0 -1
  77. package/.next/server/route-cache/APP_PAGE/16d1ab46157a868f438fa01e04bf53e805c71cddec593ea1535905c59625cd42/$/login.meta +0 -1
  78. package/.next/server/route-cache/APP_PAGE/16d1ab46157a868f438fa01e04bf53e805c71cddec593ea1535905c59625cd42/$/login.rsc +0 -26
  79. package/.next/server/route-cache/APP_PAGE/16d1ab46157a868f438fa01e04bf53e805c71cddec593ea1535905c59625cd42/$/login.segments/_full.segment.rsc +0 -26
  80. package/.next/server/route-cache/APP_PAGE/16d1ab46157a868f438fa01e04bf53e805c71cddec593ea1535905c59625cd42/$/login.segments/_tree.segment.rsc +0 -4
  81. package/.next/server/route-cache/APP_PAGE/16d1ab46157a868f438fa01e04bf53e805c71cddec593ea1535905c59625cd42/$/login.segments/login/__PAGE__.segment.rsc +0 -32
  82. package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.html +0 -1
  83. package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.meta +0 -1
  84. package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.rsc +0 -24
  85. package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.segments/_full.segment.rsc +0 -24
  86. package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.segments/_not-found/__PAGE__.segment.rsc +0 -30
  87. package/.next/server/route-cache/APP_PAGE/41da0ef926a63354a29f601d8e8d0a5951196c45ebcd28b7d4708fb7f56f3bf1/$/_not-found.segments/_tree.segment.rsc +0 -4
  88. package/.next/server/route-cache/APP_PAGE/c6377dd9ce6a1c2cd100eb4344e843eb4639b9ed26f84643f77680e9eb454c4b/$/index.html +0 -1
  89. package/.next/server/route-cache/APP_PAGE/c6377dd9ce6a1c2cd100eb4344e843eb4639b9ed26f84643f77680e9eb454c4b/$/index.meta +0 -1
  90. package/.next/server/route-cache/APP_PAGE/c6377dd9ce6a1c2cd100eb4344e843eb4639b9ed26f84643f77680e9eb454c4b/$/index.rsc +0 -26
  91. package/.next/server/route-cache/APP_PAGE/c6377dd9ce6a1c2cd100eb4344e843eb4639b9ed26f84643f77680e9eb454c4b/$/index.segments/__PAGE__.segment.rsc +0 -31
  92. package/.next/server/route-cache/APP_PAGE/c6377dd9ce6a1c2cd100eb4344e843eb4639b9ed26f84643f77680e9eb454c4b/$/index.segments/_full.segment.rsc +0 -26
  93. package/.next/server/route-cache/APP_PAGE/c6377dd9ce6a1c2cd100eb4344e843eb4639b9ed26f84643f77680e9eb454c4b/$/index.segments/_tree.segment.rsc +0 -3
  94. package/.next/static/chunks/408-4fe7147e38981ee1.js +0 -1
  95. package/.next/static/chunks/app/machines/[machineId]/page-916ee73de5eb067d.js +0 -1
  96. /package/.next/static/{xjSDCOO8Gpm5iPO9tyRG5 → -mNveXe-cHv8irQe97wI_}/_buildManifest.js +0 -0
  97. /package/.next/static/{xjSDCOO8Gpm5iPO9tyRG5 → -mNveXe-cHv8irQe97wI_}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
1
  :HL["/_next/static/css/3fbf75e4c471c6a8.css","style"]
2
2
  2:[["children",{"s":"__PAGE__","h":160}]]
3
3
  1:[["children",{"s":"processes","h":96,"c":"$Q2"}]]
4
- 0:{"b":"xjSDCOO8Gpm5iPO9tyRG5","t":{"t":{"s":"","h":80,"c":"$Q1"}}}
4
+ 0:{"b":"-mNveXe-cHv8irQe97wI_","t":{"t":{"s":"","h":80,"c":"$Q1"}}}
@@ -24,7 +24,7 @@ c:X
24
24
  c:C
25
25
  d:[["children",{"s":"__PAGE__","h":160,"d":{"r":["$","$1","c",{"children":[["$","$e",null,{"fallback":["$","div",null,{"className":"relative flex h-dvh overflow-hidden bg-background text-foreground","children":[["$","a",null,{"href":"#main-content","className":"sr-only z-50 rounded-md bg-card px-4 py-2 text-foreground focus:not-sr-only focus:absolute focus:start-2 focus:top-2 focus:outline-2 focus:outline-accent","children":"Skip to content"}],["$","$L12",null,{}],["$","div",null,{"className":"flex min-w-0 flex-1 flex-col","children":[["$","header",null,{"className":"flex min-h-14 shrink-0 flex-wrap items-center justify-between gap-2 border-b border-border px-4 py-2 md:px-6","children":[["$","h1",null,{"className":"truncate text-lg font-semibold tracking-tight","children":"Processes"}],["$","div",null,{"className":"flex items-center gap-3","children":[null,["$","$L13",null,{}]]}]]}],["$","main",null,{"id":"main-content","tabIndex":-1,"className":"relative min-h-0 min-w-0 flex-1 overflow-x-hidden overscroll-contain p-4 outline-offset-[-2px] md:p-6 overflow-y-auto","children":["$","div",null,{"className":"mx-auto flex w-full min-w-0 max-w-[1500px] flex-col","children":["$","section",null,{"className":"flex min-w-0 flex-col rounded-xl border border-border bg-card p-5 mt-2","children":[["$","div",null,{"className":"flex shrink-0 items-center justify-between gap-4","children":[["$","h2",null,{"className":"text-sm font-medium tracking-tight","children":"Process detail"}],null]}],["$","div",null,{"className":"mt-4 flex min-h-0 flex-1 flex-col","children":["$","p",null,{"role":"status","className":"py-10 text-center text-sm text-muted-foreground","children":"Loading the process view…"}]}]]}]}]}]]}]]}],"children":["$","$L14",null,{}]}],null,["$","$L15",null,{"children":["$","$e",null,{"name":"Next.MetadataOutlet","children":"$@16"}]}]]}],"p":"$@17","v":null,"s":"$9"}}]]
26
26
  a:[["children",{"s":"processes","h":96,"d":{"r":["$","$1","c",{"children":[null,["$","$L6",null,{"parallelRouterKey":"children","template":["$","$L7",null,{}]}]]}],"p":"$@b","v":"$c","s":"$9"},"c":"$Qd"}]]
27
- 0:{"t":{"t":{"s":"","h":80,"d":{"r":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/3fbf75e4c471c6a8.css","precedence":"next"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"children":["$","$L4",null,{"attribute":"class","defaultTheme":"dark","enableSystem":true,"children":["$","$L5",null,{"children":["$","$L6",null,{"parallelRouterKey":"children","template":["$","$L7",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]}]}]]}],"p":"$@8","v":null,"s":"$9"},"c":"$Qa"},"h":{"r":["$","$1","h",{"children":[null,["$","$L19",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","$L1b",null,{"children":[["$","div",null,{"hidden":true,"children":["$","$e",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"Processes — Rigscope"}],["$","meta","1",{"name":"description","content":"Self-hosted remote system monitor — a live fleet of collectors behind one authenticated hub."}],["$","link","2",{"rel":"icon","href":"/icon.svg?3b3fa3229e2d0d7a","type":"image/svg+xml","sizes":"any"}],["$","$L1c","3",{}]]}]}],null]}],null]}],"p":"$@1d","v":null,"s":"$9"}},"a":"$@1e","u":"$@1f","b":"xjSDCOO8Gpm5iPO9tyRG5"}
27
+ 0:{"t":{"t":{"s":"","h":80,"d":{"r":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/3fbf75e4c471c6a8.css","precedence":"next"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"children":["$","$L4",null,{"attribute":"class","defaultTheme":"dark","enableSystem":true,"children":["$","$L5",null,{"children":["$","$L6",null,{"parallelRouterKey":"children","template":["$","$L7",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]}]}]]}],"p":"$@8","v":null,"s":"$9"},"c":"$Qa"},"h":{"r":["$","$1","h",{"children":[null,["$","$L19",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","$L1b",null,{"children":[["$","div",null,{"hidden":true,"children":["$","$e",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"Processes — Rigscope"}],["$","meta","1",{"name":"description","content":"Self-hosted remote system monitor — a live fleet of collectors behind one authenticated hub."}],["$","link","2",{"rel":"icon","href":"/icon.svg?3b3fa3229e2d0d7a","type":"image/svg+xml","sizes":"any"}],["$","$L1c","3",{}]]}]}],null]}],null]}],"p":"$@1d","v":null,"s":"$9"}},"a":"$@1e","u":"$@1f","b":"-mNveXe-cHv8irQe97wI_"}
28
28
  16:null
29
29
  9:300
30
30
  1f:true
@@ -2,12 +2,12 @@
2
2
  "/_not-found/page": "app/_not-found/page.js",
3
3
  "/_global-error/page": "app/_global-error/page.js",
4
4
  "/icon.svg/route": "app/icon.svg/route.js",
5
- "/administration/page": "app/administration/page.js",
6
5
  "/alerts/page": "app/alerts/page.js",
7
6
  "/connections/page": "app/connections/page.js",
7
+ "/administration/page": "app/administration/page.js",
8
8
  "/login/page": "app/login/page.js",
9
- "/history/page": "app/history/page.js",
10
9
  "/page": "app/page.js",
11
- "/processes/page": "app/processes/page.js",
12
- "/machines/[machineId]/page": "app/machines/[machineId]/page.js"
10
+ "/history/page": "app/history/page.js",
11
+ "/machines/[machineId]/page": "app/machines/[machineId]/page.js",
12
+ "/processes/page": "app/processes/page.js"
13
13
  }
@@ -1 +1 @@
1
- "use strict";exports.id=168,exports.ids=[168],exports.modules={11449:(a,b,c)=>{c.d(b,{Cv:()=>e,H9:()=>d,Lf:()=>j,P$:()=>f,RL:()=>q,bP:()=>p,er:()=>m,oB:()=>i,ue:()=>o,yv:()=>l});let d=[{metric:"cpu.usage",label:"CPU usage",shortLabel:"CPU",unit:"percent",family:"cpu",colorSlot:0,description:"Total processor utilization"},{metric:"cpu.core",label:"Per-core CPU",shortLabel:"Per-core",unit:"percent",family:"cpu",colorSlot:0,description:"Logical-core utilization; heatmap for large selections"},{metric:"cpu.temperature",label:"CPU temperature",shortLabel:"Temperature",unit:"celsius",family:"cpu",colorSlot:3,description:"Identifiable CPU hwmon sensor temperature"},{metric:"cpu.power",label:"CPU package power",shortLabel:"Power",unit:"watts",family:"cpu",colorSlot:4,description:"Top-level RAPL package power draw"},{metric:"cpu.iowait",label:"CPU I/O wait",shortLabel:"I/O wait",unit:"percent",family:"cpu",colorSlot:2,description:"Processor time waiting on I/O"},{metric:"cpu.pressure",label:"CPU pressure",shortLabel:"Pressure",unit:"percent",family:"cpu",colorSlot:4,description:"Linux PSI CPU stall pressure (avg10)"},{metric:"memory.used",label:"Memory used",shortLabel:"Memory",unit:"bytes",family:"memory",colorSlot:1,description:"Physical memory in use"},{metric:"memory.usage",label:"Memory usage",shortLabel:"Memory %",unit:"percent",family:"memory",colorSlot:1,description:"Physical memory used as a share of total"},{metric:"memory.pressure.some",label:"Memory pressure (some)",shortLabel:"Pressure some",unit:"percent",family:"memory",colorSlot:2,description:"Linux PSI memory stall pressure, some tasks (avg10)"},{metric:"memory.pressure.full",label:"Memory pressure (full)",shortLabel:"Pressure full",unit:"percent",family:"memory",colorSlot:4,description:"Linux PSI memory stall pressure, all tasks (avg10)"},{metric:"swap.used",label:"Swap used",shortLabel:"Swap",unit:"bytes",family:"swap",colorSlot:2,description:"Swap space in use"},{metric:"gpu.utilization",label:"GPU utilization",shortLabel:"Utilization",unit:"percent",family:"gpus",colorSlot:0,description:"Per-card graphics processor utilization"},{metric:"gpu.memory.used",label:"GPU memory used",shortLabel:"VRAM",unit:"bytes",family:"gpus",colorSlot:1,description:"Per-card video memory in use"},{metric:"gpu.temperature",label:"GPU temperature",shortLabel:"Temperature",unit:"celsius",family:"gpus",colorSlot:3,description:"Per-card temperature"},{metric:"gpu.power",label:"GPU power",shortLabel:"Power",unit:"watts",family:"gpus",colorSlot:4,description:"Per-card power draw"},{metric:"fs.used",label:"Filesystem used",shortLabel:"Filesystem",unit:"bytes",family:"disks",colorSlot:1,description:"Used space per mounted filesystem"},{metric:"fs.usage",label:"Filesystem usage",shortLabel:"Filesystem %",unit:"percent",family:"disks",colorSlot:1,description:"Used capacity per mounted filesystem, derived from a positive total"},{metric:"fs.inodes.usage",label:"Inode usage",shortLabel:"Inodes %",unit:"percent",family:"disks",colorSlot:2,description:"Used inodes per filesystem where the collector can read them"},{metric:"disk.read",label:"Disk read",shortLabel:"Read",unit:"bytes_per_second",family:"disks",colorSlot:0,description:"Device read throughput"},{metric:"disk.write",label:"Disk write",shortLabel:"Write",unit:"bytes_per_second",family:"disks",colorSlot:2,description:"Device write throughput"},{metric:"disk.read.latency",label:"Disk read latency",shortLabel:"Read latency",unit:"milliseconds",family:"disks",colorSlot:0,description:"Average device read latency"},{metric:"disk.write.latency",label:"Disk write latency",shortLabel:"Write latency",unit:"milliseconds",family:"disks",colorSlot:2,description:"Average device write latency"},{metric:"disk.utilization",label:"Disk utilization",shortLabel:"Utilization",unit:"percent",family:"disks",colorSlot:3,description:"Share of time the device had I/O in flight"},{metric:"io.pressure.some",label:"I/O pressure (some)",shortLabel:"I/O some",unit:"percent",family:"disks",colorSlot:3,description:"Linux PSI I/O stall pressure, some tasks (avg10)"},{metric:"io.pressure.full",label:"I/O pressure (full)",shortLabel:"I/O full",unit:"percent",family:"disks",colorSlot:4,description:"Linux PSI I/O stall pressure, all tasks (avg10)"},{metric:"net.rx",label:"Network received",shortLabel:"Received",unit:"bytes_per_second",family:"network",colorSlot:0,description:"Interface receive rate"},{metric:"net.tx",label:"Network sent",shortLabel:"Sent",unit:"bytes_per_second",family:"network",colorSlot:2,description:"Interface transmit rate"}];function e(a,b){return a.filter(c=>{for(let[d,e,f]of[["memory","memory.used","memory.usage"],["filesystem","fs.used","fs.usage"]])if(a.includes(e)&&a.includes(f)&&(c===e||c===f))return c===("percent"===b[d]?f:e);return!0})}let f=[{id:"cpu",label:"CPU",metrics:["cpu.usage","cpu.core","cpu.iowait","cpu.pressure","cpu.temperature","cpu.power"]},{id:"memory",label:"Memory",metrics:["memory.used","memory.usage","swap.used","memory.pressure.some","memory.pressure.full"]},{id:"gpu",label:"GPU",metrics:["gpu.utilization","gpu.memory.used","gpu.temperature","gpu.power"]},{id:"disk",label:"Storage",metrics:["fs.used","fs.usage","fs.inodes.usage","disk.read","disk.write","disk.read.latency","disk.write.latency","disk.utilization","io.pressure.some","io.pressure.full"]},{id:"network",label:"Network",metrics:["net.rx","net.tx"]}],g=["var(--cpu)","var(--mem)","color-mix(in oklab, var(--swap) 75%, var(--foreground))","var(--warn)","var(--crit)","var(--accent)"],h=[void 0,"7 4","2 3","10 3 2 3","4 4","1 3"];function i(a){return d.find(b=>b.metric===a)??null}function j(a,b){let c=Math.max(0,b),d=a.colorSlot+c,e=(c+Math.floor(d/g.length))%h.length;return{color:g[d%g.length],dash:h[e]}}let k={cpu:"CPU",memory:"Memory",swap:"Swap",gpus:"GPU metrics",disks:"Disk metrics",network:"Network metrics"};function l(a,b){let c=i(b);if(null===c||void 0===a)return{available:!0,reason:null};let d=a.inventory?.capabilities?.[c.family];if(!d||"supported"===d.status)return{available:!0,reason:null};let e=d.reason?.trim();return{available:!1,reason:e?`${k[c.family]}: ${d.status} — ${e}`:`${k[c.family]} are ${d.status} on this machine.`}}function m(a){if(void 0===a)return[];let b=[],c=c=>{!(b.length>=16)&&l(a,c).available&&b.push(c)};c("cpu.usage"),c("memory.used");let d=function(a){let b=a.inventory?.memory.swapTotalBytes;if("number"==typeof b)return b;let c=a.metrics?.payload.swap;return c?.status==="ok"?c.totalBytes:null}(a);return null!==d&&d>0&&c("swap.used"),o(a,[]).length>0&&(c("gpu.utilization"),c("gpu.memory.used")),b}function n(a){let b=a.includes(":")?a.slice(a.indexOf(":")+1):a;return b.length<=18?b:`${b.slice(0,10)}…${b.slice(-4)}`}function o(a,b){let c=new Set(b.filter(a=>a.metric.startsWith("gpu.")&&""!==a.resourceId).map(a=>a.resourceId)),d=[],e=new Set;(a?.inventory?.gpus??[]).forEach(a=>{let b="supported"===a.telemetry;(b||c.has(a.id))&&(e.add(a.id),d.push({id:a.id,label:a.name.trim()||n(a.id),index:d.length,totalBytes:a.memoryTotalBytes,supported:b,hasHistory:c.has(a.id)}))});let f=a?.metrics?.payload.gpus;if(f?.status==="ok")for(let a of f.devices)e.has(a.id)||"ok"!==a.status||(e.add(a.id),d.push({id:a.id,label:n(a.id),index:d.length,totalBytes:a.memoryTotalBytes,supported:!0,hasHistory:c.has(a.id)}));for(let a of[...c].sort())e.has(a)||d.push({id:a,label:n(a),index:d.length,totalBytes:null,supported:!0,hasHistory:!0});return d}function p(a,b,c){if(""===c)return i(b)?.shortLabel??"Total";let d=i(b);if(null===d)return n(c);switch(d.family){case"gpus":{let b=a?.inventory?.gpus.find(a=>a.id===c);return b?.name.trim()||n(c)}case"disks":{if(b.startsWith("fs.")){let b=a?.inventory?.filesystems.find(a=>a.id===c);return b?.mountPoint||n(c)}let d=a?.inventory?.disks.find(a=>a.id===c);return d?.name||n(c)}case"network":{let b=a?.inventory?.network.find(a=>a.id===c);return b?.name||n(c)}case"cpu":{let a=/^core:(\d+)$/.exec(c);return a?`Core ${a[1]}`:n(c)}default:return n(c)}}function q(a){switch(a){case"percent":return"%";case"bytes":return"bytes";case"bytes_per_second":return"bytes/s";case"celsius":return"\xb0C";case"watts":return"W";case"milliseconds":return"ms";default:return a}}},15670:(a,b,c)=>{c.d(b,{t:()=>k});var d=c(48249),e=c(67484),f=c(96480),g=c(66338),h=c(11449),i=c(55280),j=c(47978);function k(a){let{title:b,unit:c,series:k,fromMs:l,toMs:m,stepMs:n,gaps:o,hiddenKeys:p,onToggleSeries:q,emptyMessage:r,note:s}=a,t=(0,e.useMemo)(()=>k.filter(a=>!p.has(a.key)),[k,p]),u=(0,j.Au)({series:t,fromMs:l,toMs:m,stepMs:n,gaps:o}),v=(0,e.useRef)(null),w=(0,e.useMemo)(()=>t.flatMap(a=>a.points),[t]),x=w.some(a=>null!==a.avg||null!==a.min||null!==a.max),y=Math.max(1,m-l),z=(0,e.useMemo)(()=>(0,f.$z)(o,l,m,w),[o,l,m,w]),A=(0,e.useMemo)(()=>(0,f.kk)(c,w.flatMap(a=>[a.min,a.max,a.avg]).filter(a=>null!==a)),[c,w]),B=Math.max(1e-9,A.max-A.min),C=(0,e.useCallback)(a=>6+(Math.min(m,Math.max(l,a))-l)/y*788,[l,m,y]),D=(0,e.useCallback)(a=>6+(1-(a-A.min)/B)*148,[A.min,B]),E=(0,e.useMemo)(()=>t.map(b=>{let c=(0,f.o)(b.points,{stepMs:n,gaps:z,fromMs:l,toMs:m}).map(b=>(0,f.SG)(b,a.maxDrawPoints??601,n));return{...b,segments:c,envelope:c.filter(a=>a.length>1).map(a=>{let b=a.map(a=>`${C(a.t).toFixed(2)},${D(a.max??a.avg).toFixed(2)}`),c=[...a].reverse().map(a=>`${C(a.t).toFixed(2)},${D(a.min??a.avg).toFixed(2)}`);return`M${b.join("L")}L${c.join("L")}Z`}).join(" "),path:c.filter(a=>a.length>1).map(a=>a.map((a,b)=>`${0===b?"M":"L"}${C(a.t).toFixed(2)},${D(a.avg).toFixed(2)}`).join(" ")).join(" ")}}),[t,a.maxDrawPoints,n,z,l,m,C,D]),F=(0,e.useMemo)(()=>(function(a,b,c,d,e,h){if(0===c.length)return`${a} chart: no series selected.`;let i=c.map(a=>{let c=(0,f.T6)(a.points);return`${a.label}: ${function(a,b){let c=[];if(null!==a.latest){let d=null!==a.latestT?(0,g.ei)(a.latestT):null;c.push(`latest ${(0,g.dd)(a.latest,b)}${d?` at ${d}`:""}`)}return c.push(`average ${(0,g.dd)(a.avg,b)}`),null!==a.min&&null!==a.max&&c.push(`recorded range ${(0,g.dd)(a.min,b)} to ${(0,g.dd)(a.max,b)}`),c.join(", ")}(c,b)}`}),j=h>0?`${h} shaded interval${1===h?"":"s"} without stored data.`:"";return`${a} time-series chart. ${i.join(". ")}. ${j} Time range ${(0,g.ei)(d)} to ${(0,g.ei)(e)}.`})(b,c,t,l,m,z.length),[b,c,t,l,m,z.length]),G=(0,e.useMemo)(()=>new Map(k.map(a=>[a.key,(0,f.T6)(a.points)])),[k]),H=null===u.timeMs?[]:t.map(a=>({...a,point:(0,i.bO)(a.points,u.timeMs,n,o)})),I=null===u.timeMs?null:C(u.timeMs),J=`${u.id}-tooltip`,K=`${u.id}-instructions`,L=(0,e.useMemo)(()=>(0,d.jsxs)(d.Fragment,{children:[A.ticks.map(a=>(0,d.jsx)("line",{x1:6,x2:794,y1:D(a),y2:D(a),stroke:"var(--border)",strokeWidth:"1",vectorEffect:"non-scaling-stroke"},`grid-${a}`)),z.map(a=>(0,d.jsx)("rect",{x:C(a.fromMs),y:6,width:Math.max(1,C(a.toMs)-C(a.fromMs)),height:148,fill:"var(--muted-foreground)",opacity:"0.09"},`gap-${a.fromMs}-${a.toMs}-${a.kind}`)),E.map(a=>{let b=a.envelope;return""===b?null:(0,d.jsx)("path",{d:b,fill:a.color,opacity:"0.14",stroke:"none"},`band-${a.key}`)}),E.map(a=>{let b=a.path;return""===b?null:(0,d.jsx)("path",{d:b,fill:"none",stroke:a.color,strokeWidth:"2",strokeDasharray:a.dash,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"},`line-${a.key}`)}),E.flatMap(a=>a.segments.filter(a=>1===a.length).map(b=>{let c=b[0],e=C(c.t),f=D(c.avg);return(0,d.jsx)("line",{x1:e-2.5,x2:e+2.5,y1:f,y2:f,stroke:a.color,strokeWidth:"2.5",strokeLinecap:"round",vectorEffect:"non-scaling-stroke"},`dot-${a.key}-${c.t}`)}))]}),[A,C,D,z,E]);return(0,d.jsxs)("figure",{className:`flex min-w-0 flex-col gap-2 ${a.className??""}`,children:[(0,d.jsxs)("div",{className:"flex min-h-8 flex-wrap items-center justify-between gap-2",children:[(0,d.jsx)("h3",{className:"text-xs font-medium tracking-tight text-foreground",children:b}),(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("span",{className:"tnum shrink-0 text-xs text-muted-foreground",children:s??(0,h.RL)(c)}),a.action]})]}),x?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex min-w-0 gap-2",children:[(0,d.jsx)("div",{"aria-hidden":!0,className:"flex h-40 w-14 shrink-0 flex-col justify-between py-0.5 text-right text-xs leading-none tnum text-muted-foreground",children:[...A.ticks].reverse().map(a=>(0,d.jsx)("span",{children:(0,g.Ah)(a,c)},a))}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"relative",onPointerLeave:u.clear,onPointerMove:a=>{let b=v.current?.getBoundingClientRect();b&&u.inspect((0,i.yk)(a.clientX,b.left,b.width,l,m,.0075))},children:[(0,d.jsx)("p",{id:K,className:"sr-only",children:"Use Left and Right arrows to inspect recorded readings, Home or End to jump, and Escape to dismiss."}),(0,d.jsxs)("svg",{ref:v,viewBox:"0 0 800 160",preserveAspectRatio:"none",role:"img","aria-label":F,tabIndex:0,"aria-describedby":`${K}${u.active?` ${J}`:""}`,onFocus:u.onFocus,onBlur:u.clear,onKeyDown:u.onKeyDown,className:"block h-40 w-full cursor-crosshair rounded-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent",children:[(0,d.jsx)("title",{children:b}),L,null!==I?(0,d.jsxs)("g",{"aria-hidden":!0,pointerEvents:"none",children:[(0,d.jsx)("line",{x1:I,x2:I,y1:6,y2:154,stroke:"var(--muted-foreground)",strokeWidth:"1",strokeDasharray:"3 3",vectorEffect:"non-scaling-stroke"}),H.map(({key:a,color:b,point:c})=>c?.avg==null?null:(0,d.jsx)("circle",{cx:C(c.t),cy:D(c.avg),r:"3.5",fill:b,stroke:"var(--card)",strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"},a))]}):null]}),u.active&&null!==u.timeMs&&null!==I?(0,d.jsx)(j.eg,{id:J,timeMs:u.timeMs,fraction:I/800,unit:c,readings:H}):null]}),(0,d.jsx)("div",{"aria-hidden":!0,className:"mt-1 flex justify-between gap-2 text-xs leading-tight tnum text-muted-foreground",children:(0,f.Cf)(l,m).map((a,b,c)=>(0,d.jsx)("span",{className:`${0===b?"text-left":b===c.length-1?"text-right":"hidden text-center sm:inline"}`,children:(0,g.O5)(a,y)},a))})]})]}),(0,d.jsx)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs",children:k.map(a=>{let b=!p.has(a.key),e=G.get(a.key);return(0,d.jsxs)("label",{className:"inline-flex min-h-7 cursor-pointer items-center gap-1.5",title:b?`Hide ${a.label}`:`Show ${a.label}`,children:[(0,d.jsx)("input",{type:"checkbox",checked:b,onChange:()=>q(a.key),className:"peer sr-only"}),(0,d.jsx)("span",{"aria-hidden":!0,className:"flex h-4 w-5 shrink-0 items-center justify-center rounded-sm peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:[outline-color:var(--focus)]",children:(0,d.jsx)("svg",{viewBox:"0 0 20 8",className:"h-2 w-5","aria-hidden":!0,children:(0,d.jsx)("line",{x1:"1",y1:"4",x2:"19",y2:"4",stroke:a.color,strokeWidth:"2.5",strokeDasharray:a.dash,strokeLinecap:"round"})})}),(0,d.jsx)("span",{className:b?"text-foreground":"text-muted-foreground line-through",children:a.label}),(0,d.jsx)("span",{className:"tnum text-muted-foreground",children:(0,g.dd)(e.latest,c)})]},`legend-${a.key}`)})})]}):(0,d.jsx)("div",{className:"flex min-h-32 items-center justify-center rounded-lg border border-dashed border-border px-4 py-6 text-center text-xs text-muted-foreground",children:0===k.length?r:0===t.length?"All series are hidden. Re-enable one in the legend below.":r}),!x&&k.length>0?(0,d.jsx)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs",children:k.map(a=>{let b=!p.has(a.key);return(0,d.jsxs)("label",{className:"inline-flex min-h-7 cursor-pointer items-center gap-1.5",children:[(0,d.jsx)("input",{type:"checkbox",checked:b,onChange:()=>q(a.key),className:"peer sr-only"}),(0,d.jsx)("span",{"aria-hidden":!0,className:"flex h-4 w-5 shrink-0 items-center justify-center peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:[outline-color:var(--focus)]",children:(0,d.jsx)("svg",{viewBox:"0 0 20 8",className:"h-2 w-5","aria-hidden":!0,children:(0,d.jsx)("line",{x1:"1",y1:"4",x2:"19",y2:"4",stroke:a.color,strokeWidth:"2.5",strokeDasharray:a.dash,strokeLinecap:"round"})})}),(0,d.jsx)("span",{className:b?"text-foreground":"text-muted-foreground line-through",children:a.label})]},`legend-empty-${a.key}`)})}):null]})}},43607:(a,b,c)=>{c.d(b,{n:()=>e});var d=c(67484);function e({machineId:a,metricsKey:b,coreIdsKey:c,range:f,enabled:g=!0,autoRefresh:h=!0,refreshNonce:i=0}){let[j,k]=(0,d.useState)({machineId:a,metricsKey:b,coreIdsKey:c,range:f}),l=j.machineId===a&&j.range===f?j:{machineId:a,metricsKey:b,coreIdsKey:c,range:f},m=l.metricsKey,n=l.coreIdsKey,o=`${a}|${m}|${f}|${n??"all"}`,[p,q]=(0,d.useState)(null),[r,s]=(0,d.useState)(null),[t,u]=(0,d.useState)(null);return(0,d.useRef)(i),{data:g&&p?.result.machineId===a&&p.range===f?p:null,error:g&&r?.key===o?r.error:null,loading:g&&t?.key===o,manualRefreshing:g&&t?.key===o&&t.manual}}c(66338)},47978:(a,b,c)=>{c.d(b,{Au:()=>j,_C:()=>i,eg:()=>k});var d=c(48249),e=c(67484),f=c(55280),g=c(66338);let h=(0,e.createContext)(null);function i({children:a}){let[b,c]=(0,e.useState)(null),f=(0,e.useCallback)(a=>c(b=>b?.timeMs===a?.timeMs&&b?.source===a?.source?b:a),[]),g=(0,e.useMemo)(()=>({cursor:b,setCursor:f}),[b,f]);return(0,d.jsx)(h.Provider,{value:g,children:a})}function j({series:a,fromMs:b,toMs:c,stepMs:d,gaps:g}){let i=(0,e.useId)(),[k,l]=(0,e.useState)(null),m=(0,e.useContext)(h),n=m?m.cursor:k,o=m?m.setCursor:l,p=(0,e.useRef)(null),q=(0,e.useRef)(null),r=(0,e.useCallback)(()=>{null!==p.current&&cancelAnimationFrame(p.current),p.current=null,q.current=null},[]),s=(0,e.useMemo)(()=>(0,f.X)(a).filter(a=>a.t<=c&&a.t+d/2>=b),[a,b,c,d]),t=n&&n.timeMs>=b-d/2&&n.timeMs<=c?n.timeMs:null,u=null!==t&&n?.source===i,v=()=>{r(),n?.source===i&&o(null)};return{id:i,timeMs:t,active:u,inspect:a=>{let e=Math.max(b,Math.min(c,a)),h=(0,f.bO)(s,e,d,g);q.current={timeMs:h?.t??e,source:i},null===p.current&&(p.current=requestAnimationFrame(()=>{p.current=null,o(q.current),q.current=null}))},clear:v,onKeyDown:a=>{if(r(),"Escape"===a.key)a.preventDefault(),v();else if(["ArrowLeft","ArrowRight","Home","End"].includes(a.key)){a.preventDefault();let b=(0,f.o7)(s,t,a.key);null!==b&&o({timeMs:b,source:i})}},onFocus:()=>{r(),o({timeMs:s.at(-1)?.t??c,source:i})}}}function k({id:a,timeMs:b,fraction:c,unit:f,readings:h}){let[i]=(0,e.useState)(()=>c>.5?"left":"right");return(0,d.jsxs)("div",{id:a,role:"tooltip",className:`absolute top-2 z-10 max-h-56 w-56 max-w-[calc(100%-1rem)] overflow-y-auto rounded-md border border-border bg-card p-3 text-xs text-foreground ${"left"===i?"left-2":"right-2"}`,children:[(0,d.jsx)("p",{className:"tnum font-medium",children:(0,g.r6)(b)}),(0,d.jsx)("p",{className:"mb-2 text-muted-foreground",children:"Recorded bucket average"}),(0,d.jsx)("dl",{className:"grid grid-cols-[minmax(0,1fr)_auto] items-baseline gap-x-4 gap-y-1.5",children:h.map(({key:a,label:c,color:e,point:h})=>(0,d.jsxs)("div",{className:"contents",children:[(0,d.jsxs)("dt",{className:"flex min-w-0 items-center gap-1.5",children:[(0,d.jsx)("span",{"aria-hidden":!0,className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:e}}),(0,d.jsx)("span",{className:"break-words",children:c})]}),(0,d.jsxs)("dd",{className:"tnum text-right",children:[h?.avg==null?"No reading":(0,g.dd)(h.avg,f),h&&h.t!==b?(0,d.jsx)("span",{className:"block text-muted-foreground",children:(0,g.ei)(h.t)}):null]})]},a))})]})}},55280:(a,b,c)=>{function d(a,b,c,d){if(d.some(a=>b>a.fromMs&&b<a.toMs))return null;let e=0,f=a.length;for(;e<f;){let c=e+f>>>1;a[c].t<b?e=c+1:f=c}let g=a[e-1],h=a[e],i=g&&(!h||b-g.t<=h.t-b)?g:h;return!i||Math.abs(i.t-b)>c/2||d.some(a=>a.toMs>Math.min(b,i.t)&&a.fromMs<Math.max(b,i.t))?null:i}function e(a){return[...new Set(a.flatMap(a=>a.points.map(a=>a.t)))].sort((a,b)=>a-b).map(a=>({t:a,min:null,max:null,avg:null}))}function f(a,b,c,d,e,g=0){return Math.round(d+Math.max(0,Math.min(1,((c>0?(a-b)/c:0)-g)/(1-2*g)))*(e-d))}function g(a,b,c){return 0===a.length?null:"Home"===c?a[0].t:"End"===c||null===b?a.at(-1).t:"ArrowLeft"===c?[...a].reverse().find(a=>a.t<b)?.t??a[0].t:"ArrowRight"===c?a.find(a=>a.t>b)?.t??a.at(-1).t:b}c.d(b,{X:()=>e,bO:()=>d,o7:()=>g,yk:()=>f})},66338:(a,b,c)=>{c.d(b,{Ah:()=>l,I_:()=>p,O5:()=>o,Vw:()=>v,bf:()=>u,dd:()=>k,ei:()=>m,fH:()=>q,ly:()=>e,pI:()=>d,r6:()=>n,zp:()=>f});let d=[{id:"10m",shortLabel:"10m",label:"Last 10 minutes",ms:6e5,refreshMs:1e3},{id:"1h",shortLabel:"1h",label:"Last hour",ms:36e5,refreshMs:1e3},{id:"6h",shortLabel:"6h",label:"Last 6 hours",ms:216e5,refreshMs:1e3},{id:"24h",shortLabel:"24h",label:"Last 24 hours",ms:864e5,refreshMs:1e3},{id:"7d",shortLabel:"7d",label:"Last 7 days",ms:6048e5,refreshMs:1e3}];function e(a){return d.find(b=>b.id===a)??d[0]}function f(a){return e(a).refreshMs}let g=["B","KiB","MiB","GiB","TiB","PiB"];function h(a){let b=Math.abs(a),c=0;for(;b>=1024&&c<g.length-1;)b/=1024,c+=1;return{value:a<0?-b:b,unit:g[c]}}function i(a,b){return String(Number(a.toFixed(b)))}function j(a,b=""){let{value:c,unit:d}=h(a),e=Math.abs(c)>=100?0:1;return`${i(c,e)} ${d}${b}`}function k(a,b){if(null==a||!Number.isFinite(a))return"—";switch(b){case"percent":return`${i(a,1)}%`;case"bytes":return j(a);case"bytes_per_second":return j(a,"/s");case"celsius":return`${i(a,1)}\xb0C`;case"watts":return`${i(a,1)} W`;case"milliseconds":return`${i(a,10>Math.abs(a)?2:1)} ms`;default:return i(a,2)}}function l(a,b){if(!Number.isFinite(a))return"—";switch(b){case"percent":return`${i(a,0)}%`;case"bytes":case"bytes_per_second":{let{value:c,unit:d}=h(a),e=Math.abs(c)>=10||0===c?0:1;return`${i(c,e)} ${d}${"bytes_per_second"===b?"/s":""}`}case"celsius":return`${i(a,0)}\xb0C`;case"watts":return`${i(a,0)} W`;case"milliseconds":return`${i(a,+(10>Math.abs(a)))} ms`;default:return i(a,1)}}function m(a){return new Date(a).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function n(a){return new Date(a).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"medium"})}function o(a,b){let c=new Date(a);return b>=1728e5?c.toLocaleDateString(void 0,{month:"short",day:"numeric"}):b>=864e5?c.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}):c.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1})}function p(a){let b=Math.max(0,a);return b>=36e5?`${i(b/36e5,1)} h`:b>=6e4?`${i(b/6e4,1)} min`:`${i(b/1e3,1)} s`}function q(a,b,c){let d=a.filter(a=>a.toMs>=b&&a.fromMs<=c);if(0===d.length)return"No recorded gaps in this range.";let e=d.filter(a=>"dropped"===a.kind).length,f=d.length-e,g=[];f>0&&g.push(`${f} missed interval${1===f?"":"s"}`),e>0&&g.push(`${e} dropped report${1===e?"":"s"}`);let h=[...new Set(d.map(a=>a.reason).filter(a=>"string"==typeof a&&a.length>0))],i=h.length>0?` (${h.slice(0,3).join("; ")})`:"";return`${g.join(" and ")}${i}.`}function r(a){return null!==a&&"object"==typeof a&&!Array.isArray(a)}function s(a){return"number"==typeof a&&Number.isFinite(a)}function t(a){return null===a||s(a)}function u(a){if(!r(a)||"string"!=typeof a.machineId||0===a.machineId.length||!s(a.fromMs)||!s(a.toMs)||a.toMs<=a.fromMs||!s(a.stepMs)||a.stepMs<=0||"raw"!==a.tier&&"1m"!==a.tier&&"1h"!==a.tier||"boolean"!=typeof a.truncated||!s(a.elapsedMs)||!Array.isArray(a.series)||!Array.isArray(a.gaps))return null;let b=[];for(let c of a.series){if(!r(c)||"string"!=typeof c.metric||"string"!=typeof c.resourceId||"string"!=typeof c.unit||!Array.isArray(c.points))return null;let a=[];for(let b of c.points){if(!r(b)||!s(b.t)||!t(b.min)||!t(b.max)||!t(b.avg))return null;a.push({t:b.t,min:b.min,max:b.max,avg:b.avg})}b.push({metric:c.metric,resourceId:c.resourceId,unit:c.unit,points:a})}let c=[];for(let b of a.gaps){if(!r(b)||!s(b.fromMs)||!s(b.toMs)||"missing"!==b.kind&&"dropped"!==b.kind)return null;let a={fromMs:b.fromMs,toMs:b.toMs,kind:b.kind};"string"==typeof b.reason&&(a.reason=b.reason),s(b.droppedRecords)&&(a.droppedRecords=b.droppedRecords),c.push(a)}return{machineId:a.machineId,fromMs:a.fromMs,toMs:a.toMs,stepMs:a.stepMs,tier:a.tier,series:b,gaps:c,truncated:a.truncated,elapsedMs:a.elapsedMs}}function v(a,b,c,d,f=600,g){let{fromMs:h,toMs:i}={fromMs:d-e(c).ms,toMs:d},j=new URLSearchParams({machineId:a,metrics:b.join(","),from:String(Math.floor(h)),to:String(Math.floor(i)),maxPoints:String(f)});return void 0!==g&&j.set("coreIds",g.join(",")),`/api/history?${j.toString()}`}},96480:(a,b,c)=>{function d(a){return null!==a.avg&&Number.isFinite(a.avg)}function e(a){return null!==a&&Number.isFinite(a)?a:null}function f(a){let b=[];for(let c of a){let a=b.at(-1);if(void 0!==a&&c.fromMs<=a.toMs){a.toMs=Math.max(a.toMs,c.toMs),"missing"===a.kind&&"dropped"===c.kind&&(a.kind="dropped"),void 0===a.reason&&void 0!==c.reason&&(a.reason=c.reason),void 0===a.droppedRecords&&void 0!==c.droppedRecords&&(a.droppedRecords=c.droppedRecords);continue}b.push({...c})}return b}function g(a,b,c,e){let g=f(a.map(a=>({...a,fromMs:Math.max(b,a.fromMs),toMs:Math.min(c,a.toMs)})).filter(a=>a.toMs>a.fromMs).sort((a,b)=>a.fromMs-b.fromMs||a.toMs-b.toMs));return void 0===e?g:function(a,b,c,e){if(0===a.length)return[];let g=[...new Set(b.filter(d).map(a=>a.t).filter(a=>Number.isFinite(a)))].sort((a,b)=>a-b),h=[];for(let b of a){let a=Math.max(c,Math.min(e,b.fromMs)),d=Math.max(c,Math.min(e,b.toMs));if(d<=a)continue;let f=Math.max(c,function(a,b){let c=0,d=a.length;for(;c<d;){let e=c+d>>>1;a[e]<=b?c=e+1:d=e}return c>0?a[c-1]:null}(g,a)??a),i=Math.min(e,function(a,b){let c=0,d=a.length;for(;c<d;){let e=c+d>>>1;a[e]<b?c=e+1:d=e}return c<a.length?a[c]:null}(g,d)??d);i<=f||h.push({...b,fromMs:f,toMs:i})}return h.sort((a,b)=>a.fromMs-b.fromMs||a.toMs-b.toMs),f(h)}(g,e,b,c)}function h(a,b,c){return Math.max(a,"1h"===b?36e5:"1m"===b?6e4:100,c??0)}function i(a,b){let c=[...a].sort((a,b)=>a.t-b.t),e=g(b.gaps,b.fromMs,b.toMs),f=Math.max(1,b.stepMs),h=[],i=[],j=()=>{i.length>0&&h.push(i),i=[]};for(let a of c){if(!d(a)){j();continue}let b=i.at(-1);if(void 0!==b){let c=!a.merged&&!b.merged&&(a.t<b.t||a.t-b.t>1.5*f),d=!0===a.gapBefore||function(a,b,c){return c.some(c=>c.toMs>a&&c.fromMs<b)}(b.t,a.t,e);(c||d)&&j()}i.push(a)}return j(),h}function j(a,b,c){if(b<=0)return[];let f=[...a].sort((a,b)=>a.t-b.t);if(f.length<=b)return f.map(a=>({...a}));let g=Math.max(2,Math.ceil(f.length/b)),h=Math.max(1,c),i=[],j=[],k=!1,l=null,m=()=>{if(0===j.length)return;let a=null,b=null,c=0,d=0;for(let f of j){let g=e(f.min),h=e(f.max);null!==g&&(null===a||g<a)&&(a=g),null!==h&&(null===b||h>b)&&(b=h);let i=e(f.avg);null!==i&&(c+=i,d+=1)}i.push({t:j[0].t,min:a,max:b,avg:d>0?c/d:null,...j.length>1?{merged:!0}:{},...k?{gapBefore:!0}:{}}),j=[],k=!1};for(let a of f){if(!d(a)){m(),i.push({...a}),l=null;continue}let b=null!==l&&a.t>=l.t&&a.t-l.t<=1.5*h;j.length>0&&(!b||j.length>=g)&&m(),0===j.length&&(k=null!==l&&!b),j.push(a),l=a}return m(),i}function k(a){let b=null,c=null,d=0,f=0,g=null,h=null,i=null,j=null;for(let k of a){if(null===k.avg)continue;(null===i||k.t<i)&&(i=k.t),(null===j||k.t>j)&&(j=k.t);let a=e(k.min),l=e(k.max);null!==a&&(null===b||a<b)&&(b=a),null!==l&&(null===c||l>c)&&(c=l),null!==k.avg&&Number.isFinite(k.avg)&&(d+=k.avg,f+=1,g=k.avg,h=k.t)}return{count:f,min:b,max:c,avg:f>0?d/f:null,latest:g,latestT:h,firstT:i,lastT:j}}function l(a){if(!Number.isFinite(a)||a<=0)return 1;let b=Math.pow(10,Math.floor(Math.log10(a))),c=a/b;return(c<=1?1:c<=2?2:c<=5?5:10)*b}function m(a,b){if("percent"===a)return{min:0,max:100,ticks:[0,25,50,75,100]};let c=b.filter(a=>null!==a&&Number.isFinite(a));if(0===c.length)return{min:0,max:1,ticks:[0,1]};let d=Math.min(...c),e=Math.max(...c);if("celsius"===a){let a=Math.max(1,(e-d)*.1);d=5*Math.floor((d-a)/5),e=5*Math.ceil((e+a)/5)}else d=0,e=e>0?e:1;e<=d&&(e=d+1);let f=l((e-d)/4),g=Math.floor(d/f)*f,h=Math.ceil(e/f)*f,i=function(a,b,c=4){if(!Number.isFinite(a)||!Number.isFinite(b))return[0,1];if(b<=a)return[a];let d=l((b-a)/Math.max(1,c)),e=Math.ceil(a/d)*d,f=[];for(let a=e;a<=b+.001*d&&f.length<20;a+=d)f.push(Number(a.toPrecision(12)));return f.length>0?f:[a,b]}(g,h,4);return{min:g,max:h,ticks:i}}function n(a,b,c=4){let d=Math.max(2,Math.floor(c)),e=Math.max(0,b-a);return Array.from({length:d},(b,c)=>a+e*c/(d-1))}c.d(b,{$z:()=>g,Cf:()=>n,SG:()=>j,T6:()=>k,jl:()=>h,kk:()=>m,o:()=>i})}};
1
+ "use strict";exports.id=168,exports.ids=[168],exports.modules={11449:(a,b,c)=>{c.d(b,{Cv:()=>e,H9:()=>d,Lf:()=>j,P$:()=>f,RL:()=>q,bP:()=>p,er:()=>m,oB:()=>i,ue:()=>o,yv:()=>l});let d=[{metric:"cpu.usage",label:"CPU usage",shortLabel:"CPU",unit:"percent",family:"cpu",colorSlot:0,description:"Total processor utilization"},{metric:"cpu.core",label:"Per-core CPU",shortLabel:"Per-core",unit:"percent",family:"cpu",colorSlot:0,description:"Logical-core utilization; heatmap for large selections"},{metric:"cpu.temperature",label:"CPU temperature",shortLabel:"Temperature",unit:"celsius",family:"cpu",colorSlot:3,description:"Identifiable CPU hwmon sensor temperature"},{metric:"cpu.power",label:"CPU package power",shortLabel:"Power",unit:"watts",family:"cpu",colorSlot:4,description:"Top-level RAPL package power draw"},{metric:"cpu.iowait",label:"CPU I/O wait",shortLabel:"I/O wait",unit:"percent",family:"cpu",colorSlot:2,description:"Processor time waiting on I/O"},{metric:"cpu.pressure",label:"CPU pressure",shortLabel:"Pressure",unit:"percent",family:"cpu",colorSlot:4,description:"Linux PSI CPU stall pressure (avg10)"},{metric:"memory.used",label:"Memory used",shortLabel:"Memory",unit:"bytes",family:"memory",colorSlot:1,description:"Physical memory in use"},{metric:"memory.usage",label:"Memory usage",shortLabel:"Memory %",unit:"percent",family:"memory",colorSlot:1,description:"Physical memory used as a share of total"},{metric:"memory.pressure.some",label:"Memory pressure (some)",shortLabel:"Pressure some",unit:"percent",family:"memory",colorSlot:2,description:"Linux PSI memory stall pressure, some tasks (avg10)"},{metric:"memory.pressure.full",label:"Memory pressure (full)",shortLabel:"Pressure full",unit:"percent",family:"memory",colorSlot:4,description:"Linux PSI memory stall pressure, all tasks (avg10)"},{metric:"swap.used",label:"Swap used",shortLabel:"Swap",unit:"bytes",family:"swap",colorSlot:2,description:"Swap space in use"},{metric:"gpu.utilization",label:"GPU utilization",shortLabel:"Utilization",unit:"percent",family:"gpus",colorSlot:0,description:"Per-card graphics processor utilization"},{metric:"gpu.memory.used",label:"GPU memory used",shortLabel:"VRAM",unit:"bytes",family:"gpus",colorSlot:1,description:"Per-card video memory in use"},{metric:"gpu.temperature",label:"GPU temperature",shortLabel:"Temperature",unit:"celsius",family:"gpus",colorSlot:3,description:"Per-card temperature"},{metric:"gpu.power",label:"GPU power",shortLabel:"Power",unit:"watts",family:"gpus",colorSlot:4,description:"Per-card power draw"},{metric:"fs.used",label:"Filesystem used",shortLabel:"Filesystem",unit:"bytes",family:"disks",colorSlot:1,description:"Used space per mounted filesystem"},{metric:"fs.usage",label:"Filesystem usage",shortLabel:"Filesystem %",unit:"percent",family:"disks",colorSlot:1,description:"Used capacity per mounted filesystem, derived from a positive total"},{metric:"fs.inodes.usage",label:"Inode usage",shortLabel:"Inodes %",unit:"percent",family:"disks",colorSlot:2,description:"Used inodes per filesystem where the collector can read them"},{metric:"disk.read",label:"Disk read",shortLabel:"Read",unit:"bytes_per_second",family:"disks",colorSlot:0,description:"Device read throughput"},{metric:"disk.write",label:"Disk write",shortLabel:"Write",unit:"bytes_per_second",family:"disks",colorSlot:2,description:"Device write throughput"},{metric:"disk.read.latency",label:"Disk read latency",shortLabel:"Read latency",unit:"milliseconds",family:"disks",colorSlot:0,description:"Average device read latency"},{metric:"disk.write.latency",label:"Disk write latency",shortLabel:"Write latency",unit:"milliseconds",family:"disks",colorSlot:2,description:"Average device write latency"},{metric:"disk.utilization",label:"Disk utilization",shortLabel:"Utilization",unit:"percent",family:"disks",colorSlot:3,description:"Share of time the device had I/O in flight"},{metric:"io.pressure.some",label:"I/O pressure (some)",shortLabel:"I/O some",unit:"percent",family:"disks",colorSlot:3,description:"Linux PSI I/O stall pressure, some tasks (avg10)"},{metric:"io.pressure.full",label:"I/O pressure (full)",shortLabel:"I/O full",unit:"percent",family:"disks",colorSlot:4,description:"Linux PSI I/O stall pressure, all tasks (avg10)"},{metric:"net.rx",label:"Network received",shortLabel:"Received",unit:"bytes_per_second",family:"network",colorSlot:0,description:"Interface receive rate"},{metric:"net.tx",label:"Network sent",shortLabel:"Sent",unit:"bytes_per_second",family:"network",colorSlot:2,description:"Interface transmit rate"}];function e(a,b){return a.filter(c=>{for(let[d,e,f]of[["memory","memory.used","memory.usage"],["filesystem","fs.used","fs.usage"]])if(a.includes(e)&&a.includes(f)&&(c===e||c===f))return c===("percent"===b[d]?f:e);return!0})}let f=[{id:"cpu",label:"CPU",metrics:["cpu.usage","cpu.core","cpu.iowait","cpu.pressure","cpu.temperature","cpu.power"]},{id:"memory",label:"Memory",metrics:["memory.used","memory.usage","swap.used","memory.pressure.some","memory.pressure.full"]},{id:"gpu",label:"GPU",metrics:["gpu.utilization","gpu.memory.used","gpu.temperature","gpu.power"]},{id:"disk",label:"Storage",metrics:["fs.used","fs.usage","fs.inodes.usage","disk.read","disk.write","disk.read.latency","disk.write.latency","disk.utilization","io.pressure.some","io.pressure.full"]},{id:"network",label:"Network",metrics:["net.rx","net.tx"]}],g=["var(--cpu)","var(--mem)","color-mix(in oklab, var(--swap) 75%, var(--foreground))","var(--warn)","var(--crit)","var(--accent)"],h=[void 0,"7 4","2 3","10 3 2 3","4 4","1 3"];function i(a){return d.find(b=>b.metric===a)??null}function j(a,b){let c=Math.max(0,b),d=a.colorSlot+c,e=(c+Math.floor(d/g.length))%h.length;return{color:g[d%g.length],dash:h[e]}}let k={cpu:"CPU",memory:"Memory",swap:"Swap",gpus:"GPU metrics",disks:"Disk metrics",network:"Network metrics"};function l(a,b){let c=i(b);if(null===c||void 0===a)return{available:!0,reason:null};let d=a.inventory?.capabilities?.[c.family];if(!d||"supported"===d.status)return{available:!0,reason:null};let e=d.reason?.trim();return{available:!1,reason:e?`${k[c.family]}: ${d.status} — ${e}`:`${k[c.family]} are ${d.status} on this machine.`}}function m(a){if(void 0===a)return[];let b=[],c=c=>{!(b.length>=16)&&l(a,c).available&&b.push(c)};c("cpu.usage"),c("memory.used");let d=function(a){let b=a.inventory?.memory.swapTotalBytes;if("number"==typeof b)return b;let c=a.metrics?.payload.swap;return c?.status==="ok"?c.totalBytes:null}(a);return null!==d&&d>0&&c("swap.used"),o(a,[]).length>0&&(c("gpu.utilization"),c("gpu.memory.used")),b}function n(a){let b=a.includes(":")?a.slice(a.indexOf(":")+1):a;return b.length<=18?b:`${b.slice(0,10)}…${b.slice(-4)}`}function o(a,b){let c=new Set(b.filter(a=>a.metric.startsWith("gpu.")&&""!==a.resourceId&&a.points.some(a=>null!==a.avg||null!==a.min||null!==a.max)).map(a=>a.resourceId)),d=[],e=new Set;(a?.inventory?.gpus??[]).forEach(a=>{let b="supported"===a.telemetry;(b||c.has(a.id))&&(e.add(a.id),d.push({id:a.id,label:a.name.trim()||n(a.id),index:d.length,totalBytes:a.memoryTotalBytes,supported:b,hasHistory:c.has(a.id)}))});let f=a?.metrics?.payload.gpus;if(f?.status==="ok")for(let a of f.devices)e.has(a.id)||"ok"!==a.status||(e.add(a.id),d.push({id:a.id,label:n(a.id),index:d.length,totalBytes:a.memoryTotalBytes,supported:!0,hasHistory:c.has(a.id)}));for(let a of[...c].sort())e.has(a)||d.push({id:a,label:a.startsWith("pci:")?`Previously detected GPU (${n(a)})`:n(a),index:d.length,totalBytes:null,supported:!0,hasHistory:!0});return d}function p(a,b,c){if(""===c)return i(b)?.shortLabel??"Total";let d=i(b);if(null===d)return n(c);switch(d.family){case"gpus":{let b=a?.inventory?.gpus.find(a=>a.id===c);return b?.name.trim()||n(c)}case"disks":{if(b.startsWith("fs.")){let b=a?.inventory?.filesystems.find(a=>a.id===c);return b?.mountPoint||n(c)}let d=a?.inventory?.disks.find(a=>a.id===c);return d?.name||n(c)}case"network":{let b=a?.inventory?.network.find(a=>a.id===c);return b?.name||n(c)}case"cpu":{let a=/^core:(\d+)$/.exec(c);return a?`Core ${a[1]}`:n(c)}default:return n(c)}}function q(a){switch(a){case"percent":return"%";case"bytes":return"bytes";case"bytes_per_second":return"bytes/s";case"celsius":return"\xb0C";case"watts":return"W";case"milliseconds":return"ms";default:return a}}},15670:(a,b,c)=>{c.d(b,{t:()=>k});var d=c(48249),e=c(67484),f=c(96480),g=c(66338),h=c(11449),i=c(55280),j=c(47978);function k(a){let{title:b,unit:c,series:k,fromMs:l,toMs:m,stepMs:n,gaps:o,hiddenKeys:p,onToggleSeries:q,emptyMessage:r,note:s}=a,t=(0,e.useMemo)(()=>k.filter(a=>!p.has(a.key)),[k,p]),u=(0,j.Au)({series:t,fromMs:l,toMs:m,stepMs:n,gaps:o}),v=(0,e.useRef)(null),w=(0,e.useMemo)(()=>t.flatMap(a=>a.points),[t]),x=w.some(a=>null!==a.avg||null!==a.min||null!==a.max),y=Math.max(1,m-l),z=(0,e.useMemo)(()=>(0,f.$z)(o,l,m,w),[o,l,m,w]),A=(0,e.useMemo)(()=>(0,f.kk)(c,w.flatMap(a=>[a.min,a.max,a.avg]).filter(a=>null!==a)),[c,w]),B=Math.max(1e-9,A.max-A.min),C=(0,e.useCallback)(a=>6+(Math.min(m,Math.max(l,a))-l)/y*788,[l,m,y]),D=(0,e.useCallback)(a=>6+(1-(a-A.min)/B)*148,[A.min,B]),E=(0,e.useMemo)(()=>t.map(b=>{let c=(0,f.o)(b.points,{stepMs:n,gaps:z,fromMs:l,toMs:m}).map(b=>(0,f.SG)(b,a.maxDrawPoints??601,n));return{...b,segments:c,envelope:c.filter(a=>a.length>1).map(a=>{let b=a.map(a=>`${C(a.t).toFixed(2)},${D(a.max??a.avg).toFixed(2)}`),c=[...a].reverse().map(a=>`${C(a.t).toFixed(2)},${D(a.min??a.avg).toFixed(2)}`);return`M${b.join("L")}L${c.join("L")}Z`}).join(" "),path:c.filter(a=>a.length>1).map(a=>a.map((a,b)=>`${0===b?"M":"L"}${C(a.t).toFixed(2)},${D(a.avg).toFixed(2)}`).join(" ")).join(" ")}}),[t,a.maxDrawPoints,n,z,l,m,C,D]),F=(0,e.useMemo)(()=>(function(a,b,c,d,e,h){if(0===c.length)return`${a} chart: no series selected.`;let i=c.map(a=>{let c=(0,f.T6)(a.points);return`${a.label}: ${function(a,b){let c=[];if(null!==a.latest){let d=null!==a.latestT?(0,g.ei)(a.latestT):null;c.push(`latest ${(0,g.dd)(a.latest,b)}${d?` at ${d}`:""}`)}return c.push(`average ${(0,g.dd)(a.avg,b)}`),null!==a.min&&null!==a.max&&c.push(`recorded range ${(0,g.dd)(a.min,b)} to ${(0,g.dd)(a.max,b)}`),c.join(", ")}(c,b)}`}),j=h>0?`${h} shaded interval${1===h?"":"s"} without stored data.`:"";return`${a} time-series chart. ${i.join(". ")}. ${j} Time range ${(0,g.ei)(d)} to ${(0,g.ei)(e)}.`})(b,c,t,l,m,z.length),[b,c,t,l,m,z.length]),G=(0,e.useMemo)(()=>new Map(k.map(a=>[a.key,(0,f.T6)(a.points)])),[k]),H=null===u.timeMs?[]:t.map(a=>({...a,point:(0,i.bO)(a.points,u.timeMs,n,o)})),I=null===u.timeMs?null:C(u.timeMs),J=`${u.id}-tooltip`,K=`${u.id}-instructions`,L=(0,e.useMemo)(()=>(0,d.jsxs)(d.Fragment,{children:[A.ticks.map(a=>(0,d.jsx)("line",{x1:6,x2:794,y1:D(a),y2:D(a),stroke:"var(--border)",strokeWidth:"1",vectorEffect:"non-scaling-stroke"},`grid-${a}`)),z.map(a=>(0,d.jsx)("rect",{x:C(a.fromMs),y:6,width:Math.max(1,C(a.toMs)-C(a.fromMs)),height:148,fill:"var(--muted-foreground)",opacity:"0.09"},`gap-${a.fromMs}-${a.toMs}-${a.kind}`)),E.map(a=>{let b=a.envelope;return""===b?null:(0,d.jsx)("path",{d:b,fill:a.color,opacity:"0.14",stroke:"none"},`band-${a.key}`)}),E.map(a=>{let b=a.path;return""===b?null:(0,d.jsx)("path",{d:b,fill:"none",stroke:a.color,strokeWidth:"2",strokeDasharray:a.dash,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"},`line-${a.key}`)}),E.flatMap(a=>a.segments.filter(a=>1===a.length).map(b=>{let c=b[0],e=C(c.t),f=D(c.avg);return(0,d.jsx)("line",{x1:e-2.5,x2:e+2.5,y1:f,y2:f,stroke:a.color,strokeWidth:"2.5",strokeLinecap:"round",vectorEffect:"non-scaling-stroke"},`dot-${a.key}-${c.t}`)}))]}),[A,C,D,z,E]);return(0,d.jsxs)("figure",{className:`flex min-w-0 flex-col gap-2 ${a.className??""}`,children:[(0,d.jsxs)("div",{className:"flex min-h-8 flex-wrap items-center justify-between gap-2",children:[(0,d.jsx)("h3",{className:"text-xs font-medium tracking-tight text-foreground",children:b}),(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("span",{className:"tnum shrink-0 text-xs text-muted-foreground",children:s??(0,h.RL)(c)}),a.action]})]}),x?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex min-w-0 gap-2",children:[(0,d.jsx)("div",{"aria-hidden":!0,className:"flex h-40 w-14 shrink-0 flex-col justify-between py-0.5 text-right text-xs leading-none tnum text-muted-foreground",children:[...A.ticks].reverse().map(a=>(0,d.jsx)("span",{children:(0,g.Ah)(a,c)},a))}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"relative",onPointerLeave:u.clear,onPointerMove:a=>{let b=v.current?.getBoundingClientRect();b&&u.inspect((0,i.yk)(a.clientX,b.left,b.width,l,m,.0075))},children:[(0,d.jsx)("p",{id:K,className:"sr-only",children:"Use Left and Right arrows to inspect recorded readings, Home or End to jump, and Escape to dismiss."}),(0,d.jsxs)("svg",{ref:v,viewBox:"0 0 800 160",preserveAspectRatio:"none",role:"img","aria-label":F,tabIndex:0,"aria-describedby":`${K}${u.active?` ${J}`:""}`,onFocus:u.onFocus,onBlur:u.clear,onKeyDown:u.onKeyDown,className:"block h-40 w-full cursor-crosshair rounded-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent",children:[(0,d.jsx)("title",{children:b}),L,null!==I?(0,d.jsxs)("g",{"aria-hidden":!0,pointerEvents:"none",children:[(0,d.jsx)("line",{x1:I,x2:I,y1:6,y2:154,stroke:"var(--muted-foreground)",strokeWidth:"1",strokeDasharray:"3 3",vectorEffect:"non-scaling-stroke"}),H.map(({key:a,color:b,point:c})=>c?.avg==null?null:(0,d.jsx)("circle",{cx:C(c.t),cy:D(c.avg),r:"3.5",fill:b,stroke:"var(--card)",strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"},a))]}):null]}),u.active&&null!==u.timeMs&&null!==I?(0,d.jsx)(j.eg,{id:J,timeMs:u.timeMs,fraction:I/800,unit:c,readings:H}):null]}),(0,d.jsx)("div",{"aria-hidden":!0,className:"mt-1 flex justify-between gap-2 text-xs leading-tight tnum text-muted-foreground",children:(0,f.Cf)(l,m).map((a,b,c)=>(0,d.jsx)("span",{className:`${0===b?"text-left":b===c.length-1?"text-right":"hidden text-center sm:inline"}`,children:(0,g.O5)(a,y)},a))})]})]}),(0,d.jsx)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs",children:k.map(a=>{let b=!p.has(a.key),e=G.get(a.key);return(0,d.jsxs)("label",{className:"inline-flex min-h-7 cursor-pointer items-center gap-1.5",title:b?`Hide ${a.label}`:`Show ${a.label}`,children:[(0,d.jsx)("input",{type:"checkbox",checked:b,onChange:()=>q(a.key),className:"peer sr-only"}),(0,d.jsx)("span",{"aria-hidden":!0,className:"flex h-4 w-5 shrink-0 items-center justify-center rounded-sm peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:[outline-color:var(--focus)]",children:(0,d.jsx)("svg",{viewBox:"0 0 20 8",className:"h-2 w-5","aria-hidden":!0,children:(0,d.jsx)("line",{x1:"1",y1:"4",x2:"19",y2:"4",stroke:a.color,strokeWidth:"2.5",strokeDasharray:a.dash,strokeLinecap:"round"})})}),(0,d.jsx)("span",{className:b?"text-foreground":"text-muted-foreground line-through",children:a.label}),(0,d.jsx)("span",{className:"tnum text-muted-foreground",children:(0,g.dd)(e.latest,c)})]},`legend-${a.key}`)})})]}):(0,d.jsx)("div",{className:"flex min-h-32 items-center justify-center rounded-lg border border-dashed border-border px-4 py-6 text-center text-xs text-muted-foreground",children:0===k.length?r:0===t.length?"All series are hidden. Re-enable one in the legend below.":r}),!x&&k.length>0?(0,d.jsx)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs",children:k.map(a=>{let b=!p.has(a.key);return(0,d.jsxs)("label",{className:"inline-flex min-h-7 cursor-pointer items-center gap-1.5",children:[(0,d.jsx)("input",{type:"checkbox",checked:b,onChange:()=>q(a.key),className:"peer sr-only"}),(0,d.jsx)("span",{"aria-hidden":!0,className:"flex h-4 w-5 shrink-0 items-center justify-center peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:[outline-color:var(--focus)]",children:(0,d.jsx)("svg",{viewBox:"0 0 20 8",className:"h-2 w-5","aria-hidden":!0,children:(0,d.jsx)("line",{x1:"1",y1:"4",x2:"19",y2:"4",stroke:a.color,strokeWidth:"2.5",strokeDasharray:a.dash,strokeLinecap:"round"})})}),(0,d.jsx)("span",{className:b?"text-foreground":"text-muted-foreground line-through",children:a.label})]},`legend-empty-${a.key}`)})}):null]})}},43607:(a,b,c)=>{c.d(b,{n:()=>e});var d=c(67484);function e({machineId:a,metricsKey:b,coreIdsKey:c,range:f,enabled:g=!0,autoRefresh:h=!0,refreshNonce:i=0}){let[j,k]=(0,d.useState)({machineId:a,metricsKey:b,coreIdsKey:c,range:f}),l=j.machineId===a&&j.range===f?j:{machineId:a,metricsKey:b,coreIdsKey:c,range:f},m=l.metricsKey,n=l.coreIdsKey,o=`${a}|${m}|${f}|${n??"all"}`,[p,q]=(0,d.useState)(null),[r,s]=(0,d.useState)(null),[t,u]=(0,d.useState)(null);return(0,d.useRef)(i),{data:g&&p?.result.machineId===a&&p.range===f?p:null,error:g&&r?.key===o?r.error:null,loading:g&&t?.key===o,manualRefreshing:g&&t?.key===o&&t.manual}}c(66338)},47978:(a,b,c)=>{c.d(b,{Au:()=>j,_C:()=>i,eg:()=>k});var d=c(48249),e=c(67484),f=c(55280),g=c(66338);let h=(0,e.createContext)(null);function i({children:a}){let[b,c]=(0,e.useState)(null),f=(0,e.useCallback)(a=>c(b=>b?.timeMs===a?.timeMs&&b?.source===a?.source?b:a),[]),g=(0,e.useMemo)(()=>({cursor:b,setCursor:f}),[b,f]);return(0,d.jsx)(h.Provider,{value:g,children:a})}function j({series:a,fromMs:b,toMs:c,stepMs:d,gaps:g}){let i=(0,e.useId)(),[k,l]=(0,e.useState)(null),m=(0,e.useContext)(h),n=m?m.cursor:k,o=m?m.setCursor:l,p=(0,e.useRef)(null),q=(0,e.useRef)(null),r=(0,e.useCallback)(()=>{null!==p.current&&cancelAnimationFrame(p.current),p.current=null,q.current=null},[]),s=(0,e.useMemo)(()=>(0,f.X)(a).filter(a=>a.t<=c&&a.t+d/2>=b),[a,b,c,d]),t=n&&n.timeMs>=b-d/2&&n.timeMs<=c?n.timeMs:null,u=null!==t&&n?.source===i,v=()=>{r(),n?.source===i&&o(null)};return{id:i,timeMs:t,active:u,inspect:a=>{let e=Math.max(b,Math.min(c,a)),h=(0,f.bO)(s,e,d,g);q.current={timeMs:h?.t??e,source:i},null===p.current&&(p.current=requestAnimationFrame(()=>{p.current=null,o(q.current),q.current=null}))},clear:v,onKeyDown:a=>{if(r(),"Escape"===a.key)a.preventDefault(),v();else if(["ArrowLeft","ArrowRight","Home","End"].includes(a.key)){a.preventDefault();let b=(0,f.o7)(s,t,a.key);null!==b&&o({timeMs:b,source:i})}},onFocus:()=>{r(),o({timeMs:s.at(-1)?.t??c,source:i})}}}function k({id:a,timeMs:b,fraction:c,unit:f,readings:h}){let[i]=(0,e.useState)(()=>c>.5?"left":"right");return(0,d.jsxs)("div",{id:a,role:"tooltip",className:`absolute top-2 z-10 max-h-56 w-56 max-w-[calc(100%-1rem)] overflow-y-auto rounded-md border border-border bg-card p-3 text-xs text-foreground ${"left"===i?"left-2":"right-2"}`,children:[(0,d.jsx)("p",{className:"tnum font-medium",children:(0,g.r6)(b)}),(0,d.jsx)("p",{className:"mb-2 text-muted-foreground",children:"Recorded bucket average"}),(0,d.jsx)("dl",{className:"grid grid-cols-[minmax(0,1fr)_auto] items-baseline gap-x-4 gap-y-1.5",children:h.map(({key:a,label:c,color:e,point:h})=>(0,d.jsxs)("div",{className:"contents",children:[(0,d.jsxs)("dt",{className:"flex min-w-0 items-center gap-1.5",children:[(0,d.jsx)("span",{"aria-hidden":!0,className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:e}}),(0,d.jsx)("span",{className:"break-words",children:c})]}),(0,d.jsxs)("dd",{className:"tnum text-right",children:[h?.avg==null?"No reading":(0,g.dd)(h.avg,f),h&&h.t!==b?(0,d.jsx)("span",{className:"block text-muted-foreground",children:(0,g.ei)(h.t)}):null]})]},a))})]})}},55280:(a,b,c)=>{function d(a,b,c,d){if(d.some(a=>b>a.fromMs&&b<a.toMs))return null;let e=0,f=a.length;for(;e<f;){let c=e+f>>>1;a[c].t<b?e=c+1:f=c}let g=a[e-1],h=a[e],i=g&&(!h||b-g.t<=h.t-b)?g:h;return!i||Math.abs(i.t-b)>c/2||d.some(a=>a.toMs>Math.min(b,i.t)&&a.fromMs<Math.max(b,i.t))?null:i}function e(a){return[...new Set(a.flatMap(a=>a.points.map(a=>a.t)))].sort((a,b)=>a-b).map(a=>({t:a,min:null,max:null,avg:null}))}function f(a,b,c,d,e,g=0){return Math.round(d+Math.max(0,Math.min(1,((c>0?(a-b)/c:0)-g)/(1-2*g)))*(e-d))}function g(a,b,c){return 0===a.length?null:"Home"===c?a[0].t:"End"===c||null===b?a.at(-1).t:"ArrowLeft"===c?[...a].reverse().find(a=>a.t<b)?.t??a[0].t:"ArrowRight"===c?a.find(a=>a.t>b)?.t??a.at(-1).t:b}c.d(b,{X:()=>e,bO:()=>d,o7:()=>g,yk:()=>f})},66338:(a,b,c)=>{c.d(b,{Ah:()=>l,I_:()=>p,O5:()=>o,Vw:()=>v,bf:()=>u,dd:()=>k,ei:()=>m,fH:()=>q,ly:()=>e,pI:()=>d,r6:()=>n,zp:()=>f});let d=[{id:"10m",shortLabel:"10m",label:"Last 10 minutes",ms:6e5,refreshMs:1e3},{id:"1h",shortLabel:"1h",label:"Last hour",ms:36e5,refreshMs:1e3},{id:"6h",shortLabel:"6h",label:"Last 6 hours",ms:216e5,refreshMs:1e3},{id:"24h",shortLabel:"24h",label:"Last 24 hours",ms:864e5,refreshMs:1e3},{id:"7d",shortLabel:"7d",label:"Last 7 days",ms:6048e5,refreshMs:1e3}];function e(a){return d.find(b=>b.id===a)??d[0]}function f(a){return e(a).refreshMs}let g=["B","KiB","MiB","GiB","TiB","PiB"];function h(a){let b=Math.abs(a),c=0;for(;b>=1024&&c<g.length-1;)b/=1024,c+=1;return{value:a<0?-b:b,unit:g[c]}}function i(a,b){return String(Number(a.toFixed(b)))}function j(a,b=""){let{value:c,unit:d}=h(a),e=Math.abs(c)>=100?0:1;return`${i(c,e)} ${d}${b}`}function k(a,b){if(null==a||!Number.isFinite(a))return"—";switch(b){case"percent":return`${i(a,1)}%`;case"bytes":return j(a);case"bytes_per_second":return j(a,"/s");case"celsius":return`${i(a,1)}\xb0C`;case"watts":return`${i(a,1)} W`;case"milliseconds":return`${i(a,10>Math.abs(a)?2:1)} ms`;default:return i(a,2)}}function l(a,b){if(!Number.isFinite(a))return"—";switch(b){case"percent":return`${i(a,0)}%`;case"bytes":case"bytes_per_second":{let{value:c,unit:d}=h(a),e=Math.abs(c)>=10||0===c?0:1;return`${i(c,e)} ${d}${"bytes_per_second"===b?"/s":""}`}case"celsius":return`${i(a,0)}\xb0C`;case"watts":return`${i(a,0)} W`;case"milliseconds":return`${i(a,+(10>Math.abs(a)))} ms`;default:return i(a,1)}}function m(a){return new Date(a).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function n(a){return new Date(a).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"medium"})}function o(a,b){let c=new Date(a);return b>=1728e5?c.toLocaleDateString(void 0,{month:"short",day:"numeric"}):b>=864e5?c.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}):c.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1})}function p(a){let b=Math.max(0,a);return b>=36e5?`${i(b/36e5,1)} h`:b>=6e4?`${i(b/6e4,1)} min`:`${i(b/1e3,1)} s`}function q(a,b,c){let d=a.filter(a=>a.toMs>=b&&a.fromMs<=c);if(0===d.length)return"No recorded gaps in this range.";let e=d.filter(a=>"dropped"===a.kind).length,f=d.length-e,g=[];f>0&&g.push(`${f} missed interval${1===f?"":"s"}`),e>0&&g.push(`${e} dropped report${1===e?"":"s"}`);let h=[...new Set(d.map(a=>a.reason).filter(a=>"string"==typeof a&&a.length>0))],i=h.length>0?` (${h.slice(0,3).join("; ")})`:"";return`${g.join(" and ")}${i}.`}function r(a){return null!==a&&"object"==typeof a&&!Array.isArray(a)}function s(a){return"number"==typeof a&&Number.isFinite(a)}function t(a){return null===a||s(a)}function u(a){if(!r(a)||"string"!=typeof a.machineId||0===a.machineId.length||!s(a.fromMs)||!s(a.toMs)||a.toMs<=a.fromMs||!s(a.stepMs)||a.stepMs<=0||"raw"!==a.tier&&"1m"!==a.tier&&"1h"!==a.tier||"boolean"!=typeof a.truncated||!s(a.elapsedMs)||!Array.isArray(a.series)||!Array.isArray(a.gaps))return null;let b=[];for(let c of a.series){if(!r(c)||"string"!=typeof c.metric||"string"!=typeof c.resourceId||"string"!=typeof c.unit||!Array.isArray(c.points))return null;let a=[];for(let b of c.points){if(!r(b)||!s(b.t)||!t(b.min)||!t(b.max)||!t(b.avg))return null;a.push({t:b.t,min:b.min,max:b.max,avg:b.avg})}b.push({metric:c.metric,resourceId:c.resourceId,unit:c.unit,points:a})}let c=[];for(let b of a.gaps){if(!r(b)||!s(b.fromMs)||!s(b.toMs)||"missing"!==b.kind&&"dropped"!==b.kind)return null;let a={fromMs:b.fromMs,toMs:b.toMs,kind:b.kind};"string"==typeof b.reason&&(a.reason=b.reason),s(b.droppedRecords)&&(a.droppedRecords=b.droppedRecords),c.push(a)}return{machineId:a.machineId,fromMs:a.fromMs,toMs:a.toMs,stepMs:a.stepMs,tier:a.tier,series:b,gaps:c,truncated:a.truncated,elapsedMs:a.elapsedMs}}function v(a,b,c,d,f=600,g){let{fromMs:h,toMs:i}={fromMs:d-e(c).ms,toMs:d},j=new URLSearchParams({machineId:a,metrics:b.join(","),from:String(Math.floor(h)),to:String(Math.floor(i)),maxPoints:String(f)});return void 0!==g&&j.set("coreIds",g.join(",")),`/api/history?${j.toString()}`}},96480:(a,b,c)=>{function d(a){return null!==a.avg&&Number.isFinite(a.avg)}function e(a){return null!==a&&Number.isFinite(a)?a:null}function f(a){let b=[];for(let c of a){let a=b.at(-1);if(void 0!==a&&c.fromMs<=a.toMs){a.toMs=Math.max(a.toMs,c.toMs),"missing"===a.kind&&"dropped"===c.kind&&(a.kind="dropped"),void 0===a.reason&&void 0!==c.reason&&(a.reason=c.reason),void 0===a.droppedRecords&&void 0!==c.droppedRecords&&(a.droppedRecords=c.droppedRecords);continue}b.push({...c})}return b}function g(a,b,c,e){let g=f(a.map(a=>({...a,fromMs:Math.max(b,a.fromMs),toMs:Math.min(c,a.toMs)})).filter(a=>a.toMs>a.fromMs).sort((a,b)=>a.fromMs-b.fromMs||a.toMs-b.toMs));return void 0===e?g:function(a,b,c,e){if(0===a.length)return[];let g=[...new Set(b.filter(d).map(a=>a.t).filter(a=>Number.isFinite(a)))].sort((a,b)=>a-b),h=[];for(let b of a){let a=Math.max(c,Math.min(e,b.fromMs)),d=Math.max(c,Math.min(e,b.toMs));if(d<=a)continue;let f=Math.max(c,function(a,b){let c=0,d=a.length;for(;c<d;){let e=c+d>>>1;a[e]<=b?c=e+1:d=e}return c>0?a[c-1]:null}(g,a)??a),i=Math.min(e,function(a,b){let c=0,d=a.length;for(;c<d;){let e=c+d>>>1;a[e]<b?c=e+1:d=e}return c<a.length?a[c]:null}(g,d)??d);i<=f||h.push({...b,fromMs:f,toMs:i})}return h.sort((a,b)=>a.fromMs-b.fromMs||a.toMs-b.toMs),f(h)}(g,e,b,c)}function h(a,b,c){return Math.max(a,"1h"===b?36e5:"1m"===b?6e4:100,c??0)}function i(a,b){let c=[...a].sort((a,b)=>a.t-b.t),e=g(b.gaps,b.fromMs,b.toMs),f=Math.max(1,b.stepMs),h=[],i=[],j=()=>{i.length>0&&h.push(i),i=[]};for(let a of c){if(!d(a)){j();continue}let b=i.at(-1);if(void 0!==b){let c=!a.merged&&!b.merged&&(a.t<b.t||a.t-b.t>1.5*f),d=!0===a.gapBefore||function(a,b,c){return c.some(c=>c.toMs>a&&c.fromMs<b)}(b.t,a.t,e);(c||d)&&j()}i.push(a)}return j(),h}function j(a,b,c){if(b<=0)return[];let f=[...a].sort((a,b)=>a.t-b.t);if(f.length<=b)return f.map(a=>({...a}));let g=Math.max(2,Math.ceil(f.length/b)),h=Math.max(1,c),i=[],j=[],k=!1,l=null,m=()=>{if(0===j.length)return;let a=null,b=null,c=0,d=0;for(let f of j){let g=e(f.min),h=e(f.max);null!==g&&(null===a||g<a)&&(a=g),null!==h&&(null===b||h>b)&&(b=h);let i=e(f.avg);null!==i&&(c+=i,d+=1)}i.push({t:j[0].t,min:a,max:b,avg:d>0?c/d:null,...j.length>1?{merged:!0}:{},...k?{gapBefore:!0}:{}}),j=[],k=!1};for(let a of f){if(!d(a)){m(),i.push({...a}),l=null;continue}let b=null!==l&&a.t>=l.t&&a.t-l.t<=1.5*h;j.length>0&&(!b||j.length>=g)&&m(),0===j.length&&(k=null!==l&&!b),j.push(a),l=a}return m(),i}function k(a){let b=null,c=null,d=0,f=0,g=null,h=null,i=null,j=null;for(let k of a){if(null===k.avg)continue;(null===i||k.t<i)&&(i=k.t),(null===j||k.t>j)&&(j=k.t);let a=e(k.min),l=e(k.max);null!==a&&(null===b||a<b)&&(b=a),null!==l&&(null===c||l>c)&&(c=l),null!==k.avg&&Number.isFinite(k.avg)&&(d+=k.avg,f+=1,g=k.avg,h=k.t)}return{count:f,min:b,max:c,avg:f>0?d/f:null,latest:g,latestT:h,firstT:i,lastT:j}}function l(a){if(!Number.isFinite(a)||a<=0)return 1;let b=Math.pow(10,Math.floor(Math.log10(a))),c=a/b;return(c<=1?1:c<=2?2:c<=5?5:10)*b}function m(a,b){if("percent"===a)return{min:0,max:100,ticks:[0,25,50,75,100]};let c=b.filter(a=>null!==a&&Number.isFinite(a));if(0===c.length)return{min:0,max:1,ticks:[0,1]};let d=Math.min(...c),e=Math.max(...c);if("celsius"===a){let a=Math.max(1,(e-d)*.1);d=5*Math.floor((d-a)/5),e=5*Math.ceil((e+a)/5)}else d=0,e=e>0?e:1;e<=d&&(e=d+1);let f=l((e-d)/4),g=Math.floor(d/f)*f,h=Math.ceil(e/f)*f,i=function(a,b,c=4){if(!Number.isFinite(a)||!Number.isFinite(b))return[0,1];if(b<=a)return[a];let d=l((b-a)/Math.max(1,c)),e=Math.ceil(a/d)*d,f=[];for(let a=e;a<=b+.001*d&&f.length<20;a+=d)f.push(Number(a.toPrecision(12)));return f.length>0?f:[a,b]}(g,h,4);return{min:g,max:h,ticks:i}}function n(a,b,c=4){let d=Math.max(2,Math.floor(c)),e=Math.max(0,b-a);return Array.from({length:d},(b,c)=>a+e*c/(d-1))}c.d(b,{$z:()=>g,Cf:()=>n,SG:()=>j,T6:()=>k,jl:()=>h,kk:()=>m,o:()=>i})}};
@@ -1 +1 @@
1
- globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],lowPriorityFiles:["static/xjSDCOO8Gpm5iPO9tyRG5/_buildManifest.js","static/xjSDCOO8Gpm5iPO9tyRG5/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-9ca43f4ce1bb8938.js","static/chunks/4bd1b696-c7408084347438ae.js","static/chunks/794-ceeb732a1a81bc27.js","static/chunks/main-app-f92328c8950d2e53.js"],rootMainFilesTree:{},pages:{"/_app":[]}};
1
+ globalThis.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],lowPriorityFiles:["static/-mNveXe-cHv8irQe97wI_/_buildManifest.js","static/-mNveXe-cHv8irQe97wI_/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-9ca43f4ce1bb8938.js","static/chunks/4bd1b696-c7408084347438ae.js","static/chunks/794-ceeb732a1a81bc27.js","static/chunks/main-app-f92328c8950d2e53.js"],rootMainFilesTree:{},pages:{"/_app":[]}};
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/3fbf75e4c471c6a8.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-9ca43f4ce1bb8938.js"/><script src="/_next/static/chunks/4bd1b696-c7408084347438ae.js" async=""></script><script src="/_next/static/chunks/794-ceeb732a1a81bc27.js" async=""></script><script src="/_next/static/chunks/main-app-f92328c8950d2e53.js" async=""></script><script src="/_next/static/chunks/939-514e554087419c71.js" async=""></script><script src="/_next/static/chunks/app/layout-4feff677c4071745.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Rigscope</title><meta name="description" content="Self-hosted remote system monitor — a live fleet of collectors behind one authenticated hub."/><link rel="icon" href="/icon.svg?3b3fa3229e2d0d7a" type="image/svg+xml" sizes="any"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","dark",null,["light","dark"],null,true,true)</script><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-9ca43f4ce1bb8938.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:\"static/chunks/939-514e554087419c71.js\"\n3:\"static/chunks/app/layout-4feff677c4071745.js\"\n4:I[2737,[\"939\",\"$2\",\"177\",\"$3\"],\"ThemeProvider\"]\n5:I[9939,[\"939\",\"$2\",\"177\",\"$3\"],\"LiveProvider\"]\n6:I[7121,[],\"\"]\n7:I[4581,[],\"\"]\nb:I[484,[],\"OutletBoundary\"]\nc:\"$Sreact.suspense\"\ne:\"ViewportBoundary\"\nf:I[484,[],\"$e\"]\n11:\"MetadataBoundary\"\n12:I[484,[],\"$11\"]\n14:I[7123,[],\"default\",1]\n:HL[\"/_next/static/css/3fbf75e4c471c6a8.css\",\"style\"]\n9:X\na:[[\"children\",{\"s\":\"__PAGE__\",\"h\":512,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"$c\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@d\"}]}]]}],\"p\":false,\"v\":null}}]]\n8:[[\"children\",{\"s\":\"_not-found\",\"h\":512,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],\"p\":false,\"v\":\"$9\"},\"c\":\"$Qa\"}]]\n0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"t\":{\"t\":{\"s\":\"\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/3fbf75e4c471c6a8.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L4\",null,{\"attribute\":\"class\",\"defaultTheme\":\"dark\",\"enableSystem\":true,\"children\":[\"$\",\"$L5\",null,{\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}]}]]}],\"p\":false,\"v\":null},\"c\":\"$Q8\"},\"h\":{\"r\":[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$Lf\",null,{\"children\":\"$L10\"}],[\"$\",\"$L12\",null,{\"children\":[[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$c\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L13\"}]}],null]}],null]}],\"p\":false,\"v\":null}},\"m\":\"$undefined\",\"G\":[\"$14\",[]],\"S\":true,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"xjSDCOO8Gpm5iPO9tyRG5\"}\n"])</script><script>self.__next_f.push([1,"9:C\n10:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"15:I[6869,[],\"IconMark\"]\nd:null\n13:[[\"$\",\"title\",\"0\",{\"children\":\"Rigscope\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Self-hosted remote system monitor — a live fleet of collectors behind one authenticated hub.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/icon.svg?3b3fa3229e2d0d7a\",\"type\":\"image/svg+xml\",\"sizes\":\"any\"}],[\"$\",\"$L15\",\"3\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/3fbf75e4c471c6a8.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-9ca43f4ce1bb8938.js"/><script src="/_next/static/chunks/4bd1b696-c7408084347438ae.js" async=""></script><script src="/_next/static/chunks/794-ceeb732a1a81bc27.js" async=""></script><script src="/_next/static/chunks/main-app-f92328c8950d2e53.js" async=""></script><script src="/_next/static/chunks/939-514e554087419c71.js" async=""></script><script src="/_next/static/chunks/app/layout-4feff677c4071745.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Rigscope</title><meta name="description" content="Self-hosted remote system monitor — a live fleet of collectors behind one authenticated hub."/><link rel="icon" href="/icon.svg?3b3fa3229e2d0d7a" type="image/svg+xml" sizes="any"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><script>((a,b,c,d,e,f,g,h)=>{let i=document.documentElement,j=["light","dark"];function k(b){var c;(Array.isArray(a)?a:[a]).forEach(a=>{let c="class"===a,d=c&&f?e.map(a=>f[a]||a):e;c?(i.classList.remove(...d),i.classList.add(f&&f[b]?f[b]:b)):i.setAttribute(a,b)}),c=b,h&&j.includes(c)&&(i.style.colorScheme=c)}if(d)k(d);else try{let a=localStorage.getItem(b)||c,d=g&&"system"===a?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a;k(d)}catch(a){}})("class","theme","dark",null,["light","dark"],null,true,true)</script><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-9ca43f4ce1bb8938.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:\"static/chunks/939-514e554087419c71.js\"\n3:\"static/chunks/app/layout-4feff677c4071745.js\"\n4:I[2737,[\"939\",\"$2\",\"177\",\"$3\"],\"ThemeProvider\"]\n5:I[9939,[\"939\",\"$2\",\"177\",\"$3\"],\"LiveProvider\"]\n6:I[7121,[],\"\"]\n7:I[4581,[],\"\"]\nb:I[484,[],\"OutletBoundary\"]\nc:\"$Sreact.suspense\"\ne:\"ViewportBoundary\"\nf:I[484,[],\"$e\"]\n11:\"MetadataBoundary\"\n12:I[484,[],\"$11\"]\n14:I[7123,[],\"default\",1]\n:HL[\"/_next/static/css/3fbf75e4c471c6a8.css\",\"style\"]\n9:X\na:[[\"children\",{\"s\":\"__PAGE__\",\"h\":512,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"$c\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@d\"}]}]]}],\"p\":false,\"v\":null}}]]\n8:[[\"children\",{\"s\":\"_not-found\",\"h\":512,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],\"p\":false,\"v\":\"$9\"},\"c\":\"$Qa\"}]]\n0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"t\":{\"t\":{\"s\":\"\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/3fbf75e4c471c6a8.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"children\":[\"$\",\"$L4\",null,{\"attribute\":\"class\",\"defaultTheme\":\"dark\",\"enableSystem\":true,\"children\":[\"$\",\"$L5\",null,{\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}]}]]}],\"p\":false,\"v\":null},\"c\":\"$Q8\"},\"h\":{\"r\":[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$Lf\",null,{\"children\":\"$L10\"}],[\"$\",\"$L12\",null,{\"children\":[[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$c\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L13\"}]}],null]}],null]}],\"p\":false,\"v\":null}},\"m\":\"$undefined\",\"G\":[\"$14\",[]],\"S\":true,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"-mNveXe-cHv8irQe97wI_\"}\n"])</script><script>self.__next_f.push([1,"9:C\n10:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"15:I[6869,[],\"IconMark\"]\nd:null\n13:[[\"$\",\"title\",\"0\",{\"children\":\"Rigscope\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Self-hosted remote system monitor — a live fleet of collectors behind one authenticated hub.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/icon.svg?3b3fa3229e2d0d7a\",\"type\":\"image/svg+xml\",\"sizes\":\"any\"}],[\"$\",\"$L15\",\"3\",{}]]\n"])</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-9ca43f4ce1bb8938.js"/><script src="/_next/static/chunks/4bd1b696-c7408084347438ae.js" async=""></script><script src="/_next/static/chunks/794-ceeb732a1a81bc27.js" async=""></script><script src="/_next/static/chunks/main-app-f92328c8950d2e53.js" async=""></script><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-9ca43f4ce1bb8938.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[7121,[],\"\"]\n3:I[4581,[],\"\"]\n7:I[484,[],\"OutletBoundary\"]\n8:\"$Sreact.suspense\"\na:\"ViewportBoundary\"\nb:I[484,[],\"$a\"]\nd:\"MetadataBoundary\"\ne:I[484,[],\"$d\"]\n10:I[7123,[],\"default\",1]\n4:X\n"])</script><script>self.__next_f.push([1,"6:[[\"children\",{\"s\":\"__PAGE__\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L7\",null,{\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@9\"}]}]]}],\"p\":false,\"v\":null}}]]\n"])</script><script>self.__next_f.push([1,"5:[[\"children\",{\"s\":\"_global-error\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],\"p\":false,\"v\":\"$4\"},\"c\":\"$Q6\"}]]\n0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"t\":{\"t\":{\"s\":\"\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],\"p\":false,\"v\":\"$4\"},\"c\":\"$Q5\"},\"h\":{\"r\":[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],[\"$\",\"$Le\",null,{\"children\":[[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lf\"}]}],null]}],null]}],\"p\":false,\"v\":null}},\"m\":\"$undefined\",\"G\":[\"$10\",[]],\"S\":true,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"xjSDCOO8Gpm5iPO9tyRG5\"}\n"])</script><script>self.__next_f.push([1,"4:C\nc:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"9:null\nf:[]\n"])</script></body></html>
1
+ <!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-9ca43f4ce1bb8938.js"/><script src="/_next/static/chunks/4bd1b696-c7408084347438ae.js" async=""></script><script src="/_next/static/chunks/794-ceeb732a1a81bc27.js" async=""></script><script src="/_next/static/chunks/main-app-f92328c8950d2e53.js" async=""></script><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-9ca43f4ce1bb8938.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[7121,[],\"\"]\n3:I[4581,[],\"\"]\n7:I[484,[],\"OutletBoundary\"]\n8:\"$Sreact.suspense\"\na:\"ViewportBoundary\"\nb:I[484,[],\"$a\"]\nd:\"MetadataBoundary\"\ne:I[484,[],\"$d\"]\n10:I[7123,[],\"default\",1]\n4:X\n"])</script><script>self.__next_f.push([1,"6:[[\"children\",{\"s\":\"__PAGE__\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L7\",null,{\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@9\"}]}]]}],\"p\":false,\"v\":null}}]]\n"])</script><script>self.__next_f.push([1,"5:[[\"children\",{\"s\":\"_global-error\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],\"p\":false,\"v\":\"$4\"},\"c\":\"$Q6\"}]]\n0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"t\":{\"t\":{\"s\":\"\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],\"p\":false,\"v\":\"$4\"},\"c\":\"$Q5\"},\"h\":{\"r\":[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],[\"$\",\"$Le\",null,{\"children\":[[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lf\"}]}],null]}],null]}],\"p\":false,\"v\":null}},\"m\":\"$undefined\",\"G\":[\"$10\",[]],\"S\":true,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"-mNveXe-cHv8irQe97wI_\"}\n"])</script><script>self.__next_f.push([1,"4:C\nc:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"9:null\nf:[]\n"])</script></body></html>
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[408],{4150:(e,t,r)=>{r.d(t,{Au:()=>u,_C:()=>a,eg:()=>c});var s=r(5155),n=r(2115),i=r(6304),l=r(5078);let o=(0,n.createContext)(null);function a({children:e}){let[t,r]=(0,n.useState)(null),i=(0,n.useCallback)(e=>r(t=>t?.timeMs===e?.timeMs&&t?.source===e?.source?t:e),[]),l=(0,n.useMemo)(()=>({cursor:t,setCursor:i}),[t,i]);return(0,s.jsx)(o.Provider,{value:l,children:e})}function u({series:e,fromMs:t,toMs:r,stepMs:s,gaps:l}){let a=(0,n.useId)(),[c,d]=(0,n.useState)(null),m=(0,n.useContext)(o),f=m?m.cursor:c,p=m?m.setCursor:d,h=(0,n.useRef)(null),g=(0,n.useRef)(null),y=(0,n.useCallback)(()=>{null!==h.current&&cancelAnimationFrame(h.current),h.current=null,g.current=null},[]);(0,n.useEffect)(()=>y,[y]);let x=(0,n.useMemo)(()=>(0,i.X)(e).filter(e=>e.t<=r&&e.t+s/2>=t),[e,t,r,s]),b=f&&f.timeMs>=t-s/2&&f.timeMs<=r?f.timeMs:null,v=null!==b&&f?.source===a;(0,n.useEffect)(()=>{if(!v)return;let e=e=>{"Escape"===e.key&&(y(),p(null))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[v,p,y]);let M=()=>{y(),f?.source===a&&p(null)};return{id:a,timeMs:b,active:v,inspect:e=>{let n=Math.max(t,Math.min(r,e)),o=(0,i.bO)(x,n,s,l);g.current={timeMs:o?.t??n,source:a},null===h.current&&(h.current=requestAnimationFrame(()=>{h.current=null,p(g.current),g.current=null}))},clear:M,onKeyDown:e=>{if(y(),"Escape"===e.key)e.preventDefault(),M();else if(["ArrowLeft","ArrowRight","Home","End"].includes(e.key)){e.preventDefault();let t=(0,i.o7)(x,b,e.key);null!==t&&p({timeMs:t,source:a})}},onFocus:()=>{y(),p({timeMs:x.at(-1)?.t??r,source:a})}}}function c({id:e,timeMs:t,fraction:r,unit:i,readings:o}){let[a]=(0,n.useState)(()=>r>.5?"left":"right");return(0,s.jsxs)("div",{id:e,role:"tooltip",className:`absolute top-2 z-10 max-h-56 w-56 max-w-[calc(100%-1rem)] overflow-y-auto rounded-md border border-border bg-card p-3 text-xs text-foreground ${"left"===a?"left-2":"right-2"}`,children:[(0,s.jsx)("p",{className:"tnum font-medium",children:(0,l.r6)(t)}),(0,s.jsx)("p",{className:"mb-2 text-muted-foreground",children:"Recorded bucket average"}),(0,s.jsx)("dl",{className:"grid grid-cols-[minmax(0,1fr)_auto] items-baseline gap-x-4 gap-y-1.5",children:o.map(({key:e,label:r,color:n,point:o})=>(0,s.jsxs)("div",{className:"contents",children:[(0,s.jsxs)("dt",{className:"flex min-w-0 items-center gap-1.5",children:[(0,s.jsx)("span",{"aria-hidden":!0,className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:n}}),(0,s.jsx)("span",{className:"break-words",children:r})]}),(0,s.jsxs)("dd",{className:"tnum text-right",children:[o?.avg==null?"No reading":(0,l.dd)(o.avg,i),o&&o.t!==t?(0,s.jsx)("span",{className:"block text-muted-foreground",children:(0,l.ei)(o.t)}):null]})]},e))})]})}},4567:(e,t,r)=>{r.d(t,{Cv:()=>n,H9:()=>s,Lf:()=>u,P$:()=>i,RL:()=>g,bP:()=>h,er:()=>m,oB:()=>a,ue:()=>p,yv:()=>d});let s=[{metric:"cpu.usage",label:"CPU usage",shortLabel:"CPU",unit:"percent",family:"cpu",colorSlot:0,description:"Total processor utilization"},{metric:"cpu.core",label:"Per-core CPU",shortLabel:"Per-core",unit:"percent",family:"cpu",colorSlot:0,description:"Logical-core utilization; heatmap for large selections"},{metric:"cpu.temperature",label:"CPU temperature",shortLabel:"Temperature",unit:"celsius",family:"cpu",colorSlot:3,description:"Identifiable CPU hwmon sensor temperature"},{metric:"cpu.power",label:"CPU package power",shortLabel:"Power",unit:"watts",family:"cpu",colorSlot:4,description:"Top-level RAPL package power draw"},{metric:"cpu.iowait",label:"CPU I/O wait",shortLabel:"I/O wait",unit:"percent",family:"cpu",colorSlot:2,description:"Processor time waiting on I/O"},{metric:"cpu.pressure",label:"CPU pressure",shortLabel:"Pressure",unit:"percent",family:"cpu",colorSlot:4,description:"Linux PSI CPU stall pressure (avg10)"},{metric:"memory.used",label:"Memory used",shortLabel:"Memory",unit:"bytes",family:"memory",colorSlot:1,description:"Physical memory in use"},{metric:"memory.usage",label:"Memory usage",shortLabel:"Memory %",unit:"percent",family:"memory",colorSlot:1,description:"Physical memory used as a share of total"},{metric:"memory.pressure.some",label:"Memory pressure (some)",shortLabel:"Pressure some",unit:"percent",family:"memory",colorSlot:2,description:"Linux PSI memory stall pressure, some tasks (avg10)"},{metric:"memory.pressure.full",label:"Memory pressure (full)",shortLabel:"Pressure full",unit:"percent",family:"memory",colorSlot:4,description:"Linux PSI memory stall pressure, all tasks (avg10)"},{metric:"swap.used",label:"Swap used",shortLabel:"Swap",unit:"bytes",family:"swap",colorSlot:2,description:"Swap space in use"},{metric:"gpu.utilization",label:"GPU utilization",shortLabel:"Utilization",unit:"percent",family:"gpus",colorSlot:0,description:"Per-card graphics processor utilization"},{metric:"gpu.memory.used",label:"GPU memory used",shortLabel:"VRAM",unit:"bytes",family:"gpus",colorSlot:1,description:"Per-card video memory in use"},{metric:"gpu.temperature",label:"GPU temperature",shortLabel:"Temperature",unit:"celsius",family:"gpus",colorSlot:3,description:"Per-card temperature"},{metric:"gpu.power",label:"GPU power",shortLabel:"Power",unit:"watts",family:"gpus",colorSlot:4,description:"Per-card power draw"},{metric:"fs.used",label:"Filesystem used",shortLabel:"Filesystem",unit:"bytes",family:"disks",colorSlot:1,description:"Used space per mounted filesystem"},{metric:"fs.usage",label:"Filesystem usage",shortLabel:"Filesystem %",unit:"percent",family:"disks",colorSlot:1,description:"Used capacity per mounted filesystem, derived from a positive total"},{metric:"fs.inodes.usage",label:"Inode usage",shortLabel:"Inodes %",unit:"percent",family:"disks",colorSlot:2,description:"Used inodes per filesystem where the collector can read them"},{metric:"disk.read",label:"Disk read",shortLabel:"Read",unit:"bytes_per_second",family:"disks",colorSlot:0,description:"Device read throughput"},{metric:"disk.write",label:"Disk write",shortLabel:"Write",unit:"bytes_per_second",family:"disks",colorSlot:2,description:"Device write throughput"},{metric:"disk.read.latency",label:"Disk read latency",shortLabel:"Read latency",unit:"milliseconds",family:"disks",colorSlot:0,description:"Average device read latency"},{metric:"disk.write.latency",label:"Disk write latency",shortLabel:"Write latency",unit:"milliseconds",family:"disks",colorSlot:2,description:"Average device write latency"},{metric:"disk.utilization",label:"Disk utilization",shortLabel:"Utilization",unit:"percent",family:"disks",colorSlot:3,description:"Share of time the device had I/O in flight"},{metric:"io.pressure.some",label:"I/O pressure (some)",shortLabel:"I/O some",unit:"percent",family:"disks",colorSlot:3,description:"Linux PSI I/O stall pressure, some tasks (avg10)"},{metric:"io.pressure.full",label:"I/O pressure (full)",shortLabel:"I/O full",unit:"percent",family:"disks",colorSlot:4,description:"Linux PSI I/O stall pressure, all tasks (avg10)"},{metric:"net.rx",label:"Network received",shortLabel:"Received",unit:"bytes_per_second",family:"network",colorSlot:0,description:"Interface receive rate"},{metric:"net.tx",label:"Network sent",shortLabel:"Sent",unit:"bytes_per_second",family:"network",colorSlot:2,description:"Interface transmit rate"}];function n(e,t){return e.filter(r=>{for(let[s,n,i]of[["memory","memory.used","memory.usage"],["filesystem","fs.used","fs.usage"]])if(e.includes(n)&&e.includes(i)&&(r===n||r===i))return r===("percent"===t[s]?i:n);return!0})}let i=[{id:"cpu",label:"CPU",metrics:["cpu.usage","cpu.core","cpu.iowait","cpu.pressure","cpu.temperature","cpu.power"]},{id:"memory",label:"Memory",metrics:["memory.used","memory.usage","swap.used","memory.pressure.some","memory.pressure.full"]},{id:"gpu",label:"GPU",metrics:["gpu.utilization","gpu.memory.used","gpu.temperature","gpu.power"]},{id:"disk",label:"Storage",metrics:["fs.used","fs.usage","fs.inodes.usage","disk.read","disk.write","disk.read.latency","disk.write.latency","disk.utilization","io.pressure.some","io.pressure.full"]},{id:"network",label:"Network",metrics:["net.rx","net.tx"]}],l=["var(--cpu)","var(--mem)","color-mix(in oklab, var(--swap) 75%, var(--foreground))","var(--warn)","var(--crit)","var(--accent)"],o=[void 0,"7 4","2 3","10 3 2 3","4 4","1 3"];function a(e){return s.find(t=>t.metric===e)??null}function u(e,t){let r=Math.max(0,t),s=e.colorSlot+r,n=(r+Math.floor(s/l.length))%o.length;return{color:l[s%l.length],dash:o[n]}}let c={cpu:"CPU",memory:"Memory",swap:"Swap",gpus:"GPU metrics",disks:"Disk metrics",network:"Network metrics"};function d(e,t){let r=a(t);if(null===r||void 0===e)return{available:!0,reason:null};let s=e.inventory?.capabilities?.[r.family];if(!s||"supported"===s.status)return{available:!0,reason:null};let n=s.reason?.trim();return{available:!1,reason:n?`${c[r.family]}: ${s.status} — ${n}`:`${c[r.family]} are ${s.status} on this machine.`}}function m(e){if(void 0===e)return[];let t=[],r=r=>{!(t.length>=16)&&d(e,r).available&&t.push(r)};r("cpu.usage"),r("memory.used");let s=function(e){let t=e.inventory?.memory.swapTotalBytes;if("number"==typeof t)return t;let r=e.metrics?.payload.swap;return r?.status==="ok"?r.totalBytes:null}(e);return null!==s&&s>0&&r("swap.used"),p(e,[]).length>0&&(r("gpu.utilization"),r("gpu.memory.used")),t}function f(e){let t=e.includes(":")?e.slice(e.indexOf(":")+1):e;return t.length<=18?t:`${t.slice(0,10)}…${t.slice(-4)}`}function p(e,t){let r=new Set(t.filter(e=>e.metric.startsWith("gpu.")&&""!==e.resourceId&&e.points.some(e=>null!==e.avg||null!==e.min||null!==e.max)).map(e=>e.resourceId)),s=[],n=new Set;(e?.inventory?.gpus??[]).forEach(e=>{let t="supported"===e.telemetry;(t||r.has(e.id))&&(n.add(e.id),s.push({id:e.id,label:e.name.trim()||f(e.id),index:s.length,totalBytes:e.memoryTotalBytes,supported:t,hasHistory:r.has(e.id)}))});let i=e?.metrics?.payload.gpus;if(i?.status==="ok")for(let e of i.devices)n.has(e.id)||"ok"!==e.status||(n.add(e.id),s.push({id:e.id,label:f(e.id),index:s.length,totalBytes:e.memoryTotalBytes,supported:!0,hasHistory:r.has(e.id)}));for(let e of[...r].sort())n.has(e)||s.push({id:e,label:e.startsWith("pci:")?`Previously detected GPU (${f(e)})`:f(e),index:s.length,totalBytes:null,supported:!0,hasHistory:!0});return s}function h(e,t,r){if(""===r)return a(t)?.shortLabel??"Total";let s=a(t);if(null===s)return f(r);switch(s.family){case"gpus":{let t=e?.inventory?.gpus.find(e=>e.id===r);return t?.name.trim()||f(r)}case"disks":{if(t.startsWith("fs.")){let t=e?.inventory?.filesystems.find(e=>e.id===r);return t?.mountPoint||f(r)}let s=e?.inventory?.disks.find(e=>e.id===r);return s?.name||f(r)}case"network":{let t=e?.inventory?.network.find(e=>e.id===r);return t?.name||f(r)}case"cpu":{let e=/^core:(\d+)$/.exec(r);return e?`Core ${e[1]}`:f(r)}default:return f(r)}}function g(e){switch(e){case"percent":return"%";case"bytes":return"bytes";case"bytes_per_second":return"bytes/s";case"celsius":return"\xb0C";case"watts":return"W";case"milliseconds":return"ms";default:return e}}},5078:(e,t,r)=>{r.d(t,{Ah:()=>d,I_:()=>h,O5:()=>p,Vw:()=>M,bf:()=>v,dd:()=>c,ei:()=>m,fH:()=>g,ly:()=>n,pI:()=>s,r6:()=>f,zp:()=>i});let s=[{id:"10m",shortLabel:"10m",label:"Last 10 minutes",ms:6e5,refreshMs:1e3},{id:"1h",shortLabel:"1h",label:"Last hour",ms:36e5,refreshMs:1e3},{id:"6h",shortLabel:"6h",label:"Last 6 hours",ms:216e5,refreshMs:1e3},{id:"24h",shortLabel:"24h",label:"Last 24 hours",ms:864e5,refreshMs:1e3},{id:"7d",shortLabel:"7d",label:"Last 7 days",ms:6048e5,refreshMs:1e3}];function n(e){return s.find(t=>t.id===e)??s[0]}function i(e){return n(e).refreshMs}let l=["B","KiB","MiB","GiB","TiB","PiB"];function o(e){let t=Math.abs(e),r=0;for(;t>=1024&&r<l.length-1;)t/=1024,r+=1;return{value:e<0?-t:t,unit:l[r]}}function a(e,t){return String(Number(e.toFixed(t)))}function u(e,t=""){let{value:r,unit:s}=o(e),n=Math.abs(r)>=100?0:1;return`${a(r,n)} ${s}${t}`}function c(e,t){if(null==e||!Number.isFinite(e))return"—";switch(t){case"percent":return`${a(e,1)}%`;case"bytes":return u(e);case"bytes_per_second":return u(e,"/s");case"celsius":return`${a(e,1)}\xb0C`;case"watts":return`${a(e,1)} W`;case"milliseconds":return`${a(e,10>Math.abs(e)?2:1)} ms`;default:return a(e,2)}}function d(e,t){if(!Number.isFinite(e))return"—";switch(t){case"percent":return`${a(e,0)}%`;case"bytes":case"bytes_per_second":{let{value:r,unit:s}=o(e),n=Math.abs(r)>=10||0===r?0:1;return`${a(r,n)} ${s}${"bytes_per_second"===t?"/s":""}`}case"celsius":return`${a(e,0)}\xb0C`;case"watts":return`${a(e,0)} W`;case"milliseconds":return`${a(e,+(10>Math.abs(e)))} ms`;default:return a(e,1)}}function m(e){return new Date(e).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function f(e){return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"medium"})}function p(e,t){let r=new Date(e);return t>=1728e5?r.toLocaleDateString(void 0,{month:"short",day:"numeric"}):t>=864e5?r.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}):r.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1})}function h(e){let t=Math.max(0,e);return t>=36e5?`${a(t/36e5,1)} h`:t>=6e4?`${a(t/6e4,1)} min`:`${a(t/1e3,1)} s`}function g(e,t,r){let s=e.filter(e=>e.toMs>=t&&e.fromMs<=r);if(0===s.length)return"No recorded gaps in this range.";let n=s.filter(e=>"dropped"===e.kind).length,i=s.length-n,l=[];i>0&&l.push(`${i} missed interval${1===i?"":"s"}`),n>0&&l.push(`${n} dropped report${1===n?"":"s"}`);let o=[...new Set(s.map(e=>e.reason).filter(e=>"string"==typeof e&&e.length>0))],a=o.length>0?` (${o.slice(0,3).join("; ")})`:"";return`${l.join(" and ")}${a}.`}function y(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function x(e){return"number"==typeof e&&Number.isFinite(e)}function b(e){return null===e||x(e)}function v(e){if(!y(e)||"string"!=typeof e.machineId||0===e.machineId.length||!x(e.fromMs)||!x(e.toMs)||e.toMs<=e.fromMs||!x(e.stepMs)||e.stepMs<=0||"raw"!==e.tier&&"1m"!==e.tier&&"1h"!==e.tier||"boolean"!=typeof e.truncated||!x(e.elapsedMs)||!Array.isArray(e.series)||!Array.isArray(e.gaps))return null;let t=[];for(let r of e.series){if(!y(r)||"string"!=typeof r.metric||"string"!=typeof r.resourceId||"string"!=typeof r.unit||!Array.isArray(r.points))return null;let e=[];for(let t of r.points){if(!y(t)||!x(t.t)||!b(t.min)||!b(t.max)||!b(t.avg))return null;e.push({t:t.t,min:t.min,max:t.max,avg:t.avg})}t.push({metric:r.metric,resourceId:r.resourceId,unit:r.unit,points:e})}let r=[];for(let t of e.gaps){if(!y(t)||!x(t.fromMs)||!x(t.toMs)||"missing"!==t.kind&&"dropped"!==t.kind)return null;let e={fromMs:t.fromMs,toMs:t.toMs,kind:t.kind};"string"==typeof t.reason&&(e.reason=t.reason),x(t.droppedRecords)&&(e.droppedRecords=t.droppedRecords),r.push(e)}return{machineId:e.machineId,fromMs:e.fromMs,toMs:e.toMs,stepMs:e.stepMs,tier:e.tier,series:t,gaps:r,truncated:e.truncated,elapsedMs:e.elapsedMs}}function M(e,t,r,s,i=600,l){let{fromMs:o,toMs:a}={fromMs:s-n(r).ms,toMs:s},u=new URLSearchParams({machineId:e,metrics:t.join(","),from:String(Math.floor(o)),to:String(Math.floor(a)),maxPoints:String(i)});return void 0!==l&&u.set("coreIds",l.join(",")),`/api/history?${u.toString()}`}},6304:(e,t,r)=>{function s(e,t,r,s){if(s.some(e=>t>e.fromMs&&t<e.toMs))return null;let n=0,i=e.length;for(;n<i;){let r=n+i>>>1;e[r].t<t?n=r+1:i=r}let l=e[n-1],o=e[n],a=l&&(!o||t-l.t<=o.t-t)?l:o;return!a||Math.abs(a.t-t)>r/2||s.some(e=>e.toMs>Math.min(t,a.t)&&e.fromMs<Math.max(t,a.t))?null:a}function n(e){return[...new Set(e.flatMap(e=>e.points.map(e=>e.t)))].sort((e,t)=>e-t).map(e=>({t:e,min:null,max:null,avg:null}))}function i(e,t,r,s,n,l=0){return Math.round(s+Math.max(0,Math.min(1,((r>0?(e-t)/r:0)-l)/(1-2*l)))*(n-s))}function l(e,t,r){return 0===e.length?null:"Home"===r?e[0].t:"End"===r||null===t?e.at(-1).t:"ArrowLeft"===r?[...e].reverse().find(e=>e.t<t)?.t??e[0].t:"ArrowRight"===r?e.find(e=>e.t>t)?.t??e.at(-1).t:t}r.d(t,{X:()=>n,bO:()=>s,o7:()=>l,yk:()=>i})},7284:(e,t,r)=>{r.d(t,{t:()=>c});var s=r(5155),n=r(2115),i=r(7726),l=r(5078),o=r(4567),a=r(6304),u=r(4150);function c(e){let{title:t,unit:r,series:c,fromMs:d,toMs:m,stepMs:f,gaps:p,hiddenKeys:h,onToggleSeries:g,emptyMessage:y,note:x}=e,b=(0,n.useMemo)(()=>c.filter(e=>!h.has(e.key)),[c,h]),v=(0,u.Au)({series:b,fromMs:d,toMs:m,stepMs:f,gaps:p}),M=(0,n.useRef)(null),k=(0,n.useMemo)(()=>b.flatMap(e=>e.points),[b]),w=k.some(e=>null!==e.avg||null!==e.min||null!==e.max),$=Math.max(1,m-d),j=(0,n.useMemo)(()=>(0,i.$z)(p,d,m,k),[p,d,m,k]),S=(0,n.useMemo)(()=>(0,i.kk)(r,k.flatMap(e=>[e.min,e.max,e.avg]).filter(e=>null!==e)),[r,k]),L=Math.max(1e-9,S.max-S.min),N=(0,n.useCallback)(e=>6+(Math.min(m,Math.max(d,e))-d)/$*788,[d,m,$]),P=(0,n.useCallback)(e=>6+(1-(e-S.min)/L)*148,[S.min,L]),I=(0,n.useMemo)(()=>b.map(t=>{let r=(0,i.o)(t.points,{stepMs:f,gaps:j,fromMs:d,toMs:m}).map(t=>(0,i.SG)(t,e.maxDrawPoints??601,f));return{...t,segments:r,envelope:r.filter(e=>e.length>1).map(e=>{let t=e.map(e=>`${N(e.t).toFixed(2)},${P(e.max??e.avg).toFixed(2)}`),r=[...e].reverse().map(e=>`${N(e.t).toFixed(2)},${P(e.min??e.avg).toFixed(2)}`);return`M${t.join("L")}L${r.join("L")}Z`}).join(" "),path:r.filter(e=>e.length>1).map(e=>e.map((e,t)=>`${0===t?"M":"L"}${N(e.t).toFixed(2)},${P(e.avg).toFixed(2)}`).join(" ")).join(" ")}}),[b,e.maxDrawPoints,f,j,d,m,N,P]),C=(0,n.useMemo)(()=>(function(e,t,r,s,n,o){if(0===r.length)return`${e} chart: no series selected.`;let a=r.map(e=>{let r=(0,i.T6)(e.points);return`${e.label}: ${function(e,t){let r=[];if(null!==e.latest){let s=null!==e.latestT?(0,l.ei)(e.latestT):null;r.push(`latest ${(0,l.dd)(e.latest,t)}${s?` at ${s}`:""}`)}return r.push(`average ${(0,l.dd)(e.avg,t)}`),null!==e.min&&null!==e.max&&r.push(`recorded range ${(0,l.dd)(e.min,t)} to ${(0,l.dd)(e.max,t)}`),r.join(", ")}(r,t)}`}),u=o>0?`${o} shaded interval${1===o?"":"s"} without stored data.`:"";return`${e} time-series chart. ${a.join(". ")}. ${u} Time range ${(0,l.ei)(s)} to ${(0,l.ei)(n)}.`})(t,r,b,d,m,j.length),[t,r,b,d,m,j.length]),A=(0,n.useMemo)(()=>new Map(c.map(e=>[e.key,(0,i.T6)(e.points)])),[c]),F=null===v.timeMs?[]:b.map(e=>({...e,point:(0,a.bO)(e.points,v.timeMs,f,p)})),D=null===v.timeMs?null:N(v.timeMs),R=`${v.id}-tooltip`,U=`${v.id}-instructions`,E=(0,n.useMemo)(()=>(0,s.jsxs)(s.Fragment,{children:[S.ticks.map(e=>(0,s.jsx)("line",{x1:6,x2:794,y1:P(e),y2:P(e),stroke:"var(--border)",strokeWidth:"1",vectorEffect:"non-scaling-stroke"},`grid-${e}`)),j.map(e=>(0,s.jsx)("rect",{x:N(e.fromMs),y:6,width:Math.max(1,N(e.toMs)-N(e.fromMs)),height:148,fill:"var(--muted-foreground)",opacity:"0.09"},`gap-${e.fromMs}-${e.toMs}-${e.kind}`)),I.map(e=>{let t=e.envelope;return""===t?null:(0,s.jsx)("path",{d:t,fill:e.color,opacity:"0.14",stroke:"none"},`band-${e.key}`)}),I.map(e=>{let t=e.path;return""===t?null:(0,s.jsx)("path",{d:t,fill:"none",stroke:e.color,strokeWidth:"2",strokeDasharray:e.dash,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"},`line-${e.key}`)}),I.flatMap(e=>e.segments.filter(e=>1===e.length).map(t=>{let r=t[0],n=N(r.t),i=P(r.avg);return(0,s.jsx)("line",{x1:n-2.5,x2:n+2.5,y1:i,y2:i,stroke:e.color,strokeWidth:"2.5",strokeLinecap:"round",vectorEffect:"non-scaling-stroke"},`dot-${e.key}-${r.t}`)}))]}),[S,N,P,j,I]);return(0,s.jsxs)("figure",{className:`flex min-w-0 flex-col gap-2 ${e.className??""}`,children:[(0,s.jsxs)("div",{className:"flex min-h-8 flex-wrap items-center justify-between gap-2",children:[(0,s.jsx)("h3",{className:"text-xs font-medium tracking-tight text-foreground",children:t}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:"tnum shrink-0 text-xs text-muted-foreground",children:x??(0,o.RL)(r)}),e.action]})]}),w?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex min-w-0 gap-2",children:[(0,s.jsx)("div",{"aria-hidden":!0,className:"flex h-40 w-14 shrink-0 flex-col justify-between py-0.5 text-right text-xs leading-none tnum text-muted-foreground",children:[...S.ticks].reverse().map(e=>(0,s.jsx)("span",{children:(0,l.Ah)(e,r)},e))}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"relative",onPointerLeave:v.clear,onPointerMove:e=>{let t=M.current?.getBoundingClientRect();t&&v.inspect((0,a.yk)(e.clientX,t.left,t.width,d,m,.0075))},children:[(0,s.jsx)("p",{id:U,className:"sr-only",children:"Use Left and Right arrows to inspect recorded readings, Home or End to jump, and Escape to dismiss."}),(0,s.jsxs)("svg",{ref:M,viewBox:"0 0 800 160",preserveAspectRatio:"none",role:"img","aria-label":C,tabIndex:0,"aria-describedby":`${U}${v.active?` ${R}`:""}`,onFocus:v.onFocus,onBlur:v.clear,onKeyDown:v.onKeyDown,className:"block h-40 w-full cursor-crosshair rounded-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent",children:[(0,s.jsx)("title",{children:t}),E,null!==D?(0,s.jsxs)("g",{"aria-hidden":!0,pointerEvents:"none",children:[(0,s.jsx)("line",{x1:D,x2:D,y1:6,y2:154,stroke:"var(--muted-foreground)",strokeWidth:"1",strokeDasharray:"3 3",vectorEffect:"non-scaling-stroke"}),F.map(({key:e,color:t,point:r})=>r?.avg==null?null:(0,s.jsx)("circle",{cx:N(r.t),cy:P(r.avg),r:"3.5",fill:t,stroke:"var(--card)",strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"},e))]}):null]}),v.active&&null!==v.timeMs&&null!==D?(0,s.jsx)(u.eg,{id:R,timeMs:v.timeMs,fraction:D/800,unit:r,readings:F}):null]}),(0,s.jsx)("div",{"aria-hidden":!0,className:"mt-1 flex justify-between gap-2 text-xs leading-tight tnum text-muted-foreground",children:(0,i.Cf)(d,m).map((e,t,r)=>(0,s.jsx)("span",{className:`${0===t?"text-left":t===r.length-1?"text-right":"hidden text-center sm:inline"}`,children:(0,l.O5)(e,$)},e))})]})]}),(0,s.jsx)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs",children:c.map(e=>{let t=!h.has(e.key),n=A.get(e.key);return(0,s.jsxs)("label",{className:"inline-flex min-h-7 cursor-pointer items-center gap-1.5",title:t?`Hide ${e.label}`:`Show ${e.label}`,children:[(0,s.jsx)("input",{type:"checkbox",checked:t,onChange:()=>g(e.key),className:"peer sr-only"}),(0,s.jsx)("span",{"aria-hidden":!0,className:"flex h-4 w-5 shrink-0 items-center justify-center rounded-sm peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:[outline-color:var(--focus)]",children:(0,s.jsx)("svg",{viewBox:"0 0 20 8",className:"h-2 w-5","aria-hidden":!0,children:(0,s.jsx)("line",{x1:"1",y1:"4",x2:"19",y2:"4",stroke:e.color,strokeWidth:"2.5",strokeDasharray:e.dash,strokeLinecap:"round"})})}),(0,s.jsx)("span",{className:t?"text-foreground":"text-muted-foreground line-through",children:e.label}),(0,s.jsx)("span",{className:"tnum text-muted-foreground",children:(0,l.dd)(n.latest,r)})]},`legend-${e.key}`)})})]}):(0,s.jsx)("div",{className:"flex min-h-32 items-center justify-center rounded-lg border border-dashed border-border px-4 py-6 text-center text-xs text-muted-foreground",children:0===c.length?y:0===b.length?"All series are hidden. Re-enable one in the legend below.":y}),!w&&c.length>0?(0,s.jsx)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs",children:c.map(e=>{let t=!h.has(e.key);return(0,s.jsxs)("label",{className:"inline-flex min-h-7 cursor-pointer items-center gap-1.5",children:[(0,s.jsx)("input",{type:"checkbox",checked:t,onChange:()=>g(e.key),className:"peer sr-only"}),(0,s.jsx)("span",{"aria-hidden":!0,className:"flex h-4 w-5 shrink-0 items-center justify-center peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:[outline-color:var(--focus)]",children:(0,s.jsx)("svg",{viewBox:"0 0 20 8",className:"h-2 w-5","aria-hidden":!0,children:(0,s.jsx)("line",{x1:"1",y1:"4",x2:"19",y2:"4",stroke:e.color,strokeWidth:"2.5",strokeDasharray:e.dash,strokeLinecap:"round"})})}),(0,s.jsx)("span",{className:t?"text-foreground":"text-muted-foreground line-through",children:e.label})]},`legend-empty-${e.key}`)})}):null]})}},7726:(e,t,r)=>{function s(e){return null!==e.avg&&Number.isFinite(e.avg)}function n(e){return null!==e&&Number.isFinite(e)?e:null}function i(e){let t=[];for(let r of e){let e=t.at(-1);if(void 0!==e&&r.fromMs<=e.toMs){e.toMs=Math.max(e.toMs,r.toMs),"missing"===e.kind&&"dropped"===r.kind&&(e.kind="dropped"),void 0===e.reason&&void 0!==r.reason&&(e.reason=r.reason),void 0===e.droppedRecords&&void 0!==r.droppedRecords&&(e.droppedRecords=r.droppedRecords);continue}t.push({...r})}return t}function l(e,t,r,n){let l=i(e.map(e=>({...e,fromMs:Math.max(t,e.fromMs),toMs:Math.min(r,e.toMs)})).filter(e=>e.toMs>e.fromMs).sort((e,t)=>e.fromMs-t.fromMs||e.toMs-t.toMs));return void 0===n?l:function(e,t,r,n){if(0===e.length)return[];let l=[...new Set(t.filter(s).map(e=>e.t).filter(e=>Number.isFinite(e)))].sort((e,t)=>e-t),o=[];for(let t of e){let e=Math.max(r,Math.min(n,t.fromMs)),s=Math.max(r,Math.min(n,t.toMs));if(s<=e)continue;let i=Math.max(r,function(e,t){let r=0,s=e.length;for(;r<s;){let n=r+s>>>1;e[n]<=t?r=n+1:s=n}return r>0?e[r-1]:null}(l,e)??e),a=Math.min(n,function(e,t){let r=0,s=e.length;for(;r<s;){let n=r+s>>>1;e[n]<t?r=n+1:s=n}return r<e.length?e[r]:null}(l,s)??s);a<=i||o.push({...t,fromMs:i,toMs:a})}return o.sort((e,t)=>e.fromMs-t.fromMs||e.toMs-t.toMs),i(o)}(l,n,t,r)}function o(e,t,r){return Math.max(e,"1h"===t?36e5:"1m"===t?6e4:100,r??0)}function a(e,t){let r=[...e].sort((e,t)=>e.t-t.t),n=l(t.gaps,t.fromMs,t.toMs),i=Math.max(1,t.stepMs),o=[],a=[],u=()=>{a.length>0&&o.push(a),a=[]};for(let e of r){if(!s(e)){u();continue}let t=a.at(-1);if(void 0!==t){let r=!e.merged&&!t.merged&&(e.t<t.t||e.t-t.t>1.5*i),s=!0===e.gapBefore||function(e,t,r){return r.some(r=>r.toMs>e&&r.fromMs<t)}(t.t,e.t,n);(r||s)&&u()}a.push(e)}return u(),o}function u(e,t,r){if(t<=0)return[];let i=[...e].sort((e,t)=>e.t-t.t);if(i.length<=t)return i.map(e=>({...e}));let l=Math.max(2,Math.ceil(i.length/t)),o=Math.max(1,r),a=[],u=[],c=!1,d=null,m=()=>{if(0===u.length)return;let e=null,t=null,r=0,s=0;for(let i of u){let l=n(i.min),o=n(i.max);null!==l&&(null===e||l<e)&&(e=l),null!==o&&(null===t||o>t)&&(t=o);let a=n(i.avg);null!==a&&(r+=a,s+=1)}a.push({t:u[0].t,min:e,max:t,avg:s>0?r/s:null,...u.length>1?{merged:!0}:{},...c?{gapBefore:!0}:{}}),u=[],c=!1};for(let e of i){if(!s(e)){m(),a.push({...e}),d=null;continue}let t=null!==d&&e.t>=d.t&&e.t-d.t<=1.5*o;u.length>0&&(!t||u.length>=l)&&m(),0===u.length&&(c=null!==d&&!t),u.push(e),d=e}return m(),a}function c(e){let t=null,r=null,s=0,i=0,l=null,o=null,a=null,u=null;for(let c of e){if(null===c.avg)continue;(null===a||c.t<a)&&(a=c.t),(null===u||c.t>u)&&(u=c.t);let e=n(c.min),d=n(c.max);null!==e&&(null===t||e<t)&&(t=e),null!==d&&(null===r||d>r)&&(r=d),null!==c.avg&&Number.isFinite(c.avg)&&(s+=c.avg,i+=1,l=c.avg,o=c.t)}return{count:i,min:t,max:r,avg:i>0?s/i:null,latest:l,latestT:o,firstT:a,lastT:u}}function d(e){if(!Number.isFinite(e)||e<=0)return 1;let t=Math.pow(10,Math.floor(Math.log10(e))),r=e/t;return(r<=1?1:r<=2?2:r<=5?5:10)*t}function m(e,t){if("percent"===e)return{min:0,max:100,ticks:[0,25,50,75,100]};let r=t.filter(e=>null!==e&&Number.isFinite(e));if(0===r.length)return{min:0,max:1,ticks:[0,1]};let s=Math.min(...r),n=Math.max(...r);if("celsius"===e){let e=Math.max(1,(n-s)*.1);s=5*Math.floor((s-e)/5),n=5*Math.ceil((n+e)/5)}else s=0,n=n>0?n:1;n<=s&&(n=s+1);let i=d((n-s)/4),l=Math.floor(s/i)*i,o=Math.ceil(n/i)*i,a=function(e,t,r=4){if(!Number.isFinite(e)||!Number.isFinite(t))return[0,1];if(t<=e)return[e];let s=d((t-e)/Math.max(1,r)),n=Math.ceil(e/s)*s,i=[];for(let e=n;e<=t+.001*s&&i.length<20;e+=s)i.push(Number(e.toPrecision(12)));return i.length>0?i:[e,t]}(l,o,4);return{min:l,max:o,ticks:a}}function f(e,t,r=4){let s=Math.max(2,Math.floor(r)),n=Math.max(0,t-e);return Array.from({length:s},(t,r)=>e+n*r/(s-1))}r.d(t,{$z:()=>l,Cf:()=>f,SG:()=>u,T6:()=>c,jl:()=>o,kk:()=>m,o:()=>a})},9429:(e,t,r)=>{r.d(t,{n:()=>l});var s=r(2115),n=r(5078);async function i(e){let t=null;try{let r=await e.json();if(null!==r&&"object"==typeof r&&"error"in r){let e=r.error;"string"==typeof e&&(t=e)}}catch{}switch(e.status){case 401:return{kind:"unauthorized",message:"Your session is no longer accepted."};case 403:return{kind:"denied",message:t??"You do not have access to this machine's history."};case 404:return{kind:"missing",message:t??"This machine is not available to the hub."};case 429:return{kind:"rate-limited",message:t??"The hub is limiting history requests."};case 503:return{kind:"unavailable",message:t??"History is temporarily unavailable."};default:return{kind:"invalid",message:t??`The hub could not answer this history query (${e.status}).`}}}function l({machineId:e,metricsKey:t,coreIdsKey:r,range:o,enabled:a=!0,autoRefresh:u=!0,refreshNonce:c=0}){let[d,m]=(0,s.useState)({machineId:e,metricsKey:t,coreIdsKey:r,range:o}),f=d.machineId===e&&d.range===o;(0,s.useEffect)(()=>{if(!f)return void m({machineId:e,metricsKey:t,coreIdsKey:r,range:o});let s=window.setTimeout(()=>m({machineId:e,metricsKey:t,coreIdsKey:r,range:o}),300);return()=>window.clearTimeout(s)},[e,t,r,o,f]);let p=f?d:{machineId:e,metricsKey:t,coreIdsKey:r,range:o},h=p.metricsKey,g=p.coreIdsKey,y=`${e}|${h}|${o}|${g??"all"}`,[x,b]=(0,s.useState)(null),[v,M]=(0,s.useState)(null),[k,w]=(0,s.useState)(null),$=(0,s.useRef)(c);return(0,s.useEffect)(()=>{let t=$.current!==c;if($.current=c,!a||!e||!h)return;let r=!0,s=!1,l=!1,d=-1/0,m=new AbortController,f=(0,n.zp)(o),p=async(t=!1)=>{if(r&&!s&&!l){s=!0,d=Date.now(),w({key:y,manual:t});try{let t=await fetch((0,n.Vw)(e,h.split(","),o,Date.now(),600,void 0===g?void 0:g.split(",").filter(Boolean)),{signal:"function"!=typeof AbortSignal.any||"function"!=typeof AbortSignal.timeout?m.signal:AbortSignal.any([m.signal,AbortSignal.timeout(2e4)]),cache:"no-store",headers:{Accept:"application/json"}});if(!t.ok)throw await i(t);let s=(0,n.bf)(await t.json());if(null===s||s.machineId!==e)throw{kind:"invalid",message:"Unexpected history response."};if(!r)return;b({key:y,range:o,result:s,loadedAt:Date.now()}),M(null)}catch(t){if(!r||m.signal.aborted)return;let e=null!==t&&"object"==typeof t&&"kind"in t&&"message"in t&&"string"==typeof t.message?t:{kind:"network",message:"Could not reach the hub. Try again."};l="rate-limited"===e.kind,["unauthorized","denied","missing"].includes(e.kind)&&b(null),M({key:y,error:e})}finally{s=!1,r&&w(null)}}},x=()=>{"visible"!==document.visibilityState||Date.now()-d<f||p()};p(t);let v=u?window.setInterval(x,f):null;return u&&document.addEventListener("visibilitychange",x),()=>{r=!1,m.abort(),null!==v&&window.clearInterval(v),document.removeEventListener("visibilitychange",x)}},[a,e,h,g,o,y,u,c]),{data:a&&x?.result.machineId===e&&x.range===o?x:null,error:a&&v?.key===y?v.error:null,loading:a&&k?.key===y,manualRefreshing:a&&k?.key===y&&k.manual}}}}]);
@@ -0,0 +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()}]);
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Release notes
2
2
 
3
+ ## 0.1.4
4
+
5
+ - Coordinate stopping running user services and owned foreground processes for
6
+ installation, configuration, enrollment and password recovery. Prompt before
7
+ stopping; `--yes` approves without prompting and `--no-restart` leaves the
8
+ installation stopped. Successful changes resume previously running components.
9
+ - **Uninstall now deletes saved data by default**, including accounts, history,
10
+ collector credentials, pending samples and backups. Use `uninstall --keep-data`
11
+ to retain data for reinstalling. `--purge` remains an explicit alias for default
12
+ deletion. Uninstall never restarts processes.
13
+ - Add terminal colors for help, status, warnings and completed actions. Piped
14
+ output and JSON remain plain; `NO_COLOR` disables terminal colors.
15
+ - Avoid extra History GPU cards created by empty historical PCI placeholder
16
+ series. Preserve historical cards that contain readings. Use the system PCI
17
+ name database when available, simplify fallback names and keep PCI addresses
18
+ separate. Normalize NVIDIA PCI domain widths without merging distinct domains.
19
+ - Clarify unavailable GPU counters, including Intel integrated adapters, and
20
+ avoid a last-known badge when no GPU reading is displayed.
21
+ - Update installation and operations documentation and add lifecycle, uninstall,
22
+ terminal output and GPU regression coverage.
23
+
3
24
  ## 0.1.3
4
25
 
5
26
  - Replace the unfinished versioned configuration formats with one canonical
package/README.md CHANGED
@@ -36,6 +36,8 @@ The trial uses separate data and stops with Ctrl+C.
36
36
  | Check services and the dashboard URL | `rigscope status` |
37
37
  | Follow hub logs | `rigscope logs hub --follow` |
38
38
  | Upgrade from npm | `rigscope upgrade` |
39
+ | Delete installation and all saved data | `rigscope uninstall` |
40
+ | Remove installation, preserve saved data | `rigscope uninstall --keep-data` |
39
41
  | Stop or start the installation | `rigscope stop` / `rigscope start` |
40
42
  | Open the dashboard through Tailscale HTTPS | [Set up remote access](docs/installation.md#access-from-another-computer) |
41
43
  | Monitor another machine | [Add a collector](docs/installation.md#add-machines-and-hubs) |