import{d as w,o as m,A as B,J as h,P as N,j as e,t,B as l,C as a,aq as T,Q as R,g as C,ar as u,as as o,at as n}from"./index-DOFLUERq.js";import{getCount as c,getLocalJobCount as D}from"./common-DEIQtiPI.js";import{_ as Q}from"./_plugin-vue_export-helper-DlAUqK2U.js";const x={class:"dashboard-page"},A={class:"page-header"},S={class:"page-title"},y=w({__name:"Dashboard",setup(L){const s=R({agents:0,nodes:0,taskQueue:0,scheduledTasks:0,knowledgeBase:0,note:0,event:0,todo:0,file:0}),k=async()=>{try{const d=await c("Local Ai Agent");d.success&&(s.agents=d.count||0);const i=await c("Local Ai Node");i.success&&(s.nodes=i.count||0);const f=await D();f.success&&(s.taskQueue=f.count||0);const r=await c("Local Scheduled Job");r.success&&(s.scheduledTasks=r.count||0);const _=await c("Knowledge Base");_.success&&(s.knowledgeBase=_.count||0);const v=await c("Note");v.success&&(s.note=v.count||0);const b=await c("Event");b.success&&(s.event=b.count||0);const g=await c("ToDo");g.success&&(s.todo=g.count||0);const p=await c("File");p.success&&(s.file=p.count||0)}catch(d){console.error("加载统计数据失败:",d)}};return m(()=>{k()}),(d,i)=>(C(),B("div",x,[h("div",A,[h("h1",S,N(e(t)("Dashboard")),1)]),l(e(T),{cols:4,"x-gap":16,"y-gap":16,responsive:"screen","item-responsive":!0,class:"stats-grid"},{default:a(()=>[l(e(u),null,{default:a(()=>[l(e(o),null,{default:a(()=>[l(e(n),{label:e(t)("Total Agents"),value:s.agents},null,8,["label","value"])]),_:1})]),_:1}),l(e(u),null,{default:a(()=>[l(e(o),null,{default:a(()=>[l(e(n),{label:e(t)("Total Nodes"),value:s.nodes},null,8,["label","value"])]),_:1})]),_:1}),l(e(u),null,{default:a(()=>[l(e(o),null,{default:a(()=>[l(e(n),{label:e(t)("Task Queue"),value:s.taskQueue},null,8,["label","value"])]),_:1})]),_:1}),l(e(u),null,{default:a(()=>[l(e(o),null,{default:a(()=>[l(e(n),{label:e(t)("Scheduled Tasks"),value:s.scheduledTasks},null,8,["label","value"])]),_:1})]),_:1}),l(e(u),null,{default:a(()=>[l(e(o),null,{default:a(()=>[l(e(n),{label:e(t)("Knowledge Base"),value:s.knowledgeBase},null,8,["label","value"])]),_:1})]),_:1}),l(e(u),null,{default:a(()=>[l(e(o),null,{default:a(()=>[l(e(n),{label:e(t)("Note"),value:s.note},null,8,["label","value"])]),_:1})]),_:1}),l(e(u),null,{default:a(()=>[l(e(o),null,{default:a(()=>[l(e(n),{label:e(t)("Event"),value:s.event},null,8,["label","value"])]),_:1})]),_:1}),l(e(u),null,{default:a(()=>[l(e(o),null,{default:a(()=>[l(e(n),{label:e(t)("ToDo"),value:s.todo},null,8,["label","value"])]),_:1})]),_:1}),l(e(u),null,{default:a(()=>[l(e(o),null,{default:a(()=>[l(e(n),{label:e(t)("File"),value:s.file},null,8,["label","value"])]),_:1})]),_:1})]),_:1})]))}}),G=Q(y,[["__scopeId","data-v-d1f0aa95"]]);export{G as default};
