bunqueue-dashboard 0.0.33 → 0.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/.vite/manifest.json +62 -62
  2. package/dist/assets/{AddJob-ytpBLTCJ.js → AddJob-Cih9F84t.js} +1 -1
  3. package/dist/assets/{Alerts-C39RrGbQ.js → Alerts-Dp4Vclez.js} +1 -1
  4. package/dist/assets/{Benchmark-CM60tHbf.js → Benchmark-X_gdZun5.js} +1 -1
  5. package/dist/assets/{BulkAddJobs-BjL-xcQy.js → BulkAddJobs-CXTpYMZf.js} +1 -1
  6. package/dist/assets/{CopilotPanel-BGK1rw-V.js → CopilotPanel-CIXpcwkH.js} +1 -1
  7. package/dist/assets/{Cron-s1e-jgOo.js → Cron-DUHkse77.js} +1 -1
  8. package/dist/assets/{CronManager-BostU7BX.js → CronManager-BeYrLK2E.js} +1 -1
  9. package/dist/assets/{Database-ZluStWMz.js → Database-CXPb3XGr.js} +1 -1
  10. package/dist/assets/{Diagnostics-C0N5z5j-.js → Diagnostics-DDtoiDYT.js} +1 -1
  11. package/dist/assets/{Dlq-CtcLzs-b.js → Dlq-CX_uRblW.js} +1 -1
  12. package/dist/assets/{DlqControl-B_Z8KKn5.js → DlqControl-CazFmSEd.js} +1 -1
  13. package/dist/assets/{DlqPro-B68en6AG.js → DlqPro-HSffdtLJ.js} +1 -1
  14. package/dist/assets/{Flows-CD_bkCBM.js → Flows-CGmyghKF.js} +1 -1
  15. package/dist/assets/{JobInspector-DwRtyMz0.js → JobInspector-B9i1HnG5.js} +1 -1
  16. package/dist/assets/{Jobs-BUtcBKKk.js → Jobs-BZGtMnJI.js} +1 -1
  17. package/dist/assets/{JobsPro-BK_xd4ji.js → JobsPro-tmEN8f-P.js} +1 -1
  18. package/dist/assets/{Logs-CmVODYCI.js → Logs-DxUD9V2A.js} +1 -1
  19. package/dist/assets/{LogsPro-CJ-Il3LP.js → LogsPro-BTQhvPKj.js} +1 -1
  20. package/dist/assets/{McpServer-dMjyJKgT.js → McpServer-D5rwBg74.js} +1 -1
  21. package/dist/assets/{Metrics-Dsbeplz-.js → Metrics-CSPpBf1m.js} +1 -1
  22. package/dist/assets/{MetricsPro-BqxurxrJ.js → MetricsPro-DSn-3qNT.js} +1 -1
  23. package/dist/assets/{Overview-DH9C2dsf.js → Overview-StvHYRZ5.js} +1 -1
  24. package/dist/assets/{Pagination-DpxiBnt8.js → Pagination-eotgGQf9.js} +1 -1
  25. package/dist/assets/{QueueActions-D_QGBaVm.js → QueueActions-CibRLzrz.js} +1 -1
  26. package/dist/assets/{QueueControl-V0DJ6qk6.js → QueueControl-DwYNcMfI.js} +1 -1
  27. package/dist/assets/{QueueDetail-BgKAMJqf.js → QueueDetail-NMfKwj6E.js} +1 -1
  28. package/dist/assets/{QueueDetailPro-BkHYzGiq.js → QueueDetailPro-C8SBjX09.js} +1 -1
  29. package/dist/assets/{Queues-2_v7DcNi.js → Queues-BeTAi8V8.js} +1 -1
  30. package/dist/assets/{QueuesOverview-BySSkmB4.js → QueuesOverview-BfQO8NS4.js} +1 -1
  31. package/dist/assets/{S3Backup-CPADzKQE.js → S3Backup-BYkAtONl.js} +1 -1
  32. package/dist/assets/{S3BackupPro-CSrQYIDL.js → S3BackupPro-BP1Ch54R.js} +1 -1
  33. package/dist/assets/{ServerControl-C0tI1VDx.js → ServerControl-C85jYgyN.js} +1 -1
  34. package/dist/assets/{Settings-CSzoM5up.js → Settings-DjP28c_5.js} +1 -1
  35. package/dist/assets/{Usage-B4B7tmrc.js → Usage-DECeEsO2.js} +1 -1
  36. package/dist/assets/{UsagePro-CCBpgSDy.js → UsagePro-CD7dgt3d.js} +1 -1
  37. package/dist/assets/{Webhooks-aJz-GisQ.js → Webhooks-Ct-x8DD1.js} +1 -1
  38. package/dist/assets/{Workers-Bg8xKjkg.js → Workers-lP1BXHFq.js} +1 -1
  39. package/dist/assets/{WorkersPro-BOOCrXf8.js → WorkersPro-CAUqy3Cp.js} +1 -1
  40. package/dist/assets/{index-Bn2R06qm.js → index-Dr__4DsT.js} +3 -3
  41. package/dist/assets/install-DPCcfOYo.js +3 -0
  42. package/dist/assets/{useThroughputSeries-tb26_lkb.js → useThroughputSeries-Bpyg6Jaq.js} +1 -1
  43. package/dist/index.html +1 -1
  44. package/package.json +1 -1
  45. package/scripts/embedded.gen.ts +120 -120
  46. package/dist/assets/install-CUS8Kijb.js +0 -3
@@ -1 +1 @@
1
- import{r as e,t}from"./cn-CMFYpumL.js";import{g as n,t as r}from"./react-vendor-Bjui4wS4.js";import{A as i,T as a,X as o,Y as s,b as c,c as l,h as u,m as d,st as f,u as p,v as m,x as h,y as g}from"./index-Bn2R06qm.js";import{r as _,t as v}from"./useServerActionGuard-CItj3hvh.js";var y=e(n(),1),b=r(),x=100,S=`No heartbeat recently — derived from lastSeen`;function C(){let{data:e,error:n,loading:r,refetch:C}=i(async()=>(await f.workers()).data,[]),[T,E]=(0,y.useState)(new Set),[D,O]=(0,y.useState)(null),[k,A]=(0,y.useState)(null),j=_(`workers-pro`);if((0,y.useEffect)(()=>{E(new Set),O(null)},[j.scopeKey]),r&&!e&&!n)return(0,b.jsx)(c,{label:`Loading workers…`});if(n&&!e)return(0,b.jsxs)(`div`,{children:[(0,b.jsx)(u,{title:`Workers`,description:`Worker inventory is unavailable.`}),(0,b.jsx)(g,{error:n,onRetry:C})]});let M=e?.workers??[],N=e?.quarantinedWorkers??[],P=(k?[...M].sort((e,t)=>{let n=k.key===`failed`?e.failedJobs??0:e.lastSeen??0,r=k.key===`failed`?t.failedJobs??0:t.lastSeen??0;return k.dir===`asc`?n-r:r-n}):M).slice(0,x),F=e=>A(t=>t?.key===e?{key:e,dir:t.dir===`desc`?`asc`:`desc`}:{key:e,dir:`desc`}),I=M.filter(e=>e.status===`active`).length,L=M.length-I,R=M.reduce((e,t)=>e+(t.activeJobs??0),0),z=async e=>{if(!window.confirm(`Remove the stale registry record for worker "${e}"? This does not stop the worker process. Continue only after confirming that process is stopped; Bunqueue v2.8.55 workers do not automatically re-register after their heartbeat record is removed.`))return;let t=j.begin(`worker:${e}`);if(t){E(t=>new Set(t).add(e)),O(null);try{if(v(await f.unregisterWorker(e),`Remove stale worker registry record`),!t.isCurrent())return;O({ok:!0,text:`Removed stale registry record for ${e} ✓`}),C()}catch(e){if(!t.isCurrent())return;O({ok:!1,text:`Removal failed: ${e.message}`})}finally{t.finish()&&E(t=>{let n=new Set(t);return n.delete(e),n})}}};return(0,b.jsxs)(`div`,{children:[(0,b.jsx)(u,{title:`Workers`,description:`Registered workers and their throughput.`,live:!!e&&!n}),n&&(0,b.jsx)(h,{message:`Worker refresh failed — showing the last successful inventory.`,onRetry:C}),(0,b.jsxs)(`div`,{className:`mb-6 grid grid-cols-2 gap-4 md:grid-cols-5`,children:[(0,b.jsx)(d,{label:`Total`,value:l(M.length+N.length),compact:!0}),(0,b.jsx)(d,{label:`Active`,value:l(I),tone:`green`,compact:!0}),(0,b.jsx)(`div`,{title:S,children:(0,b.jsx)(d,{label:`Stale`,value:l(L),tone:L?`amber`:`default`,compact:!0})}),(0,b.jsx)(d,{label:`Active Jobs`,value:l(R),tone:`blue`,compact:!0}),(0,b.jsx)(d,{label:`Quarantined`,value:l(N.length),tone:N.length?`red`:`default`,compact:!0})]}),N.length>0&&(0,b.jsxs)(`div`,{role:`alert`,className:`mb-4 rounded-lg border border-danger/30 bg-danger/5 p-4`,children:[(0,b.jsxs)(`p`,{className:`text-sm font-medium text-danger`,children:[N.length,` worker registration(s) contain values accepted by Bunqueue 2.8.55 but unsafe to render. Healthy workers remain available below.`]}),(0,b.jsx)(`p`,{className:`mt-1 text-xs text-muted`,children:`Their status and active-job count are unknown, so this dashboard will not offer the registry-only removal action for them.`}),(0,b.jsx)(`ul`,{className:`mt-2 space-y-1 text-xs text-muted`,children:N.slice(0,20).map(e=>(0,b.jsxs)(`li`,{className:`truncate font-mono`,children:[`#`,e.index+1,` `,e.id??`(unaddressable id)`,` — `,e.reason]},`${e.index}:${e.id??`unknown`}`))})]}),D&&(0,b.jsx)(`div`,{className:t(`mb-3 text-sm`,D.ok?`text-success`:`text-danger`),children:D.text}),M.length===0?(0,b.jsx)(m,{icon:(0,b.jsx)(o,{}),title:N.length?`No renderable workers`:`No workers registered`,hint:N.length?`Malformed registrations are isolated above instead of taking down the inventory.`:`Workers appear here once they connect and register with the server.`}):(0,b.jsx)(`div`,{className:`overflow-x-auto rounded-xl border border-line bg-surface`,children:(0,b.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,b.jsx)(`thead`,{children:(0,b.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,b.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Worker`}),(0,b.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Queues`}),(0,b.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Status`}),(0,b.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Active`}),(0,b.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Processed`}),(0,b.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:(0,b.jsx)(w,{label:`Failed`,active:k?.key===`failed`?k.dir:null,onClick:()=>F(`failed`)})}),(0,b.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:(0,b.jsx)(w,{label:`Last Seen`,active:k?.key===`lastSeen`?k.dir:null,onClick:()=>F(`lastSeen`)})}),(0,b.jsx)(`th`,{className:`w-16 px-5 py-3 text-right font-medium`,children:`Actions`})]})}),(0,b.jsx)(`tbody`,{children:P.map(e=>(0,b.jsxs)(`tr`,{className:`border-b border-line last:border-0 hover:bg-surface-2/40`,children:[(0,b.jsxs)(`td`,{className:`px-5 py-3`,children:[(0,b.jsx)(`div`,{className:`font-medium text-fg`,children:e.name||`worker`}),(0,b.jsx)(`div`,{className:`font-mono text-[11px] text-faint`,children:e.id})]}),(0,b.jsx)(`td`,{className:`px-5 py-3 font-mono text-xs text-muted`,children:e.queues.join(`, `)||`—`}),(0,b.jsx)(`td`,{className:`px-5 py-3`,children:(0,b.jsx)(`span`,{title:e.status===`active`?void 0:S,className:t(`rounded-full px-2 py-0.5 text-[11px] font-medium`,e.status===`active`?`bg-emerald-500/10 text-success`:`bg-amber-500/10 text-warning`),children:e.status})}),(0,b.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-blue-400`,children:l(e.activeJobs)}),(0,b.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:l(e.processedJobs)}),(0,b.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:l(e.failedJobs)}),(0,b.jsx)(`td`,{className:`px-5 py-3 text-right text-faint`,children:p(e.lastSeen)}),(0,b.jsx)(`td`,{className:`px-5 py-3`,children:(0,b.jsx)(`div`,{className:`flex justify-end`,children:e.status===`stale`&&e.activeJobs===0?(0,b.jsx)(a,{"aria-label":`Remove stale registry record for worker ${e.id}`,title:`Registry cleanup only — does not stop the worker process`,disabled:T.has(e.id),onClick:()=>z(e.id),children:(0,b.jsx)(s,{className:`size-3.5`})}):(0,b.jsx)(`span`,{className:`text-xs text-faint`,title:e.status===`stale`?`Registry cleanup is blocked while active jobs are reported`:`Only stale, idle registry records can be removed`,children:`—`})})})]},e.id))})]})}),M.length>x&&(0,b.jsxs)(`p`,{className:`mt-3 text-xs text-warning`,children:[`Showing first `,l(x),` of `,l(M.length),` workers.`]})]})}function w({label:e,active:n,onClick:r}){return(0,b.jsxs)(`button`,{type:`button`,onClick:r,title:`Sort by ${e}`,className:t(`inline-flex items-center gap-1 uppercase tracking-wider transition-colors hover:text-fg`,n?`text-fg`:`text-faint`),children:[e,(0,b.jsx)(`span`,{"aria-hidden":`true`,children:n===`desc`?`↓`:n===`asc`?`↑`:``})]})}export{C as WorkersPro};
1
+ import{r as e,t}from"./cn-CMFYpumL.js";import{g as n,t as r}from"./react-vendor-Bjui4wS4.js";import{A as i,T as a,X as o,Y as s,b as c,c as l,h as u,m as d,st as f,u as p,v as m,x as h,y as g}from"./index-Dr__4DsT.js";import{r as _,t as v}from"./useServerActionGuard-CItj3hvh.js";var y=e(n(),1),b=r(),x=100,S=`No heartbeat recently — derived from lastSeen`;function C(){let{data:e,error:n,loading:r,refetch:C}=i(async()=>(await f.workers()).data,[]),[T,E]=(0,y.useState)(new Set),[D,O]=(0,y.useState)(null),[k,A]=(0,y.useState)(null),j=_(`workers-pro`);if((0,y.useEffect)(()=>{E(new Set),O(null)},[j.scopeKey]),r&&!e&&!n)return(0,b.jsx)(c,{label:`Loading workers…`});if(n&&!e)return(0,b.jsxs)(`div`,{children:[(0,b.jsx)(u,{title:`Workers`,description:`Worker inventory is unavailable.`}),(0,b.jsx)(g,{error:n,onRetry:C})]});let M=e?.workers??[],N=e?.quarantinedWorkers??[],P=(k?[...M].sort((e,t)=>{let n=k.key===`failed`?e.failedJobs??0:e.lastSeen??0,r=k.key===`failed`?t.failedJobs??0:t.lastSeen??0;return k.dir===`asc`?n-r:r-n}):M).slice(0,x),F=e=>A(t=>t?.key===e?{key:e,dir:t.dir===`desc`?`asc`:`desc`}:{key:e,dir:`desc`}),I=M.filter(e=>e.status===`active`).length,L=M.length-I,R=M.reduce((e,t)=>e+(t.activeJobs??0),0),z=async e=>{if(!window.confirm(`Remove the stale registry record for worker "${e}"? This does not stop the worker process. Continue only after confirming that process is stopped; Bunqueue v2.8.55 workers do not automatically re-register after their heartbeat record is removed.`))return;let t=j.begin(`worker:${e}`);if(t){E(t=>new Set(t).add(e)),O(null);try{if(v(await f.unregisterWorker(e),`Remove stale worker registry record`),!t.isCurrent())return;O({ok:!0,text:`Removed stale registry record for ${e} ✓`}),C()}catch(e){if(!t.isCurrent())return;O({ok:!1,text:`Removal failed: ${e.message}`})}finally{t.finish()&&E(t=>{let n=new Set(t);return n.delete(e),n})}}};return(0,b.jsxs)(`div`,{children:[(0,b.jsx)(u,{title:`Workers`,description:`Registered workers and their throughput.`,live:!!e&&!n}),n&&(0,b.jsx)(h,{message:`Worker refresh failed — showing the last successful inventory.`,onRetry:C}),(0,b.jsxs)(`div`,{className:`mb-6 grid grid-cols-2 gap-4 md:grid-cols-5`,children:[(0,b.jsx)(d,{label:`Total`,value:l(M.length+N.length),compact:!0}),(0,b.jsx)(d,{label:`Active`,value:l(I),tone:`green`,compact:!0}),(0,b.jsx)(`div`,{title:S,children:(0,b.jsx)(d,{label:`Stale`,value:l(L),tone:L?`amber`:`default`,compact:!0})}),(0,b.jsx)(d,{label:`Active Jobs`,value:l(R),tone:`blue`,compact:!0}),(0,b.jsx)(d,{label:`Quarantined`,value:l(N.length),tone:N.length?`red`:`default`,compact:!0})]}),N.length>0&&(0,b.jsxs)(`div`,{role:`alert`,className:`mb-4 rounded-lg border border-danger/30 bg-danger/5 p-4`,children:[(0,b.jsxs)(`p`,{className:`text-sm font-medium text-danger`,children:[N.length,` worker registration(s) contain values accepted by Bunqueue 2.8.55 but unsafe to render. Healthy workers remain available below.`]}),(0,b.jsx)(`p`,{className:`mt-1 text-xs text-muted`,children:`Their status and active-job count are unknown, so this dashboard will not offer the registry-only removal action for them.`}),(0,b.jsx)(`ul`,{className:`mt-2 space-y-1 text-xs text-muted`,children:N.slice(0,20).map(e=>(0,b.jsxs)(`li`,{className:`truncate font-mono`,children:[`#`,e.index+1,` `,e.id??`(unaddressable id)`,` — `,e.reason]},`${e.index}:${e.id??`unknown`}`))})]}),D&&(0,b.jsx)(`div`,{className:t(`mb-3 text-sm`,D.ok?`text-success`:`text-danger`),children:D.text}),M.length===0?(0,b.jsx)(m,{icon:(0,b.jsx)(o,{}),title:N.length?`No renderable workers`:`No workers registered`,hint:N.length?`Malformed registrations are isolated above instead of taking down the inventory.`:`Workers appear here once they connect and register with the server.`}):(0,b.jsx)(`div`,{className:`overflow-x-auto rounded-xl border border-line bg-surface`,children:(0,b.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,b.jsx)(`thead`,{children:(0,b.jsxs)(`tr`,{className:`border-b border-line text-left text-[11px] uppercase tracking-wider text-faint`,children:[(0,b.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Worker`}),(0,b.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Queues`}),(0,b.jsx)(`th`,{className:`px-5 py-3 font-medium`,children:`Status`}),(0,b.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Active`}),(0,b.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:`Processed`}),(0,b.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:(0,b.jsx)(w,{label:`Failed`,active:k?.key===`failed`?k.dir:null,onClick:()=>F(`failed`)})}),(0,b.jsx)(`th`,{className:`px-5 py-3 text-right font-medium`,children:(0,b.jsx)(w,{label:`Last Seen`,active:k?.key===`lastSeen`?k.dir:null,onClick:()=>F(`lastSeen`)})}),(0,b.jsx)(`th`,{className:`w-16 px-5 py-3 text-right font-medium`,children:`Actions`})]})}),(0,b.jsx)(`tbody`,{children:P.map(e=>(0,b.jsxs)(`tr`,{className:`border-b border-line last:border-0 hover:bg-surface-2/40`,children:[(0,b.jsxs)(`td`,{className:`px-5 py-3`,children:[(0,b.jsx)(`div`,{className:`font-medium text-fg`,children:e.name||`worker`}),(0,b.jsx)(`div`,{className:`font-mono text-[11px] text-faint`,children:e.id})]}),(0,b.jsx)(`td`,{className:`px-5 py-3 font-mono text-xs text-muted`,children:e.queues.join(`, `)||`—`}),(0,b.jsx)(`td`,{className:`px-5 py-3`,children:(0,b.jsx)(`span`,{title:e.status===`active`?void 0:S,className:t(`rounded-full px-2 py-0.5 text-[11px] font-medium`,e.status===`active`?`bg-emerald-500/10 text-success`:`bg-amber-500/10 text-warning`),children:e.status})}),(0,b.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-blue-400`,children:l(e.activeJobs)}),(0,b.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:l(e.processedJobs)}),(0,b.jsx)(`td`,{className:`px-5 py-3 text-right tnum text-muted`,children:l(e.failedJobs)}),(0,b.jsx)(`td`,{className:`px-5 py-3 text-right text-faint`,children:p(e.lastSeen)}),(0,b.jsx)(`td`,{className:`px-5 py-3`,children:(0,b.jsx)(`div`,{className:`flex justify-end`,children:e.status===`stale`&&e.activeJobs===0?(0,b.jsx)(a,{"aria-label":`Remove stale registry record for worker ${e.id}`,title:`Registry cleanup only — does not stop the worker process`,disabled:T.has(e.id),onClick:()=>z(e.id),children:(0,b.jsx)(s,{className:`size-3.5`})}):(0,b.jsx)(`span`,{className:`text-xs text-faint`,title:e.status===`stale`?`Registry cleanup is blocked while active jobs are reported`:`Only stale, idle registry records can be removed`,children:`—`})})})]},e.id))})]})}),M.length>x&&(0,b.jsxs)(`p`,{className:`mt-3 text-xs text-warning`,children:[`Showing first `,l(x),` of `,l(M.length),` workers.`]})]})}function w({label:e,active:n,onClick:r}){return(0,b.jsxs)(`button`,{type:`button`,onClick:r,title:`Sort by ${e}`,className:t(`inline-flex items-center gap-1 uppercase tracking-wider transition-colors hover:text-fg`,n?`text-fg`:`text-faint`),children:[e,(0,b.jsx)(`span`,{"aria-hidden":`true`,children:n===`desc`?`↓`:n===`asc`?`↑`:``})]})}export{C as WorkersPro};