!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="fce6b90a-0839-4468-85fc-c0a4f639cebf",e._sentryDebugIdIdentifier="sentry-dbid-fce6b90a-0839-4468-85fc-c0a4f639cebf")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"6845f9ce010d5a446e5d4a40f17204cb8341a07a"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[7359],{57359:function(e,t,n){n.r(t),n.d(t,{default:function(){return We}});var a=n(67294),r=n(95248),o=n(93433),i=(n(26699),n(32023),n(57327),n(41539),n(88449),n(2490),n(59849),n(92222),n(85827),n(25387),n(72608),n(4480)),l=n(97945),c={nodes:(0,i.xu)({key:"anomalyFilters",default:[]})},s=((0,i.CG)({key:"anomalyFilterState",get:function(e){var t=e.roomId,n=e.filterKey;return function(e){return(0,e.get)(c[n](t))}},set:function(e){var t=e.roomId,n=e.filterKey;return function(e,a){var r=e.set,i=e.get;if(Array.isArray(a))return r(c[n](t),a);var l=i(c[n](t)),s=l.includes(a)?l.filter((function(e){return e!==a})):[].concat((0,o.Z)(l),[a]);r(c[n](t),s)}}}),function(e,t){return t?e[t]:e}),d=n(36560),u=n(96929),m=n(64969),h=n(87854),f=n.n(h),p=n(95348),L=n.n(p),g=new(f())({id:"notCapableNodes",use:"notCapableNodes-usage",viewBox:"0 0 231 230",content:''}),v=(L().add(g),g),Z=function(){return a.createElement(m.Flex,{width:"100%",justifyContent:"center",alignItems:"center",gap:3},a.createElement("svg",{viewBox:v.viewBox,height:"222px"},a.createElement("use",{xlinkHref:"#".concat(v.id)})),a.createElement(m.TextBig,{strong:!0},"Your nodes are either offline or not configured for ML"))},y=n(91008),b=function(){return a.createElement(m.Flex,{height:10.5,width:{min:10.5},background:"warningText",justifyContent:"center",alignItems:"center",round:"50%",sx:{borderRadius:"50%"}},a.createElement(m.Icon,{color:"warningBackground",name:"informationPress"}))},M=function(e){var t=e.to,n=e.children;return a.createElement(y.Z,{Component:m.Text,href:t,target:"_blank",rel:"noopener noreferrer"},n)},E=function(){return a.createElement(m.Flex,{column:!0,gap:1},a.createElement(m.Text,{strong:!0,color:"textDescription"},"Not Configured Nodes"),a.createElement(m.Text,{color:"textDescription"},"Learn how to configure your nodes"," ",a.createElement(M,{to:"https://learn.netdata.cloud/docs/cloud/insights/anomaly-advisor#enable-ml-on-netdata-agent"},"to support anomaly advisor"),"."))},w=function(){return a.createElement(m.Flex,{column:!0,gap:1},a.createElement(m.Text,{strong:!0,color:"textDescription"},"Not Capable Nodes"),a.createElement(m.Text,{color:"textDescription"},"All nodes need to be updated to a version higher than"," ",a.createElement(m.Text,{strong:!0,color:"textDescription"},"1.32"),". Learn how to"," ",a.createElement(M,{to:"https://learn.netdata.cloud/docs/agent/packaging/installer/update"},"update to the latest Netdata version"),"."))},x=function(){return a.createElement(m.Box,{round:!0,background:"elementBackground",padding:[4]},a.createElement(m.Flex,{gap:4,alignItems:"start"},a.createElement(b,null),a.createElement(m.Flex,{gap:4,column:!0},a.createElement(E,null),a.createElement(w,null))))},C=function(){return a.createElement(m.Flex,{column:!0,width:"100%",height:"100%",justifyContent:"start",padding:[8,4]},a.createElement(m.Flex,{column:!0,gap:8},a.createElement(Z,null),a.createElement(x,null)))},k=n(29439),A=n(88553),I=n(91268),D=n(37518),O=n(89479),S=n(74059),T=n(74662),_=n(25517),H=n(41506),B=n(39612),F=(n(82526),n(38880),n(49337),n(33321),n(69070),n(4942)),N=(n(47941),n(15581),n(34514),n(54747),n(66992),n(70189),n(78783),n(88921),n(96248),n(13599),n(11477),n(64362),n(15389),n(90401),n(45164),n(91238),n(54837),n(87485),n(56767),n(76651),n(61437),n(35285),n(39865),n(33948),n(21249),n(57640),n(9924),n(89692)),j=n(87462),V=n(45987),P=n(2077),R=n(89405),G=n(78122),U=function(e){return Math.floor(e/1e3)},z=function(){var e=(0,_.$B)(),t=(0,k.Z)(e,2),n=t[0],r=t[1],o=(0,R.rA)().localeTimeString,i=(0,a.useMemo)((function(){var e=U(n),t=U(r);return[(0,G.getDateDiff)(e,t),o(n,{secs:!0}),o(r,{secs:!0})]}),[n,r]),l=(0,k.Z)(i,3),c=l[0],s=l[1],d=l[2];return n&&r?a.createElement(m.Flex,{gap:1,alignItems:"baseline"},a.createElement(m.TextMicro,{strong:!0,color:"textLite"},a.createElement(m.TextSmall,{strong:!0,color:"textLite"},s," \u2192 ",d," \u2022")," ","Duration: ",c)):null},K=n(71893),Y=(0,K.keyframes)(["from{transform:translate(412px,0);}"]),$=K.default.g.withConfig({displayName:"skeleton__Animated",componentId:"sc-gwkfye-0"})(["animation:",";"],(function(e){return e.animate?(0,K.css)([""," 1s linear infinite"],Y):""})),q=function(e){var t=e.animate,n=void 0!==t&&t;return a.createElement("svg",{width:"1140",height:"80",viewBox:"0 0 1140 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("mask",{id:"mask0_467_73096",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"1140",height:"80"},a.createElement("rect",{width:"1140",height:"80",fill:"#C4C4C4"})),a.createElement("g",{mask:"url(#mask0_467_73096)"},a.createElement($,{animate:n},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-374 70L-401 78H-192.5H14H25.5H212L180 70L157 55L144 70L105 11L69.5 70H41L17.8524 76.8586L-8 73L-39 38L-62 71L-85.5 61.5L-100.5 73L-114.5 61.5L-146 41L-168 70L-192.5 78L-235 70L-258 55L-271 70L-310 11L-327.75 40.5L-345.5 70H-374Z",fill:"#8F9EAA"}),a.createElement("path",{d:"M-401 78L-401.142 77.5206L-401 78.5V78ZM-374 70V69.5H-374.073L-374.142 69.5206L-374 70ZM212 78V78.5L212.121 77.5149L212 78ZM180 70L179.727 70.4188L179.797 70.4647L179.879 70.4851L180 70ZM157 55L157.273 54.5812L156.908 54.3429L156.622 54.6725L157 55ZM144 70L143.583 70.2757L143.946 70.8254L144.378 70.3275L144 70ZM105 11L105.417 10.7243L104.98 10.0632L104.572 10.7422L105 11ZM69.5 70V70.5H69.7827L69.9284 70.2578L69.5 70ZM41 70V69.5H40.9275L40.8579 69.5206L41 70ZM17.8524 76.8586L17.7785 77.3531L17.8882 77.3694L17.9944 77.338L17.8524 76.8586ZM-8 73L-8.3743 73.3315L-8.25369 73.4677L-8.07382 73.4945L-8 73ZM-39 38L-38.6257 37.6685L-39.0469 37.1929L-39.4102 37.7141L-39 38ZM-62 71L-62.1874 71.4636L-61.8178 71.613L-61.5898 71.2859L-62 71ZM-85.5 61.5L-85.3126 61.0365L-85.5775 60.9294L-85.8042 61.1032L-85.5 61.5ZM-100.5 73L-100.817 73.3864L-100.511 73.6383L-100.196 73.3968L-100.5 73ZM-114.5 61.5L-114.183 61.1137L-114.204 61.0961L-114.227 61.0809L-114.5 61.5ZM-146 41L-145.727 40.5809L-146.117 40.3272L-146.398 40.6978L-146 41ZM-168 70L-167.845 70.4753L-167.696 70.4268L-167.602 70.3022L-168 70ZM-235 70L-235.273 70.4188L-235.19 70.473L-235.092 70.4914L-235 70ZM-258 55L-257.727 54.5812L-258.092 54.3429L-258.378 54.6725L-258 55ZM-271 70L-271.417 70.2757L-271.054 70.8254L-270.622 70.3275L-271 70ZM-310 11L-309.583 10.7243L-310.02 10.0632L-310.428 10.7422L-310 11ZM-345.5 70V70.5H-345.217L-345.072 70.2578L-345.5 70ZM-400.858 78.4794L-373.858 70.4794L-374.142 69.5206L-401.142 77.5206L-400.858 78.4794ZM-192.5 77.5H-401V78.5H-192.5V77.5ZM14 77.5H-192.5V78.5H14V77.5ZM14 78.5H25.5V77.5H14V78.5ZM25.5 78.5H212V77.5H25.5V78.5ZM212.121 77.5149L180.121 69.5149L179.879 70.4851L211.879 78.4851L212.121 77.5149ZM180.273 69.5812L157.273 54.5812L156.727 55.4188L179.727 70.4188L180.273 69.5812ZM156.622 54.6725L143.622 69.6725L144.378 70.3275L157.378 55.3275L156.622 54.6725ZM144.417 69.7243L105.417 10.7243L104.583 11.2757L143.583 70.2757L144.417 69.7243ZM104.572 10.7422L69.0716 69.7422L69.9284 70.2578L105.428 11.2578L104.572 10.7422ZM69.5 69.5H41V70.5H69.5V69.5ZM40.8579 69.5206L17.7103 76.3792L17.9944 77.338L41.1421 70.4794L40.8579 69.5206ZM-8.07382 73.4945L17.7785 77.3531L17.9262 76.364L-7.92618 72.5055L-8.07382 73.4945ZM-39.3743 38.3315L-8.3743 73.3315L-7.6257 72.6685L-38.6257 37.6685L-39.3743 38.3315ZM-61.5898 71.2859L-38.5898 38.2859L-39.4102 37.7141L-62.4102 70.7141L-61.5898 71.2859ZM-85.6874 61.9636L-62.1874 71.4636L-61.8126 70.5364L-85.3126 61.0365L-85.6874 61.9636ZM-100.196 73.3968L-85.1958 61.8968L-85.8042 61.1032L-100.804 72.6032L-100.196 73.3968ZM-114.817 61.8864L-100.817 73.3864L-100.183 72.6136L-114.183 61.1137L-114.817 61.8864ZM-146.273 41.4191L-114.773 61.9191L-114.227 61.0809L-145.727 40.5809L-146.273 41.4191ZM-167.602 70.3022L-145.602 41.3022L-146.398 40.6978L-168.398 69.6978L-167.602 70.3022ZM-192.345 78.4753L-167.845 70.4753L-168.155 69.5247L-192.655 77.5247L-192.345 78.4753ZM-235.092 70.4914L-192.592 78.4914L-192.408 77.5086L-234.908 69.5086L-235.092 70.4914ZM-258.273 55.4188L-235.273 70.4188L-234.727 69.5812L-257.727 54.5812L-258.273 55.4188ZM-270.622 70.3275L-257.622 55.3275L-258.378 54.6725L-271.378 69.6725L-270.622 70.3275ZM-310.417 11.2757L-271.417 70.2757L-270.583 69.7243L-309.583 10.7243L-310.417 11.2757ZM-327.322 40.7578L-309.572 11.2578L-310.428 10.7422L-328.178 40.2422L-327.322 40.7578ZM-345.072 70.2578L-327.322 40.7578L-328.178 40.2422L-345.928 69.7422L-345.072 70.2578ZM-374 70.5H-345.5V69.5H-374V70.5Z",fill:"#CFD5DA"})),a.createElement("mask",{id:"mask1_467_73096",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"52",y:"0",width:"1140",height:"80"},a.createElement("rect",{x:"52",width:"1140",height:"80",fill:"#C4C4C4"})),a.createElement("g",{mask:"url(#mask1_467_73096)"},a.createElement("rect",{x:"55.5",y:"-1.5",width:"1140",height:"80",fill:"#CFD5DA",fillOpacity:"0.25",stroke:"#8F9EAA",strokeDasharray:"2 5"}),a.createElement("rect",{x:"55",width:"86",height:"3",fill:"#CFD5DA"}))))},J=new(f())({id:"error-state",use:"error-state-usage",viewBox:"0 0 199 79",content:''}),Q=(L().add(J),J),W=function(){return a.createElement("svg",{viewBox:Q.viewBox,width:"197"},a.createElement("use",{xlinkHref:"#".concat(Q.id)}))},X=(0,K.default)(m.Button).withConfig({displayName:"errorView__RetryButton",componentId:"sc-1n9qb8k-0"})(["white-space:normal !important;align-items:flex-start !important;width:230px !important;font-size:12px !important;font-weight:normal !important;& > *{align-items:start !important;margin:0 !important;padding:0 !important;}"]),ee=function(e){var t=e.onRetry;return a.createElement(m.Flex,{column:!0,alignItems:"center",width:"100%"},a.createElement(W,null),a.createElement(m.TextSmall,{margin:[1,0,0],color:"textDescription"},"Something went wrong."),a.createElement(X,{margin:[2,0,0],padding:[0],onClick:t,icon:"reload",flavour:"borderless",label:"Retry fetching anomalies for the same timeframe",height:"initial",width:"initial"}))},te=["error","loading","hasData","onRetry","totalDimensionsCount"],ne=function(e){var t=e.error,n=e.loading,r=e.hasData;return t?a.createElement(m.TextSmall,null,"No data"===t?"No data for this period. Try highlighting an other area.":t.errorMessage||"Something went wrong"):n?a.createElement(m.TextSmall,null,"Searching for anomalies..."):r?a.createElement(m.TextSmall,{color:"sectionDescription"},"Anomalous metrics in the selected timeframe sorted from most anomalous to least."):a.createElement(m.TextSmall,null,"You haven't highlighted any timeframe yet.")},ae=function(e){var t=e.error,n=e.loading,r=e.hasData,o=e.onRetry,i=e.totalDimensionsCount,l=(0,V.Z)(e,te);return a.createElement(m.Flex,(0,j.Z)({column:!0,gap:2,padding:[4],background:"sideBar"},l),a.createElement(m.Flex,{gap:1,alignItems:"baseline"},a.createElement(m.H4,{color:"sectionTitle"},i?"".concat(i," "):"","Anomalous metrics"),a.createElement(z,null)),a.createElement(ne,{hasData:r,loading:n,error:t}),t?a.createElement(ee,{onRetry:o}):a.createElement(q,{animate:n}))},re=function(e){var t=(0,r.TA)({extraKey:"anomalies"}),n=(0,P.$g)({nodeIds:t,flavour:"anomaly"}),o=n.loaded,i=n.loading,l=n.error,c=n.totalDimensionsCount;return a.createElement(ae,(0,j.Z)({loading:i,error:l,hasData:o,totalDimensionsCount:c},e))};function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function ie(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{}).os,a={},r=function(e,t){var n={},a={},r={};return se.forEach((function(e,n){t[e]={chartId:e,id:"Anomaly advisor",subMenuId:e,priority:-(n+1)}})),e.forEach((function(e,n){t[e]={chartId:e,id:"Anomalous metrics",subMenuId:e,priority:n+1}})),[].concat(se,(0,o.Z)(e)).forEach((function(e){var o=t[e],i="".concat(o.id,"|").concat(o.subMenuId);a[i]||(a[i]=[]),n[o.id]||(n[o.id]=new Set),r[o.id]||(r[o.id]=[]),o.chartId&&(a[i].push(o.chartId),r[o.id].push(o.chartId)),i&&n[o.id].add(i)})),{chartMenus:t,menuGroups:n,subMenus:a,menuGroupChartIds:r}}(e,a),i=r.menuGroups,l=r.subMenus,c=r.menuGroupChartIds,s={},d=Object.keys(i).reduce((function(e,t){var n=c[t],r=(0,o.Z)(i[t]),l=a[n[0]];return e[t]=ie(ie(ie({},l),ce[t]),{},{level:0,id:t,subMenuIds:r,subMenuChartIds:n,link:"".concat((0,B.Z)("menu_".concat(t))),size:24,forceVisibility:!0,arFlavour:"anomaly"}),e}),{}),u=Object.keys(l).reduce((function(e,t){var n=l[t];if(!n.length)return e;var r=a[n[0]],o=d[r.id].id,i=r.chartId.split("::"),c=(0,k.Z)(i,2),s=c[0],u=c[1],m=le[r.chartId];return e[t]=ie(ie(ie({},r),{},{name:u?"".concat(s," > ").concat(u):s},m),{},{level:1,id:t,menuGroupId:o,chartIds:n,link:"".concat((0,B.Z)("menu_".concat(r.id,"_submenu_").concat(r.subMenuId))),size:24,forceVisibility:!0,arFlavour:"anomaly",showAR:!m,weightKey:"score"}),e}),{}),m=Object.keys(i),h=m.reduce((function(e,t){1;var r=d[t];return[].concat((0,o.Z)(e),[r],(0,o.Z)(d[t].subMenuIds.reduce((function(e,r){1;var i=u[r];return[].concat((0,o.Z)(e),[i],(0,o.Z)(u[r].chartIds.map((function(e){var o=a[e];if(o)return 1,s[e]=(0,N.ZP)(ie(ie({},o),{},{id:e,context:e}),{menuId:t,subMenuId:r,sectionInfo:u[r].info},{os:n}),ie(ie({},s[e]),{},{level:2,size:365,menuKey:d[t].id,forceVisibility:!0})}))))}),[])))}),[]);return a=null,{stickyIndexes:[],allCharts:h,menuGroupIds:m,menuGroupById:d,subMenuById:u,menuChartsAttributeById:s}},ue=n(15394),me=n(81961),he=n(22962),fe=n(61152),pe=n(69743),Le=n(56102),ge=n(11835),ve=["id"],Ze=function(e){var t=e.id,n=(0,V.Z)(e,ve);return a.createElement(pe.d,(0,j.Z)({id:t},n),a.createElement(Le.Y,{id:t}),a.createElement(ge.f,{id:t}))},ye=(0,a.memo)(Ze),be=n(71824),Me=n(9058),Ee=n(16978),we=(n(69826),n(31672),n(59461),n(74916),n(4723),n(24298)),xe=n(96415),Ce=n(70873),ke=n(43460),Ae=n(84817),Ie=n(18039),De=function(e,t){return e&&e.getRoot().getChildren().find((function(e){return e.match({id:"anomalies-".concat(t)})}))},Oe=function(e){return function(t){return"overview-page::".concat(e.getAttribute("id"),"::").concat(t)}},Se=["id"],Te=["height"];function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function He(e){for(var t=1;t0;return n&&!c?a.createElement(C,null):a.createElement(Qe,{nodeIds:e})}}}]);