rigscope 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +3 -3
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +6 -6
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/administration/page.js +1 -1
- package/.next/server/app/administration/page.js.nft.json +1 -1
- package/.next/server/app/administration/page_client-reference-manifest.js +1 -1
- package/.next/server/app/administration.html +1 -1
- package/.next/server/app/administration.rsc +6 -6
- package/.next/server/app/administration.segments/_full.segment.rsc +6 -6
- package/.next/server/app/administration.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/administration.segments/administration/__PAGE__.segment.rsc +6 -6
- package/.next/server/app/alerts/page.js +1 -1
- package/.next/server/app/alerts/page.js.nft.json +1 -1
- package/.next/server/app/alerts/page_client-reference-manifest.js +1 -1
- package/.next/server/app/alerts.html +1 -1
- package/.next/server/app/alerts.rsc +6 -6
- package/.next/server/app/alerts.segments/_full.segment.rsc +6 -6
- package/.next/server/app/alerts.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/alerts.segments/alerts/__PAGE__.segment.rsc +6 -6
- package/.next/server/app/connections/page.js +1 -1
- package/.next/server/app/connections/page.js.nft.json +1 -1
- package/.next/server/app/connections/page_client-reference-manifest.js +1 -1
- package/.next/server/app/connections.html +1 -1
- package/.next/server/app/connections.rsc +7 -7
- package/.next/server/app/connections.segments/_full.segment.rsc +7 -7
- package/.next/server/app/connections.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/connections.segments/connections/__PAGE__.segment.rsc +7 -7
- package/.next/server/app/history/page.js +2 -2
- package/.next/server/app/history/page.js.nft.json +1 -1
- package/.next/server/app/history/page_client-reference-manifest.js +1 -1
- package/.next/server/app/history.html +1 -1
- package/.next/server/app/history.rsc +26 -22
- package/.next/server/app/history.segments/_full.segment.rsc +26 -22
- package/.next/server/app/history.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/history.segments/history/__PAGE__.segment.rsc +23 -20
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +7 -7
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +7 -7
- package/.next/server/app/index.segments/_full.segment.rsc +7 -7
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +2 -2
- package/.next/server/app/login.segments/_full.segment.rsc +2 -2
- package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/machines/[machineId]/page.js +1 -1
- package/.next/server/app/machines/[machineId]/page.js.nft.json +1 -1
- package/.next/server/app/machines/[machineId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/processes/page.js +2 -2
- package/.next/server/app/processes/page.js.nft.json +1 -1
- package/.next/server/app/processes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/processes.html +1 -1
- package/.next/server/app/processes.rsc +21 -19
- package/.next/server/app/processes.segments/_full.segment.rsc +21 -19
- package/.next/server/app/processes.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/processes.segments/processes/__PAGE__.segment.rsc +21 -19
- package/.next/server/app-paths-manifest.json +3 -3
- package/.next/server/chunks/168.js +1 -1
- package/.next/server/chunks/350.js +1 -0
- package/.next/server/chunks/364.js +1 -0
- package/.next/server/chunks/751.js +1 -1
- package/.next/server/chunks/894.js +2 -2
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/103-976549d31902404e.js +1 -0
- package/.next/static/chunks/{227-417939c480f50747.js → 130-e940915010276f88.js} +1 -1
- package/.next/static/chunks/408-9fdba9e4e956ef08.js +1 -0
- package/.next/static/chunks/944-a7fe1d96f1d20531.js +1 -0
- package/.next/static/chunks/app/administration/page-b62f6610cda5381f.js +1 -0
- package/.next/static/chunks/app/alerts/{page-fe0e877778c60af8.js → page-3445bc100ee03d4e.js} +1 -1
- package/.next/static/chunks/app/connections/{page-99cd54d6929b3f1f.js → page-75abd16fc495fcbd.js} +1 -1
- package/.next/static/chunks/app/history/page-a25ba8fab7bd7cb9.js +3 -0
- package/.next/static/chunks/app/machines/[machineId]/{page-1a25a267563c18c0.js → page-89143e71c34b542b.js} +1 -1
- package/.next/static/chunks/app/{page-1ae9fc94c897785b.js → page-9c9c89166eee4c92.js} +1 -1
- package/.next/static/chunks/app/processes/page-3fdebd2f98b52044.js +3 -0
- package/.next/static/css/f5d3162842dcac31.css +1 -0
- package/CHANGELOG.md +26 -0
- package/DESIGN.md +27 -16
- package/dist/cli.cjs +1 -0
- package/dist/collector.cjs +1 -1
- package/dist/hub.cjs +1 -1
- package/docs/installation.md +6 -3
- package/docs/releasing.md +12 -12
- package/package.json +1 -1
- package/.next/server/chunks/721.js +0 -1
- package/.next/server/chunks/877.js +0 -1
- package/.next/static/chunks/103-c47318242b24e9ac.js +0 -1
- package/.next/static/chunks/157-0d36ebf66af048ac.js +0 -1
- package/.next/static/chunks/408-29f55984738967db.js +0 -1
- package/.next/static/chunks/app/administration/page-4b16b19bb6a39c36.js +0 -1
- package/.next/static/chunks/app/history/page-69ea64476ee5db85.js +0 -3
- package/.next/static/chunks/app/processes/page-0e98a4a64e829c5f.js +0 -3
- package/.next/static/css/3fbf75e4c471c6a8.css +0 -1
- /package/.next/static/{-mNveXe-cHv8irQe97wI_ → KBskG-P4uSZx1zfnYp1nL}/_buildManifest.js +0 -0
- /package/.next/static/{-mNveXe-cHv8irQe97wI_ → KBskG-P4uSZx1zfnYp1nL}/_ssgManifest.js +0 -0
|
@@ -6,25 +6,27 @@
|
|
|
6
6
|
6:I[7121,[],""]
|
|
7
7
|
7:I[4581,[],""]
|
|
8
8
|
b:"$Sreact.suspense"
|
|
9
|
-
c:"static/chunks/
|
|
10
|
-
d:"static/chunks/103-
|
|
11
|
-
e:"static/chunks/app/processes/page-
|
|
12
|
-
f:I[2701,["
|
|
13
|
-
10:
|
|
14
|
-
11:I[
|
|
15
|
-
12:I[
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
:
|
|
9
|
+
c:"static/chunks/944-a7fe1d96f1d20531.js"
|
|
10
|
+
d:"static/chunks/103-976549d31902404e.js"
|
|
11
|
+
e:"static/chunks/app/processes/page-3fdebd2f98b52044.js"
|
|
12
|
+
f:I[2701,["944","$c","939","$2","103","$d","952","$e"],"Sidebar"]
|
|
13
|
+
10:"MobileNavigation"
|
|
14
|
+
11:I[9904,["944","$c","939","$2","103","$d","952","$e"],"$10"]
|
|
15
|
+
12:I[2394,["944","$c","939","$2","103","$d","952","$e"],"ThemeToggle"]
|
|
16
|
+
13:I[7339,["944","$c","939","$2","103","$d","952","$e"],"ProcessesView"]
|
|
17
|
+
14:I[484,[],"OutletBoundary"]
|
|
18
|
+
16:"ViewportBoundary"
|
|
19
|
+
17:I[484,[],"$16"]
|
|
20
|
+
19:"MetadataBoundary"
|
|
21
|
+
1a:I[484,[],"$19"]
|
|
22
|
+
1c:I[7123,[],"default",1]
|
|
23
|
+
:HL["/_next/static/css/f5d3162842dcac31.css","style"]
|
|
22
24
|
9:X
|
|
23
|
-
a:[["children",{"s":"__PAGE__","h":512,"d":{"r":["$","$1","c",{"children":[["$","$b",null,{"fallback":["$","div",null,{"className":"relative flex h-dvh overflow-hidden bg-background text-foreground","children":[["$","a",null,{"href":"#main-content","className":"sr-only z-50 rounded-md bg-card px-4 py-2 text-foreground focus:not-sr-only focus:absolute focus:start-2 focus:top-2 focus:outline-2 focus:outline-accent","children":"Skip to content"}],["$","$Lf",null,{"machineId":"$undefined","machineView":"$undefined"}],["$","div",null,{"className":"flex min-w-0 flex-1 flex-col","children":[["$","header",null,{"className":"flex min-h-14 shrink-0 flex-wrap items-center justify-between gap-2 border-b border-border px-4 py-2 md:px-6","children":[["$","h1",null,{"className":"truncate text-lg font-semibold tracking-tight","children":"Processes"}],["$","div",null,{"className":"flex items-center gap-3","children":[null,["$","$
|
|
25
|
+
a:[["children",{"s":"__PAGE__","h":512,"d":{"r":["$","$1","c",{"children":[["$","$b",null,{"fallback":["$","div",null,{"className":"relative flex h-dvh overflow-hidden bg-background text-foreground","children":[["$","a",null,{"href":"#main-content","className":"sr-only z-50 rounded-md bg-card px-4 py-2 text-foreground focus:not-sr-only focus:absolute focus:start-2 focus:top-2 focus:outline-2 focus:outline-accent","children":"Skip to content"}],["$","div",null,{"className":"hidden md:flex","children":["$","$Lf",null,{"machineId":"$undefined","machineView":"$undefined"}]}],["$","div",null,{"className":"flex min-w-0 flex-1 flex-col","children":[["$","header",null,{"className":"flex min-h-14 shrink-0 flex-wrap items-center justify-between gap-2 border-b border-border px-4 py-2 md:px-6","children":[["$","div",null,{"className":"flex min-w-0 items-center gap-2","children":[["$","$L11",null,{"machineId":"$undefined","machineView":"$undefined"}],["$","h1",null,{"className":"truncate text-lg font-semibold tracking-tight","children":"Processes"}]]}],["$","div",null,{"className":"flex items-center gap-3","children":[null,["$","$L12",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":["$","$L13",null,{}]}],null,["$","$L14",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@15"}]}]]}],"p":false,"v":null}}]]
|
|
24
26
|
8:[["children",{"s":"processes","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"}]]
|
|
25
|
-
0:{"P":null,"c":["","processes"],"q":"","i":false,"t":{"t":{"s":"","h":528,"d":{"r":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/
|
|
27
|
+
0:{"P":null,"c":["","processes"],"q":"","i":false,"t":{"t":{"s":"","h":528,"d":{"r":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/f5d3162842dcac31.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"children":["$","$L4",null,{"attribute":"class","defaultTheme":"dark","enableSystem":true,"children":["$","$L5",null,{"children":["$","$L6",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]}]]}],"p":false,"v":null},"c":"$Q8"},"h":{"r":["$","$1","h",{"children":[null,["$","$L17",null,{"children":"$L18"}],["$","$L1a",null,{"children":[["$","div",null,{"hidden":true,"children":["$","$b",null,{"name":"Next.Metadata","children":"$L1b"}]}],null]}],null]}],"p":false,"v":null}},"m":"$undefined","G":["$1c",[]],"S":true,"r":"$undefined","s":"$undefined","a":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"KBskG-P4uSZx1zfnYp1nL"}
|
|
26
28
|
9:C
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
18:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
|
30
|
+
1d:I[6869,[],"IconMark"]
|
|
31
|
+
15:null
|
|
32
|
+
1b:[["$","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"}],["$","$L1d","3",{}]]
|
|
@@ -6,25 +6,27 @@
|
|
|
6
6
|
6:I[7121,[],""]
|
|
7
7
|
7:I[4581,[],""]
|
|
8
8
|
b:"$Sreact.suspense"
|
|
9
|
-
c:"static/chunks/
|
|
10
|
-
d:"static/chunks/103-
|
|
11
|
-
e:"static/chunks/app/processes/page-
|
|
12
|
-
f:I[2701,["
|
|
13
|
-
10:
|
|
14
|
-
11:I[
|
|
15
|
-
12:I[
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
:
|
|
9
|
+
c:"static/chunks/944-a7fe1d96f1d20531.js"
|
|
10
|
+
d:"static/chunks/103-976549d31902404e.js"
|
|
11
|
+
e:"static/chunks/app/processes/page-3fdebd2f98b52044.js"
|
|
12
|
+
f:I[2701,["944","$c","939","$2","103","$d","952","$e"],"Sidebar"]
|
|
13
|
+
10:"MobileNavigation"
|
|
14
|
+
11:I[9904,["944","$c","939","$2","103","$d","952","$e"],"$10"]
|
|
15
|
+
12:I[2394,["944","$c","939","$2","103","$d","952","$e"],"ThemeToggle"]
|
|
16
|
+
13:I[7339,["944","$c","939","$2","103","$d","952","$e"],"ProcessesView"]
|
|
17
|
+
14:I[484,[],"OutletBoundary"]
|
|
18
|
+
16:"ViewportBoundary"
|
|
19
|
+
17:I[484,[],"$16"]
|
|
20
|
+
19:"MetadataBoundary"
|
|
21
|
+
1a:I[484,[],"$19"]
|
|
22
|
+
1c:I[7123,[],"default",1]
|
|
23
|
+
:HL["/_next/static/css/f5d3162842dcac31.css","style"]
|
|
22
24
|
9:X
|
|
23
|
-
a:[["children",{"s":"__PAGE__","h":512,"d":{"r":["$","$1","c",{"children":[["$","$b",null,{"fallback":["$","div",null,{"className":"relative flex h-dvh overflow-hidden bg-background text-foreground","children":[["$","a",null,{"href":"#main-content","className":"sr-only z-50 rounded-md bg-card px-4 py-2 text-foreground focus:not-sr-only focus:absolute focus:start-2 focus:top-2 focus:outline-2 focus:outline-accent","children":"Skip to content"}],["$","$Lf",null,{"machineId":"$undefined","machineView":"$undefined"}],["$","div",null,{"className":"flex min-w-0 flex-1 flex-col","children":[["$","header",null,{"className":"flex min-h-14 shrink-0 flex-wrap items-center justify-between gap-2 border-b border-border px-4 py-2 md:px-6","children":[["$","h1",null,{"className":"truncate text-lg font-semibold tracking-tight","children":"Processes"}],["$","div",null,{"className":"flex items-center gap-3","children":[null,["$","$
|
|
25
|
+
a:[["children",{"s":"__PAGE__","h":512,"d":{"r":["$","$1","c",{"children":[["$","$b",null,{"fallback":["$","div",null,{"className":"relative flex h-dvh overflow-hidden bg-background text-foreground","children":[["$","a",null,{"href":"#main-content","className":"sr-only z-50 rounded-md bg-card px-4 py-2 text-foreground focus:not-sr-only focus:absolute focus:start-2 focus:top-2 focus:outline-2 focus:outline-accent","children":"Skip to content"}],["$","div",null,{"className":"hidden md:flex","children":["$","$Lf",null,{"machineId":"$undefined","machineView":"$undefined"}]}],["$","div",null,{"className":"flex min-w-0 flex-1 flex-col","children":[["$","header",null,{"className":"flex min-h-14 shrink-0 flex-wrap items-center justify-between gap-2 border-b border-border px-4 py-2 md:px-6","children":[["$","div",null,{"className":"flex min-w-0 items-center gap-2","children":[["$","$L11",null,{"machineId":"$undefined","machineView":"$undefined"}],["$","h1",null,{"className":"truncate text-lg font-semibold tracking-tight","children":"Processes"}]]}],["$","div",null,{"className":"flex items-center gap-3","children":[null,["$","$L12",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":["$","$L13",null,{}]}],null,["$","$L14",null,{"children":["$","$b",null,{"name":"Next.MetadataOutlet","children":"$@15"}]}]]}],"p":false,"v":null}}]]
|
|
24
26
|
8:[["children",{"s":"processes","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"}]]
|
|
25
|
-
0:{"P":null,"c":["","processes"],"q":"","i":false,"t":{"t":{"s":"","h":528,"d":{"r":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/
|
|
27
|
+
0:{"P":null,"c":["","processes"],"q":"","i":false,"t":{"t":{"s":"","h":528,"d":{"r":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/f5d3162842dcac31.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"children":["$","$L4",null,{"attribute":"class","defaultTheme":"dark","enableSystem":true,"children":["$","$L5",null,{"children":["$","$L6",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]}]]}],"p":false,"v":null},"c":"$Q8"},"h":{"r":["$","$1","h",{"children":[null,["$","$L17",null,{"children":"$L18"}],["$","$L1a",null,{"children":[["$","div",null,{"hidden":true,"children":["$","$b",null,{"name":"Next.Metadata","children":"$L1b"}]}],null]}],null]}],"p":false,"v":null}},"m":"$undefined","G":["$1c",[]],"S":true,"r":"$undefined","s":"$undefined","a":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"KBskG-P4uSZx1zfnYp1nL"}
|
|
26
28
|
9:C
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
18:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
|
30
|
+
1d:I[6869,[],"IconMark"]
|
|
31
|
+
15:null
|
|
32
|
+
1b:[["$","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"}],["$","$L1d","3",{}]]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
:HL["/_next/static/css/
|
|
1
|
+
:HL["/_next/static/css/f5d3162842dcac31.css","style"]
|
|
2
2
|
2:[["children",{"s":"__PAGE__","h":160}]]
|
|
3
3
|
1:[["children",{"s":"processes","h":96,"c":"$Q2"}]]
|
|
4
|
-
0:{"b":"-
|
|
4
|
+
0:{"b":"KBskG-P4uSZx1zfnYp1nL","t":{"t":{"s":"","h":80,"c":"$Q1"}}}
|
|
@@ -6,31 +6,33 @@
|
|
|
6
6
|
6:I[7121,[],""]
|
|
7
7
|
7:I[4581,[],""]
|
|
8
8
|
e:"$Sreact.suspense"
|
|
9
|
-
f:"static/chunks/
|
|
10
|
-
10:"static/chunks/103-
|
|
11
|
-
11:"static/chunks/app/processes/page-
|
|
12
|
-
12:I[2701,["
|
|
13
|
-
13:
|
|
14
|
-
14:I[
|
|
15
|
-
15:I[
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
1a:"
|
|
9
|
+
f:"static/chunks/944-a7fe1d96f1d20531.js"
|
|
10
|
+
10:"static/chunks/103-976549d31902404e.js"
|
|
11
|
+
11:"static/chunks/app/processes/page-3fdebd2f98b52044.js"
|
|
12
|
+
12:I[2701,["944","$f","939","$2","103","$10","952","$11"],"Sidebar"]
|
|
13
|
+
13:"MobileNavigation"
|
|
14
|
+
14:I[9904,["944","$f","939","$2","103","$10","952","$11"],"$13"]
|
|
15
|
+
15:I[2394,["944","$f","939","$2","103","$10","952","$11"],"ThemeToggle"]
|
|
16
|
+
16:I[7339,["944","$f","939","$2","103","$10","952","$11"],"ProcessesView"]
|
|
17
|
+
17:I[484,[],"OutletBoundary"]
|
|
18
|
+
1a:"ViewportBoundary"
|
|
19
19
|
1b:I[484,[],"$1a"]
|
|
20
|
-
1c:
|
|
21
|
-
:
|
|
20
|
+
1c:"MetadataBoundary"
|
|
21
|
+
1d:I[484,[],"$1c"]
|
|
22
|
+
1e:I[6869,[],"IconMark"]
|
|
23
|
+
:HL["/_next/static/css/f5d3162842dcac31.css","style"]
|
|
22
24
|
9:X
|
|
23
25
|
c:X
|
|
24
26
|
c:C
|
|
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,["$","$
|
|
27
|
+
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"}],["$","div",null,{"className":"hidden md:flex","children":["$","$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":[["$","div",null,{"className":"flex min-w-0 items-center gap-2","children":[["$","$L14",null,{}],["$","h1",null,{"className":"truncate text-lg font-semibold tracking-tight","children":"Processes"}]]}],["$","div",null,{"className":"flex items-center gap-3","children":[null,["$","$L15",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":["$","$L16",null,{}]}],null,["$","$L17",null,{"children":["$","$e",null,{"name":"Next.MetadataOutlet","children":"$@18"}]}]]}],"p":"$@19","v":null,"s":"$9"}}]]
|
|
26
28
|
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/
|
|
28
|
-
|
|
29
|
+
0:{"t":{"t":{"s":"","h":80,"d":{"r":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/f5d3162842dcac31.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,["$","$L1b",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","$L1d",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"}],["$","$L1e","3",{}]]}]}],null]}],null]}],"p":"$@1f","v":null,"s":"$9"}},"a":"$@20","u":"$@21","b":"KBskG-P4uSZx1zfnYp1nL"}
|
|
30
|
+
18:null
|
|
29
31
|
9:300
|
|
30
|
-
|
|
32
|
+
21:true
|
|
31
33
|
9:C
|
|
32
|
-
|
|
34
|
+
20:0
|
|
33
35
|
b:"$undefined"
|
|
34
36
|
8:"$undefined"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
1f:"$undefined"
|
|
38
|
+
19:"$undefined"
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
"/alerts/page": "app/alerts/page.js",
|
|
6
6
|
"/connections/page": "app/connections/page.js",
|
|
7
7
|
"/administration/page": "app/administration/page.js",
|
|
8
|
+
"/history/page": "app/history/page.js",
|
|
8
9
|
"/login/page": "app/login/page.js",
|
|
9
10
|
"/page": "app/page.js",
|
|
10
|
-
"/
|
|
11
|
-
"/machines/[machineId]/page": "app/machines/[machineId]/page.js"
|
|
12
|
-
"/processes/page": "app/processes/page.js"
|
|
11
|
+
"/processes/page": "app/processes/page.js",
|
|
12
|
+
"/machines/[machineId]/page": "app/machines/[machineId]/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&&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
|
+
"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 touch-pan-y select-none",onPointerLeave:a=>{"mouse"===a.pointerType&&u.clear()},onPointerDown:a=>{if("mouse"===a.pointerType)return;a.currentTarget.setPointerCapture(a.pointerId);let b=v.current?.getBoundingClientRect();b&&u.inspect((0,i.yk)(a.clientX,b.left,b.width,l,m,.0075))},onPointerCancel:u.clear,onContextMenu:a=>a.preventDefault(),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:"Touch and drag horizontally to inspect readings. 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:`pointer-events-none absolute bottom-full mb-2 md:pointer-events-auto md:bottom-auto md:top-2 md:mb-0 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})}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.id=350,exports.ids=[350],exports.modules={104:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(65366).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},2116:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0});var d={default:function(){return p},useLinkStatus:function(){return r}};for(var e in d)Object.defineProperty(b,e,{enumerable:!0,get:d[e]});let f=c(24814),g=c(48249),h=f._(c(67484)),i=c(79925),j=c(30836),k=c(57272),l=c(30167),m=c(75729);c(52204);let n=c(78756);c(52836);let o=c(10881);function p(a){var b;let c,d,e,[f,p]=(0,h.useOptimistic)(n.IDLE_LINK_STATUS),r=(0,h.useRef)(null),{href:s,as:t,children:u,prefetch:v=null,passHref:w,replace:x,shallow:y,scroll:z,onClick:A,onMouseEnter:B,onTouchStart:C,legacyBehavior:D=!1,onNavigate:E,transitionTypes:F,ref:G,unstable_dynamicOnHover:H,...I}=a;c=u,D&&("string"==typeof c||"number"==typeof c)&&(c=(0,g.jsx)("a",{children:c}));let J=h.default.useContext(j.AppRouterContext),K=!1!==v,L=!1===v?"none":!0===v?"full":"auto",M="none"!==L?"auto"===L?o.FetchStrategy.PPR:o.FetchStrategy.Full:o.FetchStrategy.PPR,N="string"==typeof(b=t||s)?b:(0,i.formatUrl)(b);if(D){if(c?.$$typeof===Symbol.for("react.lazy"))throw Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag.");d=h.default.Children.only(c)}let O=D?d&&"object"==typeof d&&d.ref:G,P,Q=h.default.useCallback(a=>(null!==J&&(r.current=(0,n.mountLinkInstance)(a,N,J,M,K,p,P)),()=>{r.current&&((0,n.unmountLinkForCurrentNavigation)(r.current),r.current=null),(0,n.unmountPrefetchableInstance)(a)}),[K,N,J,M,p,P]),R={ref:(0,k.useMergedRef)(Q,O),onClick(a){D||"function"!=typeof A||A(a),D&&d.props&&"function"==typeof d.props.onClick&&d.props.onClick(a),!J||a.defaultPrevented||function(a="none"){}(L)},onMouseEnter(a){D||"function"!=typeof B||B(a),D&&d.props&&"function"==typeof d.props.onMouseEnter&&d.props.onMouseEnter(a),J&&K&&(0,n.onNavigationIntent)(a.currentTarget,!0===H)},onTouchStart:function(a){D||"function"!=typeof C||C(a),D&&d.props&&"function"==typeof d.props.onTouchStart&&d.props.onTouchStart(a),J&&K&&(0,n.onNavigationIntent)(a.currentTarget,!0===H)}};return(0,l.isAbsoluteUrl)(N)?R.href=N:D&&!w&&("a"!==d.type||"href"in d.props)||(R.href=(0,m.addBasePath)(N)),e=D?h.default.cloneElement(d,R):(0,g.jsx)("a",{...I,...R,children:c}),(0,g.jsx)(q.Provider,{value:f,children:e})}let q=(0,h.createContext)(n.IDLE_LINK_STATUS),r=()=>(0,h.useContext)(q);("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},8696:(a,b,c)=>{c.d(b,{D:()=>j,N:()=>k});var d=c(67484),e=(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){}},f=["light","dark"],g="(prefers-color-scheme: dark)",h=d.createContext(void 0),i={setTheme:a=>{},themes:[]},j=()=>{var a;return null!=(a=d.useContext(h))?a:i},k=a=>d.useContext(h)?d.createElement(d.Fragment,null,a.children):d.createElement(m,{...a}),l=["light","dark"],m=({forcedTheme:a,disableTransitionOnChange:b=!1,enableSystem:c=!0,enableColorScheme:e=!0,storageKey:i="theme",themes:j=l,defaultTheme:k=c?"system":"light",attribute:m="data-theme",value:r,children:s,nonce:t,scriptProps:u})=>{let[v,w]=d.useState(()=>o(i,k)),[x,y]=d.useState(()=>"system"===v?q():v),z=r?Object.values(r):j,A=d.useCallback(a=>{let d=a;if(!d)return;"system"===a&&c&&(d=q());let g=r?r[d]:d,h=b?p(t):null,i=document.documentElement,j=a=>{"class"===a?(i.classList.remove(...z),g&&i.classList.add(g)):a.startsWith("data-")&&(g?i.setAttribute(a,g):i.removeAttribute(a))};if(Array.isArray(m)?m.forEach(j):j(m),e){let a=f.includes(k)?k:null,b=f.includes(d)?d:a;i.style.colorScheme=b}null==h||h()},[t]),B=d.useCallback(a=>{let b="function"==typeof a?a(v):a;w(b);try{localStorage.setItem(i,b)}catch(a){}},[v]),C=d.useCallback(b=>{y(q(b)),"system"===v&&c&&!a&&A("system")},[v,a]);d.useEffect(()=>{let a=window.matchMedia(g);return a.addListener(C),C(a),()=>a.removeListener(C)},[C]),d.useEffect(()=>{let a=a=>{a.key===i&&(a.newValue?w(a.newValue):B(k))};return window.addEventListener("storage",a),()=>window.removeEventListener("storage",a)},[B]),d.useEffect(()=>{A(null!=a?a:v)},[a,v]);let D=d.useMemo(()=>({theme:v,setTheme:B,forcedTheme:a,resolvedTheme:"system"===v?x:v,themes:c?[...j,"system"]:j,systemTheme:c?x:void 0}),[v,B,a,x,c,j]);return d.createElement(h.Provider,{value:D},d.createElement(n,{forcedTheme:a,storageKey:i,attribute:m,enableSystem:c,enableColorScheme:e,defaultTheme:k,value:r,themes:j,nonce:t,scriptProps:u}),s)},n=d.memo(({forcedTheme:a,storageKey:b,attribute:c,enableSystem:f,enableColorScheme:g,defaultTheme:h,value:i,themes:j,nonce:k,scriptProps:l})=>{let m=JSON.stringify([c,b,h,a,j,i,f,g]).slice(1,-1);return d.createElement("script",{...l,suppressHydrationWarning:!0,nonce:k,dangerouslySetInnerHTML:{__html:`(${e.toString()})(${m})`}})}),o=(a,b)=>{},p=a=>{let b=document.createElement("style");return a&&b.setAttribute("nonce",a),b.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(b),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(b)},1)}},q=a=>(a||(a=window.matchMedia(g)),a.matches?"dark":"light")},12421:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(65366).A)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},19099:(a,b,c)=>{var d=c(54839);c.o(d,"usePathname")&&c.d(b,{usePathname:function(){return d.usePathname}}),c.o(d,"useRouter")&&c.d(b,{useRouter:function(){return d.useRouter}}),c.o(d,"useSearchParams")&&c.d(b,{useSearchParams:function(){return d.useSearchParams}})},19289:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(65366).A)("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]])},27346:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(65366).A)("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]])},31742:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(65366).A)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},44999:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(65366).A)("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]])},49187:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(65366).A)("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},50132:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(65366).A)("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]])},51589:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(65366).A)("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]])},51872:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(65366).A)("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]])},52836:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"isLocalURL",{enumerable:!0,get:function(){return f}});let d=c(30167),e=c(71742);function f(a){if(!(0,d.isAbsoluteUrl)(a))return!0;try{let b=(0,d.getLocationOrigin)(),c=new URL(a,b);return c.origin===b&&(0,e.hasBasePath)(c.pathname)}catch(a){return!1}}},55091:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"default",{enumerable:!0,get:function(){return f}});let d=c(5735),e=c(22675);function f(){return(0,d.jsx)(e.HTTPAccessErrorFallback,{status:404,message:"This page could not be found."})}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},57272:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"useMergedRef",{enumerable:!0,get:function(){return e}});let d=c(67484);function e(a,b){let c=(0,d.useRef)(null),e=(0,d.useRef)(null);return(0,d.useCallback)(d=>{if(null===d){let a=c.current;a&&(c.current=null,a());let b=e.current;b&&(e.current=null,b())}else a&&(c.current=f(a,d)),b&&(e.current=f(b,d))},[a,b])}function f(a,b){if("function"!=typeof a)return a.current=b,()=>{a.current=null};{let c=a(b);return"function"==typeof c?c:()=>a(null)}}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},65366:(a,b,c)=>{c.d(b,{A:()=>h});var d=c(67484);let e=(...a)=>a.filter((a,b,c)=>!!a&&""!==a.trim()&&c.indexOf(a)===b).join(" ").trim();var f={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let g=(0,d.forwardRef)(({color:a="currentColor",size:b=24,strokeWidth:c=2,absoluteStrokeWidth:g,className:h="",children:i,iconNode:j,...k},l)=>(0,d.createElement)("svg",{ref:l,...f,width:b,height:b,stroke:a,strokeWidth:g?24*Number(c)/Number(b):c,className:e("lucide",h),...k},[...j.map(([a,b])=>(0,d.createElement)(a,b)),...Array.isArray(i)?i:[i]])),h=(a,b)=>{let c=(0,d.forwardRef)(({className:c,...f},h)=>(0,d.createElement)(g,{ref:h,iconNode:b,className:e(`lucide-${a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,c),...f}));return c.displayName=`${a}`,c}},71e3:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"addPathPrefix",{enumerable:!0,get:function(){return e}});let d=c(10571);function e(a,b){if(!a.startsWith("/")||!b)return a;let{pathname:c,query:e,hash:f}=(0,d.parsePath)(a);return`${b}${c}${e}${f}`}},71327:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(65366).A)("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},75729:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"addBasePath",{enumerable:!0,get:function(){return f}});let d=c(71e3),e=c(34956);function f(a,b){return(0,e.normalizePathTrailingSlash)((0,d.addPathPrefix)(a,""))}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},78607:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(65366).A)("Bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]])},79925:(a,b,c)=>{Object.defineProperty(b,"__esModule",{value:!0});var d={formatUrl:function(){return h},formatWithValidation:function(){return j},urlObjectKeys:function(){return i}};for(var e in d)Object.defineProperty(b,e,{enumerable:!0,get:d[e]});let f=c(24814)._(c(90485)),g=/https?|ftp|gopher|file/;function h(a){let{auth:b,hostname:c}=a,d=a.protocol||"",e=a.pathname||"",h=a.hash||"",i=a.query||"",j=!1;b=b?encodeURIComponent(b).replace(/%3A/i,":")+"@":"",a.host?j=b+a.host:c&&(j=b+(~c.indexOf(":")?`[${c}]`:c),a.port&&(j+=":"+a.port)),i&&"object"==typeof i&&(i=String(f.urlQueryToSearchParams(i)));let k=a.search||i&&`?${i}`||"";return d&&!d.endsWith(":")&&(d+=":"),a.slashes||(!d||g.test(d))&&!1!==j?(j="//"+(j||""),e&&"/"!==e[0]&&(e="/"+e)):j||(j=""),h&&"#"!==h[0]&&(h="#"+h),k&&"?"!==k[0]&&(k="?"+k),e=e.replace(/[?#]/g,encodeURIComponent),k=k.replace("#","%23"),`${d}${j}${e}${k}${h}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function j(a){return h(a)}},82437:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(65366).A)("Cable",[["path",{d:"M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1",key:"10bnsj"}],["path",{d:"M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9",key:"1eqmu1"}],["path",{d:"M21 21v-2h-4",key:"14zm7j"}],["path",{d:"M3 5h4V3",key:"z442eg"}],["path",{d:"M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3",key:"ebdjd7"}]])},89313:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(65366).A)("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},90162:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(65366).A)("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]])},93484:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(65366).A)("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]])}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";exports.id=364,exports.ids=[364],exports.modules={4155:(a,b,c)=>{c.d(b,{E:()=>r,x:()=>q});var d=c(48249),e=c(2116),f=c.n(e),g=c(31742),h=c(50132),i=c(49187),j=c(90606),k=c(93484),l=c(12421),m=c(22338),n=c(58910);function o(a){return(0,d.jsxs)("button",{type:"button",onClick:a.onClick,className:"inline-flex items-center gap-1.5 rounded-md border border-border px-3 py-1.5 text-xs text-foreground transition-colors hover:bg-card-strong",children:[(0,d.jsx)(g.A,{className:"h-3.5 w-3.5","aria-hidden":!0}),a.children]})}function p(a){return(0,d.jsx)(f(),{href:a.href,className:a.primary?"inline-flex items-center gap-1.5 rounded-md bg-accent px-3 py-1.5 text-xs font-medium text-accent-foreground transition-colors hover:bg-accent/90":"inline-flex items-center gap-1.5 rounded-md border border-border px-3 py-1.5 text-xs text-foreground transition-colors hover:bg-card-strong",children:a.children})}function q(){let{session:a,phase:b,retryConnection:c}=(0,n.M)();switch(a.kind){case"restoring":return(0,d.jsx)(m.Z,{title:"Checking session",className:"mx-auto my-12 max-w-md",children:(0,d.jsx)(m.p,{icon:h.A,note:"Checking your session…"})});case"restore-failed":return(0,d.jsxs)(m.Z,{title:"Hub unreachable",className:"mx-auto my-12 max-w-md",children:[(0,d.jsx)(m.p,{icon:i.A,note:"The hub is unreachable right now."}),(0,d.jsx)("div",{className:"flex justify-center",children:(0,d.jsx)(o,{onClick:c,children:"Check again"})})]});case"signed-out":if("expired"===b)return(0,d.jsxs)(m.Z,{title:"Session ended",className:"mx-auto my-12 max-w-md",children:[(0,d.jsx)(m.p,{icon:j.A,note:"Your session ended."}),(0,d.jsx)("div",{className:"flex justify-center",children:(0,d.jsx)(p,{href:"/login",primary:!0,children:"Sign in"})})]});return(0,d.jsxs)(m.Z,{title:"Sign in required",className:"mx-auto my-12 max-w-md",children:[(0,d.jsx)(m.p,{icon:h.A,note:"Sign in required."}),(0,d.jsx)("div",{className:"flex justify-center",children:(0,d.jsx)(p,{href:"/login",primary:!0,children:"Sign in"})})]});case"auth-unavailable":return(0,d.jsx)(m.Z,{title:"Sign-in unavailable",className:"mx-auto my-12 max-w-md",children:(0,d.jsx)(m.p,{icon:k.A,note:"Browser sign-in is not configured on this hub."})})}return"expired"===b?(0,d.jsxs)(m.Z,{title:"Session ended",className:"mx-auto my-12 max-w-md",children:[(0,d.jsx)(m.p,{icon:j.A,note:"Your session ended."}),(0,d.jsx)("div",{className:"flex justify-center",children:(0,d.jsx)(p,{href:"/login",primary:!0,children:"Sign in"})})]}):"no-permission"===b?(0,d.jsxs)(m.Z,{title:"No permission",className:"mx-auto my-12 max-w-md",children:[(0,d.jsx)(m.p,{icon:k.A,note:`You are signed in as ${a.user.username}, but this hub grants no machine view to this account.`}),(0,d.jsx)("div",{className:"flex justify-center",children:(0,d.jsx)(o,{onClick:c,children:"Check again"})})]}):null}function r(){let{phase:a,retryConnection:b}=(0,n.M)();return"reconnecting"!==a&&"disconnected"!==a&&"connecting"!==a?null:"connecting"===a?(0,d.jsxs)("div",{role:"status",className:"mb-5 flex items-center gap-2 rounded-lg border border-border bg-card px-4 py-2.5 text-xs text-muted-foreground",children:[(0,d.jsx)(g.A,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),"Connecting to the live feed — waiting for the first snapshot."]}):(0,d.jsxs)("div",{role:"status",className:"mb-5 flex flex-wrap items-center gap-x-3 gap-y-2 rounded-lg border border-border bg-card px-4 py-2.5 text-xs text-muted-foreground",children:[(0,d.jsx)(l.A,{className:"h-3.5 w-3.5 shrink-0 text-warn","aria-hidden":!0}),(0,d.jsxs)("span",{children:["Connection lost — values below are ",(0,d.jsx)("strong",{className:"font-medium text-foreground",children:"last known"}),", not live measurements","reconnecting"===a?" — retrying with backoff…":" — retries stopped."]}),"disconnected"===a?(0,d.jsx)(o,{onClick:b,children:"Retry now"}):null]})}},50280:(a,b,c)=>{c.d(b,{iL:()=>k,jB:()=>m,vw:()=>n});var d=c(48249),e=c(93224),f=c(22127);let g=2*Math.PI*70;function h(a){return Number.isFinite(a)?Math.min(100,Math.max(0,a)):0}function i(a){let{reason:b,ageLabel:c,center:e}=a;return(0,d.jsxs)("p",{className:e?"max-w-[16rem] text-center text-xs text-warn":"text-xs text-warn",children:["Unavailable — ",b,c?(0,d.jsxs)("span",{className:"text-muted-foreground",children:[" (last update ",c,")"]}):null]})}function j(a){let{reason:b,ageLabel:c}=a;return(0,d.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,d.jsx)("div",{role:"img","aria-label":`Unavailable — ${b}`,className:"flex h-40 w-40 shrink-0 items-center justify-center rounded-full border-[5px] border-dashed border-border",children:(0,d.jsx)("span",{className:"tnum text-xl font-semibold text-muted-foreground",children:"—"})}),(0,d.jsx)(i,{reason:b,ageLabel:c,center:!0})]})}function k(a){let{metricName:b,field:c,ageLabel:i,isHeld:k,thresholdMs:l}=a;if("unavailable"===c.out)return(0,d.jsx)(j,{reason:c.reason,ageLabel:i??null});if("absent"===c.out)return(0,d.jsx)(j,{reason:"No sample has arrived yet.",ageLabel:i??null});let m="stale"===c.out,n=h(c.value),o=g*(1-n/100),p=m?`${b} last known ${(0,e.l9)(n)}, stale`:`${b} ${(0,e.l9)(n)}`;return(0,d.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,d.jsxs)("svg",{role:"img","aria-label":p,viewBox:"0 0 160 160",className:"h-40 w-40 shrink-0",children:[(0,d.jsx)("circle",{cx:80,cy:80,r:70,fill:"none",stroke:"var(--border)",strokeWidth:8}),(0,d.jsx)("circle",{cx:80,cy:80,r:70,fill:"none",stroke:m?"var(--warn)":"var(--cpu)",strokeWidth:8,strokeLinecap:"round",strokeDasharray:g,strokeDashoffset:o,transform:"rotate(-90 80 80)"}),(0,d.jsx)("text",{x:"50%",y:m||k?"45%":"50%",dominantBaseline:"central",textAnchor:"middle",className:"fill-foreground text-xl font-semibold tnum",children:(0,e.l9)(n)}),m?(0,d.jsx)("text",{x:"50%",y:102,textAnchor:"middle",className:"fill-warn text-xs tnum",children:"last known"}):k?(0,d.jsx)("text",{x:"50%",y:102,textAnchor:"middle",className:"fill-muted-foreground text-xs tnum",children:"held"}):null]}),(0,d.jsx)("p",{className:"text-center text-xs text-muted-foreground",children:m?`Last known value — no update for over ${(0,e.$)(l??f.vz)}${i?` (${i})`:""}`:i??""})]})}function l(a){let{reason:b,ageLabel:c}=a;return(0,d.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,d.jsx)("div",{role:"img","aria-label":`Memory unavailable — ${b}`,className:"h-3 w-full max-w-64 rounded-full border border-dashed border-border"}),(0,d.jsx)(i,{reason:b,ageLabel:c})]})}function m(a){let{field:b,ageLabel:c,isHeld:g,thresholdMs:i}=a;if("unavailable"===b.out)return(0,d.jsx)(l,{reason:b.reason,ageLabel:c??null});if("absent"===b.out)return(0,d.jsx)(l,{reason:"No sample has arrived yet.",ageLabel:c??null});let j="stale"===b.out,k=b.totalBytes,m=b.usedBytes,o=k>0?h(m/k*100)/100:0,p=j?`Memory last known ${(0,e.z3)(m)} of ${(0,e.z3)(k)}, stale`:`Memory ${(0,e.z3)(m)} of ${(0,e.z3)(k)}`;return(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsx)("div",{role:"img","aria-label":p,className:"flex h-3 w-full max-w-64 items-stretch overflow-hidden rounded-full bg-card-strong",children:(0,d.jsx)("div",{className:"h-full rounded-full",style:{width:`${100*o}%`,backgroundColor:j?"var(--warn)":"var(--mem)",minWidth:k>0?void 0:0}})}),(0,d.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,d.jsx)("p",{className:"tnum text-sm",children:k>0?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"font-semibold",children:(0,e.z3)(m)}),(0,d.jsxs)("span",{className:"text-muted-foreground",children:[" of ",(0,e.z3)(k)]}),(0,d.jsxs)("span",{className:"text-muted-foreground",children:[" ","\xb7 ",(0,e.l9)(k>0?m/k*100:null)]})]}):(0,d.jsxs)("span",{className:"text-muted-foreground",children:[(0,e.z3)(m)," used — total size unavailable"]})}),j?(0,d.jsx)(n,{text:"last known",title:`No update for over ${(0,e.$)(i??f.vz)}`}):null,g&&!j?(0,d.jsx)(n,{text:"held",title:"Value kept while the connection is down"}):null]}),(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:j?`Retained from the last accepted sample${c?` (${c})`:""}.`:c??""})]})}function n(a){let{text:b,title:c}=a;return(0,d.jsx)("span",{title:c,className:"tnum shrink-0 rounded-full border border-border px-2 py-0.5 text-xs text-muted-foreground",children:b})}},90606:(a,b,c)=>{c.d(b,{A:()=>d});let d=(0,c(65366).A)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},99837:(a,b,c)=>{c.d(b,{B4:()=>o,CE:()=>k,V5:()=>i,YL:()=>n,Zf:()=>p,cH:()=>l,cy:()=>C,d5:()=>m,fp:()=>z,hL:()=>x,rn:()=>j,v4:()=>h});var d=c(93224);function e(a,b){return{state:"value",value:a,stale:b}}function f(a){return{state:"unavailable",reason:a}}function g(a){return{state:"absent",reason:a}}function h(a){let b=a.displayName?.trim();if(b)return b;let c=a.hostname?.trim();return c||a.machineId}function i(a){let b=new Set,c=[];for(let d of a.tags??[]){if("string"!=typeof d)continue;let a=d.trim();if(!(""===a||b.has(a.toLowerCase()))&&(b.add(a.toLowerCase()),c.push(a),c.length>=32))break}return c}function j(a,b){let c=b.trim().toLowerCase().split(/\s+/).filter(Boolean);return 0===c.length?[...a]:a.filter(a=>{let b=[h(a),a.hostname,a.machineId,a.collectorId,...i(a)].filter(a=>"string"==typeof a&&""!==a.trim()).join(" ").toLowerCase();return c.every(a=>b.includes(a))})}function k(a){return null!=a&&Number.isFinite(a)?`${(0,d.z3)(a)}/s`:"—"}function l(a){return null!=a&&Number.isFinite(a)?`${Math.round(a)} \xb0C`:"—"}function m(a){return null!=a&&Number.isFinite(a)?`${Math.round(a)} W`:"—"}function n(a){return null==a||!Number.isFinite(a)||a<0?"—":`${a<10?a.toFixed(2):a.toFixed(1)} ms`}function o(a){return null!=a&&Number.isFinite(a)?Math.round(a).toLocaleString():"—"}function p(a){return null!=a&&Number.isFinite(a)?`${Math.round(a)} Mb/s`:"—"}function q(a){let b=a.filter(a=>"supported"===a.telemetry);return b.some(a=>"ok"===a.state)&&b.some(a=>"ok"!==a.state)}let r="The collector has not reported this metric family to this hub.";function s(a){return a.metrics?.payload??null}function t(a){return"number"==typeof a&&Number.isFinite(a)?a:null}function u(a){let b=t(a);return null!==b&&b>=0?b:null}function v(a,b,c,d,h=!0){if(null===a||"object"!=typeof a)return g(d);if("unavailable"===a.status)return f(("string"==typeof a.reason?a.reason.trim():"")||"This metric family is unavailable.");if("ok"!==a.status)return g(d);let i=(h?u:t)(a[b]);return null===i?f("Not reported for this sample."):e(i,c)}function w(a){let b=s(a);return null!==b?"ok"===b.disks.status?{state:"available"}:{state:"unavailable",reason:b.disks.reason}:{state:"absent",reason:r}}function x(a,b){var c;let j,k,l,m,n,o,p,t,x,y=(0,d.vj)(a,b),z="stale"===y,A=function(a,b){let c=a.inventory?.gpus??[],d=s(a),e=d?.gpus.status==="ok"?d.gpus.devices:[],f=d?.gpus.status==="unavailable"?d.gpus.reason:null,g=new Map(e.map(a=>[a.id,a])),h=new Map(c.map(a=>[a.id,a])),i=[];for(let a of c)i.push(a.id);for(let a of e)h.has(a.id)||i.push(a.id);let j=[];for(let a of i){let c=h.get(a),d=g.get(a),e={id:a,name:c?.name??a.replace(/^gpu:/,""),vendor:c?.vendor??"other",pciBusId:c?.pciBusId??null,telemetry:c?.telemetry??"supported",stale:b};if(d?.status==="ok"){j.push({...e,state:"ok",reason:null,utilizationPercent:d.utilizationPercent,memoryUsedBytes:d.memoryUsedBytes,memoryTotalBytes:d.memoryTotalBytes??c?.memoryTotalBytes??null,temperatureC:d.temperatureC,powerWatts:d.powerWatts});continue}if(d?.status==="unavailable"){j.push({...e,state:"unavailable",reason:d.reason,utilizationPercent:null,memoryUsedBytes:null,memoryTotalBytes:c?.memoryTotalBytes??null,temperatureC:null,powerWatts:null});continue}if(c?.telemetry==="unsupported"){j.push({...e,state:"unsupported",reason:c.reason??"No supported telemetry for this adapter.",utilizationPercent:null,memoryUsedBytes:null,memoryTotalBytes:null,temperatureC:null,powerWatts:null});continue}j.push({...e,state:"unavailable",reason:f??"No current reading for this device.",utilizationPercent:null,memoryUsedBytes:null,memoryTotalBytes:c?.memoryTotalBytes??null,temperatureC:null,powerWatts:null})}return j}(a,z);return{displayName:h(a),tags:i(a),freshness:y,thresholdMs:(0,d.Cj)(a.expectedIntervalMs),stale:z,cpu:{total:void 0===(l=a.metrics?.payload.cpu)?g("No CPU reading has been received yet."):"ok"===l.status?e(l.usagePercent,z):f(l.reason),perCore:void 0===(m=a.metrics?.payload.cpu)?g("No CPU reading has been received yet; per-core values are unknown."):"ok"===m.status?e([...m.perCore],z):f(m.reason)},memory:void 0===(n=a.metrics?.payload.memory)?g("No memory reading has been received yet."):"ok"===n.status?e({usedBytes:n.usedBytes,totalBytes:n.totalBytes},z):f(n.reason),swap:void 0===(o=a.metrics?.payload.swap)?g("No swap reading has been received yet."):"ok"===o.status?e({usedBytes:o.usedBytes,totalBytes:o.totalBytes},z):f(o.reason),bottlenecks:(p=a.metrics?.payload.cpu,t=a.metrics?.payload.memory,x=a.metrics?.payload.disks,{cpuTemperature:v(p,"temperatureC",z,"No CPU reading has been received yet.",!1),cpuPower:v(p,"powerWatts",z,"No CPU reading has been received yet."),cpuIowait:v(p,"iowaitPercent",z,"No CPU reading has been received yet."),cpuPressure:v(p,"pressureSomePercent",z,"No CPU reading has been received yet."),memoryPressureSome:v(t,"pressureSomePercent",z,"No memory reading has been received yet."),memoryPressureFull:v(t,"pressureFullPercent",z,"No memory reading has been received yet."),ioPressureSome:v(x,"pressureSomePercent",z,"No disk reading has been received yet."),ioPressureFull:v(x,"pressureFullPercent",z,"No disk reading has been received yet.")}),gpus:{family:null!==(j=s(c=a))?"ok"===j.gpus.status?{state:"available"}:{state:"unavailable",reason:j.gpus.reason}:(c.inventory?.gpus.length??0)>0?{state:"absent",reason:"No GPU readings have been received yet."}:{state:"absent",reason:r+" GPU telemetry is unknown until inventory or a reading arrives."},cards:A,partial:q(A)},filesystems:{family:w(a),items:function(a,b){let c=a.inventory?.filesystems??[],d=s(a),e=d?.disks.status==="ok"?d.disks.filesystems:[],f=d?.disks.status==="unavailable"?d.disks.reason:null,g=new Map(e.map(a=>[a.id,a])),h=new Map(c.map(a=>[a.id,a])),i=[];for(let a of c)i.push(a.id);for(let a of e)h.has(a.id)||i.push(a.id);return i.map(a=>{let c=h.get(a),e=g.get(a),i={id:a,mountPoint:c?.mountPoint??a.replace(/^fs:/,""),device:c?.device??"",fsType:c?.fsType??"unknown",totalBytes:c?.totalBytes??null,inodesUsed:null,inodesTotal:null,stale:b};return e?.status==="ok"?{...i,usedBytes:e.usedBytes,totalBytes:e.totalBytes,inodesUsed:u(e.inodesUsed),inodesTotal:u(e.inodesTotal),state:"ok",reason:null}:e?.status==="unavailable"?{...i,usedBytes:null,state:"unavailable",reason:e.reason}:null!==f?{...i,usedBytes:null,state:"unavailable",reason:f}:{...i,usedBytes:null,state:"inventory",reason:null===d?r:"No current usage reading for this filesystem."}})}(a,z)},disks:{family:w(a),items:function(a,b){let c=a.inventory?.disks??[],d=s(a),e=d?.disks.status==="ok"?d.disks.devices:[],f=d?.disks.status==="unavailable"?d.disks.reason:null,g=new Map(e.map(a=>[a.id,a])),h=new Map(c.map(a=>[a.id,a])),i=[];for(let a of c)i.push(a.id);for(let a of e)h.has(a.id)||i.push(a.id);return i.map(a=>{let c=h.get(a),e=g.get(a),i={id:a,name:c?.name??a.replace(/^disk:/,""),model:c?.model??null,rotational:c?.rotational??null,sizeBytes:c?.sizeBytes??null,readLatencyMs:null,writeLatencyMs:null,ioUtilizationPercent:null,stale:b};return e?.status==="ok"?{...i,state:"ok",reason:null,readBytesPerSec:e.readBytesPerSec,writeBytesPerSec:e.writeBytesPerSec,readLatencyMs:u(e.readLatencyMs),writeLatencyMs:u(e.writeLatencyMs),ioUtilizationPercent:u(e.ioUtilizationPercent)}:e?.status==="unavailable"?{...i,state:"unavailable",reason:e.reason,readBytesPerSec:null,writeBytesPerSec:null}:null!==f?{...i,state:"unavailable",reason:f,readBytesPerSec:null,writeBytesPerSec:null}:{...i,state:"inventory",reason:null===d?r:"No current I/O reading for this device.",readBytesPerSec:null,writeBytesPerSec:null}})}(a,z)},network:{family:null!==(k=s(a))?"ok"===k.network.status?{state:"available"}:{state:"unavailable",reason:k.network.reason}:{state:"absent",reason:r},items:function(a,b){let c=a.inventory?.network??[],d=s(a),e=d?.network.status==="ok"?d.network.interfaces:[],f=d?.network.status==="unavailable"?d.network.reason:null,g=new Map(e.map(a=>[a.id,a])),h=new Map(c.map(a=>[a.id,a])),i=[];for(let a of c)i.push(a.id);for(let a of e)h.has(a.id)||i.push(a.id);return i.map(a=>{let c=h.get(a),e=g.get(a),i={id:a,name:c?.name??a.replace(/^net:/,""),mac:c?.mac??null,addresses:c?.addresses??[],virtual:c?.virtual??!1,linkState:c?.state??"unknown",speedMbps:c?.speedMbps??null,stale:b};return e?.status==="ok"?{...i,state:"ok",reason:null,rxBytesPerSec:e.rxBytesPerSec,txBytesPerSec:e.txBytesPerSec}:e?.status==="unavailable"?{...i,state:"unavailable",reason:e.reason,rxBytesPerSec:null,txBytesPerSec:null}:null!==f?{...i,state:"unavailable",reason:f,rxBytesPerSec:null,txBytesPerSec:null}:{...i,state:"inventory",reason:null===d?r:"No current rate reading for this interface.",rxBytesPerSec:null,txBytesPerSec:null}})}(a,z)}}}function y(a){if(0===a.length||a.some(a=>null===a))return null;let b=0;for(let c of a)b+=c;return b}function z(a,b){let c,d,e,f,g,h,i=x(a,b),j=i.gpus.cards,k=0===j.length?null:(e=(d=(c=j.filter(a=>"supported"===a.telemetry)).filter(a=>"ok"===a.state)).map(a=>a.utilizationPercent).filter(a=>null!==a),f=y(c.map(a=>a.memoryUsedBytes)),g=y(c.map(a=>a.memoryTotalBytes)),h=0===d.length?"unavailable"===i.gpus.family.state||"absent"===i.gpus.family.state?i.gpus.family.reason:0===c.length?"No telemetry-supported GPU was reported.":"No current GPU reading.":null,{count:j.length,supportedCount:c.length,okCount:d.length,partial:q(j),maxUtilizationPercent:0===e.length?null:Math.max(...e),memoryUsedBytes:f,memoryTotalBytes:g,stale:i.stale,reason:h}),l=i.filesystems.items.filter(a=>"ok"===a.state&&null!==a.usedBytes&&null!==a.totalBytes&&a.totalBytes>0).map(a=>a.usedBytes/a.totalBytes*100),m=0===i.filesystems.items.length?null:{maxUsedPercent:0===l.length?null:Math.max(...l),stale:i.stale,reason:0===l.length?"available"===i.filesystems.family.state?"No current filesystem usage reading.":i.filesystems.family.reason:null},n=i.network.items.filter(a=>"ok"===a.state&&null!==a.rxBytesPerSec&&null!==a.txBytesPerSec),o=0===i.network.items.length?null:{rxBytesPerSec:n.reduce((a,b)=>a+b.rxBytesPerSec,0),txBytesPerSec:n.reduce((a,b)=>a+b.txBytesPerSec,0),stale:i.stale,reason:0===n.length?"available"===i.network.family.state?"No current interface rate reading.":i.network.family.reason:null};return{cpu:i.cpu.total,memory:i.memory,gpu:k,disk:m,network:o}}let A=["cpu","memory","swap","gpus","disks","network","processes"],B={cpu:"CPU",memory:"Memory",swap:"Swap",gpus:"GPUs",disks:"Disks",network:"Network",processes:"Processes"};function C(a,b){return a.map(a=>{var c;return{machineId:a.machineId,name:h(a),collectorId:a.collectorId,connected:a.connected,cadenceMs:a.expectedIntervalMs??null,thresholdMs:(0,d.Cj)(a.expectedIntervalMs),lastReceivedAt:a.lastReceivedAt,freshness:(0,d.vj)(a,b),delivery:a.delivery?.delivery??null,deliveryCapturedAt:a.delivery?.capturedAt??null,failures:a.delivery?.failures??[],capabilities:void 0===(c=a.inventory)?null:A.map(a=>{let b=c.capabilities[a];return{key:a,label:B[a],status:b.status,reason:b.reason??null}})}})}}};
|