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.e749c582d834b9982a52.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:"24dad2414db89a9e2209703b6e48226fc420eca1"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="73c2560b-5de8-435e-8f1a-99c9fc1bf35b",e._sentryDebugIdIdentifier="sentry-dbid-73c2560b-5de8-435e-8f1a-99c9fc1bf35b")}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[3348],{98212(e,t,o){o.d(t,{A:()=>a});var n=o(96540),r=o(41514),l=o(42358),s=o(74848);class i 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(){var e;return this.state.hasError?(0,s.jsxs)(l.Flex,{column:!0,alignItems:"center",justifyContent:"center",height:"100%",gap:4,padding:[8],children:[(0,s.jsx)(l.Icon,{name:"alert_triangle",size:"large",color:"error"}),(0,s.jsx)(l.Text,{strong:!0,children:"Map failed to load"}),(0,s.jsx)(l.Text,{color:"textLite",textAlign:"center",width:{max:100},children:(null===(e=this.state.error)||void 0===e?void 0:e.message)||"An error occurred while loading the map. Please check your network connection and try again."}),(0,s.jsx)(l.Button,{flavour:"borderless",onClick:()=>this.setState({hasError:!1,error:null}),children:"Retry"})]}):this.props.children}}const a=i},93348(e,t,o){o.r(t),o.d(t,{default:()=>C});o(98992),o(81454),o(62953);var n=o(96540),r=o(54550),l=o(51510),s=o(42358),i=o(2817),a=o(75811),d=o(84819),c=o(82226),u=o(15715),g=o(74848);const p=e=>{let{node:t,onClick:o}=e;const[l,s]=(0,n.useState)(!1),{hasAlert:i,critical:a}=(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:()=>s(!0),onMouseLeave:()=>s(!1),children:[(0,g.jsx)(d.O9,{color:p,children:i&&(a>0?(0,g.jsx)(d.t6,{}):(0,g.jsx)(d.sH,{}))}),l&&(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:l,isDark:s}=e;const{lat:i,lng:a,count:u}=t,p=(0,d.fA)(u),f=(0,c._9)(o,s),m=(0,c.OQ)(o),x=(0,n.useCallback)((()=>{l&&l(t)}),[t,l]);return(0,g.jsx)(r.J8,{position:{lat:i,lng:a},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:l,isSelected:s,onClick:i}=e;const a=(0,r.ko)();return(0,n.useEffect)((()=>{if(!a||!t||!o)return;const e=new google.maps.Polyline({path:[{lat:t.latitude,lng:t.longitude},{lat:o.latitude,lng:o.longitude}],strokeColor:l,strokeOpacity:s?1:.7,strokeWeight:s?4:2.5,geodesic:!0,map:a});return i&&e.addListener("click",(()=>i())),()=>{e.setMap(null),google.maps.event.clearInstanceListeners(e)}}),[a,t,o,l,s,i]),null},x=e=>{let{links:t,nodeById:o,selectedLinkId:n,onSelectLink:r}=e;return t.map((e=>{const t=o[e.fromNodeId],l=o[e.toNodeId];return t&&l?(0,g.jsx)(m,{from:t._geo,to:l._geo,color:e.color,isSelected:n===e.id,onClick:()=>r(e.id)},e.id):null}))};var v=o(98212);const b=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},k=e=>{var t;let{onNodeClick:o,showTraffic:l,isDark:s,savedViewport:d,onViewportChange:u,linkProps:m={}}=e;const v=(0,i.A)(),k=(0,r.ko)(),[C,w]=(0,n.useState)((null===d||void 0===d?void 0:d.zoom)||h.aM),[y,j]=(0,n.useState)(null),_=(0,n.useRef)(C);_.current=C;const I=(0,n.useRef)(null),M=(0,n.useCallback)((e=>{var t;const{zoom:o}=e.detail;w(o);const n=null===(t=e.map)||void 0===t?void 0:t.getBounds();if(n){const e=n.getNorthEast(),t=n.getSouthWest();j({north:e.lat(),south:t.lat(),east:e.lng(),west:t.lng()})}u&&(clearTimeout(I.current),I.current=setTimeout((()=>{const{center:t}=e.detail;t&&u({lat:t.lat,lng:t.lng,zoom:o})}),h.l6))}),[u]);(0,n.useEffect)((()=>()=>clearTimeout(I.current)),[]);const{processed:T,getClusterExpansionZoom:E,nodeById:S}=(0,a.A)(v,C,y),A=(0,n.useCallback)((e=>{if(!k)return;const t=E(e.id);k.panTo({lat:e.lat,lng:e.lng}),k.setZoom(Math.min(t,h.nD))}),[k,E]),D=(0,n.useCallback)((e=>{if(_.current<h.KC&&k){const t=S[e];t&&(k.panTo({lat:t._geo.latitude,lng:t._geo.longitude}),k.setZoom(h.p9))}else o&&o(e)}),[k,S,o]),z=(0,n.useMemo)((()=>(0,c.bW)(v)||void 0),[v]),L=(0,n.useMemo)((()=>d?{lat:d.lat,lng:d.lng}:1===v.length?{lat:v[0]._geo.latitude,lng:v[0]._geo.longitude}:h.Ii),[v,d]),B=(null===d||void 0===d?void 0:d.zoom)||(1===v.length?10:h.aM),N=!!d;return(0,g.jsxs)(r.T5,{defaultCenter:L,defaultZoom:B,defaultBounds:!N&&v.length>1?z: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:M,style:{width:"100%",height:"100%"},children:[(0,g.jsx)(b,{visible:l}),(null===(t=m.links)||void 0===t?void 0:t.length)>0&&(0,g.jsx)(x,{links:m.links,nodeById:S,selectedLinkId:m.selectedLinkId,onSelectLink:m.onSelectLink}),T.map((e=>"cluster"===e.type?(0,g.jsx)(f,{cluster:e,nodes:e.nodes,onClick:A,isDark:s},"cluster-".concat(e.id)):e.node?(0,g.jsx)(p,{node:e.node,onClick:D},e.id):null))]})},C=e=>{let{onNodeClick:t,showTraffic:o,savedViewport:n,onViewportChange:i,linkProps:a}=e;const d="Default"!==(0,l.useTheme)().name,c=(0,h.Sz)();return c?(0,g.jsx)(v.A,{children:(0,g.jsx)(r.c4,{apiKey:c,children:(0,g.jsx)(k,{onNodeClick:t,showTraffic:o,isDark:d,savedViewport:n,onViewportChange:i,linkProps:a})})}):(0,g.jsx)(v.A,{children:(0,g.jsx)(s.Flex,{justifyContent:"center",alignItems:"center",height:"100%",padding:[5],children:(0,g.jsx)(s.Text,{color:"textLite",children:"Google Maps API key not configured. Update your map settings."})})})}},15715(e,t,o){o.d(t,{A:()=>a});var n=o(51510),r=o(42358),l=o(53450),s=o(74848);const i=(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")),a=e=>{var t,o,n;let{node:a,statusColor:d}=e;const c=(null===(t=a.health)||void 0===t||null===(t=t.alerts)||void 0===t?void 0:t.critical)||0,u=(null===(o=a.health)||void 0===o||null===(o=o.alerts)||void 0===o?void 0:o.warning)||0,g=a.nodeStatus||"Unknown";return(0,s.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,s.jsx)(r.Text,{strong:!0,children:a.name||a.nm}),(0,s.jsxs)(r.Flex,{alignItems:"center",gap:1,children:[(0,s.jsx)(r.Box,{width:"8px",height:"8px",round:1,style:{background:d,flexShrink:0}}),(0,s.jsx)(r.TextSmall,{color:"textLite",children:g})]}),(null===(n=a.os)||void 0===n?void 0:n.nm)&&(0,s.jsxs)(r.TextSmall,{color:"textLite",children:["OS: ",a.os.nm]}),(c>0||u>0)&&(0,s.jsxs)(r.Flex,{alignItems:"center",gap:1,margin:[1,0,0],children:[c>0&&(0,s.jsxs)(i,{bg:l.s2.critical,children:[c," critical"]}),u>0&&(0,s.jsxs)(i,{bg:l.s2.warning,children:[u," warning"]})]})]})}},84819(e,t,o){o.d(t,{Hg:()=>g,O9:()=>i,fA:()=>p,fT:()=>c,lk:()=>u,sH:()=>d,t6:()=>a});var n=o(51510),r=o(42358),l=o(53450);const s=(0,n.keyframes)(["0%{transform:scale(1);opacity:0.8;}50%{transform:scale(1.8);opacity:0;}100%{transform:scale(1.8);opacity:0;}"]),i=(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);}"],l.DT,l.DT,(e=>{let{color:t}=e;return t}),(0,r.getRgbColor)("bright",.9)),a=(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;"],l.s2.critical,s,l.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;"],l.s2.warning,s,l.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(l.zc+2*e,60)},75811(e,t,o){o.d(t,{A:()=>a});o(98992),o(54520),o(81454),o(62953);var n=o(96540),r=o(22882),l=o(53450),s=o(49519);const i=r.A.default||r.A,a=(e,t,o)=>{const r=(0,n.useMemo)((()=>{const t=new i({radius:l.cF,maxZoom:l.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]),a=(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,s.A)(e),c=(0,n.useCallback)((e=>{try{return r.getClusterExpansionZoom(e)}catch(o){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(t){return[]}}),[r,d]);return{processed:(0,n.useMemo)((()=>a.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]}}))),[a,d,u]),getClusterExpansionZoom:c,nodeById:d}}},82226(e,t,o){o.d(t,{OQ:()=>s,_9:()=>l,bW:()=>a,qY:()=>r,t3:()=>i});o(98992),o(54520),o(81454),o(62953);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,l=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 l=(0,n.fK)(t);return r>n.e9?l.mixed:r>n.FU?l.mostOffline:n.Ez.offline},s=e=>{for(const n of e){var t;if(null!==(t=n.health)&&void 0!==t&&null!==(t=t.alerts)&&void 0!==t&&t.critical)return"critical"}for(const n of e){var o;if(null!==(o=n.health)&&void 0!==o&&null!==(o=o.alerts)&&void 0!==o&&o.warning)return"warning"}return null},i=e=>{var t,o;const r=(null===(t=e.health)||void 0===t||null===(t=t.alerts)||void 0===t?void 0:t.critical)||0,l=(null===(o=e.health)||void 0===o||null===(o=o.alerts)||void 0===o?void 0:o.warning)||0;return{critical:r,warning:l,hasAlert:r>0||l>0,alertColor:r>0?n.s2.critical:n.s2.warning,alertSpeed:r>0?n.ap:n.jf}},a=e=>{if(e.length<=1)return null;let t=90,o=-90,n=180,r=-180;for(const i of e)t=Math.min(t,i._geo.latitude),o=Math.max(o,i._geo.latitude),n=Math.min(n,i._geo.longitude),r=Math.max(r,i._geo.longitude);const l=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),s=Math.max(...n),i=Math.max(.15*(s-r),2),a=r-i,d=s+i;return{north:o+l,south:t-l,west:a>180?a-360:a,east:d>180?d-360:d}}const s=Math.max(.15*(r-n),2);return{north:o+l,south:t-l,east:r+s,west:n-s}}}}]);