@overlordai/server 1.0.77 → 1.0.78
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/dist/database/repositories/task.repository.d.ts +1 -0
- package/dist/database/repositories/task.repository.d.ts.map +1 -1
- package/dist/database/repositories/task.repository.js +7 -0
- package/dist/database/repositories/task.repository.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/web/frame-handlers/progress.handler.d.ts.map +1 -1
- package/dist/web/frame-handlers/progress.handler.js +4 -0
- package/dist/web/frame-handlers/progress.handler.js.map +1 -1
- package/package.json +4 -4
- package/public/assets/{AccessTokensPage-Dxofb4Gv.js → AccessTokensPage-B6_fWEBP.js} +1 -1
- package/public/assets/{AdminPage-BZOcymMl.js → AdminPage-C_v25c0x.js} +1 -1
- package/public/assets/{ApiReferencePage-DEUChB1Y.js → ApiReferencePage-CYLRiFX7.js} +1 -1
- package/public/assets/{ArchitecturePage-UmnUjr9Y.js → ArchitecturePage-BRhekDQJ.js} +1 -1
- package/public/assets/{AuditLogPage-C9vfr3A4.js → AuditLogPage-odG3piBe.js} +2 -2
- package/public/assets/{BindPlatformPage-BB2ON_iu.js → BindPlatformPage-CLvh8Bp2.js} +1 -1
- package/public/assets/{BotIntegrationPage-BPvtNAdE.js → BotIntegrationPage-DFIKhj9d.js} +1 -1
- package/public/assets/{BotManage-Bcq_Aq0D.js → BotManage-2HtDdVv1.js} +1 -1
- package/public/assets/{BotSetupPage-G0027SKy.js → BotSetupPage-n8DW-JIc.js} +1 -1
- package/public/assets/{ChangelogPage-VonXYKXf.js → ChangelogPage-ljWPJI_C.js} +1 -1
- package/public/assets/{CliReferencePage-21hiD60B.js → CliReferencePage-D6HE7aqg.js} +1 -1
- package/public/assets/{DeploymentPage-2IYwETKo.js → DeploymentPage-BkC2WS0X.js} +1 -1
- package/public/assets/{DevWorkflowPage-oxcb8Jir.js → DevWorkflowPage-Zjb_g_7T.js} +1 -1
- package/public/assets/{DeveloperManage-D2nIFb9a.js → DeveloperManage-C3yFOhR0.js} +2 -2
- package/public/assets/{DeveloperSetupPage-C7JiOBge.js → DeveloperSetupPage-M6J5WtmL.js} +1 -1
- package/public/assets/{DocsIndexPage-C978CHkY.js → DocsIndexPage-BdYY0bOk.js} +4 -4
- package/public/assets/DocsLayout-BbAqJHIO.js +1 -0
- package/public/assets/{DocsPrimitives-RSr50li3.js → DocsPrimitives-kq9vBAzD.js} +1 -1
- package/public/assets/{EditProjectPage-BWSuoeF1.js → EditProjectPage-DisNJeAg.js} +2 -2
- package/public/assets/{EmptyState-BvjX-NgG.js → EmptyState-BQVGct4g.js} +1 -1
- package/public/assets/{EnvVariablesPage-Bl5Irz5w.js → EnvVariablesPage-CuHHcFKu.js} +1 -1
- package/public/assets/{HomePage-BA3f2KHB.js → HomePage-DdkVTsOL.js} +1 -1
- package/public/assets/{InfoRow-CZ_jBwp8.js → InfoRow-Dpfw3QiV.js} +1 -1
- package/public/assets/{InstallationPage-XAZu75Zy.js → InstallationPage-BKVql2sz.js} +1 -1
- package/public/assets/LandingPage-bv7kElRB.js +33 -0
- package/public/assets/{LocalDevelopmentPage-D9ogMPfi.js → LocalDevelopmentPage-CUkTIbZb.js} +1 -1
- package/public/assets/{LoginPage-BV9Dmn1G.js → LoginPage-B3Rs6BOm.js} +1 -1
- package/public/assets/{MetricBar-CrOT-r6q.js → MetricBar-CfTtNirJ.js} +1 -1
- package/public/assets/{NotFoundPage-DYikabLl.js → NotFoundPage-DyPcvSl9.js} +1 -1
- package/public/assets/{OnboardingGuide-BfUJC9ZP.js → OnboardingGuide-C87ArIaT.js} +1 -1
- package/public/assets/{PermissionsPage-e_EgAqUf.js → PermissionsPage-M4x6R-By.js} +1 -1
- package/public/assets/{PipelineConfigPage-kS4vd4NL.js → PipelineConfigPage-BcrMm1vI.js} +1 -1
- package/public/assets/{PipelineEditorPage-98ODGsrk.js → PipelineEditorPage-CAYiXX0V.js} +1 -1
- package/public/assets/{ProfilePage-Bsk1uz52.js → ProfilePage-8l-iMHnM.js} +1 -1
- package/public/assets/{ProjectDetailPage-CLuNH358.js → ProjectDetailPage-33RT7os8.js} +3 -3
- package/public/assets/{ProjectListPage-vawhkdci.js → ProjectListPage-CUHo7VwS.js} +1 -1
- package/public/assets/{PtyTerminal-Dkl65ubQ.js → PtyTerminal-GBlFxP4w.js} +12 -7
- package/public/assets/{QuickAuth-BAgFqySj.js → QuickAuth-CKWWIMdj.js} +1 -1
- package/public/assets/{RemoveMemberConfirmDialog-DjrDzzz5.js → RemoveMemberConfirmDialog-DebT7Iww.js} +1 -1
- package/public/assets/{Select-D3Sy8S-M.js → Select-whtPZbZ2.js} +1 -1
- package/public/assets/{SettingsPage-jZLNG_Lw.js → SettingsPage-C2Db7obY.js} +1 -1
- package/public/assets/{Skeleton-BepyS_5Q.js → Skeleton-CjvMhglG.js} +1 -1
- package/public/assets/{SkillPage-DOfSHnTC.js → SkillPage-Cwg7zBb6.js} +1 -1
- package/public/assets/{TaskDetailPage-DU_kA_pl.js → TaskDetailPage-BLZqkopc.js} +2 -2
- package/public/assets/{TaskListPage-Ds_6TpQY.js → TaskListPage-CI9mCUsn.js} +1 -1
- package/public/assets/{TaskStatusBadge-D4UjPJHk.js → TaskStatusBadge-PdGq2XxP.js} +1 -1
- package/public/assets/{TerminalHomePage-B5rv4oBA.js → TerminalHomePage-D-w4h3iq.js} +3 -8
- package/public/assets/{TokenManage-B-dFDPwS.js → TokenManage-COQZNfbz.js} +1 -1
- package/public/assets/{TotpSetupPage-ILZIheM6.js → TotpSetupPage-ebavRpD7.js} +1 -1
- package/public/assets/WorkerDetailPage-DpFTilWr.js +1 -0
- package/public/assets/WorkerListPage-DoQxA9Md.js +6 -0
- package/public/assets/{WorkerOperationsPage-DIJh92Gv.js → WorkerOperationsPage-CN4pXG5t.js} +1 -1
- package/public/assets/{WorkerSetupGuidePage-BBREO3mC.js → WorkerSetupGuidePage-Wvck_cEr.js} +1 -1
- package/public/assets/{WorkerSetupPage-DlMzDIyC.js → WorkerSetupPage-CV35GYSK.js} +1 -1
- package/public/assets/{arrow-left-CC_JsKtL.js → arrow-left-XmcNxEPm.js} +1 -1
- package/public/assets/{arrow-right-DkLd7pME.js → arrow-right-Bm7UfWKB.js} +1 -1
- package/public/assets/{bot-CJCz18Bp.js → bot-DV0Ml0Pr.js} +1 -1
- package/public/assets/{chevron-right-CP9UhYte.js → chevron-right-BSazmjxp.js} +1 -1
- package/public/assets/{copy-CtXbutie.js → copy-CX4krhaQ.js} +1 -1
- package/public/assets/{download-BwEgKfzE.js → download-DG52uO3H.js} +1 -1
- package/public/assets/{external-link-D1bp1HzW.js → external-link-aIJ6uRqy.js} +1 -1
- package/public/assets/{index-T5O3DlGh.css → index-CB29rhot.css} +1 -1
- package/public/assets/{index-BcZzdu9-.js → index-y1Zb2xN4.js} +55 -45
- package/public/assets/{key-Ct-x_Yiu.js → key-DU4O771U.js} +1 -1
- package/public/assets/{loader-circle-oshIXC7W.js → loader-circle-DzBlc5as.js} +1 -1
- package/public/assets/{pencil-DRlJf2FR.js → pencil-Ca2CRHc2.js} +1 -1
- package/public/assets/{plus-brBzlNyd.js → plus-QoSQh1Ci.js} +1 -1
- package/public/assets/{rotate-ccw-cx97vO_1.js → rotate-ccw-MV4xHG6J.js} +1 -1
- package/public/assets/{scroll-text-x0p-Ikiw.js → scroll-text-BYr5IgPD.js} +1 -1
- package/public/assets/{settings-B89fe2lq.js → settings-Dz3BpGMr.js} +1 -1
- package/public/assets/{status-colors-D1WMNf6w.js → status-colors-DxwFeYp0.js} +1 -1
- package/public/assets/{task-constants-DE0qX24g.js → task-constants-DnSoMOPb.js} +1 -1
- package/public/assets/{trash-2-BUyInSzl.js → trash-2-DH-jzGMr.js} +1 -1
- package/public/assets/{useFetch-DbOROShl.js → useFetch-BuZrNB5l.js} +1 -1
- package/public/assets/{users-CeQmyC1y.js → users-Cs7l6K9q.js} +1 -1
- package/public/assets/{wifi-CFEQlNIL.js → wifi-DssF_9t2.js} +1 -1
- package/public/assets/{workflow-BlMxia3I.js → workflow-l3FdQ5M5.js} +1 -1
- package/public/index.html +3 -3
- package/public/sw.js +1 -1
- package/public/assets/DocsLayout-CmkqXaYd.js +0 -1
- package/public/assets/LandingPage-CZ_rsXBJ.js +0 -28
- package/public/assets/WorkerDetailPage-COI-BW1w.js +0 -1
- package/public/assets/WorkerListPage-F8t-zQwF.js +0 -1
- package/public/assets/code-xml-BepAbll9.js +0 -6
- package/public/assets/layout-grid-DBcDKUA5.js +0 -6
- package/public/assets/message-square-DdtRCx9G.js +0 -6
- package/public/assets/zap-B7713iF1.js +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
import{W as r,
|
|
1
|
+
import{W as r,m as e,U as s,V as u,I as a}from"./index-y1Zb2xN4.js";const n={[e.QUEUED]:"var(--text-muted)",[e.ASSIGNED]:"#60a5fa",[e.RUNNING]:"var(--accent)",[e.SUSPENDED]:"var(--warning)",[e.COMPLETED]:"var(--accent)",[e.FAILED]:"var(--destructive)",[e.CANCELLED]:"var(--text-muted)"};function v(t){return n[t]??"var(--text-muted)"}const c={[r.ONLINE]:"var(--accent)",[r.OFFLINE]:"var(--destructive)",[r.DRAINING]:"var(--warning)",[r.DECOMMISSIONED]:"var(--text-muted)"};function E(t){return c[t]??"var(--text-muted)"}function x(t){switch(t){case s.ACTIVE:return"text-green-400";case s.DISABLED:return"text-red-400";default:return"text-[var(--text-muted)]"}}function S(t){switch(t){case a.ACTIVE:return"text-green-400";case a.USED:return"text-blue-400";case a.REVOKED:return"text-red-400";case a.EXPIRED:return"text-[var(--text-muted)]";default:return"text-[var(--text-muted)]"}}function d(t){switch(t){case u.ACTIVE:return"text-green-400";case"error":return"text-red-400";default:return"text-[var(--text-muted)]"}}function i(t){return t>.8?"var(--destructive)":t>.6?"var(--warning)":"var(--accent)"}export{v as a,i as b,x as c,d,S as e,E as g,n as t,c as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{l as f,h as n,m as c}from"./index-y1Zb2xN4.js";const T=f((t,e)=>({tasks:[],currentTask:null,loading:!1,error:null,nextCursor:null,_fetchTasksAbort:null,fetchTasks:async a=>{const s=e()._fetchTasksAbort;s&&s.abort();const o=new AbortController;t({loading:!0,error:null,_fetchTasksAbort:o});try{const r={};a!=null&&a.status&&(r.status=a.status),a!=null&&a.projectKey&&(r.projectKey=a.projectKey),a!=null&&a.cursor&&(r.cursor=a.cursor),a!=null&&a.limit&&(r.limit=String(a.limit));const l=await n.get("web/tasks",{searchParams:r,signal:o.signal}).json();a!=null&&a.cursor?t(i=>({tasks:[...i.tasks,...l.data],nextCursor:l.nextCursor??null,_fetchTasksAbort:null})):t({tasks:l.data,nextCursor:l.nextCursor??null,_fetchTasksAbort:null})}catch(r){if(r instanceof DOMException&&r.name==="AbortError")return;t({error:r instanceof Error?r.message:"Failed to fetch tasks"})}finally{t({loading:!1})}},fetchTask:async a=>{t({loading:!0,error:null});try{const s=await n.get(`web/tasks/${a}`).json();t({currentTask:s})}catch(s){t({error:s instanceof Error?s.message:"Failed to fetch task"})}finally{t({loading:!1})}},createTask:async a=>{t({error:null});try{const s=await n.post("web/tasks",{json:a}).json();return t(o=>({tasks:[s,...o.tasks]})),s}catch(s){throw t({error:s instanceof Error?s.message:"Failed to create task"}),s}},cancelTask:async a=>{t({error:null});try{await n.post(`web/tasks/${a}/cancel`);const{currentTask:s}=e();(s==null?void 0:s.id)===a&&await e().fetchTask(a)}catch(s){throw t({error:s instanceof Error?s.message:"Failed to cancel task"}),s}},reset:()=>{t({tasks:[],currentTask:null,loading:!1,error:null,nextCursor:null})}})),h=[c.COMPLETED,c.FAILED,c.CANCELLED],b=[{value:"feat",label:"feat"},{value:"fix",label:"fix"},{value:"refactor",label:"refactor"},{value:"docs",label:"docs"},{value:"chore",label:"chore"}];export{h as T,b as a,T as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./index-
|
|
1
|
+
import{r as e}from"./index-y1Zb2xN4.js";function p(c,f){const[l,i]=e.useState(null),[d,u]=e.useState(!0),[R,a]=e.useState(null),o=e.useRef(c);o.current=c;const r=e.useRef(0),n=e.useCallback(async()=>{const s=++r.current;u(!0),a(null);try{const t=await o.current();s===r.current&&i(t)}catch(t){if(s===r.current){const g=t instanceof Error?t.message:"An unexpected error occurred";a(g)}}finally{s===r.current&&u(!1)}},f);return e.useEffect(()=>{n()},[n]),{data:l,loading:d,error:R,refetch:n}}export{p as u};
|
package/public/index.html
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<meta name="twitter:description" content="turn your subscriptions and machines into a dev team that never sleeps. dispatch tasks, ai agents execute in parallel, watch live or come back to finished PRs." />
|
|
15
15
|
<meta name="twitter:image" content="/og-image.png" />
|
|
16
16
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
17
|
-
<meta name="
|
|
17
|
+
<meta name="mobile-web-app-capable" content="yes">
|
|
18
18
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
19
19
|
<meta name="apple-mobile-web-app-title" content="Overlord">
|
|
20
20
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png">
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap"
|
|
29
29
|
rel="stylesheet"
|
|
30
30
|
/>
|
|
31
|
-
<script type="module" crossorigin src="/assets/index-
|
|
32
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
31
|
+
<script type="module" crossorigin src="/assets/index-y1Zb2xN4.js"></script>
|
|
32
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CB29rhot.css">
|
|
33
33
|
<link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
|
|
34
34
|
<body>
|
|
35
35
|
<div id="root"></div>
|
package/public/sw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
if(!self.define){let s,e={};const l=(l,i)=>(l=new URL(l+".js",i).href,e[l]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()}).then(()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s}));self.define=(i,n)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let
|
|
1
|
+
if(!self.define){let s,e={};const l=(l,i)=>(l=new URL(l+".js",i).href,e[l]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()}).then(()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s}));self.define=(i,n)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let a={};const o=s=>l(s,r),u={module:{uri:r},exports:a,require:o};e[r]=Promise.all(i.map(s=>u[s]||o(s))).then(s=>(n(...s),a))}}define(["./workbox-6e9b121d"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"og-image.png",revision:"f1563b4bdc7d1a4ab0aef864b0c2294e"},{url:"index.html",revision:"778280203b50394ae86a49ee4050b2e7"},{url:"icon-maskable-512x512.png",revision:"69ada030d99c4a087bc309c00d716654"},{url:"icon-maskable-192x192.png",revision:"bf88226fe789dcb35bf89a307d3ba1af"},{url:"icon-512x512.png",revision:"74e561c3eb152bbb9cdcb333b5f1f3be"},{url:"icon-192x192.png",revision:"0bc2b74efb274c01d9eb50f717f4b7cf"},{url:"favicon.svg",revision:"e91ea32c7308cc2267ae15a5974a27f8"},{url:"apple-touch-icon-180x180.png",revision:"34c1b155ebc55bee221777f86f4612d8"},{url:"apple-touch-icon-152x152.png",revision:"8cc7ef3bc3aa19c3d8a29a58646d0636"},{url:"apple-touch-icon-120x120.png",revision:"7057fb6fb60df3fcf3cd49883db13be9"},{url:"assets/workflow-l3FdQ5M5.js",revision:null},{url:"assets/wifi-DssF_9t2.js",revision:null},{url:"assets/users-Cs7l6K9q.js",revision:null},{url:"assets/useFetch-BuZrNB5l.js",revision:null},{url:"assets/trash-2-DH-jzGMr.js",revision:null},{url:"assets/task-constants-DnSoMOPb.js",revision:null},{url:"assets/string-B39tzdVK.js",revision:null},{url:"assets/status-colors-DxwFeYp0.js",revision:null},{url:"assets/settings-Dz3BpGMr.js",revision:null},{url:"assets/scroll-text-BYr5IgPD.js",revision:null},{url:"assets/rotate-ccw-MV4xHG6J.js",revision:null},{url:"assets/plus-QoSQh1Ci.js",revision:null},{url:"assets/pencil-Ca2CRHc2.js",revision:null},{url:"assets/password-CHk45-jw.js",revision:null},{url:"assets/loader-circle-DzBlc5as.js",revision:null},{url:"assets/key-DU4O771U.js",revision:null},{url:"assets/index-y1Zb2xN4.js",revision:null},{url:"assets/index-CB29rhot.css",revision:null},{url:"assets/external-link-aIJ6uRqy.js",revision:null},{url:"assets/download-DG52uO3H.js",revision:null},{url:"assets/date-BdNtiQTP.js",revision:null},{url:"assets/copy-CX4krhaQ.js",revision:null},{url:"assets/chevron-right-BSazmjxp.js",revision:null},{url:"assets/bot-DV0Ml0Pr.js",revision:null},{url:"assets/arrow-right-Bm7UfWKB.js",revision:null},{url:"assets/arrow-left-XmcNxEPm.js",revision:null},{url:"assets/WorkerSetupPage-CV35GYSK.js",revision:null},{url:"assets/WorkerSetupGuidePage-Wvck_cEr.js",revision:null},{url:"assets/WorkerOperationsPage-CN4pXG5t.js",revision:null},{url:"assets/WorkerListPage-DoQxA9Md.js",revision:null},{url:"assets/WorkerDetailPage-DpFTilWr.js",revision:null},{url:"assets/TotpSetupPage-ebavRpD7.js",revision:null},{url:"assets/TokenManage-COQZNfbz.js",revision:null},{url:"assets/TerminalHomePage-D-w4h3iq.js",revision:null},{url:"assets/TaskStatusBadge-PdGq2XxP.js",revision:null},{url:"assets/TaskListPage-CI9mCUsn.js",revision:null},{url:"assets/TaskDetailPage-BLZqkopc.js",revision:null},{url:"assets/SkillPage-Cwg7zBb6.js",revision:null},{url:"assets/Skeleton-CjvMhglG.js",revision:null},{url:"assets/SettingsPage-C2Db7obY.js",revision:null},{url:"assets/Select-whtPZbZ2.js",revision:null},{url:"assets/RemoveMemberConfirmDialog-DebT7Iww.js",revision:null},{url:"assets/QuickAuth-CKWWIMdj.js",revision:null},{url:"assets/PtyTerminal-GBlFxP4w.js",revision:null},{url:"assets/PtyTerminal-Beg8tuEN.css",revision:null},{url:"assets/ProjectListPage-CUHo7VwS.js",revision:null},{url:"assets/ProjectDetailPage-33RT7os8.js",revision:null},{url:"assets/ProfilePage-8l-iMHnM.js",revision:null},{url:"assets/PipelineEditorPage-CAYiXX0V.js",revision:null},{url:"assets/PipelineConfigPage-BcrMm1vI.js",revision:null},{url:"assets/PermissionsPage-M4x6R-By.js",revision:null},{url:"assets/OnboardingGuide-C87ArIaT.js",revision:null},{url:"assets/NotFoundPage-DyPcvSl9.js",revision:null},{url:"assets/MetricBar-CfTtNirJ.js",revision:null},{url:"assets/LoginPage-B3Rs6BOm.js",revision:null},{url:"assets/LocalDevelopmentPage-CUkTIbZb.js",revision:null},{url:"assets/LandingPage-bv7kElRB.js",revision:null},{url:"assets/InstallationPage-BKVql2sz.js",revision:null},{url:"assets/InfoRow-Dpfw3QiV.js",revision:null},{url:"assets/HomePage-DdkVTsOL.js",revision:null},{url:"assets/EnvVariablesPage-CuHHcFKu.js",revision:null},{url:"assets/EmptyState-BQVGct4g.js",revision:null},{url:"assets/EditProjectPage-DisNJeAg.js",revision:null},{url:"assets/DocsPrimitives-kq9vBAzD.js",revision:null},{url:"assets/DocsLayout-BbAqJHIO.js",revision:null},{url:"assets/DocsIndexPage-BdYY0bOk.js",revision:null},{url:"assets/DeveloperSetupPage-M6J5WtmL.js",revision:null},{url:"assets/DeveloperManage-C3yFOhR0.js",revision:null},{url:"assets/DevWorkflowPage-Zjb_g_7T.js",revision:null},{url:"assets/DeploymentPage-BkC2WS0X.js",revision:null},{url:"assets/CliReferencePage-D6HE7aqg.js",revision:null},{url:"assets/ChangelogPage-ljWPJI_C.js",revision:null},{url:"assets/BotSetupPage-n8DW-JIc.js",revision:null},{url:"assets/BotManage-2HtDdVv1.js",revision:null},{url:"assets/BotIntegrationPage-DFIKhj9d.js",revision:null},{url:"assets/BindPlatformPage-CLvh8Bp2.js",revision:null},{url:"assets/AuditLogPage-odG3piBe.js",revision:null},{url:"assets/ArchitecturePage-BRhekDQJ.js",revision:null},{url:"assets/ApiReferencePage-CYLRiFX7.js",revision:null},{url:"assets/AdminPage-C_v25c0x.js",revision:null},{url:"assets/AccessTokensPage-B6_fWEBP.js",revision:null},{url:"apple-touch-icon-180x180.png",revision:"34c1b155ebc55bee221777f86f4612d8"},{url:"favicon.svg",revision:"e91ea32c7308cc2267ae15a5974a27f8"},{url:"icon-192x192.png",revision:"0bc2b74efb274c01d9eb50f717f4b7cf"},{url:"icon-512x512.png",revision:"74e561c3eb152bbb9cdcb333b5f1f3be"},{url:"icon-maskable-192x192.png",revision:"bf88226fe789dcb35bf89a307d3ba1af"},{url:"icon-maskable-512x512.png",revision:"69ada030d99c4a087bc309c00d716654"},{url:"manifest.webmanifest",revision:"c35fecd3fb20dd6d473c713737b26dd4"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("/index.html"))),s.registerRoute(/^https:\/\/fonts\.googleapis\.com/,new s.CacheFirst({cacheName:"google-fonts-stylesheets",plugins:[]}),"GET"),s.registerRoute(/^https:\/\/fonts\.gstatic\.com/,new s.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new s.ExpirationPlugin({maxEntries:10,maxAgeSeconds:31536e3})]}),"GET")});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as i,f as x,j as a,L as m,b as d,J as p,O as b}from"./index-BcZzdu9-.js";import{A as f}from"./arrow-left-CC_JsKtL.js";import{C as u}from"./code-xml-BepAbll9.js";import{M as v}from"./message-square-DdtRCx9G.js";import{L as h}from"./layout-grid-DBcDKUA5.js";const t=[{to:"/docs/cli",label:"cli",icon:d},{to:"/docs/api",label:"api",icon:u},{to:"/docs/bot",label:"bot",icon:v},{to:"/docs/all",label:"all",icon:h}],j=new Set(t.map(s=>s.to));function w(){const{t:s}=i(),r=x(),o=!j.has(r.pathname);return a.jsxs("div",{className:"flex h-full flex-col",children:[a.jsxs("nav",{className:"flex items-center border-b border-[var(--border)] bg-[var(--bg-card)] px-4 md:px-6 overflow-x-auto no-scrollbar",children:[o&&a.jsxs(m,{to:"/docs/all",className:"mr-3 shrink-0 flex items-center gap-1 text-xs text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:[a.jsx(f,{size:12}),s("docs.docs_back")]}),t.map(({to:e,label:c,icon:l})=>a.jsxs(p,{to:e,className:({isActive:n})=>`flex items-center gap-1.5 px-3 py-3 text-xs lowercase border-b-2 transition-colors shrink-0 ${n||o&&e==="/docs/all"?"border-[var(--accent)] text-[var(--accent)]":"border-transparent text-[var(--text-secondary)] hover:text-[var(--text-primary)]"}`,children:[a.jsx(l,{size:14}),a.jsx("span",{children:c})]},e))]}),a.jsx("main",{className:"flex-1 overflow-auto p-4 md:p-6",children:a.jsx(b,{})})]})}export{w as default};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import{c as l,u,a as b,r as x,j as e,T as _,L as i,S as f,b as y,d as j,P as N,C as w}from"./index-BcZzdu9-.js";import{A as m}from"./arrow-right-DkLd7pME.js";import{Z as K}from"./zap-B7713iF1.js";import{B as k}from"./bot-CJCz18Bp.js";import{W as z,G as S}from"./workflow-BlMxia3I.js";import{U as T}from"./users-CeQmyC1y.js";import{L}from"./layout-grid-DBcDKUA5.js";import{C}from"./copy-CtXbutie.js";/**
|
|
2
|
-
* @license lucide-react v0.469.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const M=l("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
7
|
-
* @license lucide-react v0.469.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const I=l("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
|
12
|
-
* @license lucide-react v0.469.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const A=l("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
|
|
17
|
-
* @license lucide-react v0.469.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const B=l("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
|
22
|
-
* @license lucide-react v0.469.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const E=l("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),h=[{icon:f,titleKey:"landing.step_define",descKey:"landing.step_define_desc"},{icon:E,titleKey:"landing.step_dispatch",descKey:"landing.step_dispatch_desc"},{icon:M,titleKey:"landing.step_monitor",descKey:"landing.step_monitor_desc"}],G=[{icon:K,titleKey:"landing.feature_trigger",descKey:"landing.feature_trigger_desc"},{icon:I,titleKey:"landing.feature_remote",descKey:"landing.feature_remote_desc"},{icon:A,titleKey:"landing.feature_pool",descKey:"landing.feature_pool_desc"}],F=[{icon:y,titleKey:"landing.feature_terminal",descKey:"landing.feature_terminal_desc"},{icon:k,titleKey:"landing.feature_multi_agent",descKey:"landing.feature_multi_agent_desc"},{icon:z,titleKey:"landing.feature_pipeline",descKey:"landing.feature_pipeline_desc"},{icon:S,titleKey:"landing.feature_routing",descKey:"landing.feature_routing_desc"},{icon:T,titleKey:"landing.feature_collab",descKey:"landing.feature_collab_desc"},{icon:j,titleKey:"landing.feature_security",descKey:"landing.feature_security_desc"}],R=[{num:"01",titleKey:"landing.setup_step_1_title",descKey:"landing.setup_step_1_desc",commandKey:"landing.setup_step_1_command",linkLabel:"landing.setup_step_1_link",linkTo:"/docs/cli",icon:B},{num:"02",titleKey:"landing.setup_step_2_title",descKey:"landing.setup_step_2_desc",commandKey:"landing.setup_step_2_command",linkLabel:"landing.setup_step_2_link",linkTo:"/workers/setup",icon:L},{num:"03",titleKey:"landing.setup_step_3_title",descKey:"landing.setup_step_3_desc",commandKey:"landing.setup_step_3_command",linkLabel:"landing.setup_step_3_link",linkTo:"/docs/cli",icon:y}];function W({step:n,t:s}){const[t,c]=x.useState(!1),d=s(n.commandKey);async function p(){try{await navigator.clipboard.writeText(d),c(!0),setTimeout(()=>c(!1),2e3)}catch{}}return e.jsx("div",{className:"group rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] transition-shadow hover:shadow-md",children:e.jsxs("div",{className:"flex flex-col gap-4 p-5 sm:flex-row sm:items-start sm:gap-6",children:[e.jsxs("div",{className:"flex items-center gap-4 sm:w-56 sm:flex-shrink-0",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-[4px] bg-[var(--accent)]/10 text-[var(--accent)]",children:e.jsx(n.icon,{size:20})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[11px] font-semibold lowercase tracking-widest text-[var(--text-muted)]",children:s("landing.step_n",{n:n.num})}),e.jsx("h3",{className:"text-sm font-semibold text-[var(--text-primary)]",children:s(n.titleKey)})]})]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-xs leading-relaxed text-[var(--text-secondary)]",children:s(n.descKey)}),e.jsxs("div",{className:"mt-3 flex items-center justify-between gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-4 py-2.5",children:[e.jsx("code",{className:"overflow-x-auto whitespace-pre text-[11px] text-[var(--text-primary)]",children:d.split(`
|
|
27
|
-
`).map((o,a)=>e.jsxs("span",{children:[a>0&&`
|
|
28
|
-
`,e.jsx("span",{className:"select-none text-[var(--text-muted)]",children:"$ "}),o]},a))}),e.jsx("button",{onClick:p,className:"ml-2 flex-shrink-0 rounded-[4px] p-1.5 text-[var(--text-secondary)] transition-colors hover:bg-[var(--border)]","aria-label":s("landing.copy_install_command"),children:t?e.jsx(w,{size:14,className:"text-[var(--accent)]"}):e.jsx(C,{size:14})})]}),e.jsx("div",{className:"mt-2",children:e.jsxs(i,{to:n.linkTo,className:"inline-flex items-center gap-1 text-[11px] text-[var(--accent)] transition-colors hover:brightness-110",children:[s(n.linkLabel),e.jsx(m,{size:12})]})})]})]})})}const g=["landing.hero_word_subscriptions","landing.hero_word_machines"];function $(){const s=u(a=>a.user)?"/home":"/login",{t}=b(),[c,d]=x.useState(0),[p,o]=x.useState(!1);return x.useEffect(()=>{let a;const r=setInterval(()=>{o(!0),a=setTimeout(()=>{d(v=>(v+1)%g.length),o(!1)},200)},2e3);return()=>{clearInterval(r),clearTimeout(a)}},[]),e.jsxs("div",{className:"min-h-screen bg-[var(--bg-primary)]",children:[e.jsx("nav",{className:"sticky top-0 z-50 border-b border-[var(--border)] bg-[var(--bg-primary)]/80 backdrop-blur-md",children:e.jsxs("div",{className:"mx-auto flex h-14 max-w-6xl items-center justify-between px-4 sm:px-6",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-[4px] bg-[var(--accent)]","aria-hidden":!0,style:{fontFamily:"'JetBrains Mono', monospace"},children:e.jsx("span",{className:"text-xl font-semibold",style:{color:"#0C0C0C"},children:"~"})}),e.jsx("span",{className:"text-lg font-bold text-[var(--text-primary)]",style:{fontSize:"20px",fontFamily:"'JetBrains Mono', monospace"},children:t("landing.overlord")})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(_,{}),e.jsx(i,{to:s,className:"text-xs font-medium text-[var(--accent)] transition-colors hover:opacity-80",children:t("landing.go_to_app")})]})]})}),e.jsxs("section",{className:"relative overflow-hidden",children:[e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute -top-40 left-1/2 h-[600px] w-[900px] -translate-x-1/2 rounded-full opacity-20 blur-3xl",style:{background:"radial-gradient(ellipse at center, var(--accent), transparent 70%)"}}),e.jsxs("div",{className:"relative mx-auto max-w-5xl px-4 pb-20 pt-24 text-center sm:px-6 sm:pb-28 sm:pt-32",children:[e.jsx("div",{className:"mb-6 inline-flex items-center rounded-full border border-[var(--accent)]/20 bg-[var(--accent)]/5 px-4 py-1.5 text-xs text-[var(--accent)]",children:t("landing.version_badge")}),e.jsxs("h1",{className:"text-3xl font-extrabold leading-tight tracking-tight text-[var(--text-primary)] sm:text-4xl md:text-5xl",children:[t("landing.hero_turn_your")," ",e.jsx("span",{className:"inline-block text-[var(--accent)] transition-opacity duration-200",style:{opacity:p?0:1},children:t(g[c])})," ",t("landing.hero_into"),e.jsx("br",{}),e.jsx("span",{className:"text-[var(--accent)]",children:t("landing.hero_highlight")})]}),e.jsx("p",{className:"mx-auto mt-6 max-w-3xl text-sm leading-relaxed text-[var(--text-secondary)] sm:text-base",children:t("landing.hero_desc")}),e.jsxs("div",{className:"mt-10",children:[e.jsxs(i,{to:s,className:"inline-flex items-center gap-2 rounded-[4px] bg-[var(--accent)] px-8 py-3 text-sm font-semibold text-black shadow-lg shadow-[var(--accent)]/25 transition-all hover:brightness-110 active:scale-[0.98]",children:[t("landing.get_started"),e.jsx(m,{size:16})]}),e.jsxs(i,{to:"/docs/cli",className:"ml-4 inline-flex items-center gap-1 text-sm text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]",children:[t("landing.read_docs")," ",e.jsx(m,{size:14})]})]})]})]}),e.jsx("section",{className:"border-t border-[var(--border)] bg-[var(--bg-card)]",children:e.jsxs("div",{className:"mx-auto max-w-5xl px-4 py-20 sm:px-6 sm:py-28",children:[e.jsx("h2",{className:"text-center text-xl font-bold text-[var(--text-primary)] sm:text-2xl",children:t("landing.how_it_works")}),e.jsx("p",{className:"mx-auto mt-3 max-w-xl text-center text-sm text-[var(--text-secondary)]",children:t("landing.three_steps")}),e.jsx("div",{className:"mt-14 grid gap-8 sm:grid-cols-3",children:h.map((a,r)=>e.jsxs("div",{className:"relative text-center",children:[r<h.length-1&&e.jsx("div",{"aria-hidden":!0,className:"absolute right-0 top-8 hidden h-px w-8 translate-x-full bg-[var(--border)] sm:block"}),e.jsx("div",{className:"mx-auto flex h-14 w-14 items-center justify-center rounded-full bg-[var(--accent)]/10 text-[var(--accent)] text-sm font-bold",children:String(r+1).padStart(2,"0")}),e.jsx("div",{className:"mt-1 text-[11px] font-semibold lowercase tracking-widest text-[var(--text-muted)]",children:t("landing.step_n",{n:r+1})}),e.jsx("h3",{className:"mt-2 text-sm font-semibold text-[var(--text-primary)]",children:t(a.titleKey)}),e.jsx("p",{className:"mt-2 text-xs leading-relaxed text-[var(--text-secondary)]",children:t(a.descKey)})]},a.titleKey))})]})}),e.jsx("section",{className:"border-t border-[var(--border)]",children:e.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-20 sm:px-6 sm:py-28",children:[e.jsx("h2",{className:"text-center text-xl font-bold text-[var(--text-primary)] sm:text-2xl",children:t("landing.everything_you_need")}),e.jsx("p",{className:"mx-auto mt-3 max-w-xl text-center text-sm text-[var(--text-secondary)]",children:t("landing.complete_platform")}),e.jsx("div",{className:"mt-14 grid gap-6 sm:grid-cols-3",children:G.map(a=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--accent)]/20 bg-[var(--accent)]/5 p-6 transition-shadow hover:shadow-md",children:[e.jsx("div",{className:"flex h-11 w-11 items-center justify-center rounded-[4px] bg-[var(--accent)]/15 text-[var(--accent)]",children:e.jsx(a.icon,{size:22})}),e.jsx("h3",{className:"mt-4 text-base font-semibold text-[var(--text-primary)]",children:t(a.titleKey)}),e.jsx("p",{className:"mt-2 text-sm leading-relaxed text-[var(--text-secondary)]",children:t(a.descKey)})]},a.titleKey))}),e.jsx("div",{className:"mt-6 grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:F.map(a=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5 transition-shadow hover:shadow-md",children:[e.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-[4px] bg-[var(--accent)]/10 text-[var(--accent)]",children:e.jsx(a.icon,{size:18})}),e.jsx("h3",{className:"mt-3 text-sm font-semibold text-[var(--text-primary)]",children:t(a.titleKey)}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-[var(--text-secondary)]",children:t(a.descKey)})]},a.titleKey))})]})}),e.jsx("section",{className:"border-t border-[var(--border)] bg-[var(--bg-card)]",children:e.jsxs("div",{className:"mx-auto max-w-5xl px-4 py-20 sm:px-6 sm:py-28",children:[e.jsx("h2",{className:"text-center text-xl font-bold text-[var(--text-primary)] sm:text-2xl",children:t("landing.install_title")}),e.jsx("p",{className:"mx-auto mt-3 max-w-xl text-center text-sm text-[var(--text-secondary)]",children:t("landing.install_desc")}),e.jsx("div",{className:"mt-14 space-y-4",children:R.map(a=>e.jsx(W,{step:a,t},a.num))}),e.jsx("div",{className:"mt-12 text-center",children:e.jsxs(i,{to:s,className:"inline-flex items-center gap-2 rounded-[4px] bg-[var(--accent)] px-8 py-3 text-sm font-semibold text-black shadow-lg shadow-[var(--accent)]/25 transition-all hover:brightness-110 active:scale-[0.98]",children:[t("landing.get_started"),e.jsx(m,{size:16})]})})]})}),e.jsx("footer",{className:"border-t border-[var(--border)]",children:e.jsxs("div",{className:"mx-auto flex max-w-6xl flex-col items-center gap-4 px-4 py-8 text-xs text-[var(--text-secondary)] sm:flex-row sm:justify-between sm:px-6",children:[e.jsxs("span",{children:["© ",new Date().getFullYear()," ",t("landing.overlord")]}),e.jsxs("div",{className:"flex gap-6",children:[e.jsx("a",{href:"/docs/cli",className:"transition-colors hover:text-[var(--text-primary)]",children:t("landing.documentation")}),e.jsx("a",{href:"/docs/api",className:"transition-colors hover:text-[var(--text-primary)]",children:t("landing.api")})]})]})}),e.jsx(N,{})]})}export{$ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as u,j as e,s as O,v as W,e as G,r as m,u as H,n as P,W as c,D,L as R,x as S,g as h}from"./index-BcZzdu9-.js";import{t as V,b as $}from"./date-BdNtiQTP.js";import{w as z,b as B,t as q}from"./status-colors-D1WMNf6w.js";import{I as i}from"./InfoRow-CZ_jBwp8.js";import{M as N}from"./MetricBar-CrOT-r6q.js";import{u as J}from"./useFetch-DbOROShl.js";import{T as I}from"./trash-2-BUyInSzl.js";import{A as K}from"./arrow-left-CC_JsKtL.js";function Q({isOpen:t,onClose:a,onConfirm:r,workerName:o,isDraining:l,loading:j}){const{t:d}=u();return e.jsx(O,{isOpen:t,onClose:a,onConfirm:r,title:d(l?"workers.undrain_worker_title":"workers.drain_worker_title"),message:l?d("workers.undrain_confirm",{name:o}):d("workers.drain_confirm",{name:o}),confirmLabel:d(l?"workers.undrain":"workers.drain"),confirmVariant:l?"accent":"warning",isLoading:j})}function ne(){const{id:t}=W(),a=G(),{t:r}=u(),[o,l]=m.useState(!1),[j,d]=m.useState(!1),[A,p]=m.useState(!1),[E,y]=m.useState(!1),g=H(n=>{var v;return(v=n.user)==null?void 0:v.role}),{data:x,loading:F,error:_,refetch:C}=J(async()=>{if(!t)throw new Error("Missing worker ID");const[n,v]=await Promise.all([h.get(`web/workers/${t}`).json(),h.get(`web/workers/${t}/tasks`).json().catch(()=>[])]);return{worker:n,tasks:v}},[t]),s=(x==null?void 0:x.worker)??null,w=(x==null?void 0:x.tasks)??[];P(m.useMemo(()=>!s||s.status===c.DECOMMISSIONED?null:e.jsxs("div",{className:"flex items-center gap-2",children:[s.status===c.ONLINE&&e.jsxs("button",{onClick:()=>l(!0),className:"rounded-[4px] border border-[var(--warning)]/40 px-3 py-1.5 text-xs text-[var(--warning)] hover:bg-[var(--warning)]/10 transition-colors",children:["> ",r("workers.drain")]}),g===D.ADMIN&&e.jsxs("button",{onClick:()=>p(!0),className:"flex items-center gap-1 rounded-[4px] border border-[var(--destructive)]/40 px-3 py-1.5 text-xs text-[var(--destructive)] hover:bg-[var(--destructive)]/10 transition-colors",children:[e.jsx(I,{className:"h-3 w-3"}),r("workers.decommission")]})]}),[s,g,r]));async function T(){if(s){d(!0);try{const n=s.status===c.DRAINING?"undrain":"drain";await h.post(`web/workers/${s.id}/${n}`),await C()}catch{}finally{d(!1),l(!1)}}}async function U(){if(s){y(!0);try{await h.delete(`admin/workers/${s.id}`),a("/workers")}catch{}finally{y(!1),p(!1)}}}if(F)return e.jsx("div",{className:"mx-auto max-w-5xl px-4 md:px-6 py-8 font-mono",children:e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:r("workers.loading_worker")})});if(_)return e.jsxs("div",{className:"mx-auto max-w-5xl px-4 md:px-6 py-8 font-mono lowercase text-center",children:[e.jsx("p",{className:"text-sm text-[var(--destructive)]",children:_}),e.jsx("button",{onClick:()=>C(),className:"mt-4 rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("common.retry")})]});if(!s)return e.jsxs("div",{className:"mx-auto max-w-5xl px-4 md:px-6 py-8 font-mono lowercase text-center",children:[e.jsx("p",{className:"text-sm text-[var(--text-secondary)]",children:r("workers.worker_not_found")}),e.jsxs("button",{onClick:()=>a("/workers"),className:"mt-4 rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:["< ",r("workers.back_to_workers")]})]});const b=s.status===c.DRAINING,k=s.status!==c.DECOMMISSIONED;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mx-auto max-w-5xl font-mono lowercase",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] bg-[var(--bg-primary)] px-4 shrink-0 md:hidden",style:{height:56},children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("button",{onClick:()=>a("/workers"),className:"shrink-0 text-[var(--text-muted)]",children:e.jsx(K,{className:"h-4 w-4"})}),e.jsx("span",{className:"truncate text-sm font-medium text-[var(--text-primary)]",children:s.name})]}),!b&&s.status!==c.OFFLINE&&k&&e.jsxs("button",{onClick:()=>l(!0),className:"shrink-0 rounded-[4px] border border-[var(--warning)]/40 px-3 py-1.5 text-xs text-[var(--warning)] hover:bg-[var(--warning)]/10 transition-colors",children:["> ",r("workers.drain")]})]}),e.jsxs("div",{className:"px-4 md:px-6 py-8",children:[b?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx(R,{to:"/workers",className:"text-[var(--text-muted)] hover:text-[var(--text-secondary)] transition-colors",children:r("workers.title")}),e.jsx("span",{className:"text-[var(--text-muted)]",children:"/"}),e.jsx("span",{className:"text-[var(--text-secondary)]",children:s.name})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[k&&e.jsxs("button",{onClick:()=>l(!0),className:"rounded-[4px] border border-[var(--accent)] px-4 py-1.5 text-xs text-[var(--accent)] hover:bg-[var(--accent)]/10 transition-colors",children:["> ",r("workers.undrain")]}),g===D.ADMIN&&k&&e.jsxs("button",{onClick:()=>p(!0),className:"flex items-center gap-1 rounded-[4px] border border-[var(--destructive)]/40 px-3 py-1.5 text-xs text-[var(--destructive)] hover:bg-[var(--destructive)]/10 transition-colors",children:[e.jsx(I,{className:"h-3 w-3"}),r("workers.decommission")]})]})]}),e.jsx("div",{className:"mb-4",children:e.jsx("span",{className:"rounded-[4px] bg-[var(--warning)]/20 px-2.5 py-1 text-xs font-medium text-[var(--warning)]",children:r("workers.draining")})}),e.jsxs("div",{className:"mb-6 rounded-[4px] border border-[var(--warning)]/40 bg-[var(--warning)]/10 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(S,{className:"h-3.5 w-3.5 text-[var(--warning)]"}),e.jsx("span",{className:"text-xs text-[var(--warning)]",children:r("workers.draining_warning")})]}),e.jsx("p",{className:"text-xs text-[var(--warning)]/70 ml-5.5",children:r("workers.draining_active_tasks")})]}),e.jsxs("div",{className:"mb-6 grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsx(f,{label:r("workers.cpu"),value:s.cpuUsage,unit:"%"}),e.jsx(f,{label:r("workers.memory"),value:s.memoryUsage,unit:"%"}),e.jsx(f,{label:r("workers.disk"),value:s.diskUsage,unit:"%"}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("workers.slots")}),e.jsxs("p",{className:"mt-2 text-lg font-semibold text-[var(--text-primary)]",children:[s.activeSlots,"/",s.maxSlots]})]})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>a("/workers"),className:"mb-4 text-xs text-[var(--text-muted)] hover:text-[var(--text-secondary)] transition-colors",children:["< ",r("workers.back_to_workers")]}),e.jsxs("h1",{className:"mb-2 text-lg font-bold text-[var(--text-primary)] flex items-center gap-2",children:[s.name,e.jsxs("span",{className:"flex items-center gap-1.5 text-sm font-normal",style:{color:z[s.status]},children:[e.jsx("span",{style:{fontSize:"0.5rem"},children:"●"}),s.status.toLowerCase()]})]}),e.jsx("p",{className:"mb-6 text-xs text-[var(--text-muted)]",children:r("workers.last_heartbeat",{time:V(s.lastHeartbeat,"never")})}),s.status===c.DECOMMISSIONED&&e.jsx("div",{className:"mb-6 rounded-[4px] border border-[var(--text-muted)]/40 bg-[var(--text-muted)]/10 p-4",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(S,{className:"h-3.5 w-3.5 text-[var(--text-muted)]"}),e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["this worker has been decommissioned",s.decommissionedAt?` on ${$(s.decommissionedAt)}`:""," and can no longer accept tasks."]})]})}),e.jsxs("div",{className:"mb-6 grid gap-4 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:[e.jsx("h2",{className:"mb-3 text-xs text-[var(--text-muted)]",children:r("workers.resource_usage")}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx(N,{label:r("workers.cpu"),value:s.cpuUsage}),e.jsx(N,{label:r("workers.mem"),value:s.memoryUsage}),e.jsx(N,{label:r("workers.disk"),value:s.diskUsage})]})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:[e.jsx("h2",{className:"mb-3 text-xs text-[var(--text-muted)]",children:r("workers.connection_info")}),e.jsx(M,{worker:s})]})]})]}),b?e.jsxs(e.Fragment,{children:[e.jsx(L,{title:r("workers.active_tasks"),tasks:w,navigate:a}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h2",{className:"mb-4 text-sm font-medium text-[var(--accent)]",children:r("workers.capabilities")}),s.capabilities.length>0?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:s.capabilities.map(n=>e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx("p",{className:"text-xs text-[var(--text-primary)]",children:n})},n))}):e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("workers.no_capabilities_short")})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx("h2",{className:"mb-4 text-sm font-medium text-[var(--accent)]",children:r("workers.worker_info")}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:e.jsx(M,{worker:s,showExtended:!0})})]})]}):e.jsxs(e.Fragment,{children:[s.capabilities.length>0&&e.jsxs("div",{className:"mb-6 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:[e.jsx("h2",{className:"mb-3 text-xs text-[var(--text-muted)]",children:r("workers.capabilities")}),e.jsx("div",{className:"flex flex-wrap gap-2",children:s.capabilities.map(n=>e.jsx("span",{className:"rounded-[4px] border border-[var(--border)] px-2.5 py-1 text-xs text-[var(--text-secondary)]",children:n},n))})]}),e.jsx(L,{title:`${r("workers.current_tasks")} (${w.length})`,tasks:w,navigate:a})]})]})]}),e.jsx(Q,{isOpen:o,onClose:()=>l(!1),onConfirm:T,workerName:s.name,isDraining:b,loading:j}),e.jsx(O,{isOpen:A,onClose:()=>p(!1),onConfirm:U,title:r("workers.decommission_title"),message:r("workers.decommission_confirm",{name:s.name}),confirmLabel:r("workers.decommission"),confirmVariant:"danger",isLoading:E})]})}function M({worker:t,showExtended:a=!1}){const{t:r}=u();return e.jsxs("div",{className:"flex flex-col gap-2 text-xs",children:[e.jsx(i,{label:r("workers.worker_id"),value:t.id}),e.jsx(i,{label:r("workers.host"),value:t.host}),e.jsx(i,{label:r("workers.port"),value:String(t.port)}),e.jsx(i,{label:r("workers.os"),value:t.os??r("workers.unknown")}),e.jsx(i,{label:r("workers.cpu_model"),value:t.cpuModel??r("workers.n_a")}),e.jsx(i,{label:r("workers.cpu_cores"),value:t.cpuCores!=null?String(t.cpuCores):r("workers.n_a")}),e.jsx(i,{label:r("workers.memory"),value:t.memoryGb!=null?`${t.memoryGb} gb`:r("workers.n_a")}),e.jsx(i,{label:r("workers.last_heartbeat_label"),value:$(t.lastHeartbeat)}),e.jsx(i,{label:r("workers.slots"),value:`${t.activeSlots}/${t.maxSlots}`}),a&&e.jsxs(e.Fragment,{children:[e.jsx(i,{label:r("workers.status_label"),value:t.status.toLowerCase()}),e.jsx(i,{label:r("workers.worker_version"),value:t.workerVersion??r("workers.n_a")})]})]})}function L({title:t,tasks:a,navigate:r}){const{t:o}=u();return e.jsxs("div",{className:"mb-6 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:[e.jsx("h2",{className:"mb-3 text-xs text-[var(--text-muted)]",children:t}),a.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-6",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:o("workers.no_active_tasks")})]}):e.jsx(X,{tasks:a,navigate:r})]})}function X({tasks:t,navigate:a}){const{t:r}=u();return e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border-row)]",children:[e.jsx("th",{className:"py-2 pr-4 text-left font-normal text-[var(--text-muted)]",children:r("workers.id")}),e.jsx("th",{className:"py-2 pr-4 text-left font-normal text-[var(--text-muted)]",children:r("workers.description")}),e.jsx("th",{className:"py-2 pr-4 text-left font-normal text-[var(--text-muted)]",children:r("workers.status_label")}),e.jsx("th",{className:"py-2 text-left font-normal text-[var(--text-muted)]",children:r("workers.stage")})]})}),e.jsx("tbody",{children:t.map(o=>e.jsxs("tr",{onClick:()=>a(`/tasks/${o.id}`),className:"cursor-pointer border-b border-[var(--border-row)] hover:bg-[var(--bg-input)] transition-colors",children:[e.jsxs("td",{className:"py-2 pr-4 text-[var(--text-primary)]",children:["#",o.id]}),e.jsx("td",{className:"max-w-[120px] md:max-w-xs truncate py-2 pr-4 text-[var(--text-secondary)]",children:o.description}),e.jsx("td",{className:"py-2 pr-4",children:e.jsxs("span",{style:{color:q[o.status]},children:["● ",o.status.toLowerCase()]})}),e.jsx("td",{className:"py-2 text-[var(--text-secondary)]",children:o.currentStage??"-"})]},o.id))})]})})}function f({label:t,value:a,unit:r}){const o=Math.round(a*100);return e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:t}),e.jsxs("p",{className:"mt-2 text-lg font-semibold text-[var(--text-primary)]",children:[o,r]}),e.jsx("div",{className:"mt-3 h-1.5 w-full rounded-[2px] bg-[var(--bg-input)]",children:e.jsx("div",{className:"h-full rounded-[2px] transition-all",style:{width:`${o}%`,backgroundColor:B(a)}})})]})}export{ne as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{R as G,a as S,j as e,r as a,g as _,X as U,w as K,e as q,u as H,W as N,n as X,D as J,S as L,B as Q}from"./index-BcZzdu9-.js";import{w as W}from"./status-colors-D1WMNf6w.js";import{M as y}from"./MetricBar-CrOT-r6q.js";import V from"./WorkerSetupGuidePage-BBREO3mC.js";import{C as M}from"./copy-CtXbutie.js";import{L as Y}from"./loader-circle-oshIXC7W.js";import{S as Z}from"./Select-D3Sy8S-M.js";import{E as ee}from"./EmptyState-BvjX-NgG.js";import{C as te}from"./Skeleton-BepyS_5Q.js";import{u as re}from"./useFetch-DbOROShl.js";import{P as se}from"./plus-brBzlNyd.js";import"./key-Ct-x_Yiu.js";import"./download-BwEgKfzE.js";import"./settings-B89fe2lq.js";import"./wifi-CFEQlNIL.js";const ae=G.memo(function({worker:r,onClick:l}){const{t}=S();return e.jsxs("div",{onClick:l,className:`rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 font-mono lowercase transition-colors ${l?"cursor-pointer hover:border-[var(--accent)]/40 hover:bg-[var(--bg-input)]":""}`,children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[e.jsxs("h3",{className:"truncate text-sm text-[var(--text-primary)]",children:[e.jsx("span",{style:{color:W[r.status],fontSize:"0.6rem"},children:"●"})," ",r.name]}),e.jsx("span",{className:"text-xs",style:{color:W[r.status]},children:r.status})]}),e.jsxs("div",{className:"mb-3 text-xs text-[var(--text-muted)]",children:[r.host,r.os?`:${r.os}`:""]}),e.jsxs("div",{className:"mb-3 flex flex-col gap-2",children:[e.jsx(y,{label:t("workers.cpu"),value:r.cpuUsage,variant:"inline"}),e.jsx(y,{label:t("workers.mem"),value:r.memoryUsage,variant:"inline"}),e.jsx(y,{label:t("workers.disk"),value:r.diskUsage,variant:"inline"})]}),e.jsx("div",{className:"flex items-center justify-between text-xs",children:e.jsx("span",{className:"text-[var(--text-secondary)]",children:t("workers.tasks_slots",{active:String(r.activeSlots),max:String(r.maxSlots)})})}),r.capabilities.length>0&&e.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:r.capabilities.map(s=>e.jsx("span",{className:"rounded-[4px] border border-[var(--border)] px-1.5 py-0.5 text-[11px] text-[var(--text-muted)]",children:s},s))})]})});function oe({isOpen:d,onClose:r,onRegistered:l}){const{t}=S(),[s,c]=a.useState(1),[g,p]=a.useState(!1),[i,m]=a.useState(""),[u,b]=a.useState(null),[h,j]=a.useState(""),[o,v]=a.useState(""),[z,f]=a.useState(!1),[A,w]=a.useState(!1),[F,C]=a.useState(""),[T,I]=a.useState(""),x=a.useRef(null),P={1:t("workers.reg_step_generate_token"),2:t("workers.reg_step_install_worker"),3:t("workers.reg_step_waiting_activation"),4:t("workers.reg_step_activated")};a.useEffect(()=>(d&&(c(1),m(""),b(null),j(""),v(""),f(!1),w(!1),C(""),I(""),p(!1)),()=>{x.current&&clearInterval(x.current)}),[d]);const $=async()=>{const n=h.trim();if(!n){v(t("admin.pat_label_required"));return}v(""),p(!0);try{const k=await _.post("admin/worker-tokens",{json:{label:n}}).json();m(k.token),b(k.tokenId),c(2)}catch{}finally{p(!1)}},R=typeof window<"u"?window.location.origin:"https://overlord.example.com",E=i?`overlord setup worker --token ${i} --server ${R}`:"",D=()=>{navigator.clipboard.writeText(i),f(!0),setTimeout(()=>f(!1),2e3)},O=()=>{navigator.clipboard.writeText(E),w(!0),setTimeout(()=>w(!1),2e3)},B=a.useCallback(()=>{u&&(c(3),x.current=setInterval(async()=>{try{const n=await _.get(`admin/worker-tokens/${u}/status`).json();n.used&&n.workerName&&(C(n.workerName),I(n.workerId??""),c(4),x.current&&clearInterval(x.current),l==null||l())}catch{}},3e3))},[u,l]);return a.useEffect(()=>()=>{x.current&&clearInterval(x.current)},[]),d?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center font-mono lowercase",children:[e.jsx("div",{className:"absolute inset-0 bg-[var(--bg-primary)]/60 backdrop-blur-sm",onClick:r}),e.jsxs("div",{className:"relative z-10 w-full max-w-[1080px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-8",children:[e.jsx("button",{type:"button",onClick:r,className:"absolute right-4 top-4 text-[var(--text-muted)] hover:text-[var(--text-primary)]",children:e.jsx(U,{className:"h-4 w-4"})}),e.jsx("h2",{className:"text-lg font-bold text-[var(--accent)]",children:t("workers.reg_title")}),e.jsx("p",{className:"mt-1 text-xs text-[var(--text-muted)]",children:t("workers.reg_subtitle")}),e.jsx("div",{className:"mt-6 flex items-center justify-center gap-2",children:[1,2,3,4].map((n,k)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:`rounded-[4px] px-3 py-1.5 text-[11px] font-bold ${n===s?"bg-[var(--accent)] text-black":n<s?"bg-[var(--accent)]/20 text-[var(--accent)]":"border border-[var(--border)] bg-[var(--bg-primary)] text-[var(--text-muted)]"}`,children:[n,". ",P[n]]}),k<3&&e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"→"})]},n))}),e.jsxs("div",{className:"mt-6 grid grid-cols-1 gap-4 lg:grid-cols-2",children:[e.jsxs("div",{className:`rounded-[4px] border p-4 ${s===1?"border-[var(--accent)] bg-[var(--bg-primary)]":"border-[var(--border)] bg-[var(--bg-primary)]"}`,children:[e.jsxs("p",{className:"text-[13px] font-bold text-[var(--accent)]",children:["> ",t("workers.reg_step_generate_token")]}),s===1&&!i?e.jsxs("div",{className:"mt-3 space-y-3",children:[e.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:t("workers.reg_click_to_generate")}),o&&e.jsx("p",{className:"text-[11px] text-red-400",children:o}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-[11px] text-[var(--text-muted)]",children:t("admin.label")}),e.jsx("input",{type:"text",placeholder:t("admin.pat_label_placeholder"),value:h,onChange:n=>j(n.target.value),onKeyDown:n=>{n.key==="Enter"&&$()},className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-1.5 text-[11px] text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:border-[var(--accent)] focus:outline-none"})]}),e.jsx("button",{type:"button",onClick:$,disabled:g,className:"rounded-[4px] bg-[var(--accent)] px-4 py-1.5 text-xs font-bold text-black disabled:opacity-50",children:t(g?"admin.generating":"workers.reg_step_generate_token")})]}):i?e.jsxs("div",{className:"mt-3 space-y-3",children:[e.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:t("workers.reg_token_generated")}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-[11px] text-[var(--text-muted)]",children:"Token"}),e.jsxs("div",{className:"relative rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-3 py-2 pr-16",children:[e.jsx("code",{className:"block break-all text-[11px] text-[var(--text-primary)]",children:i}),e.jsx("button",{type:"button",onClick:D,className:"absolute right-2 top-1.5 text-[11px] text-[var(--text-muted)] hover:text-[var(--text-primary)]",children:z?e.jsx("span",{className:"text-[var(--accent)]",children:t("common.copied")}):e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(M,{className:"h-3 w-3"})," ",t("common.copy")]})})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-[11px] text-[var(--text-muted)]",children:t("admin.setup_command")}),e.jsxs("div",{className:"relative rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-3 py-2 pr-16",children:[e.jsxs("code",{className:"block break-all text-[11px] text-[var(--accent)]",children:["$ ",E]}),e.jsx("button",{type:"button",onClick:O,className:"absolute right-2 top-1.5 text-[11px] text-[var(--text-muted)] hover:text-[var(--text-primary)]",children:A?e.jsx("span",{className:"text-[var(--accent)]",children:t("common.copied")}):e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(M,{className:"h-3 w-3"})," ",t("common.copy")]})})]})]}),e.jsx("div",{className:"rounded-[4px] border border-yellow-500/30 bg-yellow-500/10 px-3 py-2 text-[11px] text-yellow-400",children:t("admin.token_shown_once")})]}):e.jsx("p",{className:"mt-2 text-[11px] text-[var(--text-muted)]",children:t("workers.reg_completed")})]}),e.jsxs("div",{className:`rounded-[4px] border p-4 ${s===2?"border-[var(--accent)] bg-[var(--bg-primary)]":"border-[var(--border)] bg-[var(--bg-primary)]"}`,children:[e.jsxs("p",{className:"text-[13px] font-bold text-[var(--text-primary)]",children:["> ",t("workers.reg_step_install_worker")]}),e.jsx("p",{className:"mt-2 text-[11px] text-[var(--text-muted)]",children:t("workers.reg_running_installation")}),s>=2&&e.jsxs("div",{className:"mt-3 space-y-1 rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] p-3",children:[e.jsx("p",{className:"text-[11px] text-[var(--text-primary)]",children:"$ overlord setup worker"}),e.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:"server url: https://..."}),e.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:"worker token: ovw_..."}),e.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:"worker name: my-worker"}),e.jsx("p",{className:"text-[11px] text-[var(--accent)]",children:"config written. starting worker..."}),s===2&&e.jsx("p",{className:"text-[11px] text-[var(--accent)] animate-pulse",children:"█"})]}),s===2&&e.jsx("button",{type:"button",onClick:B,className:"mt-3 rounded-[4px] bg-[var(--accent)] px-4 py-1.5 text-xs font-bold text-black",children:t("workers.reg_installed_wait")})]}),e.jsxs("div",{className:`rounded-[4px] border p-4 ${s===3?"border-amber-500 bg-[var(--bg-primary)]":"border-[var(--border)] bg-[var(--bg-primary)]"}`,children:[e.jsxs("p",{className:"text-[13px] font-bold text-[var(--text-primary)]",children:["> ",t("workers.reg_step_waiting_activation")]}),s>=3?e.jsx("div",{className:"mt-3 flex flex-col items-center justify-center gap-3 py-6",children:s===3?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full border-2 border-amber-500",children:e.jsx(Y,{className:"h-5 w-5 animate-spin text-amber-500"})}),e.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:t("workers.reg_listening_for_worker")})]}):e.jsx("p",{className:"text-[11px] text-[var(--accent)]",children:t("workers.reg_worker_connected")})}):e.jsx("p",{className:"mt-2 text-[11px] text-[var(--text-muted)]",children:t("workers.reg_waiting_for_worker")})]}),e.jsxs("div",{className:`rounded-[4px] border p-4 ${s===4?"border-[var(--accent)] bg-[var(--bg-primary)]":"border-[var(--border)] bg-[var(--bg-primary)]"}`,children:[e.jsxs("p",{className:"text-[13px] font-bold text-[var(--text-primary)]",children:["> ",t("workers.reg_step_activated")]}),s===4?e.jsxs("div",{className:"mt-3 flex flex-col items-center justify-center gap-3 py-6",children:[e.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-[var(--accent)]/20",children:e.jsx(K,{className:"h-6 w-6 text-[var(--accent)]"})}),e.jsx("p",{className:"text-xs font-bold text-[var(--accent)]",children:t("workers.reg_worker_activated",{name:F})}),T&&e.jsxs("p",{className:"text-[11px] text-[var(--text-muted)]",children:["worker_id: ",T]})]}):e.jsx("p",{className:"mt-2 text-[11px] text-[var(--text-muted)]",children:t("workers.reg_worker_registered")})]})]}),s===4&&e.jsx("div",{className:"mt-6 flex justify-end",children:e.jsx("button",{type:"button",onClick:r,className:"rounded-[4px] bg-[var(--accent)] px-5 py-2 text-xs font-bold text-black",children:t("workers.reg_done")})})]})]}):null}function fe(){const d=q(),{t:r}=S(),[l,t]=a.useState("all"),[s,c]=a.useState("fleet"),[g,p]=a.useState(!1),[i,m]=a.useState(0),u=H(o=>{var v;return(v=o.user)==null?void 0:v.role}),{data:b,loading:h}=re(()=>{const o={};return l!=="all"&&(o.status=l),_.get("web/workers",{searchParams:o}).json()},[l,i]),j=a.useMemo(()=>[{value:"all",label:r("workers.all_statuses")},{value:N.ONLINE,label:r("workers.online")},{value:N.OFFLINE,label:r("workers.offline")},{value:N.DRAINING,label:r("workers.draining")}],[r]);return X(a.useMemo(()=>u===J.ADMIN?e.jsxs("button",{type:"button",onClick:()=>p(!0),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity",children:[e.jsx(se,{size:14}),r("workers.register_worker")]}):null,[u,r])),e.jsxs("div",{className:"mx-auto max-w-6xl px-4 md:px-6 py-8 font-mono lowercase",children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between border-b border-[var(--border)]",children:[e.jsxs("div",{className:"flex overflow-x-auto no-scrollbar",children:[e.jsxs("button",{type:"button",onClick:()=>{c("fleet"),m(o=>o+1)},className:`flex shrink-0 whitespace-nowrap items-center gap-2 px-4 py-2.5 text-xs transition-colors ${s==="fleet"?"border-b-2 border-[var(--accent)] text-[var(--text-primary)]":"text-[var(--text-muted)] hover:text-[var(--text-secondary)]"}`,children:[e.jsx(L,{size:14}),r("workers.fleet")]}),e.jsxs("button",{type:"button",onClick:()=>c("setup_guide"),className:`flex shrink-0 whitespace-nowrap items-center gap-2 px-4 py-2.5 text-xs transition-colors ${s==="setup_guide"?"border-b-2 border-[var(--accent)] text-[var(--text-primary)]":"text-[var(--text-muted)] hover:text-[var(--text-secondary)]"}`,children:[e.jsx(Q,{size:14}),r("workers.setup_guide")]})]}),s==="fleet"&&e.jsx(Z,{value:l,onChange:t,options:j})]}),s==="fleet"?h?e.jsx(te,{cards:6}):!b||b.length===0?e.jsx(ee,{icon:L,title:r("workers.no_workers_found"),description:r(l!=="all"?"workers.try_changing_status_filter":"workers.no_workers_registered"),action:e.jsx("button",{type:"button",onClick:()=>c("setup_guide"),className:"rounded-[4px] bg-[var(--accent)] px-5 py-2 text-[11px] font-bold text-black",children:r("workers.view_setup_guide")})}):e.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:(b??[]).map(o=>e.jsx(ae,{worker:o,onClick:()=>d(`/workers/${o.id}`)},o.id))}):e.jsx(V,{}),e.jsx(oe,{isOpen:g,onClose:()=>{p(!1),m(o=>o+1)},onRegistered:()=>{m(o=>o+1)}})]})}export{fe as default};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{c as e}from"./index-BcZzdu9-.js";/**
|
|
2
|
-
* @license lucide-react v0.469.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const o=e("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);export{o as C};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{c as t}from"./index-BcZzdu9-.js";/**
|
|
2
|
-
* @license lucide-react v0.469.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const r=t("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);export{r as L};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{c as e}from"./index-BcZzdu9-.js";/**
|
|
2
|
-
* @license lucide-react v0.469.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const s=e("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);export{s as M};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{c as a}from"./index-BcZzdu9-.js";/**
|
|
2
|
-
* @license lucide-react v0.469.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const e=a("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);export{e as Z};
|