import{r as n,b1 as l,j as p}from"./vendor-ClLR6ncd.js";import{P as m}from"./ui-CVsJhvnv.js";import{E as c,i as f}from"./index-OtVJl4GC.js";import"./lodash-ZyeDnt0e.js";import{u as g}from"./model-CfTXIMmE.js";import"./Messages-BRmQDxrZ.js";import"./RefreshDataButton-BMv_Vwgi.js";function d(){const[e,a]=n.useState(),[i,r]=n.useState(""),s=c(["admin","logfile"],async()=>{const o=new URL("/logfile",window.location.origin);e!==void 0&&o.searchParams.append("startAt",e);const t=await f({url:o.toString()});return(t==null?void 0:t.lastPosition)!==void 0&&a(t.lastPosition),r(u=>u+`
`+t.contents.trim()),null});return{content:i,logData:s}}function x(){return g({accept:"text/plain",file:"agraph.log",path:"/logfile?all=true"})}function j(){const{title:e}=l();return p.jsx(m,{useData:d,useDownloadMutation:x,title:e,emptyMessage:"Server log is empty"})}export{j as default};
