import{d as k,b as m,o as N,e as T,f as h,g as B,j as e,h as l,w as a,n as R,t,$ as u,a0 as o,a1 as n,a2 as D}from"./index-a0da86f0.js";import{getCount as c,getLocalJobCount as x}from"./common-fa44b7a0.js";import{_ as y}from"./_plugin-vue_export-helper-c27b6911.js";const C={class:"dashboard-page"},Q={class:"page-header"},S={class:"page-title"},A=k({__name:"Dashboard",setup(L){const s=m({agents:0,nodes:0,taskQueue:0,scheduledTasks:0,knowledgeBase:0,note:0,event:0,todo:0,file:0}),w=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 _=await x();_.success&&(s.taskQueue=_.count||0);const f=await c("Local Scheduled Job");f.success&&(s.scheduledTasks=f.count||0);const r=await c("Knowledge Base");r.success&&(s.knowledgeBase=r.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 N(()=>{w()}),(d,i)=>(R(),T("div",C,[h("div",Q,[h("h1",S,B(e(t)("Dashboard")),1)]),l(e(D),{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})]))}});const I=y(A,[["__scopeId","data-v-d1f0aa95"]]);export{I as default};
