File: //opt/netdata/usr/share/netdata/web/v3/5.2b5213079bca3e335270.chunk.js
!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};t.SENTRY_RELEASE={id:"8922de3783e88f1cd90ca2031b9812542c125fed"};var e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="c6d73ec0-247b-4923-8681-250a706d983a",t._sentryDebugIdIdentifier="sentry-dbid-c6d73ec0-247b-4923-8681-250a706d983a")}catch(t){}}(),(globalThis.webpackChunkcloud_frontend=globalThis.webpackChunkcloud_frontend||[]).push([[5],{44252(t,e,r){r.d(e,{A:()=>v});r(98992),r(54520);var n=r(96540),o=r(78904),a=r(5020),i=r(85660),l=r(18121),s=r(23226),d=r(80744),c=(r(3949),r(8872),r(19018)),u=r(57377),p=r(1817),f=r(24285),m=r(74848);const h={dark:{publicColor:"#FF9700",privateColor:"#0075A2",serverColor:"#00a44a",clientColor:"#DB162F",otherColor:"#3E4551",appFontColor:"#AEBBBB",appFontFamily:"monospace",appFontSize:"12px",appFontWeight:"regular",borderFontColor:"#EDF0F0",borderFontFamily:"monospace",borderFontSize:"14px",borderFontWeight:"bold"},light:{publicColor:"#BFA142",privateColor:"#197EA8",serverColor:"#339979",clientColor:"#CD6364",otherColor:"#AFB5BA",appFontColor:"#526161",appFontFamily:"monospace",appFontSize:"12px",appFontWeight:"regular",borderFontColor:"#5D7070",borderFontFamily:"monospace",borderFontSize:"14px",borderFontWeight:"bold"}},g=(0,n.memo)(t=>{let{data:e,width:r,height:a,processing:i,ref:l}=t;const s=(0,n.useRef)({}),d=(0,f.xd)("theme"),g=(0,p.A)(e),y=(0,p.A)(r),b=(0,p.A)(a),x=(0,p.A)(i),v=(0,n.useRef)({}),F=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=!t&&(0,u.Ay)(e,g);v.current=n?v.current:e.reduce((t,e)=>(t[e.Process]||(t[e.Process]={listen:0,inbound:0,outbound:0,local:0,private:0,public:0,total:0,name:e.Process}),t[e.Process].total+=e.Count,"listen"===e.Direction?t[e.Process].listen+=e.Count:"local"===e.Direction?t[e.Process].local+=e.Count:"inbound"===e.Direction?t[e.Process].inbound+=e.Count:"outbound"===e.Direction&&(t[e.Process].outbound+=e.Count),"public"===e.RemoteAddressSpace?t[e.Process].public+=e.Count:"private"===e.RemoteAddressSpace&&(t[e.Process].private+=e.Count),t),{});function o(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(7!==t.length||"#"!==t[0])throw new Error("Invalid hex color format");return`rgba(${parseInt(t.slice(1,3),16)}, ${parseInt(t.slice(3,5),16)}, ${parseInt(t.slice(5,7),16)}, ${e})`}function i(t,e,r,n,o){const a=e/2,i=r/2;!function(t){t.selectAll(".app").each(function(t){t&&(s.current[t.name]={x:t.x,y:t.y})})}(t);const l=c.scaleOrdinal().domain(["public","private","listenInbound","outbound","others"]).range([o.publicColor,o.privateColor,o.serverColor,o.clientColor,o.otherColor]),d=c.pie().value(t=>t.value),u=c.arc(),h=t.selectAll(".app").data(Object.values(v.current),t=>t.name);h.exit().transition().style("opacity",0).remove();const g=h.enter().append("g").attr("class","app").attr("transform",t=>{const e=s.current[t.name];return`translate(${e?.x||a}, ${e?.x||i})`});g.each(function(t){const e=c.select(this),r=d(t.d3.pie),n=t.d3.size;e.selectAll("path").data(r).enter().append("path").transition().attr("fill",(t,e)=>l(e)),e.append("text").text(t=>t.name).attr("text-anchor","middle").attr("y",n+10).style("font-family",o.appFontFamily).style("font-size",o.appFontSize).style("font-weight",o.appFontWeight).style("fill",o.appFontColor)});const y=g.merge(h);return y.each(function(t){const e=c.select(this),r=s.current[t.name]||function(t){return t.d3.isListener?{x:t.d3.x,y:t.d3.y}:{x:a,y:i}}(t);t.x=r.x,t.y=r.y,e.selectAll("path").data(d(t.d3.pie)).transition().attr("d",u.innerRadius(0).outerRadius(t.d3.size)),e.select("text").transition().attr("y",t.d3.size+10)}),y.call(c.drag().on("start",p).on("drag",f).on("end",m)),y}let l;function p(t,e){t.active||l.alphaTarget(1).restart(),e.fx=e.x,e.fy=e.y}function f(t,e){e.fx=t.x,e.fy=t.y}function m(t,e){t.active||l.alphaTarget(0),e.fx=null,e.fy=null}!function(e,s){let d=c.select("#d3-canvas").select("svg");((t,e,r)=>{if(n)return;const o=t/2-r,a=e/2-r,i=Math.min(2*o/3-r,2*a/3-r,Math.max(5,Math.min(t,e)/Object.keys(v.current).length)+13),l=Object.values(v.current),s={total:c.max(l,t=>t.total),local:c.max(l,t=>t.local),listen:c.max(l,t=>t.listen),private:c.max(l,t=>t.private),public:c.max(l,t=>t.public),inbound:c.max(l,t=>t.inbound),outbound:c.max(l,t=>t.outbound)},d=c.scaleLog().domain([1,s.total]).range([13,i]).clamp(!0);let u=0,p=0,f=0,m=e-r;l.forEach(n=>{const i=c.scaleLog().domain([1,n.total+1]).range([0,o-r]),l=c.scaleLog().domain([1,n.total+1]).range([0,o-r]),h=c.scaleLog().domain([1,n.total+1]).range([0,a-r]),g=c.scaleLog().domain([1,n.total+1]).range([0,a-r]);v.current[n.name].forces={total:n.total/s.total,local:n.local/s.local,listen:n.listen/s.listen,private:n.private/s.private,public:n.public/s.public,inbound:n.inbound/s.inbound,outbound:n.outbound/s.outbound},v.current[n.name].pos={right:i(n.public+1),left:l(n.private+1),top:h(n.outbound+1),bottom:g((n.listen+n.inbound)/2+1)};const y=n.total-(n.public+n.private+n.listen+n.inbound+n.outbound);let b=r+o+v.current[n.name].pos.right-v.current[n.name].pos.left,x=r+a+v.current[n.name].pos.bottom-v.current[n.name].pos.top,F=d(n.total);n.listen===n.total&&(F=10,f===p&&50*u>2*t/3&&(u=0,f=0,p=0,m-=80),u?f>=p?(p++,b=t/2+50*p,x=m-F-(p%2===0?0:40)):(f++,b=t/2-50*f,x=m-F-(f%2===0?0:40)):(b=t/2,x=m-F),u++),v.current[n.name].d3={isListener:n.listen===n.total,x:b,y:x,size:F,pie:[{value:n.public},{value:n.private},{value:n.listen+n.inbound},{value:n.outbound},{value:y>0?y:0}]},v.current[n.name].d3.x-v.current[n.name].d3.size/2<r&&(v.current[n.name].d3.x=r+2*v.current[n.name].d3.size),v.current[n.name].d3.x+v.current[n.name].d3.size/2>t&&(v.current[n.name].d3.x=t-2*v.current[n.name].d3.size),v.current[n.name].d3.y-v.current[n.name].d3.size/2<r&&(v.current[n.name].d3.y=r+2*v.current[n.name].d3.size),v.current[n.name].d3.y+v.current[n.name].d3.size/2>e&&(v.current[n.name].d3.y=e-2*v.current[n.name].d3.size)})})(r,a,e),(d.empty()||t)&&(d=d.empty()?c.select("#d3-canvas").append("svg").attr("width",r).attr("height",a):d.attr("width",r).attr("height",a),function(t,e,r,n,a){c.select("#d3-canvas").selectAll("svg > *").remove();const i=r/2,l=t.append("defs").append("linearGradient").attr("id","clientsGradient").attr("x1","0%").attr("y1","0%").attr("x2","0%").attr("y2","100%");l.append("stop").attr("offset","0%").style("stop-color",o(a.clientColor,1)),l.append("stop").attr("offset","100%").style("stop-color",o(a.clientColor,0));const s=t.append("g").attr("class","topRect");s.append("rect").attr("x",0).attr("y",0).attr("width","100%").attr("height",n/2).style("fill","url(#clientsGradient)"),s.append("text").text("Clients").attr("x","50%").attr("y",12).attr("text-anchor","middle").style("font-family",a.borderFontFamily).style("font-size",a.borderFontSize).style("font-weight",a.borderFontWeight).style("fill",a.borderFontColor);const d=t.append("defs").append("linearGradient").attr("id","serversGradient").attr("x1","0%").attr("y1","100%").attr("x2","0%").attr("y2","0%");d.append("stop").attr("offset","0%").style("stop-color",o(a.serverColor,1)),d.append("stop").attr("offset","100%").style("stop-color",o(a.serverColor,0));const u=t.append("g").attr("class","bottomRect");u.append("rect").attr("x",0).attr("y","100%").attr("width","100%").attr("height",n/2).attr("transform",`translate(0, -${n/2})`).style("fill","url(#serversGradient)"),u.append("text").text("Servers").attr("x","50%").attr("y","100%").attr("text-anchor","middle").attr("transform","translate(0, -4)").style("font-family",a.borderFontFamily).style("font-size",a.borderFontSize).style("font-weight",a.borderFontWeight).style("fill",a.borderFontColor);const p=t.append("defs").append("linearGradient").attr("id","publicGradient").attr("x1","100%").attr("y1","0%").attr("x2","0%").attr("y2","0%");p.append("stop").attr("offset","0%").style("stop-color",o(a.publicColor,1)),p.append("stop").attr("offset","100%").style("stop-color",o(a.publicColor,0));const f=t.append("g").attr("class","rightRect");f.append("rect").attr("x","100%").attr("y",0).attr("transform",`translate(-${n/2}, 0)`).attr("width",n/2).attr("height","100%").style("fill","url(#publicGradient)"),f.append("text").text("Public").attr("x","100%").attr("y","50%").attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",`rotate(90, ${e-n/4}, ${i})`).style("font-family",a.borderFontFamily).style("font-size",a.borderFontSize).style("font-weight",a.borderFontWeight).style("fill",a.borderFontColor);const m=t.append("defs").append("linearGradient").attr("id","privateGradient").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");m.append("stop").attr("offset","0%").style("stop-color",o(a.privateColor,1)),m.append("stop").attr("offset","100%").style("stop-color",o(a.privateColor,0));const h=t.append("g").attr("class","leftRect");h.append("rect").attr("x",0).attr("y",0).attr("width",n/2).attr("height","100%").style("fill","url(#privateGradient)"),h.append("text").text("Private").attr("x",n/2).attr("y","50%").attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",`rotate(-90, ${n/2-10}, ${i})`).style("font-family",a.borderFontFamily).style("font-size",a.borderFontSize).style("font-weight",a.borderFontWeight).style("fill",a.borderFontColor)}(d,r,a,e,s));const u=i(d,r,a,0,s);l=c.forceSimulation(Object.values(v.current)).force("x",c.forceX(t=>t.d3.x).strength(t=>t.d3.isListener?.2:.1)).force("y",c.forceY(t=>t.d3.y).strength(t=>t.d3.isListener?.2:.1)).force("collision",c.forceCollide(t=>1.1*t.d3.size+15).strength(1)).on("tick",()=>{u.each(t=>{t.x>r-e?t.x=r-e:t.x<e&&(t.x=e),t.y>a-e?t.y=a-e:t.y<e&&(t.y=e)}),u.attr("transform",t=>`translate(${t.x}, ${t.y})`)})}(40,h[d]||h.dark)};return(0,n.useLayoutEffect)(()=>{i||r&&a&&F(y!==r||b!==a||x!==i)},[e,r,a,d,i]),(0,m.jsx)(o.Flex,{id:"d3-canvas",ref:l,width:"100%",height:"100%",flex:!0,round:!0,overflow:"hidden"})}),y={"network-viewer":g},b=t=>{let{id:e,resizeHandle:r,style:a,paramsKey:d,containerWidth:c,resizing:u,ref:p,data:f,...h}=t;const g=y[e],[b,x]=(0,l.useHovered)({},[]),[,v]=(0,s.A)();(0,n.useEffect)(()=>{v(x)},[x]);const[F,{width:C,height:w}]=(0,i.A)();return(0,m.jsxs)(o.Flex,{ref:(0,o.mergeRefs)(p,F),position:"relative",style:a,children:[(0,m.jsx)(g,{data:f,id:e,role:"graphics-object","aria-roledescription":"chart",ref:b,containerWidth:c,width:C,height:w,processing:u,...h},e),r]})},x=(0,n.memo)(t=>{let{paramsKey:e,customCharts:r,containerWidth:i,data:l}=t;const s=Object.values(r).filter(t=>!!y[t.type]),c=s[0]?.type,[u,p]=(0,n.useState)(function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return[(0,a.bP)(t,{left:0,top:0,width:12,height:9,id:t,...e,chartId:t,minWidth:12,maxWidth:12,minHeight:4,static:!1,dashboardable:!0})]}(c,{paramsKey:e,containerWidth:i}));return s.length?(0,m.jsx)(o.Flex,{column:!0,"data-testid":"functionsCharts",gap:3,width:"100%",background:"mainChartBg",round:.5,children:(0,m.jsx)(d.Ay,{rootId:e.extraKey,containerId:e.extraKey,onDragEnd:(t,e)=>{(0,a.Q)(e),p(t)},items:u,containerWidth:i-40,Item:b,itemProps:{data:l},rearrangeable:!1})}):"No chart found"}),v=x},20410(t,e,r){r.d(e,{A:()=>n});r(98992),r(23215),r(3949),r(81454),r(8872),r(25509),r(65223),r(60321),r(41927),r(11632),r(64377),r(66771),r(12516),r(68931),r(52514),r(35694),r(52774),r(49536),r(21926),r(94483),r(16215);const n={sum:t=>t.reduce((t,e)=>t+("number"===typeof e?e:0),0),min:t=>{let e;return t.forEach(t=>{null!=t&&(e>t||void 0===e&&t>=t)&&(e=t)}),e},max:t=>{let e;return t.forEach(t=>{null!=t&&(e<t||void 0===e&&t>=t)&&(e=t)}),e},extent:t=>{let e,r;return t.forEach(t=>{null!=t&&(void 0===e?t>=t&&(e=r=t):(e>t&&(e=t),r<t&&(r=t)))}),[e,r]},mean:t=>{let e=0,r=0;if(t.forEach(t=>{null!=t&&(t=+t)>=t&&(++e,r+=t)}),e)return r/e},median:t=>{if(!t.length)return;if(e=t,!Array.isArray(e)||!e.every(t=>"number"===typeof t))return;var e;if(1===t.length)return t[0];const r=Math.floor(t.length/2),n=t.sort((t,e)=>t-e);return t.length%2!==0?n[r]:(n[r-1]+n[r])/2},unique:t=>Array.from(new Set(t.map(t=>t)).values()),uniqueCount:t=>new Set(t.map(t=>t)).size,count:t=>t.length}},81989(t,e,r){r.d(e,{A:()=>h});r(74423),r(98992),r(23215),r(54520),r(81454);var n=r(96540),o=r(28657),a=r(78904),i=r(13752),l=r(92815),s=r(72582),d=r(82650),c=r(87398),u=r(62718),p=r(74848);const f=t=>e=>`histogram::${t.getAttribute("id")}::${e}`,m={"-":["#6F8879","#6F8879"],"[unsampled]":["#DBE1E1","#4A5757"],critical:["#F38593","#6E0B18"],debug:["#9E8B6E","#9E8B6E"],error:["#DB162F","#DB162F"],info:["#0EB6F0","#06526D"],information:["#0EB6F0","#06526D"],none:["#6F8879","#6F8879"],notice:["#3366CC","#3366CC"],success:["#00AB44","#00AB44"],verbose:["#854573","#422239"],warning:["#FF9700","#FF9700"]},h=t=>{let{histogram:e,availableHistograms:r,data:h,pagination:g,hover:y,help:b,histogramId:x,filters:v,onFiltersChange:F,toolboxSelectHistogram:C,toolboxReload:w,hideToolbox:A,nodeIds:E,fn:z,height:I}=t;const S=(0,c.eg)(),j=(0,n.useRef)();j.current=()=>Promise.resolve(e?.chart);const B=(0,n.useRef)(!1),[D,$]=(0,n.useMemo)(()=>{const t=`${E}-${z}-${x}`,r=S.makeChart({attributes:{id:t,info:b,...e&&{colors:e.chart.view.dimensions.names.map(t=>m[t.toLowerCase()]||null)}},getChart:()=>j.current(),makeTrack:f});return S.getRoot().appendChild(r),[r,t]},[E,z]);return(0,n.useEffect)(()=>{e&&(D.setAttribute("colors",e.chart.view.dimensions.names.map(t=>m[t.toLowerCase()]||null)),D.trigger("fetch"))},[e]),(0,n.useEffect)(()=>!!r&&D.updateAttributes({toolboxElements:A?[...w?[w]:[]]:[t=>{let{disabled:e}=t;return C({selectedId:x,disabled:e})},...w?[w]:[],s.default,i.default,l.default,d.default],title:e?.chart?.view?.title}),[r,z,w,A]),(0,n.useEffect)(()=>{if(!y||!D||!g)return;if(D.getAttribute&&D.getAttribute("dropdownOpen"))return;const t=h[y],r=Math.floor(t?.[g?.column]/1e6);r&&!isNaN(r)&&D.updateAttribute("hoverX",[1e3*Math.floor(r-r%e.chart.view.update_every),null])},[h,e,y]),(0,n.useEffect)(()=>{if(!D)return;const t=D.onAttributeChange("selectedLegendDimensions",t=>{if(B.current)return;const e=t.filter(t=>"[estimated]"!==t&&"[unsampled]"!==t);F(e)});return()=>{t()}},[D,F]),(0,n.useEffect)(()=>{if(!D||!e)return;const t=D.getAttribute("selectedLegendDimensions")||[],r=[...v||[],...t.filter(t=>"[estimated]"===t||"[unsampled]"===t)];(t.length!==r.length||!t.every(t=>r.includes(t)))&&(B.current=!0,D.setAttribute("selectedLegendDimensions",r),Promise.resolve().then(()=>{B.current=!1}))},[D,v,e]),(0,n.useEffect)(()=>()=>D&&D.destroy(),[D]),(0,p.jsx)(a.Flex,{flex:!0,width:"100%",height:{min:75,max:I},alignItems:"center",justifyContent:"center",children:D?(0,p.jsx)(o.A,{"data-chartid":$,chart:D,overflow:"hidden",hasFilters:!1}):(0,p.jsx)(u.mo,{})})}},13607(t,e,r){r.d(e,{A:()=>p});var n=r(96540),o=r(882),a=r(78904),i=r(81641),l=r(74848);const s=o.default.div.withConfig({displayName:"reload__IconsContainer",componentId:"sc-gd414j-0"})(["position:relative;"]),d=(0,o.default)(a.Icon).withConfig({displayName:"reload__SmallIcon",componentId:"sc-gd414j-1"})(["position:absolute;top:3px;left:3px;"]),c=(0,o.keyframes)(["from{transform:rotate(0deg);}to{transform:rotate(359deg);}"]),u=(0,o.default)(a.IconButton).withConfig({displayName:"reload__AnimatedIcon",componentId:"sc-gd414j-2"})(["&& svg{animation:",";}animation:rotation 2s infinite linear;"],t=>{let{animate:e}=t;return e?(0,o.css)([""," 3s linear infinite"],c):""}),p=t=>{let{onRefresh:e,dataGa:r,testId:o,loading:c}=t;const p=(0,i.gC)(),[f,m]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{if(!c)return void m(!1);const t=setTimeout(()=>m(!0),500);return()=>{clearTimeout(t)}},[c]),(0,l.jsx)(a.Flex,{alignItems:"center",children:(0,l.jsxs)(s,{children:[(0,l.jsx)(d,{name:p?"playSolid":"pauseSolid",width:"6px",height:"6px",color:p?"primary":"text"}),(0,l.jsx)(u,{animate:f,"data-testid":`${o}-refreshNowBtn`,"data-ga":`${r}::click-refresh-now::functions-view`,flavour:"hollow",icon:"refresh",onClick:()=>e({merge:!1}),disabled:p,padding:[1]})]})})}}}]);