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