import{r as a,bx as u,by as x,bz as p,j as e,W as v,a as r,c as f,aJ as n,du as s,dv as h,dw as m,dx as _}from"./index-_eM6l4Nf.js";const j=()=>{u(x.monitoring);const[o,i]=a.useState(!1),l=p(),c=async()=>{try{i(!0);const t=await new h().request({url:"/elastic/jwt/services",type:m.get}),{kibanaUrl:d}=(t==null?void 0:t.data)??{},g=`${_}${d}security_tenant=private#/?_g=()&_a=(columns:!(service,host,logdate,logger_name,priority,log_message),index:'.services-*',interval:auto,sort:!(logdate,desc))`;window.open(g,"_blank")}catch{l.error({title:"Error",content:"Failed to open Service Logs."})}finally{i(!1)}};return e.jsxs(v,{title:"Monitoring",children:[e.jsx(r,{flexDirection:"row",children:e.jsx(f,{bold:!0,children:"Access to monitoring applications"})}),e.jsxs(r,{flexDirection:"row",mt:"20px",children:[e.jsx(n,{intent:"inline",href:`${s}/grafana`,target:"_blank",external:!0,children:"Grafana ↗"}),e.jsx(n,{intent:"inline",href:`${s}/hdfsui`,target:"_blank",external:!0,children:"HopsFS Admin ↗"}),e.jsx(n,{intent:"inline",onClick:c,isLoading:o,children:"Service Logs ↗"})]})]})},y=a.memo(j);export{y as default};
