import{r as s,bC as g,aE as p,j as e,m as u,B as r,b as x,aG as i,bD as h,d4 as m,d5 as v}from"./index-dP1W1_bd.js";const f=()=>{g(h.monitoring);const[o,n]=s.useState(!1),a=p(),l=async()=>{try{n(!0);const t=await new m().request({url:"/elastic/jwt/services",type:v.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{n(!1)}};return e.jsxs(u,{title:"Monitoring",children:[e.jsx(r,{flexDirection:"row",children:e.jsx(x,{bold:!0,children:"Access to monitoring applications"})}),e.jsxs(r,{flexDirection:"row",mt:"20px",children:[e.jsx(i,{intent:"inline",href:"/hopsworks-api/grafana",target:"_blank",external:!0,children:"Grafana ↗"}),e.jsx(i,{intent:"inline",href:"/hopsworks-api/hdfsui",target:"_blank",external:!0,children:"HopsFS Admin ↗"}),e.jsx(i,{intent:"inline",onClick:l,isLoading:o,children:"Service Logs ↗"})]})]})},j=s.memo(f);export{j as default};
