File: //proc/self/root/opt/netdata/netdata-web-files/v3/5178.933c3ddf58709af98be8.chunk.js
try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="cbe853c2-d0a8-43ac-a3a5-0899b3d20438",e._sentryDebugIdIdentifier="sentry-dbid-cbe853c2-d0a8-43ac-a3a5-0899b3d20438")}()}catch(e){}!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"24860f4888408c3529c668460cb7600d59ef7ae7"}}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[5178],{5178:(e,t,r)=>{r.r(t),r.d(t,{default:()=>v});r(98992),r(81454);var n=r(96540),o=r(63766),i=r(19075),l=r(81685),s=r(42849),a=r(50100),d=r(71870),c=r(91721),p=r(39929),u=r(24868),x=r(24155),g=r(79748),h=r(6304),m=r(41514),f=r(3319),w=r(74848);const y=e=>{let{children:t,...r}=e;return(0,w.jsx)(o.Flex,{column:!0,gap:3,padding:[4,0],...r,children:t})},j=()=>(0,w.jsxs)(y,{children:[(0,w.jsx)(x.A,{height:"80px"}),(0,w.jsx)(x.A,{height:"80px"}),(0,w.jsx)(x.A,{height:"80px"}),(0,w.jsx)(x.A,{height:"80px"}),(0,w.jsx)(x.A,{height:"80px"})]}),b=e=>{let{id:t,createdAt:r}=e;const i=(0,s.A)({reportDate:new Date(r),dateOptions:{long:!0}}),{goToReport:l}=(0,a.A)(),{sendLog:d}=(0,f.A)(),c=(0,n.useCallback)((()=>{l(t),d({feature:"AlertDetailsModal",description:"View full report button click",reportId:t})}),[t,l,d]);return(0,w.jsxs)(o.Flex,{column:!0,gap:2,background:"panelBg",round:!0,border:{side:"all",color:"border"},padding:[3,4],children:[(0,w.jsx)(o.TextBig,{strong:!0,color:"menuItem",children:i}),(0,w.jsx)(u.R,{id:t,limitCharacters:180}),(0,w.jsx)(o.Flex,{justifyContent:"end",children:(0,w.jsx)(g.A,{onClick:c,children:"View more"})})]})},A="alert-modal",C=()=>(0,w.jsxs)(o.Flex,{alignItems:"center",gap:2,children:[(0,w.jsx)(o.Icon,{name:"checkmark_s",color:"success"}),(0,w.jsx)(o.TextBig,{children:"Requested a report"})]}),I=e=>{let{alertId:t}=e;const[r,i,,l]=(0,h.A)(),[s,,a]=(0,h.A)(),c=(0,d.A)({onSuccess:a}),{sendLog:u}=(0,f.A)(),x=(0,n.useCallback)((()=>{c({alertId:t}),(0,m.H)("alert-troubleshooter","click-alert-troubleshooter-action-confirmation",A,{action:"request-report-alert",alertId:t},"user-clicked-cta"),u({feature:"AlertTroubleshooter",alertId:t,ui:A,description:"request-report-alert"})}),[t,c,u]);return s?(0,w.jsx)(C,{}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(g.A,{Component:o.TextBig,onClick:i,children:"Request a new report"}),r?(0,w.jsx)(p.A,{data:{id:t},handleAction:x,onClose:l}):null]})},v=e=>{let{alertId:t,...r}=e;const{fullyLoaded:n}=(0,i.JL)(t),{loaded:o,reports:s}=(0,l.nX)({alertId:t});return n?o?(0,w.jsxs)(y,{...r,children:[(0,w.jsx)(I,{alertId:t}),s.map((e=>(0,w.jsx)(b,{...e},e.id)))]}):(0,w.jsx)(j,{}):(0,w.jsx)(c.A,{})}},24868:(e,t,r)=>{r.d(t,{R:()=>k,A:()=>N});r(98992),r(54520),r(72577),r(81454);var n=r(96540),o=r(63766),i=r(79997),l=r(81685),s=r(74848);const a=e=>t=>{let{containerProps:r={},...n}=t;return(0,s.jsx)(o.Flex,{alignItems:"center",justifyContent:"center",flex:"grow",...r,children:(0,s.jsx)(e,{...n})})},d=a((()=>(0,s.jsx)(o.Text,{children:"Loading reports..."}))),c=a((e=>{let{error:t}=e;const r=(0,n.useMemo)((()=>t?.errorMessage||"Something went wrong"),[t]);return(0,s.jsxs)(o.Flex,{alignItems:"center",gap:2,children:[(0,s.jsx)(o.Icon,{name:"warning_triangle",color:"warning"}),(0,s.jsx)(o.Text,{children:r})]})})),p=a((()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.Text,{children:"There are no recently generated reports."}),(0,s.jsx)(o.Text,{children:"Create the first one by selecting one of the definitions on the left."})]})));var u=r(24155),x=r(79748),g=r(83341),h=r(42849);r(8872);const m=["alertTransition"],f=e=>{let{variables:t={}}=e;return Object.entries(t).reduce(((e,t)=>{let[r,n]=t;if(!m.includes(r)){return`${e}-${Array.isArray(n)?"nodes"===r?`${n.length}-nodes`:n.join(","):n}`}return e}),"")};var w=r(50100),y=r(64156);const j="(min-width: 1600px)",b="(max-width: 1599px)",A="(max-width: 1299px)",C="(max-width: 1128px)",I=()=>({isLarge:(0,y.A)(j),isMedium:(0,y.A)(b),isSmall:(0,y.A)(A),isSuoerSmall:(0,y.A)(C)});var v=r(6304),_=r(3319);const T=()=>(0,s.jsxs)(o.Flex,{column:!0,gap:2,children:[(0,s.jsx)(u.A,{}),(0,s.jsx)(u.A,{width:"75%"})]}),k=e=>{let{id:t,limitCharacters:r=70}=e;const{loaded:i,report:a,error:d}=(0,l.ef)({id:t}),c=(0,n.useMemo)((()=>i&&!d&&a.data?.blocks?.length?a.data.blocks.find((e=>{let{type:t}=e;return"TEXT"===t}))?.data?.substring(0,r):""),[i,a,d]);return i?d?null:(0,s.jsx)(o.Flex,{"data-testid":"insights-report-preview-container",children:(0,s.jsx)(g.A,{children:`${c}...`})}):(0,s.jsx)(T,{})},F=e=>{let{id:t,definitionId:r,createdAt:a,variables:d,itemsNum:c}=e;const{loaded:p,definition:u}=(0,l.fL)({id:r}),g=(0,h.A)({reportDate:new Date(a),dateOptions:{long:!0}}),m=f({variables:d}),{goToReport:y}=(0,w.A)(),{sendLog:j}=(0,_.A)(),b=(0,n.useCallback)((()=>{y(t),j({feature:"Insights",description:"View full report button click",reportId:t})}),[t,y,j]);return p?(0,s.jsxs)(i.oQ,{"data-testid":"insights-recent-report-preview",itemsNum:c,children:[(0,s.jsxs)(o.Flex,{column:!0,gap:3,children:[(0,s.jsxs)(o.Flex,{column:!0,gap:1,children:[(0,s.jsx)(o.Text,{color:"menuItem",children:g}),(0,s.jsx)(o.TextBig,{strong:!0,children:u.name}),m?(0,s.jsxs)(o.TextSmall,{color:"menuItem",children:["(",m.substring(0,30),")"]}):null]}),(0,s.jsx)(k,{id:t})]}),(0,s.jsx)(o.Flex,{justifyContent:"end",children:(0,s.jsx)(x.A,{onClick:b,children:"View full report."})})]}):null},N=e=>{let{collapsed:t}=e;const[r,a]=(0,v.A)(t),{loaded:u,reports:x,error:g}=(0,l.rY)(),h=(()=>{const{isMedium:e,isSmall:t,isSuoerSmall:r}=I();return r?1:t?2:e?3:4})(),m=(0,n.useMemo)((()=>u?(x||[]).filter((e=>{let{status:t}=e;return"COMPLETED"===t})).slice(0,h).sort(((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime())):[]),[u,x,h]);return u?g?(0,s.jsx)(i.Mx,{collapsed:r,children:(0,s.jsx)(c,{error:g})}):m.length?(0,s.jsx)(i.Mx,{collapsed:r,children:(0,s.jsxs)(o.Flex,{"data-testid":"insights-recent-reports-container",width:"100%",column:!0,gap:4,padding:[4],children:[(0,s.jsxs)(o.Flex,{alignItems:"center",gap:2,onClick:a,cursor:"pointer",children:[(0,s.jsx)(o.Text,{color:"primary",children:"Recently generated reports"}),(0,s.jsx)(o.Icon,{name:"chevron_left",size:"small",color:"primary",rotate:r?3:1})]}),r?null:(0,s.jsx)(o.Flex,{gap:4,children:m.map((e=>(0,s.jsx)(F,{...e,itemsNum:h},e.id)))})]})}):(0,s.jsx)(i.Mx,{collapsed:r,children:(0,s.jsx)(p,{containerProps:{column:!0,gap:2}})}):(0,s.jsx)(i.Mx,{collapsed:r,children:(0,s.jsx)(d,{})})}},42849:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(64587),o=r(79022);const i=e=>{let{reportDate:t,showTime:r=!0,dateOptions:i={},timeOptions:l={}}=e;const{localeDateString:s,localeTimeString:a}=(0,n.$j)();return(0,o.PP)({reportDate:t,showTime:r,dateOptions:i,timeOptions:l,localeDateString:s,localeTimeString:a})}},50100:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(96540),o=r(88934),i=r(61841),l=r(99094);const s=()=>{const e=(0,o.Zp)(),[t,r]=(0,i.Ay)();return{goToReport:(0,n.useCallback)((n=>{n&&e(`/spaces/${t}/rooms/${r}/${l.p9}/${n}`)}),[t,r,e]),getUrl:(0,n.useCallback)((e=>{const{origin:n}=window.location;return`${n}/spaces/${t}/rooms/${r}/${l.p9}/${e}`}),[t,r])}}},79997:(e,t,r)=>{r.d(t,{AQ:()=>j,AT:()=>y,BN:()=>d,DJ:()=>g,Hs:()=>c,J3:()=>p,Mx:()=>h,VW:()=>x,_V:()=>l,oQ:()=>m,oe:()=>s,p6:()=>a,qm:()=>b,rk:()=>w,yB:()=>u});var n=r(33185),o=r(63766),i=r(99094);const l=(0,n.default)(o.Box).attrs((e=>({height:"100%",...e}))).withConfig({displayName:"styled__LayoutContainer",componentId:"sc-v88w2r-0"})(["display:grid;grid-template-columns:430px auto;gap:8px;"]),s=(0,n.default)(o.Flex).attrs((e=>({position:"relative",height:"100%",column:!0,flex:"grow",border:{side:"right",color:"border"},overflow:{vertical:"auto"},padding:[4,0,0,0],...e}))).withConfig({displayName:"styled__SidebarContainer",componentId:"sc-v88w2r-1"})([""]),a=(0,n.default)(o.Flex).attrs((e=>({position:"absolute",top:"12px",right:"12px",alignItems:"center",gap:2,...e}))).withConfig({displayName:"styled__LabelsContainer",componentId:"sc-v88w2r-2"})([""]),d=(0,n.default)(o.Flex).attrs((e=>({alignItems:"center",gap:2,padding:[0,4],...e}))).withConfig({displayName:"styled__SidebarSearch",componentId:"sc-v88w2r-3"})([""]),c=(0,n.default)(o.Flex).attrs((e=>({column:!0,height:"calc(100vh - 420px)",overflow:{vertical:"auto"},...e}))).withConfig({displayName:"styled__SidebarMenuContainer",componentId:"sc-v88w2r-4"})([""]),p=((0,n.default)(o.Flex).attrs((e=>({column:!0,gap:2,padding:[4],border:{side:"bottom",color:"border"},...e}))).withConfig({displayName:"styled__SidebarMenuItemContainer",componentId:"sc-v88w2r-5"})([""]),(0,n.default)(o.Flex).attrs((e=>({column:!0,overflow:{vertical:"auto"},...e}))).withConfig({displayName:"styled__MainContainer",componentId:"sc-v88w2r-6"})([""])),u=(0,n.default)(o.Box).withConfig({displayName:"styled__ReportBodyContainer",componentId:"sc-v88w2r-7"})(["display:grid;grid-template-columns:220px auto;gap:16px;"]),x=(0,n.default)(o.Flex).attrs((e=>{let{isActive:t,...r}=e;return{border:{side:"left",color:t?"primary":"border"},...r}})).withConfig({displayName:"styled__TocItemContainer",componentId:"sc-v88w2r-8"})(["&:hover{border-color:",";}"],(0,o.getColor)("primary")),g=(0,n.default)(o.Text).attrs((e=>{let{isActive:t,...r}=e;return{color:t?"primary":"text",padding:[2,4],...r}})).withConfig({displayName:"styled__TocItemText",componentId:"sc-v88w2r-9"})(["&:hover{text-decoration:none;}"]),h=(0,n.default)(o.Flex).attrs((e=>{let{collapsed:t,...r}=e;return{gap:4,...t?{}:{height:`${i.xV}px`,border:{side:"top",color:"border"}},...r}})).withConfig({displayName:"styled__RecentReportsContainer",componentId:"sc-v88w2r-10"})([""]),m=(0,n.default)(o.Flex).attrs((e=>{let{itemsNum:t,...r}=e;return{width:100/t+"%",height:i.xV-105+"px",column:!0,gap:3,padding:[4],background:"panelBg",round:!0,justifyContent:"between",...r}})).withConfig({displayName:"styled__ReportPreviewItem",componentId:"sc-v88w2r-11"})([""]),f=(0,n.css)(["animation:",";@keyframes blinking{0%{opacity:0;}50%{opacity:1;}100%{opacity:0;}}"],(e=>{let{isBlinking:t}=e;return t?"blinking 1.6s ease-in infinite":""})),w=(0,n.default)(o.Flex).attrs((e=>({alignItems:"center",justifyContent:"center",padding:[1],...e}))).withConfig({displayName:"styled__ReportStatusDotContainer",componentId:"sc-v88w2r-12"})([""]),y=(0,n.default)(o.Box).attrs((e=>({width:"6px",height:"6px",round:"50%",...e}))).withConfig({displayName:"styled__ReportStatusDot",componentId:"sc-v88w2r-13"})(["",""],f),j=(0,n.default)(o.Icon).withConfig({displayName:"styled__IconBlinking",componentId:"sc-v88w2r-14"})(["",""],f),b=(0,n.default)(o.Box).attrs((e=>({padding:[2,4],round:4,...e}))).withConfig({displayName:"styled__TextBubble",componentId:"sc-v88w2r-15"})([""])},83341:(e,t,r)=>{r.d(t,{A:()=>p});var n=r(96540),o=r(54852),i=(r(98992),r(81454),r(32277)),l=r(25279),s=r(74848);const a=e=>{let{children:t,...r}=e;const n=(0,l.A)();return(0,s.jsx)("table",{id:n,"data-report-table-id":n,"data-report-block-type":"TABLE",...r,children:t})},d=e=>{let{content:t=""}=e;const r=t.split("\n");return(0,s.jsx)("div",{"data-report-block-type":"CODE",children:r.map(((e,t)=>(0,s.jsx)("p",{className:"code-line",children:e},t)))})},c=function(){let{isPrintable:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{...i.A,fence:{...i.A.fence,...e?{render:d}:{}},...e?{table:{render:a}}:{}}},p=(0,n.memo)((e=>{let{isPrintable:t,children:r}=e;return(0,s.jsx)(o.A,{transformConfiguration:{nodes:c({isPrintable:t})},children:r})}))}}]);