@sleep2agi/agent-network-dashboard 0.4.6-preview.330 → 0.4.6-preview.332
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/build-manifest.json +3 -3
- package/.next/diagnostics/route-bundle-stats.json +4 -4
- package/.next/fallback-build-manifest.json +3 -3
- 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/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/admin.html +1 -1
- package/.next/server/app/admin.rsc +1 -1
- package/.next/server/app/admin.segments/_full.segment.rsc +1 -1
- package/.next/server/app/admin.segments/_head.segment.rsc +1 -1
- package/.next/server/app/admin.segments/_index.segment.rsc +1 -1
- package/.next/server/app/admin.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/admin.segments/admin/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/admin.segments/admin.segment.rsc +1 -1
- package/.next/server/app/index.html +2 -2
- package/.next/server/app/index.rsc +2 -2
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +2 -2
- 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/_head.segment.rsc +1 -1
- package/.next/server/app/login.segments/_index.segment.rsc +1 -1
- package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/server/app/logs.html +1 -1
- package/.next/server/app/logs.rsc +1 -1
- package/.next/server/app/logs.segments/_full.segment.rsc +1 -1
- package/.next/server/app/logs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/logs.segments/_index.segment.rsc +1 -1
- package/.next/server/app/logs.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/logs.segments/logs/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/logs.segments/logs.segment.rsc +1 -1
- package/.next/server/app/messages.html +1 -1
- package/.next/server/app/messages.rsc +1 -1
- package/.next/server/app/messages.segments/_full.segment.rsc +1 -1
- package/.next/server/app/messages.segments/_head.segment.rsc +1 -1
- package/.next/server/app/messages.segments/_index.segment.rsc +1 -1
- package/.next/server/app/messages.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/messages.segments/messages/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/messages.segments/messages.segment.rsc +1 -1
- package/.next/server/app/node.html +1 -1
- package/.next/server/app/node.rsc +1 -1
- package/.next/server/app/node.segments/_full.segment.rsc +1 -1
- package/.next/server/app/node.segments/_head.segment.rsc +1 -1
- package/.next/server/app/node.segments/_index.segment.rsc +1 -1
- package/.next/server/app/node.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/node.segments/node/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/node.segments/node.segment.rsc +1 -1
- package/.next/server/app/nodes.html +1 -1
- package/.next/server/app/nodes.rsc +1 -1
- package/.next/server/app/nodes.segments/_full.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/_head.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/_index.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/nodes/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/nodes.segments/nodes.segment.rsc +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/server-logs.html +1 -1
- package/.next/server/app/server-logs.rsc +1 -1
- package/.next/server/app/server-logs.segments/_full.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/_index.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/server-logs/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/server-logs.segments/server-logs.segment.rsc +1 -1
- package/.next/server/app/settings/networks.html +1 -1
- package/.next/server/app/settings/networks.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_full.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_index.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings/networks/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings/networks.segment.rsc +1 -1
- package/.next/server/app/settings/networks.segments/settings.segment.rsc +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/tokens.html +1 -1
- package/.next/server/app/settings/tokens.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_full.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_index.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings/tokens/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings/tokens.segment.rsc +1 -1
- package/.next/server/app/settings/tokens.segments/settings.segment.rsc +1 -1
- package/.next/server/app/settings.html +2 -2
- package/.next/server/app/settings.rsc +2 -2
- package/.next/server/app/settings.segments/_full.segment.rsc +2 -2
- package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_index.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/.next/server/app/tasks.html +1 -1
- package/.next/server/app/tasks.rsc +1 -1
- package/.next/server/app/tasks.segments/_full.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/_head.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/_index.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/tasks/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/tasks.segments/tasks.segment.rsc +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js +2 -2
- package/.next/server/chunks/ssr/agent-network-dashboard_09kk21a._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_01jhlxz._.js.map +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js +1 -1
- package/.next/server/chunks/ssr/agent-network-dashboard_app_09d29my._.js.map +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/{01lnh531iq52c.js → 0_e7lmzh87xp3.js} +4 -4
- package/.next/static/chunks/{07mk7c3zr0q8e.js → 0mpa-fgyi2k78.js} +1 -1
- package/.next/static/chunks/{1313g927paj0g.js → 0nlhul7k4hwil.js} +1 -1
- package/.next/trace +2 -2
- package/.next/trace-build +1 -1
- package/app/components/ServersDrawer.tsx +108 -0
- package/app/components/TopoGraph.tsx +4 -4
- package/docs/rfc/v0.10.0-hero3-dashboard-upgrade.md +230 -0
- package/package.json +1 -1
- package/scripts/topo-chrome-active-weight-test.mjs +104 -0
- package/scripts/topo-chrome-inactive-color-test.mjs +90 -0
- /package/.next/static/{ye4-_QI1pFromk7mijSAv → hfSU1i7vzNQ20f_ftGrx-}/_buildManifest.js +0 -0
- /package/.next/static/{ye4-_QI1pFromk7mijSAv → hfSU1i7vzNQ20f_ftGrx-}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{ye4-_QI1pFromk7mijSAv → hfSU1i7vzNQ20f_ftGrx-}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,59276,e=>{"use strict";var s=e.i(12629),a=e.i(11449);let t=async e=>{let s=await fetch(e);if(401===s.status)throw window.location.assign("/login"),Error("unauthorized");return s.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function n(e,s){if(!s)return e;let a=e.includes("?")?"&":"?";return`${e}${a}network_id=${encodeURIComponent(s)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,s.default)("/api/anet/config",t,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:a}=(0,s.default)("/api/hub/health",t,r);return{health:e||null,error:a}},"useLicense",0,function(){let{data:e,error:a}=(0,s.default)("/api/hub/license",t,{refreshInterval:6e4});return{license:e?.ok?e:null,error:a}},"useMessages",0,function(e=100){let{networkId:l}=(0,a.useNetworkId)(),{data:i,error:c,isLoading:d}=(0,s.default)(n(`/api/hub/messages?limit=${e}`,l),t,r);return{messages:i?.messages||[],error:c,isLoading:d}},"useSessions",0,function(){let{networkId:e}=(0,a.useNetworkId)(),{data:l,error:i,isLoading:c}=(0,s.default)(n("/api/hub/status",e),t,r);return{sessions:l?.sessions||[],hint:l?._hint,error:i,isLoading:c}},"useStats",0,function(){let{networkId:e}=(0,a.useNetworkId)(),{data:l,error:i}=(0,s.default)(n("/api/hub/stats",e),t,r);return{stats:l?.ok?l:null,error:i}},"useTasks",0,function(e){let{networkId:l}=(0,a.useNetworkId)(),i=new URLSearchParams({limit:"100",...e}).toString(),{data:c,error:d,isLoading:o}=(0,s.default)(n(`/api/hub/tasks?${i}`,l),t,r);return{tasks:c?.tasks||[],count:c?.count??0,source:c?.source,error:d,isLoading:o}}])},70286,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.4.6-preview.330"],70286)},65610,e=>{"use strict";var s=e.i(22381),a=e.i(23910),t=e.i(56839),r=e.i(59276),n=e.i(70286);e.s(["default",0,function(){let{config:e}=(0,r.useAnetConfig)(),{health:l}=(0,r.useHealth)(),{license:i}=(0,r.useLicense)(),[c,d]=(0,a.useState)(""),[o,x]=(0,a.useState)(""),[m,h]=(0,a.useState)(""),[g,u]=(0,a.useState)(""),[p,N]=(0,a.useState)(""),b="flex flex-col gap-1 sm:flex-row sm:items-start sm:justify-between",j="break-all sm:max-w-[320px] sm:text-right";return(0,s.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-white mb-3 lg:ml-0 ml-10",children:"Settings"}),(0,s.jsx)("nav",{className:"mb-8 flex flex-wrap gap-1 text-xs",children:[{href:"#connection",label:"Connection"},{href:"#account",label:"Account"},{href:"#resources",label:"Resources"}].map(e=>(0,s.jsx)("a",{href:e.href,className:"rounded-md px-2.5 py-1 text-gray-500 hover:text-cyan-300 hover:bg-cyan-500/10 transition-colors",children:e.label},e.href))}),(0,s.jsxs)("div",{className:"max-w-2xl space-y-10",children:[(0,s.jsxs)("div",{id:"connection",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Connection"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"CommHub Connection"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500 shrink-0",children:"Hub URL"}),(0,s.jsx)("span",{className:`text-cyan-300 ${j}`,children:e?.hub||"not configured"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Config Source"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:e?.source==="file"?"Local file (~/.anet/config.json)":e?.source==="runtime-env"?"Vercel env vars":"Missing"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Auth Token"}),(0,s.jsx)("span",{className:`${e?.tokenConfigured?"text-green-400":"text-red-400"} ${j}`,children:e?.tokenConfigured?`Configured (${e.tokenPreview})`:"Not configured"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Server Auth"}),(0,s.jsx)("span",{className:`${l?.auth==="enabled"?"text-green-400":"text-yellow-400"} sm:text-right`,children:l?.auth||"--"})]}),e?.error&&(0,s.jsx)("div",{className:"border-t border-[#2a2a4a] pt-3 text-xs text-gray-600",children:e.error})]})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Server Info"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.version||"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Sessions"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.sessions??"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsxs)("span",{className:"text-gray-500",children:["SSE streams ",(0,s.jsx)("span",{className:"text-gray-600",children:"· server"})]}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.sse_connections??"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Uptime"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.uptime?`${Math.floor(l.uptime/3600)}h ${Math.floor(l.uptime%3600/60)}m`:"--"})]})]})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Dashboard"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,s.jsx)("span",{className:`text-gray-300 font-mono ${j}`,title:"From package.json @sleep2agi/agent-network-dashboard",children:n.DASHBOARD_VERSION})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Data Layer"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:"SWR (5s refresh, 3s dedup)"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Pages"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:"Overview, Tasks, Nodes, Messages, Networks, Audit, Server Logs, Admin, Settings"})]})]})]})]}),(0,s.jsxs)("div",{id:"account",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Account"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsxs)("h2",{className:"text-sm font-semibold text-gray-300 mb-4 flex items-center gap-2",children:["License",i?.license&&(0,s.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-[10px] font-medium px-2 py-0.5 rounded-full border ${"pro"===i.license.type?"text-green-300 bg-green-500/10 border-green-500/30":i.license.days_left<=7?"text-red-300 bg-red-500/10 border-red-500/30":"text-amber-300 bg-amber-500/10 border-amber-500/30"}`,children:[(0,s.jsx)("span",{"aria-hidden":!0,className:"w-1.5 h-1.5 rounded-full bg-current"}),i.license.type,i.license.days_left?` \xb7 ${i.license.days_left}d left`:""]})]}),i?.license?(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[i.license.days_left<=7&&(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-red-400 font-medium",children:"⚠ Expiring soon"}),(0,s.jsxs)("span",{className:"text-red-400",children:[i.license.days_left," days left"]})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Expires"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.license.expires_at})]}),i.limits&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Max Agents"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_agents})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Max Networks"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_networks})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Tasks/Day"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_tasks_day})]})]}),(0,s.jsxs)("div",{className:"pt-3 border-t border-[#2a2a4a]",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{type:"text",value:c,onChange:e=>d(e.target.value),placeholder:"anet-XXXX-XXXX-XXXX-XXXX",className:"flex-1 bg-[#0a0a15] border border-[#2a2a4a] rounded px-3 py-2 text-xs text-white placeholder-gray-600 focus:outline-none"}),(0,s.jsx)("button",{onClick:async()=>{if(!c.trim())return;let e=await fetch("/api/hub/license",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:c})}),s=await e.json();x(s.ok?`Activated: ${s.type}`:`Failed: ${s.error}`),s.ok&&d(""),setTimeout(()=>x(""),5e3)},className:"px-3 py-2 bg-cyan-600 hover:bg-cyan-500 text-white text-xs rounded transition-colors",children:"Activate"})]}),o&&(0,s.jsx)("div",{className:`mt-2 text-xs ${o.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:o})]})]}):(0,s.jsx)("div",{className:"text-xs text-gray-600",children:"License info not available"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Change Password"}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("input",{type:"password",value:m,onChange:e=>h(e.target.value),placeholder:"Current password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("input",{type:"password",value:g,onChange:e=>u(e.target.value),placeholder:"New password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("button",{onClick:async()=>{if(!m||!g)return;let e=sessionStorage.getItem("anet_v3_auth");if(!e)return void N("Not logged in with V3 auth");let{token:s}=JSON.parse(e),a=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"change_password",token:s,current_password:m,new_password:g})}),t=await a.json();if(N(t.ok?"Password changed":`Failed: ${t.error}`),t.ok){if(t.token){let s=JSON.parse(e);sessionStorage.setItem("anet_v3_auth",JSON.stringify({...s,token:t.token}))}h(""),u("")}setTimeout(()=>N(""),5e3)},disabled:!m||!g,className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Change Password"})]}),p&&(0,s.jsx)("div",{className:`mt-2 text-xs ${p.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:p})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Sign out"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Signing out clears your dashboard session cookie. You'll return to the login page."}),(0,s.jsx)("button",{onClick:async()=>{await fetch("/api/auth/logout",{method:"POST"}).catch(()=>{}),window.location.assign("/login")},className:"px-4 py-2 bg-transparent hover:bg-[#1a1a2a] text-gray-300 text-sm rounded-lg border border-[#2a2a4a] hover:border-[#3a3a5a] transition-colors",children:"Sign out"})]})]}),(0,s.jsxs)("div",{id:"resources",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Resources"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,s.jsxs)(t.default,{href:"/settings/tokens",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"API Tokens"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create and manage tokens for CLI access."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]}),(0,s.jsxs)(t.default,{href:"/settings/networks",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Networks"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create, manage, and delete agent networks."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]})]})]})]})]})}])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,59276,e=>{"use strict";var s=e.i(12629),a=e.i(11449);let t=async e=>{let s=await fetch(e);if(401===s.status)throw window.location.assign("/login"),Error("unauthorized");return s.json()},r={refreshInterval:5e3,dedupingInterval:3e3};function n(e,s){if(!s)return e;let a=e.includes("?")?"&":"?";return`${e}${a}network_id=${encodeURIComponent(s)}`}e.s(["useAnetConfig",0,function(){let{data:e}=(0,s.default)("/api/anet/config",t,{refreshInterval:3e4});return{config:e||null}},"useHealth",0,function(){let{data:e,error:a}=(0,s.default)("/api/hub/health",t,r);return{health:e||null,error:a}},"useLicense",0,function(){let{data:e,error:a}=(0,s.default)("/api/hub/license",t,{refreshInterval:6e4});return{license:e?.ok?e:null,error:a}},"useMessages",0,function(e=100){let{networkId:l}=(0,a.useNetworkId)(),{data:i,error:c,isLoading:d}=(0,s.default)(n(`/api/hub/messages?limit=${e}`,l),t,r);return{messages:i?.messages||[],error:c,isLoading:d}},"useSessions",0,function(){let{networkId:e}=(0,a.useNetworkId)(),{data:l,error:i,isLoading:c}=(0,s.default)(n("/api/hub/status",e),t,r);return{sessions:l?.sessions||[],hint:l?._hint,error:i,isLoading:c}},"useStats",0,function(){let{networkId:e}=(0,a.useNetworkId)(),{data:l,error:i}=(0,s.default)(n("/api/hub/stats",e),t,r);return{stats:l?.ok?l:null,error:i}},"useTasks",0,function(e){let{networkId:l}=(0,a.useNetworkId)(),i=new URLSearchParams({limit:"100",...e}).toString(),{data:c,error:d,isLoading:o}=(0,s.default)(n(`/api/hub/tasks?${i}`,l),t,r);return{tasks:c?.tasks||[],count:c?.count??0,source:c?.source,error:d,isLoading:o}}])},70286,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.4.6-preview.331"],70286)},65610,e=>{"use strict";var s=e.i(22381),a=e.i(23910),t=e.i(56839),r=e.i(59276),n=e.i(70286);e.s(["default",0,function(){let{config:e}=(0,r.useAnetConfig)(),{health:l}=(0,r.useHealth)(),{license:i}=(0,r.useLicense)(),[c,d]=(0,a.useState)(""),[o,x]=(0,a.useState)(""),[m,h]=(0,a.useState)(""),[g,u]=(0,a.useState)(""),[p,N]=(0,a.useState)(""),b="flex flex-col gap-1 sm:flex-row sm:items-start sm:justify-between",j="break-all sm:max-w-[320px] sm:text-right";return(0,s.jsxs)("div",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 p-4 sm:p-6 font-mono",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-white mb-3 lg:ml-0 ml-10",children:"Settings"}),(0,s.jsx)("nav",{className:"mb-8 flex flex-wrap gap-1 text-xs",children:[{href:"#connection",label:"Connection"},{href:"#account",label:"Account"},{href:"#resources",label:"Resources"}].map(e=>(0,s.jsx)("a",{href:e.href,className:"rounded-md px-2.5 py-1 text-gray-500 hover:text-cyan-300 hover:bg-cyan-500/10 transition-colors",children:e.label},e.href))}),(0,s.jsxs)("div",{className:"max-w-2xl space-y-10",children:[(0,s.jsxs)("div",{id:"connection",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Connection"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"CommHub Connection"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500 shrink-0",children:"Hub URL"}),(0,s.jsx)("span",{className:`text-cyan-300 ${j}`,children:e?.hub||"not configured"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Config Source"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:e?.source==="file"?"Local file (~/.anet/config.json)":e?.source==="runtime-env"?"Vercel env vars":"Missing"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Auth Token"}),(0,s.jsx)("span",{className:`${e?.tokenConfigured?"text-green-400":"text-red-400"} ${j}`,children:e?.tokenConfigured?`Configured (${e.tokenPreview})`:"Not configured"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Server Auth"}),(0,s.jsx)("span",{className:`${l?.auth==="enabled"?"text-green-400":"text-yellow-400"} sm:text-right`,children:l?.auth||"--"})]}),e?.error&&(0,s.jsx)("div",{className:"border-t border-[#2a2a4a] pt-3 text-xs text-gray-600",children:e.error})]})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Server Info"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.version||"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Sessions"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.sessions??"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsxs)("span",{className:"text-gray-500",children:["SSE streams ",(0,s.jsx)("span",{className:"text-gray-600",children:"· server"})]}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.sse_connections??"--"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Uptime"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:l?.uptime?`${Math.floor(l.uptime/3600)}h ${Math.floor(l.uptime%3600/60)}m`:"--"})]})]})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Dashboard"}),(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Version"}),(0,s.jsx)("span",{className:`text-gray-300 font-mono ${j}`,title:"From package.json @sleep2agi/agent-network-dashboard",children:n.DASHBOARD_VERSION})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Data Layer"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:"SWR (5s refresh, 3s dedup)"})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Pages"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:"Overview, Tasks, Nodes, Messages, Networks, Audit, Server Logs, Admin, Settings"})]})]})]})]}),(0,s.jsxs)("div",{id:"account",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Account"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsxs)("h2",{className:"text-sm font-semibold text-gray-300 mb-4 flex items-center gap-2",children:["License",i?.license&&(0,s.jsxs)("span",{className:`inline-flex items-center gap-1.5 text-[10px] font-medium px-2 py-0.5 rounded-full border ${"pro"===i.license.type?"text-green-300 bg-green-500/10 border-green-500/30":i.license.days_left<=7?"text-red-300 bg-red-500/10 border-red-500/30":"text-amber-300 bg-amber-500/10 border-amber-500/30"}`,children:[(0,s.jsx)("span",{"aria-hidden":!0,className:"w-1.5 h-1.5 rounded-full bg-current"}),i.license.type,i.license.days_left?` \xb7 ${i.license.days_left}d left`:""]})]}),i?.license?(0,s.jsxs)("div",{className:"space-y-3 text-sm",children:[i.license.days_left<=7&&(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-red-400 font-medium",children:"⚠ Expiring soon"}),(0,s.jsxs)("span",{className:"text-red-400",children:[i.license.days_left," days left"]})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Expires"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.license.expires_at})]}),i.limits&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Max Agents"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_agents})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Max Networks"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_networks})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("span",{className:"text-gray-500",children:"Tasks/Day"}),(0,s.jsx)("span",{className:`text-gray-300 ${j}`,children:i.limits.max_tasks_day})]})]}),(0,s.jsxs)("div",{className:"pt-3 border-t border-[#2a2a4a]",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{type:"text",value:c,onChange:e=>d(e.target.value),placeholder:"anet-XXXX-XXXX-XXXX-XXXX",className:"flex-1 bg-[#0a0a15] border border-[#2a2a4a] rounded px-3 py-2 text-xs text-white placeholder-gray-600 focus:outline-none"}),(0,s.jsx)("button",{onClick:async()=>{if(!c.trim())return;let e=await fetch("/api/hub/license",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:c})}),s=await e.json();x(s.ok?`Activated: ${s.type}`:`Failed: ${s.error}`),s.ok&&d(""),setTimeout(()=>x(""),5e3)},className:"px-3 py-2 bg-cyan-600 hover:bg-cyan-500 text-white text-xs rounded transition-colors",children:"Activate"})]}),o&&(0,s.jsx)("div",{className:`mt-2 text-xs ${o.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:o})]})]}):(0,s.jsx)("div",{className:"text-xs text-gray-600",children:"License info not available"})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Change Password"}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("input",{type:"password",value:m,onChange:e=>h(e.target.value),placeholder:"Current password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("input",{type:"password",value:g,onChange:e=>u(e.target.value),placeholder:"New password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-3 py-2 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:outline-none"}),(0,s.jsx)("button",{onClick:async()=>{if(!m||!g)return;let e=sessionStorage.getItem("anet_v3_auth");if(!e)return void N("Not logged in with V3 auth");let{token:s}=JSON.parse(e),a=await fetch("/api/hub/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"change_password",token:s,current_password:m,new_password:g})}),t=await a.json();if(N(t.ok?"Password changed":`Failed: ${t.error}`),t.ok){if(t.token){let s=JSON.parse(e);sessionStorage.setItem("anet_v3_auth",JSON.stringify({...s,token:t.token}))}h(""),u("")}setTimeout(()=>N(""),5e3)},disabled:!m||!g,className:"px-4 py-2 bg-cyan-600 hover:bg-cyan-500 disabled:bg-gray-800 disabled:text-gray-600 text-white text-sm rounded-lg transition-colors",children:"Change Password"})]}),p&&(0,s.jsx)("div",{className:`mt-2 text-xs ${p.startsWith("Failed")?"text-red-400":"text-green-400"}`,children:p})]}),(0,s.jsxs)("section",{className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300 mb-4",children:"Sign out"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mb-3",children:"Signing out clears your dashboard session cookie. You'll return to the login page."}),(0,s.jsx)("button",{onClick:async()=>{await fetch("/api/auth/logout",{method:"POST"}).catch(()=>{}),window.location.assign("/login")},className:"px-4 py-2 bg-transparent hover:bg-[#1a1a2a] text-gray-300 text-sm rounded-lg border border-[#2a2a4a] hover:border-[#3a3a5a] transition-colors",children:"Sign out"})]})]}),(0,s.jsxs)("div",{id:"resources",className:"space-y-4 scroll-mt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,s.jsx)("div",{className:"text-[11px] uppercase tracking-[0.14em] text-gray-400 font-semibold",children:"Resources"}),(0,s.jsx)("div",{className:"flex-1 h-px bg-[#2a2a4a]"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,s.jsxs)(t.default,{href:"/settings/tokens",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"API Tokens"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create and manage tokens for CLI access."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]}),(0,s.jsxs)(t.default,{href:"/settings/networks",className:"bg-[#111128] border border-[#2a2a4a] rounded-xl p-5 hover:border-cyan-500/30 transition-colors",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-gray-300",children:"Networks"}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:"Create, manage, and delete agent networks."}),(0,s.jsx)("span",{className:"text-xs text-cyan-400 mt-3 inline-block",children:"Manage →"})]})]})]})]})]})}])}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,70286,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.4.6-preview.
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,70286,e=>{"use strict";e.s(["DASHBOARD_VERSION",0,"0.4.6-preview.331"],70286)},48941,e=>{"use strict";var t=e.i(22381),r=e.i(23910),a=e.i(70286);e.s(["default",0,function(){let[e,s]=(0,r.useState)("login"),[n,o]=(0,r.useState)(""),[i,l]=(0,r.useState)(""),[c,d]=(0,r.useState)(!1),[x,g]=(0,r.useState)(""),[h,m]=(0,r.useState)(!1),u=async t=>{t.preventDefault(),m(!0),g("");try{let t=await fetch("/api/auth/v3",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,username:n,password:i})}),r=await t.json();if(r.ok){r.token&&sessionStorage.setItem("anet_v3_auth",JSON.stringify({user:r.user,token:r.token,networks:r.networks||[],currentNetwork:r.network_id||r.networks?.[0]?.network_id||""})),window.location.assign("/");return}g(r.error||"Login failed")}catch{g("Connection failed")}m(!1)};return(0,t.jsxs)("main",{className:"min-h-screen bg-[#0a0a1a] text-gray-100 font-mono flex items-center justify-center relative overflow-hidden px-4 py-10 sm:py-16",children:[(0,t.jsx)("div",{className:"absolute inset-0 pointer-events-none anet-login-bg","aria-hidden":!0}),(0,t.jsxs)("div",{className:"relative w-full max-w-sm",children:[(0,t.jsxs)("div",{className:"text-center mb-7",children:[(0,t.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-4 rounded-2xl bg-[#111128] border border-[#2a2a4a] anet-login-mark",children:(0,t.jsxs)("svg",{className:"w-9 h-9",viewBox:"0 0 32 32","aria-hidden":!0,children:[(0,t.jsx)("circle",{cx:"16",cy:"16",r:"10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.25",className:"text-cyan-400 anet-login-mark-ring"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"10",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("line",{x1:"16",y1:"10",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("line",{x1:"10",y1:"20",x2:"22",y2:"20",stroke:"currentColor",strokeWidth:"1",opacity:"0.5",className:"text-cyan-400 anet-login-mark-edge"}),(0,t.jsx)("circle",{cx:"16",cy:"10",r:"3",fill:"currentColor",className:"text-cyan-400 anet-login-mark-node-a"}),(0,t.jsx)("circle",{cx:"10",cy:"20",r:"3",fill:"currentColor",className:"text-green-400 anet-login-mark-node-b"}),(0,t.jsx)("circle",{cx:"22",cy:"20",r:"3",fill:"currentColor",className:"text-violet-400 anet-login-mark-node-c"})]})}),(0,t.jsx)("h1",{className:"text-[22px] sm:text-2xl font-semibold text-white tracking-tight",children:"Agent Network"}),(0,t.jsx)("p",{className:"text-[13px] text-gray-500 mt-1.5 leading-snug",children:"login"===e?(0,t.jsxs)(t.Fragment,{children:["Welcome back · ",(0,t.jsx)("span",{className:"text-gray-600",children:"Tasks · Mesh · Messages"})]}):(0,t.jsxs)(t.Fragment,{children:["Create your account · ",(0,t.jsx)("span",{className:"text-gray-600",children:"Free preview · no credit card"})]})})]}),(0,t.jsx)("div",{className:"flex rounded-lg border border-[#2a2a4a] bg-[#111128] p-1 mb-4",children:["login","register"].map(r=>(0,t.jsx)("button",{type:"button",onClick:()=>{s(r),g("")},className:`flex-1 rounded-md px-3 py-2 text-sm transition-colors ${e===r?"bg-cyan-500/10 text-cyan-300":"text-gray-500 hover:text-gray-200"}`,children:"login"===r?"Sign in":"Register"},r))}),(0,t.jsxs)("form",{onSubmit:u,className:"border border-[#2a2a4a] bg-[#111128]/80 backdrop-blur-sm rounded-xl p-6 shadow-2xl shadow-black/30",children:[(0,t.jsx)("label",{htmlFor:"username",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Username"}),(0,t.jsx)("input",{id:"username",type:"text",value:n,onChange:e=>o(e.target.value),autoFocus:!0,placeholder:"Enter username",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-4 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:ring-1 focus:ring-cyan-500/20 focus:outline-none transition-all mb-4"}),(0,t.jsx)("label",{htmlFor:"password",className:"block text-xs text-gray-500 mb-2 uppercase tracking-wider",children:"Password"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{id:"password",type:c?"text":"password",value:i,onChange:e=>l(e.target.value),placeholder:"Enter password",className:"w-full bg-[#0a0a15] border border-[#2a2a4a] rounded-lg px-4 pr-11 py-3 text-sm text-white placeholder-gray-600 focus:border-cyan-500/50 focus:ring-1 focus:ring-cyan-500/20 focus:outline-none transition-all"}),(0,t.jsx)("button",{type:"button",onClick:()=>d(e=>!e),tabIndex:-1,"aria-label":c?"Hide password":"Show password",className:"absolute inset-y-0 right-0 flex items-center px-3 text-gray-600 hover:text-gray-300 transition-colors",children:c?(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),(0,t.jsx)("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}):(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})})]}),x&&(0,t.jsx)("div",{className:"mt-3 text-sm text-red-300 bg-red-500/5 border border-red-500/10 rounded-lg px-3 py-2",children:x}),(0,t.jsxs)("button",{type:"submit",disabled:h||!i||!n.trim(),className:"mt-5 w-full flex items-center justify-center gap-2 px-4 py-3 bg-gradient-to-r from-cyan-600 to-blue-600 hover:from-cyan-500 hover:to-blue-500 disabled:from-gray-800 disabled:to-gray-800 disabled:text-gray-600 text-white text-sm font-medium rounded-lg transition-all shadow-lg shadow-cyan-500/10 hover:shadow-cyan-500/20 disabled:shadow-none",children:[h&&(0,t.jsxs)("svg",{"aria-hidden":!0,className:"w-4 h-4 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",opacity:"0.25"}),(0,t.jsx)("path",{d:"M4 12a8 8 0 018-8",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]}),(0,t.jsx)("span",{children:h?"login"===e?"Signing in…":"Registering…":"login"===e?"Sign in":"Create account"})]})]}),(0,t.jsxs)("p",{className:"text-center text-[11px] text-gray-700 mt-6",children:["Sleep2AGI · Apache-2.0 · ",(0,t.jsx)("a",{href:"https://anet.sh",className:"hover:text-gray-500 transition-colors",children:"anet.sh"}),(0,t.jsx)("span",{className:"mx-1 text-gray-800",children:"·"}),(0,t.jsxs)("span",{className:"font-mono",title:"@sleep2agi/agent-network-dashboard",children:["v",a.DASHBOARD_VERSION]})]})]})]})}])}]);
|
package/.next/trace
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
[{"name":"generate-buildid","duration":351,"timestamp":118461429150,"id":4,"parentId":1,"tags":{},"startTime":1778926433675,"traceId":"75f478546cbc7f77"},{"name":"load-custom-routes","duration":650,"timestamp":118461429717,"id":5,"parentId":1,"tags":{},"startTime":1778926433676,"traceId":"75f478546cbc7f77"},{"name":"create-dist-dir","duration":942,"timestamp":118461430430,"id":6,"parentId":1,"tags":{},"startTime":1778926433677,"traceId":"75f478546cbc7f77"},{"name":"clean","duration":37793,"timestamp":118461432115,"id":7,"parentId":1,"tags":{},"startTime":1778926433678,"traceId":"75f478546cbc7f77"},{"name":"discover-routes","duration":9549,"timestamp":118461564839,"id":8,"parentId":1,"tags":{},"startTime":1778926433811,"traceId":"75f478546cbc7f77"},{"name":"create-root-mapping","duration":108,"timestamp":118461574445,"id":9,"parentId":1,"tags":{},"startTime":1778926433821,"traceId":"75f478546cbc7f77"},{"name":"generate-route-types","duration":40764,"timestamp":118461576918,"id":10,"parentId":1,"tags":{},"startTime":1778926433823,"traceId":"75f478546cbc7f77"},{"name":"public-dir-conflict-check","duration":148,"timestamp":118461617783,"id":11,"parentId":1,"tags":{},"startTime":1778926433864,"traceId":"75f478546cbc7f77"},{"name":"generate-routes-manifest","duration":4339,"timestamp":118461618115,"id":12,"parentId":1,"tags":{},"startTime":1778926433864,"traceId":"75f478546cbc7f77"},{"name":"run-turbopack","duration":6766474,"timestamp":118461628960,"id":14,"parentId":1,"tags":{},"startTime":1778926433875,"traceId":"75f478546cbc7f77"},{"name":"turbopack-build-events","duration":118,"timestamp":118461938044,"id":15,"parentId":1,"tags":{},"startTime":1778926434184,"traceId":"75f478546cbc7f77"},{"name":"run-typescript","duration":9551838,"timestamp":118468405435,"id":16,"parentId":1,"tags":{},"startTime":1778926440652,"traceId":"75f478546cbc7f77"},{"name":"generate-required-server-files","duration":3958,"timestamp":118477958948,"id":18,"parentId":1,"tags":{},"startTime":1778926450205,"traceId":"75f478546cbc7f77"},{"name":"check-static-error-page","duration":29589,"timestamp":118478185174,"id":20,"parentId":19,"tags":{},"startTime":1778926450431,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":449245,"timestamp":118478217481,"id":63,"parentId":22,"tags":{},"startTime":1778926450464,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":470140,"timestamp":118478196777,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1778926450443,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":558623,"timestamp":118478219858,"id":69,"parentId":30,"tags":{},"startTime":1778926450466,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":573652,"timestamp":118478204926,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1778926450451,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":569372,"timestamp":118478220094,"id":70,"parentId":32,"tags":{},"startTime":1778926450466,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":584201,"timestamp":118478205335,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1778926450452,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":589932,"timestamp":118478220167,"id":71,"parentId":33,"tags":{},"startTime":1778926450466,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":604689,"timestamp":118478205482,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1778926450452,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":605222,"timestamp":118478220840,"id":72,"parentId":34,"tags":{},"startTime":1778926450467,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":620537,"timestamp":118478205616,"id":34,"parentId":19,"tags":{"page":"/api/hub/license"},"startTime":1778926450452,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":610325,"timestamp":118478220923,"id":73,"parentId":35,"tags":{},"startTime":1778926450467,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":625572,"timestamp":118478205760,"id":35,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1778926450452,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":618349,"timestamp":118478218101,"id":67,"parentId":28,"tags":{},"startTime":1778926450464,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":631851,"timestamp":118478204676,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1778926450451,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":615693,"timestamp":118478221134,"id":74,"parentId":36,"tags":{},"startTime":1778926450467,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":631809,"timestamp":118478206282,"id":36,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1778926450453,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":620000,"timestamp":118478221253,"id":76,"parentId":38,"tags":{},"startTime":1778926450468,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":634732,"timestamp":118478206581,"id":38,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1778926450453,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":620544,"timestamp":118478221207,"id":75,"parentId":37,"tags":{},"startTime":1778926450467,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":635341,"timestamp":118478206455,"id":37,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1778926450453,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":624194,"timestamp":118478221276,"id":77,"parentId":39,"tags":{},"startTime":1778926450468,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":638838,"timestamp":118478206684,"id":39,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1778926450453,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":630287,"timestamp":118478221298,"id":79,"parentId":41,"tags":{},"startTime":1778926450468,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":644711,"timestamp":118478206915,"id":41,"parentId":19,"tags":{"page":"/api/hub/servers"},"startTime":1778926450453,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":635940,"timestamp":118478221310,"id":80,"parentId":42,"tags":{},"startTime":1778926450468,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":650221,"timestamp":118478207073,"id":42,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1778926450453,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":640965,"timestamp":118478221346,"id":81,"parentId":43,"tags":{},"startTime":1778926450468,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":655175,"timestamp":118478207177,"id":43,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1778926450453,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":645016,"timestamp":118478221362,"id":82,"parentId":44,"tags":{},"startTime":1778926450468,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":659115,"timestamp":118478207304,"id":44,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1778926450454,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":652487,"timestamp":118478217602,"id":64,"parentId":25,"tags":{},"startTime":1778926450464,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":666181,"timestamp":118478203956,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1778926450450,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":650395,"timestamp":118478221375,"id":83,"parentId":45,"tags":{},"startTime":1778926450468,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":664175,"timestamp":118478207652,"id":45,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1778926450454,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":655899,"timestamp":118478221395,"id":85,"parentId":47,"tags":{},"startTime":1778926450468,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":669325,"timestamp":118478208019,"id":47,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1778926450454,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":656137,"timestamp":118478221387,"id":84,"parentId":46,"tags":{},"startTime":1778926450468,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":669718,"timestamp":118478207839,"id":46,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1778926450454,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":659999,"timestamp":118478221436,"id":86,"parentId":48,"tags":{},"startTime":1778926450468,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":673345,"timestamp":118478208136,"id":48,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1778926450454,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":660710,"timestamp":118478226719,"id":88,"parentId":24,"tags":{},"startTime":1778926450473,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":689758,"timestamp":118478197713,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1778926450444,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":674181,"timestamp":118478221286,"id":78,"parentId":40,"tags":{},"startTime":1778926450468,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":688741,"timestamp":118478206778,"id":40,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1778926450453,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":667016,"timestamp":118478228836,"id":89,"parentId":31,"tags":{},"startTime":1778926450475,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":690860,"timestamp":118478205050,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1778926450451,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":689280,"timestamp":118478221453,"id":87,"parentId":49,"tags":{},"startTime":1778926450468,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":699972,"timestamp":118478210828,"id":49,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1778926450457,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":702960,"timestamp":118478217808,"id":66,"parentId":27,"tags":{},"startTime":1778926450464,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":716266,"timestamp":118478204568,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1778926450451,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":738684,"timestamp":118478217724,"id":65,"parentId":26,"tags":{},"startTime":1778926450464,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":752049,"timestamp":118478204437,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1778926450451,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":726284,"timestamp":118478241910,"id":90,"parentId":23,"tags":{},"startTime":1778926450488,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":770916,"timestamp":118478197341,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1778926450444,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":751988,"timestamp":118478217081,"id":62,"parentId":21,"tags":{},"startTime":1778926450463,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":775489,"timestamp":118478193627,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1778926450440,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":758468,"timestamp":118478219689,"id":68,"parentId":29,"tags":{},"startTime":1778926450466,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":773426,"timestamp":118478204779,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1778926450451,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":736388,"timestamp":118478241989,"id":95,"parentId":54,"tags":{},"startTime":1778926450488,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":766447,"timestamp":118478211983,"id":54,"parentId":19,"tags":{"page":"/nodes"},"startTime":1778926450458,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":737473,"timestamp":118478244734,"id":96,"parentId":56,"tags":{},"startTime":1778926450491,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":769661,"timestamp":118478212587,"id":56,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1778926450459,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":744943,"timestamp":118478244894,"id":98,"parentId":59,"tags":{},"startTime":1778926450491,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":775747,"timestamp":118478214132,"id":59,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1778926450460,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":751253,"timestamp":118478241944,"id":91,"parentId":50,"tags":{},"startTime":1778926450488,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":781889,"timestamp":118478211369,"id":50,"parentId":19,"tags":{"page":"/login"},"startTime":1778926450458,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":755094,"timestamp":118478241957,"id":92,"parentId":51,"tags":{},"startTime":1778926450488,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":785547,"timestamp":118478211543,"id":51,"parentId":19,"tags":{"page":"/logs"},"startTime":1778926450458,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":762956,"timestamp":118478246075,"id":101,"parentId":58,"tags":{},"startTime":1778926450492,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":796103,"timestamp":118478212980,"id":58,"parentId":19,"tags":{"page":"/settings"},"startTime":1778926450459,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":769109,"timestamp":118478246065,"id":100,"parentId":61,"tags":{},"startTime":1778926450492,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":800771,"timestamp":118478214451,"id":61,"parentId":19,"tags":{"page":"/tasks"},"startTime":1778926450461,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":749535,"timestamp":118478266741,"id":102,"parentId":55,"tags":{},"startTime":1778926450513,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":804128,"timestamp":118478212188,"id":55,"parentId":19,"tags":{"page":"/"},"startTime":1778926450458,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":782256,"timestamp":118478246023,"id":99,"parentId":60,"tags":{},"startTime":1778926450492,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":814038,"timestamp":118478214308,"id":60,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1778926450461,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":797392,"timestamp":118478241970,"id":93,"parentId":52,"tags":{},"startTime":1778926450488,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":827745,"timestamp":118478211674,"id":52,"parentId":19,"tags":{"page":"/messages"},"startTime":1778926450458,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":811858,"timestamp":118478241977,"id":94,"parentId":53,"tags":{},"startTime":1778926450488,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":842060,"timestamp":118478211832,"id":53,"parentId":19,"tags":{"page":"/node"},"startTime":1778926450458,"traceId":"75f478546cbc7f77"},{"name":"is-page-static","duration":824175,"timestamp":118478244864,"id":97,"parentId":57,"tags":{},"startTime":1778926450491,"traceId":"75f478546cbc7f77"},{"name":"check-page","duration":856305,"timestamp":118478212780,"id":57,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1778926450459,"traceId":"75f478546cbc7f77"},{"name":"static-check","duration":885188,"timestamp":118478183931,"id":19,"parentId":1,"tags":{},"startTime":1778926450430,"traceId":"75f478546cbc7f77"},{"name":"write-routes-manifest","duration":497,"timestamp":118479075843,"id":104,"parentId":1,"tags":{},"startTime":1778926451322,"traceId":"75f478546cbc7f77"},{"name":"load-dotenv","duration":60,"timestamp":118479087929,"id":107,"parentId":106,"tags":{},"startTime":1778926451334,"traceId":"75f478546cbc7f77"},{"name":"run-export-path-map","duration":610,"timestamp":118479091519,"id":108,"parentId":106,"tags":{},"startTime":1778926451338,"traceId":"75f478546cbc7f77"},{"name":"next-export","duration":675187,"timestamp":118479086681,"id":106,"parentId":1,"tags":{},"startTime":1778926451333,"traceId":"75f478546cbc7f77"}]
|
|
2
|
-
[{"name":"move-exported-app-not-found-","duration":
|
|
1
|
+
[{"name":"generate-buildid","duration":365,"timestamp":119486465409,"id":4,"parentId":1,"tags":{},"startTime":1778927458712,"traceId":"fb8b3c1e8034abd6"},{"name":"load-custom-routes","duration":520,"timestamp":119486465945,"id":5,"parentId":1,"tags":{},"startTime":1778927458712,"traceId":"fb8b3c1e8034abd6"},{"name":"create-dist-dir","duration":762,"timestamp":119486466512,"id":6,"parentId":1,"tags":{},"startTime":1778927458713,"traceId":"fb8b3c1e8034abd6"},{"name":"clean","duration":37132,"timestamp":119486468154,"id":7,"parentId":1,"tags":{},"startTime":1778927458714,"traceId":"fb8b3c1e8034abd6"},{"name":"discover-routes","duration":27332,"timestamp":119486598156,"id":8,"parentId":1,"tags":{},"startTime":1778927458844,"traceId":"fb8b3c1e8034abd6"},{"name":"create-root-mapping","duration":178,"timestamp":119486625576,"id":9,"parentId":1,"tags":{},"startTime":1778927458872,"traceId":"fb8b3c1e8034abd6"},{"name":"generate-route-types","duration":31601,"timestamp":119486628972,"id":10,"parentId":1,"tags":{},"startTime":1778927458875,"traceId":"fb8b3c1e8034abd6"},{"name":"public-dir-conflict-check","duration":132,"timestamp":119486660680,"id":11,"parentId":1,"tags":{},"startTime":1778927458907,"traceId":"fb8b3c1e8034abd6"},{"name":"generate-routes-manifest","duration":4874,"timestamp":119486660982,"id":12,"parentId":1,"tags":{},"startTime":1778927458907,"traceId":"fb8b3c1e8034abd6"},{"name":"run-turbopack","duration":8019030,"timestamp":119486682527,"id":14,"parentId":1,"tags":{},"startTime":1778927458929,"traceId":"fb8b3c1e8034abd6"},{"name":"turbopack-build-events","duration":121,"timestamp":119487004850,"id":15,"parentId":1,"tags":{},"startTime":1778927459251,"traceId":"fb8b3c1e8034abd6"},{"name":"run-typescript","duration":11090086,"timestamp":119494709243,"id":16,"parentId":1,"tags":{},"startTime":1778927466956,"traceId":"fb8b3c1e8034abd6"},{"name":"generate-required-server-files","duration":3027,"timestamp":119505800711,"id":18,"parentId":1,"tags":{},"startTime":1778927478047,"traceId":"fb8b3c1e8034abd6"},{"name":"check-static-error-page","duration":16478,"timestamp":119506019872,"id":20,"parentId":19,"tags":{},"startTime":1778927478266,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":584097,"timestamp":119506041077,"id":63,"parentId":22,"tags":{},"startTime":1778927478287,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":602225,"timestamp":119506023210,"id":22,"parentId":19,"tags":{"page":"/_global-error"},"startTime":1778927478269,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":714069,"timestamp":119506043566,"id":69,"parentId":30,"tags":{},"startTime":1778927478290,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":730042,"timestamp":119506027694,"id":30,"parentId":19,"tags":{"page":"/api/hub/broadcast"},"startTime":1778927478274,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":726757,"timestamp":119506041463,"id":66,"parentId":27,"tags":{},"startTime":1778927478288,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":741133,"timestamp":119506027162,"id":27,"parentId":19,"tags":{"page":"/api/auth/v3"},"startTime":1778927478273,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":723209,"timestamp":119506045301,"id":70,"parentId":32,"tags":{},"startTime":1778927478292,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":740392,"timestamp":119506028161,"id":32,"parentId":19,"tags":{"page":"/api/hub/health"},"startTime":1778927478274,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":731718,"timestamp":119506041230,"id":64,"parentId":25,"tags":{},"startTime":1778927478288,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":746239,"timestamp":119506026789,"id":25,"parentId":19,"tags":{"page":"/api/auth/login"},"startTime":1778927478273,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":736580,"timestamp":119506045501,"id":73,"parentId":35,"tags":{},"startTime":1778927478292,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":753538,"timestamp":119506028614,"id":35,"parentId":19,"tags":{"page":"/api/hub/messages"},"startTime":1778927478275,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":744721,"timestamp":119506040657,"id":62,"parentId":21,"tags":{},"startTime":1778927478287,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":763518,"timestamp":119506021923,"id":21,"parentId":19,"tags":{"page":"/_not-found"},"startTime":1778927478268,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":757430,"timestamp":119506045385,"id":71,"parentId":33,"tags":{},"startTime":1778927478292,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":774608,"timestamp":119506028329,"id":33,"parentId":19,"tags":{"page":"/api/hub/inbox"},"startTime":1778927478275,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":761789,"timestamp":119506045607,"id":74,"parentId":36,"tags":{},"startTime":1778927478292,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":778329,"timestamp":119506029138,"id":36,"parentId":19,"tags":{"page":"/api/hub/networks"},"startTime":1778927478275,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":768320,"timestamp":119506041351,"id":65,"parentId":26,"tags":{},"startTime":1778927478288,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":782761,"timestamp":119506026962,"id":26,"parentId":19,"tags":{"page":"/api/auth/logout"},"startTime":1778927478273,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":769391,"timestamp":119506045665,"id":77,"parentId":39,"tags":{},"startTime":1778927478292,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":785515,"timestamp":119506029622,"id":39,"parentId":19,"tags":{"page":"/api/hub/send"},"startTime":1778927478276,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":772834,"timestamp":119506045470,"id":72,"parentId":34,"tags":{},"startTime":1778927478292,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":789869,"timestamp":119506028476,"id":34,"parentId":19,"tags":{"page":"/api/hub/license"},"startTime":1778927478275,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":779074,"timestamp":119506043425,"id":68,"parentId":29,"tags":{},"startTime":1778927478290,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":795020,"timestamp":119506027534,"id":29,"parentId":19,"tags":{"page":"/api/hub/auth"},"startTime":1778927478274,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":778898,"timestamp":119506045700,"id":80,"parentId":42,"tags":{},"startTime":1778927478292,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":794714,"timestamp":119506029925,"id":42,"parentId":19,"tags":{"page":"/api/hub/session"},"startTime":1778927478276,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":783238,"timestamp":119506045687,"id":79,"parentId":41,"tags":{},"startTime":1778927478292,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":799161,"timestamp":119506029812,"id":41,"parentId":19,"tags":{"page":"/api/hub/servers"},"startTime":1778927478276,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":783353,"timestamp":119506045771,"id":82,"parentId":44,"tags":{},"startTime":1778927478292,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":799030,"timestamp":119506030129,"id":44,"parentId":19,"tags":{"page":"/api/hub/status"},"startTime":1778927478276,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":792301,"timestamp":119506045783,"id":83,"parentId":45,"tags":{},"startTime":1778927478292,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":807922,"timestamp":119506030220,"id":45,"parentId":19,"tags":{"page":"/api/hub/task-events"},"startTime":1778927478276,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":793754,"timestamp":119506045674,"id":78,"parentId":40,"tags":{},"startTime":1778927478292,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":809754,"timestamp":119506029718,"id":40,"parentId":19,"tags":{"page":"/api/hub/server-logs"},"startTime":1778927478276,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":793813,"timestamp":119506045797,"id":84,"parentId":46,"tags":{},"startTime":1778927478292,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":809334,"timestamp":119506030309,"id":46,"parentId":19,"tags":{"page":"/api/hub/tasks"},"startTime":1778927478277,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":798709,"timestamp":119506045807,"id":85,"parentId":47,"tags":{},"startTime":1778927478292,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":811940,"timestamp":119506032620,"id":47,"parentId":19,"tags":{"page":"/api/hub/tmux"},"startTime":1778927478279,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":801589,"timestamp":119506051534,"id":88,"parentId":24,"tags":{},"startTime":1778927478298,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":829429,"timestamp":119506023747,"id":24,"parentId":19,"tags":{"page":"/api/anet/config"},"startTime":1778927478270,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":805655,"timestamp":119506058736,"id":89,"parentId":31,"tags":{},"startTime":1778927478305,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":836619,"timestamp":119506027819,"id":31,"parentId":19,"tags":{"page":"/api/hub/events"},"startTime":1778927478274,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":819212,"timestamp":119506045753,"id":81,"parentId":43,"tags":{},"startTime":1778927478292,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":834997,"timestamp":119506030041,"id":43,"parentId":19,"tags":{"page":"/api/hub/stats"},"startTime":1778927478276,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":825521,"timestamp":119506045653,"id":76,"parentId":38,"tags":{},"startTime":1778927478292,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":841695,"timestamp":119506029526,"id":38,"parentId":19,"tags":{"page":"/api/hub/register"},"startTime":1778927478276,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":826747,"timestamp":119506045831,"id":87,"parentId":49,"tags":{},"startTime":1778927478292,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":839796,"timestamp":119506032833,"id":49,"parentId":19,"tags":{"page":"/favicon.ico"},"startTime":1778927478279,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":835040,"timestamp":119506043205,"id":67,"parentId":28,"tags":{},"startTime":1778927478289,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":850987,"timestamp":119506027306,"id":28,"parentId":19,"tags":{"page":"/api/hub/audit-log"},"startTime":1778927478274,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":838633,"timestamp":119506045819,"id":86,"parentId":48,"tags":{},"startTime":1778927478292,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":851754,"timestamp":119506032744,"id":48,"parentId":19,"tags":{"page":"/api/hub/tokens"},"startTime":1778927478279,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":876907,"timestamp":119506064568,"id":93,"parentId":52,"tags":{},"startTime":1778927478311,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":908029,"timestamp":119506033684,"id":52,"parentId":19,"tags":{"page":"/messages"},"startTime":1778927478280,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":880852,"timestamp":119506064542,"id":91,"parentId":50,"tags":{},"startTime":1778927478311,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":912130,"timestamp":119506033325,"id":50,"parentId":19,"tags":{"page":"/login"},"startTime":1778927478280,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":904869,"timestamp":119506045636,"id":75,"parentId":37,"tags":{},"startTime":1778927478292,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":921176,"timestamp":119506029384,"id":37,"parentId":19,"tags":{"page":"/api/hub/nodes"},"startTime":1778927478276,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":886139,"timestamp":119506064594,"id":95,"parentId":54,"tags":{},"startTime":1778927478311,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":916668,"timestamp":119506034093,"id":54,"parentId":19,"tags":{"page":"/nodes"},"startTime":1778927478280,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":886291,"timestamp":119506064604,"id":96,"parentId":56,"tags":{},"startTime":1778927478311,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":916023,"timestamp":119506034898,"id":56,"parentId":19,"tags":{"page":"/server-logs"},"startTime":1778927478281,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":888734,"timestamp":119506064617,"id":97,"parentId":57,"tags":{},"startTime":1778927478311,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":918301,"timestamp":119506035115,"id":57,"parentId":19,"tags":{"page":"/settings/networks"},"startTime":1778927478281,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":900675,"timestamp":119506064558,"id":92,"parentId":51,"tags":{},"startTime":1778927478311,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":931761,"timestamp":119506033523,"id":51,"parentId":19,"tags":{"page":"/logs"},"startTime":1778927478280,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":900732,"timestamp":119506064662,"id":100,"parentId":61,"tags":{},"startTime":1778927478311,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":929328,"timestamp":119506036098,"id":61,"parentId":19,"tags":{"page":"/tasks"},"startTime":1778927478282,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":886711,"timestamp":119506078793,"id":101,"parentId":58,"tags":{},"startTime":1778927478325,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":930221,"timestamp":119506035310,"id":58,"parentId":19,"tags":{"page":"/settings"},"startTime":1778927478282,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":901982,"timestamp":119506064509,"id":90,"parentId":23,"tags":{},"startTime":1778927478311,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":943025,"timestamp":119506023504,"id":23,"parentId":19,"tags":{"page":"/admin"},"startTime":1778927478270,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":902442,"timestamp":119506064630,"id":98,"parentId":59,"tags":{},"startTime":1778927478311,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":931330,"timestamp":119506035782,"id":59,"parentId":19,"tags":{"page":"/settings/tokens"},"startTime":1778927478282,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":853433,"timestamp":119506116851,"id":102,"parentId":55,"tags":{},"startTime":1778927478363,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":935989,"timestamp":119506034331,"id":55,"parentId":19,"tags":{"page":"/"},"startTime":1778927478281,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":906293,"timestamp":119506064648,"id":99,"parentId":60,"tags":{},"startTime":1778927478311,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":935044,"timestamp":119506035940,"id":60,"parentId":19,"tags":{"page":"/tasks/[id]"},"startTime":1778927478282,"traceId":"fb8b3c1e8034abd6"},{"name":"is-page-static","duration":917238,"timestamp":119506064581,"id":94,"parentId":53,"tags":{},"startTime":1778927478311,"traceId":"fb8b3c1e8034abd6"},{"name":"check-page","duration":947993,"timestamp":119506033872,"id":53,"parentId":19,"tags":{"page":"/node"},"startTime":1778927478280,"traceId":"fb8b3c1e8034abd6"},{"name":"static-check","duration":963375,"timestamp":119506018549,"id":19,"parentId":1,"tags":{},"startTime":1778927478265,"traceId":"fb8b3c1e8034abd6"},{"name":"write-routes-manifest","duration":615,"timestamp":119506990935,"id":104,"parentId":1,"tags":{},"startTime":1778927479237,"traceId":"fb8b3c1e8034abd6"},{"name":"load-dotenv","duration":64,"timestamp":119507003752,"id":107,"parentId":106,"tags":{},"startTime":1778927479250,"traceId":"fb8b3c1e8034abd6"},{"name":"run-export-path-map","duration":555,"timestamp":119507008351,"id":108,"parentId":106,"tags":{},"startTime":1778927479255,"traceId":"fb8b3c1e8034abd6"},{"name":"next-export","duration":655525,"timestamp":119507002513,"id":106,"parentId":1,"tags":{},"startTime":1778927479249,"traceId":"fb8b3c1e8034abd6"}]
|
|
2
|
+
[{"name":"move-exported-app-not-found-","duration":3264,"timestamp":119507662200,"id":109,"parentId":105,"tags":{},"startTime":1778927479908,"traceId":"fb8b3c1e8034abd6"},{"name":"move-exported-app-global-error-","duration":1253,"timestamp":119507665574,"id":110,"parentId":105,"tags":{},"startTime":1778927479912,"traceId":"fb8b3c1e8034abd6"},{"name":"static-generation","duration":672861,"timestamp":119506996716,"id":105,"parentId":1,"tags":{},"startTime":1778927479243,"traceId":"fb8b3c1e8034abd6"},{"name":"write-routes-manifest","duration":547,"timestamp":119507669791,"id":111,"parentId":1,"tags":{},"startTime":1778927479916,"traceId":"fb8b3c1e8034abd6"},{"name":"print-tree-view","duration":4368,"timestamp":119507686474,"id":112,"parentId":1,"tags":{},"startTime":1778927479933,"traceId":"fb8b3c1e8034abd6"},{"name":"write-route-bundle-stats","duration":16877,"timestamp":119507690896,"id":113,"parentId":1,"tags":{},"startTime":1778927479937,"traceId":"fb8b3c1e8034abd6"},{"name":"telemetry-flush","duration":13826,"timestamp":119507707813,"id":114,"parentId":1,"tags":{},"startTime":1778927479954,"traceId":"fb8b3c1e8034abd6"},{"name":"next-build","duration":21320628,"timestamp":119486401051,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778927458647,"traceId":"fb8b3c1e8034abd6"}]
|
package/.next/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-turbopack","duration":
|
|
1
|
+
[{"name":"run-turbopack","duration":8019030,"timestamp":119486682527,"id":14,"parentId":1,"tags":{},"startTime":1778927458929,"traceId":"fb8b3c1e8034abd6"},{"name":"turbopack-build-events","duration":121,"timestamp":119487004850,"id":15,"parentId":1,"tags":{},"startTime":1778927459251,"traceId":"fb8b3c1e8034abd6"},{"name":"run-typescript","duration":11090086,"timestamp":119494709243,"id":16,"parentId":1,"tags":{},"startTime":1778927466956,"traceId":"fb8b3c1e8034abd6"},{"name":"static-check","duration":963375,"timestamp":119506018549,"id":19,"parentId":1,"tags":{},"startTime":1778927478265,"traceId":"fb8b3c1e8034abd6"},{"name":"static-generation","duration":672861,"timestamp":119506996716,"id":105,"parentId":1,"tags":{},"startTime":1778927479243,"traceId":"fb8b3c1e8034abd6"},{"name":"telemetry-flush","duration":13826,"timestamp":119507707813,"id":114,"parentId":1,"tags":{},"startTime":1778927479954,"traceId":"fb8b3c1e8034abd6"},{"name":"next-build","duration":21320628,"timestamp":119486401051,"id":1,"tags":{"buildMode":"default","version":"16.2.3","bundler":"turbopack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1778927458647,"traceId":"fb8b3c1e8034abd6"}]
|
|
@@ -20,6 +20,14 @@ import useSWR from 'swr';
|
|
|
20
20
|
* so old hubs don't read as "something broke".
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
+
interface ServerAgent {
|
|
24
|
+
alias: string;
|
|
25
|
+
runtime: string | null;
|
|
26
|
+
status: 'working' | 'idle' | 'offline';
|
|
27
|
+
last_seen_at?: string | null;
|
|
28
|
+
progress?: number | null; // 0..1
|
|
29
|
+
}
|
|
30
|
+
|
|
23
31
|
interface ServerCard {
|
|
24
32
|
hostname: string;
|
|
25
33
|
ip?: string | null;
|
|
@@ -27,6 +35,17 @@ interface ServerCard {
|
|
|
27
35
|
cpu_cores: number;
|
|
28
36
|
mem_used_gb: number | null;
|
|
29
37
|
mem_total_gb: number | null;
|
|
38
|
+
/** Hero 1 v0.10.0: disk usage. Optional — older hubs don't report. */
|
|
39
|
+
disk_used_gb?: number | null;
|
|
40
|
+
disk_total_gb?: number | null;
|
|
41
|
+
/** Hero 1 v0.10.0: short history for sparklines (5-min sliding window).
|
|
42
|
+
* Each is the rolling 1-min average sampled at ~30s cadence (so ~10
|
|
43
|
+
* data points for 5-min). Optional — older hubs don't report. */
|
|
44
|
+
cpu_history?: number[];
|
|
45
|
+
mem_history?: number[];
|
|
46
|
+
/** Hero 2 v0.10.0: per-server agent rollup. Optional — older hubs
|
|
47
|
+
* send only aggregate agent_count. */
|
|
48
|
+
agents?: ServerAgent[];
|
|
30
49
|
agent_count: number;
|
|
31
50
|
status: 'online' | 'offline';
|
|
32
51
|
note?: string;
|
|
@@ -74,6 +93,95 @@ function Bar({ pct, label }: { pct: number; label: string }) {
|
|
|
74
93
|
);
|
|
75
94
|
}
|
|
76
95
|
|
|
96
|
+
/** Hero 1 v0.10.0 — inline SVG sparkline for 5-min rolling history.
|
|
97
|
+
* Zero-dep (no recharts). Renders a stroked polyline + filled area.
|
|
98
|
+
* Values are percentages (0..100); clamps inside. */
|
|
99
|
+
function Sparkline({ values, tint, label }: { values: number[]; tint: string; label: string }) {
|
|
100
|
+
if (!values || values.length < 2) return null;
|
|
101
|
+
const w = 100, h = 18;
|
|
102
|
+
const max = 100;
|
|
103
|
+
const stride = w / Math.max(1, values.length - 1);
|
|
104
|
+
const pts = values.map((v, i) => {
|
|
105
|
+
const x = i * stride;
|
|
106
|
+
const y = h - (Math.max(0, Math.min(max, v)) / max) * h;
|
|
107
|
+
return `${x.toFixed(1)},${y.toFixed(1)}`;
|
|
108
|
+
});
|
|
109
|
+
const polyline = pts.join(' ');
|
|
110
|
+
const area = `M0,${h} L${pts.join(' L')} L${w},${h} Z`;
|
|
111
|
+
return (
|
|
112
|
+
<svg
|
|
113
|
+
width="100%" height={h} viewBox={`0 0 ${w} ${h}`}
|
|
114
|
+
preserveAspectRatio="none" aria-label={`${label} 5-min history`}
|
|
115
|
+
data-server-sparkline={label}
|
|
116
|
+
>
|
|
117
|
+
<path d={area} fill={tint} opacity="0.18" />
|
|
118
|
+
<polyline points={polyline} fill="none" stroke={tint} strokeWidth="1.2" />
|
|
119
|
+
</svg>
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/** Hero 1 v0.10.0 — single health badge derived from the worst of
|
|
124
|
+
* CPU / Mem / Disk percentages. Green ≤60%, amber 60-85%, red >85%
|
|
125
|
+
* (same thresholds as Bar). Returns null when no percentages available
|
|
126
|
+
* (e.g. offline server) so the card layout reads "n/a · offline" instead. */
|
|
127
|
+
function HealthBadge({ cpu, mem, disk }: { cpu: number | null; mem: number | null; disk: number | null }) {
|
|
128
|
+
const vals = [cpu, mem, disk].filter((v): v is number => typeof v === 'number');
|
|
129
|
+
if (vals.length === 0) return null;
|
|
130
|
+
const worst = Math.max(...vals);
|
|
131
|
+
const t = barTint(worst);
|
|
132
|
+
const status = worst >= 85 ? 'red' : worst >= 60 ? 'amber' : 'green';
|
|
133
|
+
return (
|
|
134
|
+
<span
|
|
135
|
+
className="inline-block w-2 h-2 rounded-full shrink-0"
|
|
136
|
+
style={{ background: t.fill, boxShadow: `0 0 0 2px ${t.track}` }}
|
|
137
|
+
data-server-health-badge={status}
|
|
138
|
+
title={`worst: ${Math.round(worst)}%`}
|
|
139
|
+
/>
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** Hero 2 v0.10.0 — per-server expandable agent list. Renders compact
|
|
144
|
+
* rows: alias · runtime · status chip · last_seen relative. progress
|
|
145
|
+
* bar appears when an agent reports progress (0..1). When the upstream
|
|
146
|
+
* hub doesn't report agents[], the row falls through to a small
|
|
147
|
+
* "agent list pending hub upgrade" hint. */
|
|
148
|
+
function AgentList({ agents }: { agents?: ServerAgent[] }) {
|
|
149
|
+
if (!agents || agents.length === 0) {
|
|
150
|
+
return (
|
|
151
|
+
<div className="text-[9px] text-[var(--fg-dim)] font-mono italic px-1 py-1">
|
|
152
|
+
agent rollup pending hub ≥ 0.8.2-preview
|
|
153
|
+
</div>
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
return (
|
|
157
|
+
<ul className="space-y-1" data-server-agent-list>
|
|
158
|
+
{agents.map(a => {
|
|
159
|
+
const statusColor =
|
|
160
|
+
a.status === 'working' ? '#10b981' :
|
|
161
|
+
a.status === 'idle' ? '#06b6d4' : '#6b7280';
|
|
162
|
+
return (
|
|
163
|
+
<li
|
|
164
|
+
key={a.alias}
|
|
165
|
+
className="flex items-center gap-1.5 text-[10px] font-mono"
|
|
166
|
+
data-server-agent={a.alias}
|
|
167
|
+
>
|
|
168
|
+
<span className="w-1.5 h-1.5 rounded-full shrink-0" style={{ background: statusColor }} />
|
|
169
|
+
<span className="font-semibold truncate" style={{ color: 'var(--fg)' }}>{a.alias}</span>
|
|
170
|
+
{a.runtime && (
|
|
171
|
+
<span className="text-[9px] text-[var(--fg-dim)] shrink-0">· {a.runtime}</span>
|
|
172
|
+
)}
|
|
173
|
+
{typeof a.progress === 'number' && a.progress > 0 && (
|
|
174
|
+
<span className="ml-auto text-[9px] tabular-nums text-[var(--fg-muted)]">
|
|
175
|
+
{Math.round(a.progress * 100)}%
|
|
176
|
+
</span>
|
|
177
|
+
)}
|
|
178
|
+
</li>
|
|
179
|
+
);
|
|
180
|
+
})}
|
|
181
|
+
</ul>
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
77
185
|
export function ServersDrawer() {
|
|
78
186
|
const [open, setOpen] = useState(false);
|
|
79
187
|
// Drawer state is per-user-machine — persist like the other dashboard
|
|
@@ -1690,7 +1690,7 @@ export function TopoGraph({ sessions, sseSessions, renameSignal }: TopoGraphProp
|
|
|
1690
1690
|
weight; cyan-400/60 + ring-inset retained. The
|
|
1691
1691
|
R163/R196 hover/active deeps + R249 chrome-pop
|
|
1692
1692
|
click feedback continue unchanged. */
|
|
1693
|
-
className={`px-2.5 py-1 transition-colors focus:outline-none focus-visible:ring-1 focus-visible:ring-cyan-400/60 focus-visible:ring-inset ${layout === 'ring' ? 'bg-cyan-500/15 text-cyan-300 hover:bg-cyan-500/20 active:bg-cyan-500/25' : 'text-gray-
|
|
1693
|
+
className={`px-2.5 py-1 transition-colors focus:outline-none focus-visible:ring-1 focus-visible:ring-cyan-400/60 focus-visible:ring-inset ${layout === 'ring' ? 'bg-cyan-500/15 text-cyan-300 font-medium hover:bg-cyan-500/20 active:bg-cyan-500/25' : 'text-gray-400 hover:text-cyan-300 hover:bg-cyan-500/5 active:bg-cyan-500/15'} ${chromePopping === 'layout-ring' ? ' anet-chrome-pop' : ''}`}
|
|
1694
1694
|
>
|
|
1695
1695
|
Ring
|
|
1696
1696
|
</button>
|
|
@@ -1707,7 +1707,7 @@ export function TopoGraph({ sessions, sseSessions, renameSignal }: TopoGraphProp
|
|
|
1707
1707
|
// Round 306 / Loop: focus-visible:ring-2 → ring-1 sibling
|
|
1708
1708
|
// change to Ring above — unifies focus-ring width across
|
|
1709
1709
|
// all chrome buttons.
|
|
1710
|
-
className={`px-2.5 py-1 border-l transition-colors focus:outline-none focus-visible:ring-1 focus-visible:ring-cyan-400/60 focus-visible:ring-inset ${layout === 'grid' ? 'bg-cyan-500/15 text-cyan-300 hover:bg-cyan-500/20 active:bg-cyan-500/25' : 'text-gray-
|
|
1710
|
+
className={`px-2.5 py-1 border-l transition-colors focus:outline-none focus-visible:ring-1 focus-visible:ring-cyan-400/60 focus-visible:ring-inset ${layout === 'grid' ? 'bg-cyan-500/15 text-cyan-300 font-medium hover:bg-cyan-500/20 active:bg-cyan-500/25' : 'text-gray-400 hover:text-cyan-300 hover:bg-cyan-500/5 active:bg-cyan-500/15'} ${chromePopping === 'layout-grid' ? ' anet-chrome-pop' : ''}`}
|
|
1711
1711
|
/* Round 268 / Loop: Grid button's left border (the
|
|
1712
1712
|
internal divider between Ring and Grid) picks up
|
|
1713
1713
|
pal.containerBorder, matching the wrapper change at
|
|
@@ -7409,7 +7409,7 @@ export function TopoGraph({ sessions, sseSessions, renameSignal }: TopoGraphProp
|
|
|
7409
7409
|
/ fullscreen) preview their active state on hover.
|
|
7410
7410
|
Pure actions (zoom -/+, reset) stay white — they
|
|
7411
7411
|
aren't toggles, have no active state to preview. */
|
|
7412
|
-
className={`px-2 py-1 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-cyan-400/60 focus-visible:ring-inset ${idx > 0 ? 'border-l' : ''} ${nodeScale === v ? 'bg-cyan-500/15 text-cyan-300 hover:bg-cyan-500/20 active:bg-cyan-500/25' : 'hover:bg-cyan-500/5 active:bg-cyan-500/15'}${chromePopping === popKey ? ' anet-chrome-pop' : ''}`}
|
|
7412
|
+
className={`px-2 py-1 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-cyan-400/60 focus-visible:ring-inset ${idx > 0 ? 'border-l' : ''} ${nodeScale === v ? 'bg-cyan-500/15 text-cyan-300 font-medium hover:bg-cyan-500/20 active:bg-cyan-500/25' : 'hover:bg-cyan-500/5 active:bg-cyan-500/15'}${chromePopping === popKey ? ' anet-chrome-pop' : ''}`}
|
|
7413
7413
|
style={{ color: nodeScale === v ? undefined : pal.legendText, borderColor: pal.containerBorder }}
|
|
7414
7414
|
>
|
|
7415
7415
|
{lbl}
|
|
@@ -7612,7 +7612,7 @@ export function TopoGraph({ sessions, sseSessions, renameSignal }: TopoGraphProp
|
|
|
7612
7612
|
the nodeSize buttons at line ~6711. */
|
|
7613
7613
|
className={`p-1.5 rounded-md border transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-cyan-400/60 ${
|
|
7614
7614
|
isFullscreen
|
|
7615
|
-
? 'bg-cyan-500/15 text-cyan-300 hover:bg-cyan-500/20 active:bg-cyan-500/25'
|
|
7615
|
+
? 'bg-cyan-500/15 text-cyan-300 font-medium hover:bg-cyan-500/20 active:bg-cyan-500/25'
|
|
7616
7616
|
: 'hover:bg-cyan-500/5 active:bg-cyan-500/15'
|
|
7617
7617
|
}${chromePopping === 'fullscreen' ? ' anet-chrome-pop' : ''}`}
|
|
7618
7618
|
style={{
|