import{r as x,bx as I,by as b,u as P,ec as f,bo as j,j as t,D as E,cq as F,o as D,q as l,b as k,bT as v,$ as G}from"./index-ljTaFLaB.js";import{G as y}from"./GrafanaDashboard-djxrjugw.js";import{P as T}from"./Panel-mILL570q.js";import{u as M}from"./useUserPermissions-Di54216O.js";import"./Deprecated-D_iwBiXP.js";const L=()=>{I(b.fgMetrics);const{id:n,fsId:o,fgId:i}=P(),{currentData:e,isFetching:d,refetch:u}=f({pId:+n,fsId:+o,fgId:+i}),a=[{name:"feature_group_id",value:i}],c=j(),{canEdit:m,isLoading:p,isDataScientist:h}=M(),s="grafana/d-solo/onlineFS/onlinefs",r="350px",g=[{title:"Deserialization Time",height:r,linkParams:{urlPath:s,variables:a,panelId:9}},{title:"Processing Time",height:r,linkParams:{urlPath:s,variables:a,panelId:10}},{title:"Messages rate",height:r,linkParams:{urlPath:s,variables:a,panelId:7}},{title:"Error rate",height:r,linkParams:{urlPath:s,variables:a,panelId:30}},{title:"Byte rate",height:r,linkParams:{urlPath:s,variables:a,panelId:15}},{title:"Record Size",height:r,linkParams:{urlPath:s,variables:a,panelId:45}}];return d?t.jsx(E,{}):e?t.jsxs(t.Fragment,{children:[t.jsx(T,{title:e==null?void 0:e.name,version:e==null?void 0:e.version,data:e,idColor:(e==null?void 0:e.type)==="onDemandFeaturegroupDTO"?"labels.blue":"labels.orange",isEditDisabled:!m||h||p,onClickEdit:()=>{c(D(l.project.featureGroup.edit,l.project.value,{id:n,fsId:o,fgId:i}))},onClickRefresh:u,pathnamePostFix:"/metrics"}),t.jsxs(k,{mt:"10px",title:"Online metrics",height:"auto",children:[!(e!=null&&e.onlineEnabled)&&t.jsx(v,{mainText:"Metrics not supported for non-online feature groups"}),(e==null?void 0:e.onlineEnabled)&&t.jsx(y,{panels:g})]}),t.jsx(G,{width:"100%",minHeight:"40px",sx:{visibility:"hidden"},children:"INVISIBLE"})]}):t.jsx(F,{})},R=x.memo(L);export{R as default};
