MOON
Server: Apache
System: Linux server1.studioinfinity.com.br 2.6.32-954.3.5.lve1.4.90.el6.x86_64 #1 SMP Tue Feb 21 12:26:30 UTC 2023 x86_64
User: artinside (517)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/netdata/usr/share/netdata/web/v3/3348.96627aace191750fdf56.chunk.js
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"0725d67f2585acd82a0d73d488b6cd9060c3224d"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c704a5c4-acb6-43d8-8808-724ba859a62d",e._sentryDebugIdIdentifier="sentry-dbid-c704a5c4-acb6-43d8-8808-724ba859a62d")}catch(e){}}(),(globalThis.webpackChunkcloud_frontend=globalThis.webpackChunkcloud_frontend||[]).push([[3348],{98212(e,t,o){o.d(t,{A:()=>i});var n=o(96540),r=o(41514),s=o(78904),l=o(74848);class a extends n.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){(0,r.H)("geomap-error",{error:e.message,stack:t.componentStack})}render(){return this.state.hasError?(0,l.jsxs)(s.Flex,{column:!0,alignItems:"center",justifyContent:"center",height:"100%",gap:4,padding:[8],children:[(0,l.jsx)(s.Icon,{name:"alert_triangle",size:"large",color:"error"}),(0,l.jsx)(s.Text,{strong:!0,children:"Map failed to load"}),(0,l.jsx)(s.Text,{color:"textLite",textAlign:"center",width:{max:100},children:this.state.error?.message||"An error occurred while loading the map. Please check your network connection and try again."}),(0,l.jsx)(s.Button,{flavour:"borderless",onClick:()=>this.setState({hasError:!1,error:null}),children:"Retry"})]}):this.props.children}}const i=a},93348(e,t,o){o.r(t),o.d(t,{default:()=>w});o(98992),o(81454);var n=o(96540),r=o(54550),s=o(882),l=o(78904),a=o(2817),i=o(75811),d=o(84819),c=o(82226),u=o(15715),g=o(74848);const p=e=>{let{node:t,onClick:o}=e;const[s,l]=(0,n.useState)(!1),{hasAlert:a,critical:i}=(0,c.t3)(t),p=(0,c.qY)(t),h=(0,n.useCallback)(()=>{o&&o(t.id)},[t.id,o]);return(0,g.jsx)(r.J8,{position:{lat:t._geo.latitude,lng:t._geo.longitude},onClick:h,children:(0,g.jsxs)("div",{style:{position:"relative"},onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[(0,g.jsx)(d.O9,{color:p,children:a&&(i>0?(0,g.jsx)(d.t6,{}):(0,g.jsx)(d.sH,{}))}),s&&(0,g.jsx)(d.fT,{children:(0,g.jsx)(u.A,{node:t,statusColor:p})})]})})};var h=o(53450);const f=e=>{let{cluster:t,nodes:o,onClick:s,isDark:l}=e;const{lat:a,lng:i,count:u}=t,p=(0,d.fA)(u),f=(0,c._9)(o,l),m=(0,c.OQ)(o),x=(0,n.useCallback)(()=>{s&&s(t)},[t,s]);return(0,g.jsx)(r.J8,{position:{lat:a,lng:i},onClick:x,children:(0,g.jsxs)(d.lk,{bg:f,style:{width:p,height:p},children:[m&&(0,g.jsx)(d.Hg,{color:h.s2[m]}),u]})})},m=e=>{let{from:t,to:o,color:s,isSelected:l,onClick:a}=e;const i=(0,r.ko)();return(0,n.useEffect)(()=>{if(!i||!t||!o)return;const e=new google.maps.Polyline({path:[{lat:t.latitude,lng:t.longitude},{lat:o.latitude,lng:o.longitude}],strokeColor:s,strokeOpacity:l?1:.7,strokeWeight:l?4:2.5,geodesic:!0,map:i});return a&&e.addListener("click",()=>a()),()=>{e.setMap(null),google.maps.event.clearInstanceListeners(e)}},[i,t,o,s,l,a]),null},x=e=>{let{links:t,nodeById:o,selectedLinkId:n,onSelectLink:r}=e;return t.map(e=>{const t=o[e.fromNodeId],s=o[e.toNodeId];return t&&s?(0,g.jsx)(m,{from:t._geo,to:s._geo,color:e.color,isSelected:n===e.id,onClick:()=>r(e.id)},e.id):null})};var b=o(98212);const k=e=>{let{visible:t}=e;const o=(0,r.ko)();return(0,n.useEffect)(()=>{if(!o||!t)return;const e=new google.maps.TrafficLayer;return e.setMap(o),()=>e.setMap(null)},[o,t]),null},C=e=>{let{onNodeClick:t,showTraffic:o,isDark:s,savedViewport:l,onViewportChange:d,linkProps:u={}}=e;const m=(0,a.A)(),b=(0,r.ko)(),[C,w]=(0,n.useState)(l?.zoom||h.aM),[y,j]=(0,n.useState)(null),v=(0,n.useRef)(C);v.current=C;const _=(0,n.useRef)(null),I=(0,n.useCallback)(e=>{const{zoom:t}=e.detail;w(t);const o=e.map?.getBounds();if(o){const e=o.getNorthEast(),t=o.getSouthWest();j({north:e.lat(),south:t.lat(),east:e.lng(),west:t.lng()})}d&&(clearTimeout(_.current),_.current=setTimeout(()=>{const{center:o}=e.detail;o&&d({lat:o.lat,lng:o.lng,zoom:t})},h.l6))},[d]);(0,n.useEffect)(()=>()=>clearTimeout(_.current),[]);const{processed:T,getClusterExpansionZoom:M,nodeById:E}=(0,i.A)(m,C,y),S=(0,n.useCallback)(e=>{if(!b)return;const t=M(e.id);b.panTo({lat:e.lat,lng:e.lng}),b.setZoom(Math.min(t,h.nD))},[b,M]),A=(0,n.useCallback)(e=>{if(v.current<h.KC&&b){const t=E[e];return void(t&&(b.panTo({lat:t._geo.latitude,lng:t._geo.longitude}),b.setZoom(h.p9)))}t&&t(e)},[b,E,t]),D=(0,n.useMemo)(()=>(0,c.bW)(m)||void 0,[m]),z=(0,n.useMemo)(()=>l?{lat:l.lat,lng:l.lng}:1===m.length?{lat:m[0]._geo.latitude,lng:m[0]._geo.longitude}:h.Ii,[m,l]),L=l?.zoom||(1===m.length?10:h.aM),B=!!l;return(0,g.jsxs)(r.T5,{defaultCenter:z,defaultZoom:L,defaultBounds:!B&&m.length>1?D:void 0,minZoom:h.DQ,maxZoom:h.nD,gestureHandling:"greedy",disableDefaultUI:!1,mapTypeControl:!0,zoomControl:!0,streetViewControl:!1,fullscreenControl:!1,mapId:"netdata-geo-map",colorScheme:s?"DARK":"LIGHT",onCameraChanged:I,style:{width:"100%",height:"100%"},children:[(0,g.jsx)(k,{visible:o}),u.links?.length>0&&(0,g.jsx)(x,{links:u.links,nodeById:E,selectedLinkId:u.selectedLinkId,onSelectLink:u.onSelectLink}),T.map(e=>"cluster"===e.type?(0,g.jsx)(f,{cluster:e,nodes:e.nodes,onClick:S,isDark:s},`cluster-${e.id}`):e.node?(0,g.jsx)(p,{node:e.node,onClick:A},e.id):null)]})},w=e=>{let{onNodeClick:t,showTraffic:o,savedViewport:n,onViewportChange:a,linkProps:i}=e;const d="Default"!==(0,s.useTheme)().name,c=(0,h.Sz)();return c?(0,g.jsx)(b.A,{children:(0,g.jsx)(r.c4,{apiKey:c,children:(0,g.jsx)(C,{onNodeClick:t,showTraffic:o,isDark:d,savedViewport:n,onViewportChange:a,linkProps:i})})}):(0,g.jsx)(b.A,{children:(0,g.jsx)(l.Flex,{justifyContent:"center",alignItems:"center",height:"100%",padding:[5],children:(0,g.jsx)(l.Text,{color:"textLite",children:"Google Maps API key not configured. Update your map settings."})})})}},15715(e,t,o){o.d(t,{A:()=>i});var n=o(882),r=o(78904),s=o(53450),l=o(74848);const a=(0,n.default)(r.Flex).attrs({alignItems:"center",gap:1,round:!0,padding:[0,1]}).withConfig({displayName:"nodeMapTooltip__AlertBadge",componentId:"sc-1jgq7ul-0"})(["font-size:10px;font-weight:600;background:",";color:",";"],e=>{let{bg:t}=e;return t},(0,r.getColor)("bright")),i=e=>{let{node:t,statusColor:o}=e;const n=t.health?.alerts?.critical||0,i=t.health?.alerts?.warning||0,d=t.nodeStatus||"Unknown";return(0,l.jsxs)(r.Flex,{column:!0,padding:[2,3],round:2,background:"mainBackground",border:{color:"borderSecondary"},width:{min:"200px",max:"280px"},style:{boxShadow:"0 4px 12px rgba(0,0,0,0.15)",pointerEvents:"none",whiteSpace:"nowrap"},children:[(0,l.jsx)(r.Text,{strong:!0,children:t.name||t.nm}),(0,l.jsxs)(r.Flex,{alignItems:"center",gap:1,children:[(0,l.jsx)(r.Box,{width:"8px",height:"8px",round:1,style:{background:o,flexShrink:0}}),(0,l.jsx)(r.TextSmall,{color:"textLite",children:d})]}),t.os?.nm&&(0,l.jsxs)(r.TextSmall,{color:"textLite",children:["OS: ",t.os.nm]}),(n>0||i>0)&&(0,l.jsxs)(r.Flex,{alignItems:"center",gap:1,margin:[1,0,0],children:[n>0&&(0,l.jsxs)(a,{bg:s.s2.critical,children:[n," critical"]}),i>0&&(0,l.jsxs)(a,{bg:s.s2.warning,children:[i," warning"]})]})]})}},84819(e,t,o){o.d(t,{Hg:()=>g,O9:()=>a,fA:()=>p,fT:()=>c,lk:()=>u,sH:()=>d,t6:()=>i});var n=o(882),r=o(78904),s=o(53450);const l=(0,n.keyframes)(["0%{transform:scale(1);opacity:0.8;}50%{transform:scale(1.8);opacity:0;}100%{transform:scale(1.8);opacity:0;}"]),a=(0,n.default)(r.Flex).attrs({alignItems:"center",justifyContent:"center",cursor:"pointer",position:"relative"}).withConfig({displayName:"shared__MarkerDot",componentId:"sc-27t4jv-0"})(["width:","px;height:","px;border-radius:50%;background:",";border:2px solid ",";box-shadow:0 2px 6px rgba(0,0,0,0.3);transition:transform 0.15s ease;&:hover{transform:scale(1.3);}"],s.DT,s.DT,e=>{let{color:t}=e;return t},(0,r.getRgbColor)("bright",.9)),i=(0,n.default)(r.Box).attrs({position:"absolute"}).withConfig({displayName:"shared__PulseRingCritical",componentId:"sc-27t4jv-1"})(["inset:-4px;border-radius:50%;border:2px solid ",";animation:"," ","s ease-out infinite;pointer-events:none;"],s.s2.critical,l,s.ap),d=(0,n.default)(r.Box).attrs({position:"absolute"}).withConfig({displayName:"shared__PulseRingWarning",componentId:"sc-27t4jv-2"})(["inset:-4px;border-radius:50%;border:2px solid ",";animation:"," ","s ease-out infinite;pointer-events:none;"],s.s2.warning,l,s.jf),c=(0,n.default)(r.Box).attrs({position:"absolute",zIndex:10}).withConfig({displayName:"shared__TooltipAnchor",componentId:"sc-27t4jv-3"})(["bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);"]),u=(0,n.default)(r.Flex).attrs({alignItems:"center",justifyContent:"center",cursor:"pointer",position:"relative"}).withConfig({displayName:"shared__ClusterDotBase",componentId:"sc-27t4jv-4"})(["border-radius:50%;background:",";border:3px solid ",";box-shadow:0 2px 8px rgba(0,0,0,0.3);font-size:13px;font-weight:700;color:",";transition:transform 0.15s ease;&:hover{transform:scale(1.15);}"],e=>{let{bg:t}=e;return t},(0,r.getRgbColor)("bright",.9),(0,r.getColor)("bright")),g=(0,n.default)(r.Box).attrs({position:"absolute"}).withConfig({displayName:"shared__ClusterAlertRing",componentId:"sc-27t4jv-5"})(["inset:-3px;border-radius:50%;border:2px solid ",";pointer-events:none;"],e=>{let{color:t}=e;return t}),p=e=>Math.min(s.zc+2*e,60)},75811(e,t,o){o.d(t,{A:()=>i});o(98992),o(54520),o(81454);var n=o(96540),r=o(22882),s=o(53450),l=o(49519);const a=r.A.default||r.A,i=(e,t,o)=>{const r=(0,n.useMemo)(()=>{const t=new a({radius:s.cF,maxZoom:s.cE}),o=e.map(e=>({type:"Feature",properties:{nodeId:e.id},geometry:{type:"Point",coordinates:[e._geo.longitude,e._geo.latitude]}}));return t.load(o),t},[e]),i=(0,n.useMemo)(()=>{if(!o)return[];const e=[o.west,o.south,o.east,o.north];return r.getClusters(e,Math.floor(t))},[r,o,t]),d=(0,l.A)(e),c=(0,n.useCallback)(e=>{try{return r.getClusterExpansionZoom(e)}catch{return t+2}},[r,t]),u=(0,n.useCallback)(e=>{try{return r.getLeaves(e,1/0).map(e=>d[e.properties.nodeId]).filter(Boolean)}catch{return[]}},[r,d]);return{processed:(0,n.useMemo)(()=>i.map(e=>{const[t,o]=e.geometry.coordinates;return e.properties.cluster?{type:"cluster",id:e.properties.cluster_id,lat:o,lng:t,count:e.properties.point_count,nodes:u(e.properties.cluster_id)}:{type:"node",id:e.properties.nodeId,node:d[e.properties.nodeId]}}),[i,d,u]),getClusterExpansionZoom:c,nodeById:d}}},82226(e,t,o){o.d(t,{OQ:()=>l,_9:()=>s,bW:()=>i,qY:()=>r,t3:()=>a});o(98992),o(54520),o(81454);var n=o(53450);const r=e=>e.isLive?n.Ez.live:e.isOffline?n.Ez.offline:"stale"===e.state?n.Ez.stale:n.Ez.unseen,s=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=e.length;if(0===o)return n.Ez.offline;const r=e.filter(e=>e.isLive).length/o;if(r>n.z1)return n.Ez.live;const s=(0,n.fK)(t);return r>n.e9?s.mixed:r>n.FU?s.mostOffline:n.Ez.offline},l=e=>{for(const t of e)if(t.health?.alerts?.critical)return"critical";for(const t of e)if(t.health?.alerts?.warning)return"warning";return null},a=e=>{const t=e.health?.alerts?.critical||0,o=e.health?.alerts?.warning||0;return{critical:t,warning:o,hasAlert:t>0||o>0,alertColor:t>0?n.s2.critical:n.s2.warning,alertSpeed:t>0?n.ap:n.jf}},i=e=>{if(e.length<=1)return null;let t=90,o=-90,n=180,r=-180;for(const a of e)t=Math.min(t,a._geo.latitude),o=Math.max(o,a._geo.latitude),n=Math.min(n,a._geo.longitude),r=Math.max(r,a._geo.longitude);const s=Math.max(.15*(o-t),2);if(r-n>180){const n=e.map(e=>{const t=e._geo.longitude;return t<0?t+360:t}),r=Math.min(...n),l=Math.max(...n),a=Math.max(.15*(l-r),2),i=r-a,d=l+a;return{north:o+s,south:t-s,west:i>180?i-360:i,east:d>180?d-360:d}}const l=Math.max(.15*(r-n),2);return{north:o+s,south:t-s,east:r+l,west:n-l}}}}]);