summaryrefslogtreecommitdiffstats
path: root/src/web/gui/v2/3104.dfd9b1f79c9550ab8493.chunk.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/gui/v2/3104.dfd9b1f79c9550ab8493.chunk.js')
-rw-r--r--src/web/gui/v2/3104.dfd9b1f79c9550ab8493.chunk.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/web/gui/v2/3104.dfd9b1f79c9550ab8493.chunk.js b/src/web/gui/v2/3104.dfd9b1f79c9550ab8493.chunk.js
new file mode 100644
index 000000000..3a580a659
--- /dev/null
+++ b/src/web/gui/v2/3104.dfd9b1f79c9550ab8493.chunk.js
@@ -0,0 +1 @@
+!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]="4502ca4c-8646-48c3-a987-7771b9d63a94",e._sentryDebugIdIdentifier="sentry-dbid-4502ca4c-8646-48c3-a987-7771b9d63a94")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"08864407160b3973b9b88c5ae92687282b21e2f4"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[3104],{3104:(e,t,a)=>{a.r(t),a.d(t,{default:()=>Ke});var n=a(96540),o=a(11128),r=(a(14905),a(98992),a(8872),a(62953),a(47762));const l=(e,t)=>t?e[t]:e;var i=a(99739),s=a(67990),d=a(10058),c=a(12897),m=a.n(c),h=a(55042),u=a.n(h),p=new(m())({id:"notCapableNodes",use:"notCapableNodes-usage",viewBox:"0 0 231 230",content:'<symbol xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 231 230" id="notCapableNodes"><path fill="#EDF2F6" d="M115.5 226c61.304 0 111-49.696 111-111S176.804 4 115.5 4 4.5 53.696 4.5 115s49.696 111 111 111" /><path fill="#E2E6EC" d="M212.149 115A96.65 96.65 0 1 1 39.894 54.809l3.303-4.038A96.649 96.649 0 0 1 212.149 115" /><mask id="notCapableNodes_a" width="206" height="194" x="6" y="18" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#E2E6EC" d="M211.798 114.743a96.657 96.657 0 0 1-40.698 78.821 96.659 96.659 0 0 1-87.833 12.432C68.697 200.905 26.108 203.209 15.5 192c-10.608-11.209.28-35.172-4-50-4.281-14.828-6.001-31.361-3-46.5 3.001-15.139-.614-35.927 9-48H40c13.017-14.675 33.037-22.027 52.086-26.708a96.648 96.648 0 0 1 119.712 93.951" /></mask><g mask="url(#notCapableNodes_a)"><g clip-path="url(#notCapableNodes_b)"><path fill="#45535C" d="M217.255 50H19.142a2.641 2.641 0 0 0-2.642 2.642v134.716A2.642 2.642 0 0 0 19.142 190h198.113a2.641 2.641 0 0 0 2.641-2.642V52.642A2.641 2.641 0 0 0 217.255 50" /><path fill="#546C82" d="M19.142 50h198.113a2.644 2.644 0 0 1 2.641 2.642v3.962H16.5v-3.962A2.641 2.641 0 0 1 19.142 50" /><path fill="#0F0" d="M21.123 55.283a1.981 1.981 0 1 0 0-3.962 1.981 1.981 0 0 0 0 3.962" opacity=".5" /><path fill="#FF0" d="M27.726 55.283a1.981 1.981 0 1 0 0-3.962 1.981 1.981 0 0 0 0 3.962" opacity=".5" /><path fill="red" d="M34.33 55.283a1.981 1.981 0 1 0 0-3.962 1.981 1.981 0 0 0 0 3.962" opacity=".5" /><path stroke="#fff" stroke-miterlimit="10" stroke-width="2" d="m34.33 88.962 6.604-6.603-6.604-6.604M44.236 88.302h11.887" /></g><path fill="#7698B0" d="M145.373 81.99a2.327 2.327 0 1 0-4.655 0v19.551a2.328 2.328 0 1 0 4.655 0z" /><path fill="#6D8CA3" d="M145.373 83.386h7.821a2.421 2.421 0 0 1 2.421 2.42v11.918a2.42 2.42 0 0 1-2.421 2.421h-7.821z" /><path fill="#658196" d="M155.615 88.972h2.979a2.608 2.608 0 0 1 2.607 2.607v.373a2.607 2.607 0 0 1-2.607 2.607h-2.979z" /><path fill="#7698B0" d="M219.897 143.904v1.862h-36.35a9.31 9.31 0 0 1-9.311-9.31v-36.311c0-4.097-2.7-7.449-6.052-7.449h-6.982v-1.862h6.982c4.376 0 7.914 4.19 7.914 9.311v36.311a7.446 7.446 0 0 0 7.449 7.448z" /><path fill="#80A4BF" d="M124.89 85.248h-9.31a1.862 1.862 0 1 0 0 3.724h9.31a1.862 1.862 0 1 0 0-3.724M124.89 94.558h-9.31a1.862 1.862 0 1 0 0 3.725h9.31a1.862 1.862 0 1 0 0-3.725" /><path fill="#6D8CA3" d="M127.777 81.524h12.941v20.483h-12.941a3.818 3.818 0 0 1-3.818-3.818V85.342a3.814 3.814 0 0 1 2.357-3.527c.463-.192.959-.29 1.461-.29" /><path fill="#19B357" d="M106.269 107.127a2.327 2.327 0 0 0-4.655 0v19.553a2.327 2.327 0 0 0 4.655 0z" /><path fill="#00AB44" d="M106.269 108.524h7.821a2.421 2.421 0 0 1 2.421 2.421v11.917a2.421 2.421 0 0 1-2.421 2.421h-7.821z" /><path fill="#00993D" d="M116.511 114.11h2.979a2.607 2.607 0 0 1 2.607 2.607v.373a2.607 2.607 0 0 1-2.607 2.607h-2.979z" /><path fill="#00AB44" d="M219.896 132.732c-.016.624 0 1.136 0 1.862h-75.454a9.312 9.312 0 0 1-9.311-9.311c0-4.097-2.7-7.448-6.051-7.448h-6.983v-1.862h6.983c4.376 0 7.914 4.189 7.914 9.31a7.447 7.447 0 0 0 7.448 7.449z" /><path fill="#00CB51" d="M85.786 110.386h-9.31a1.862 1.862 0 0 0 0 3.724h9.31a1.862 1.862 0 1 0 0-3.724M85.786 119.697h-9.31a1.862 1.862 0 1 0 0 3.724h9.31a1.862 1.862 0 0 0 0-3.724" /><path fill="#00AB44" d="M88.672 106.662h12.942v20.483H88.672a3.817 3.817 0 0 1-3.817-3.817v-12.849a3.818 3.818 0 0 1 3.817-3.817" /><path fill="#7698B0" d="M124.89 149.025a2.327 2.327 0 1 0-4.655 0v19.552a2.328 2.328 0 0 0 4.655 0z" /><path fill="#6D8CA3" d="M124.89 150.421h7.821a2.421 2.421 0 0 1 2.421 2.421v11.824a2.421 2.421 0 0 1-2.421 2.421h-7.821z" /><path fill="#658196" d="M135.131 156.008h2.98a2.606 2.606 0 0 1 2.607 2.607v.372a2.608 2.608 0 0 1-2.607 2.607h-2.98z" /><path fill="#7698B0" d="M219.896 122.49h-56.833a7.446 7.446 0 0 0-7.448 7.448v20.483c0 5.121-3.538 9.311-7.914 9.311h-6.983v-1.862h6.983c3.352 0 6.052-3.352 6.052-7.449v-20.483a9.31 9.31 0 0 1 9.31-9.31h56.833z" /><path fill="#80A4BF" d="M104.407 152.284h-9.31a1.862 1.862 0 1 0 0 3.724h9.31a1.862 1.862 0 0 0 0-3.724M104.407 161.594h-9.31a1.862 1.862 0 0 0 0 3.724h9.31a1.862 1.862 0 1 0 0-3.724" /><path fill="#6D8CA3" d="M107.293 148.559h12.942v20.484h-12.942a3.818 3.818 0 0 1-3.817-3.818v-12.848a3.818 3.818 0 0 1 3.817-3.818" /></g><defs><clipPath id="notCapableNodes_b"><path fill="#fff" d="M16.5 50h203.396v140H16.5z" /></clipPath></defs></symbol>'});u().add(p);const L=p,f=()=>n.createElement(d.Flex,{width:"100%",justifyContent:"center",alignItems:"center",gap:3},n.createElement("svg",{viewBox:L.viewBox,height:"222px"},n.createElement("use",{xlinkHref:"#".concat(L.id)})),n.createElement(d.TextBig,{strong:!0},"Your nodes are either offline or not configured for ML"));var g=a(4659);const y=()=>n.createElement(d.Flex,{height:10.5,width:{min:10.5},background:"warningText",justifyContent:"center",alignItems:"center",round:"50%",sx:{borderRadius:"50%"}},n.createElement(d.Icon,{color:"warningBackground",name:"informationPress"})),v=e=>{let{to:t,children:a}=e;return n.createElement(g.A,{Component:d.Text,href:t,target:"_blank",rel:"noopener noreferrer"},a)},E=()=>n.createElement(d.Flex,{column:!0,gap:1},n.createElement(d.Text,{strong:!0,color:"textDescription"},"Not Configured Nodes"),n.createElement(d.Text,{color:"textDescription"},"Learn how to configure your nodes"," ",n.createElement(v,{to:"https://learn.netdata.cloud/docs/cloud/insights/anomaly-advisor#enable-ml-on-netdata-agent"},"to support anomaly advisor"),".")),M=()=>n.createElement(d.Flex,{column:!0,gap:1},n.createElement(d.Text,{strong:!0,color:"textDescription"},"Not Capable Nodes"),n.createElement(d.Text,{color:"textDescription"},"All nodes need to be updated to a version higher than"," ",n.createElement(d.Text,{strong:!0,color:"textDescription"},"1.32"),". Learn how to"," ",n.createElement(v,{to:"https://learn.netdata.cloud/docs/agent/packaging/installer/update"},"update to the latest Netdata version"),".")),b=()=>n.createElement(d.Box,{round:!0,background:"elementBackground",padding:[4]},n.createElement(d.Flex,{gap:4,alignItems:"start"},n.createElement(y,null),n.createElement(d.Flex,{gap:4,column:!0},n.createElement(E,null),n.createElement(M,null)))),A=()=>n.createElement(d.Flex,{column:!0,width:"100%",height:"100%",justifyContent:"start",padding:[8,4]},n.createElement(d.Flex,{column:!0,gap:8},n.createElement(f,null),n.createElement(b,null)));var w=a(58168),x=a(3705),C=a(83084),k=a(69765),I=a(23931),Z=a(3914),D=a(16579),_=a(81416),H=a(27467),T=a(99292),z=a(79304),B=(a(9920),a(41393),a(3949),a(81454),a(25509),a(65223),a(60321),a(41927),a(11632),a(64377),a(66771),a(12516),a(68931),a(52514),a(35694),a(52774),a(49536),a(21926),a(94483),a(16215),a(45387)),N=a(61427),S=a(21290),F=a(93658);const V=e=>Math.floor(e/1e3),R=()=>{const[e,t]=(0,_.yD)(),{localeTimeString:a}=(0,S.$j)(),[o,r,l]=(0,n.useMemo)((()=>{const n=V(e),o=V(t);return[(0,F.getDateDiff)(n,o),a(e,{secs:!0}),a(t,{secs:!0})]}),[e,t]);return e&&t?n.createElement(d.Flex,{gap:1,alignItems:"baseline"},n.createElement(d.TextMicro,{strong:!0,color:"textLite"},n.createElement(d.TextSmall,{strong:!0,color:"textLite"},r," \u2192 ",l," \u2022")," ","Duration: ",o)):null};var G=a(8711);const O=(0,G.keyframes)(["from{transform:translate(412px,0);}"]),U=G.default.g.withConfig({displayName:"skeleton__Animated",componentId:"sc-gwkfye-0"})(["animation:",";"],(e=>{let{animate:t}=e;return t?(0,G.css)([""," 1s linear infinite"],O):""})),j=e=>{let{animate:t=!1}=e;return n.createElement("svg",{width:"1140",height:"80",viewBox:"0 0 1140 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("mask",{id:"mask0_467_73096",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"1140",height:"80"},n.createElement("rect",{width:"1140",height:"80",fill:"#C4C4C4"})),n.createElement("g",{mask:"url(#mask0_467_73096)"},n.createElement(U,{animate:t},n.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"}),n.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"})),n.createElement("mask",{id:"mask1_467_73096",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"52",y:"0",width:"1140",height:"80"},n.createElement("rect",{x:"52",width:"1140",height:"80",fill:"#C4C4C4"})),n.createElement("g",{mask:"url(#mask1_467_73096)"},n.createElement("rect",{x:"55.5",y:"-1.5",width:"1140",height:"80",fill:"#CFD5DA",fillOpacity:"0.25",stroke:"#8F9EAA",strokeDasharray:"2 5"}),n.createElement("rect",{x:"55",width:"86",height:"3",fill:"#CFD5DA"}))))};a(9391);var K=new(m())({id:"error-state",use:"error-state-usage",viewBox:"0 0 199 79",content:'<symbol xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 199 79" id="error-state"><path fill="#8F9EAA" fill-rule="evenodd" d="m91.008 47.745 2.142 1.506.575-.819-2.437-1.713-.288.409-.298-.401L51.319 76.01 25.983 77.76H0v1h26.017l.017-.002 25.5-1.76.147-.01.117-.087zm7.017 4.932 4.875 3.427.575-.818-4.875-3.427zm9.75 6.854 4.875 3.427.575-.818-4.875-3.427zm9.75 6.854 4.875 3.426.575-.818-4.875-3.427zm25.62.71-.199-.061-.182.098-3.25 1.742.472.882 3.067-1.645 2.679.812.29-.957zm8.336 3.57 2.874.871 2.874.871.29-.957-2.874-.871-2.874-.871zm-21.245 4.318 3.25-1.742-.472-.882-2.979 1.597-2.185-1.536-.575.818 2.437 1.713.253.178zm32.742-.834 2.877.872.043.013.044.005 2.667.31.115-.993-2.622-.305-2.834-.859zm10.964 1.82 5.334.619.115-.993-5.333-.62zm10.667 1.239 5.333.619.116-.993-5.334-.62zm10.667 1.239 2.666.31.116-.994-2.667-.31z" clip-rule="evenodd" /><mask id="error-state_a" width="93" height="79" x="53" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#C4C4C4" d="M53 0h93v79H53z" /></mask><g fill="#CFD5DA" mask="url(#error-state_a)"><path fill-opacity=".25" stroke="#8F9EAA" stroke-dasharray="2 5" d="M56.5-1.5h85v82h-85z" /><path d="M56 0h86v3H56z" /></g></symbol>'});u().add(K);const Y=K;var P=a(50876),q=a(63314);const J=()=>n.createElement("svg",{viewBox:Y.viewBox,width:"197"},n.createElement("use",{xlinkHref:"#".concat(Y.id)})),W=(0,G.default)(d.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;}"]),X=e=>{let{onRetry:t}=e;const{sendLog:a,isReady:o}=(0,P.A)(),r=(0,n.useCallback)((()=>{a({feature:"AnomalyAdvisor",description:"Retry"}).finally((()=>{"function"==typeof t&&t()}))}),[o]);return n.createElement(q.DL,{feature:"AnomalyAdvisor"},n.createElement(d.Flex,{column:!0,alignItems:"center",width:"100%"},n.createElement(J,null),n.createElement(d.TextSmall,{margin:[1,0,0],color:"textDescription"},"Something went wrong."),n.createElement(W,{margin:[2,0,0],padding:[0],onClick:r,icon:"reload",flavour:"borderless",label:"Retry fetching anomalies for the same timeframe",height:"initial",width:"initial"})))},$=e=>{let{error:t,loading:a,hasData:o}=e;return t?n.createElement(d.TextSmall,null,"No data"===t?"No data for this period. Try highlighting an other area.":t.errorMessage||"Something went wrong"):a?n.createElement(d.TextSmall,null,"Searching for anomalies..."):o?n.createElement(d.TextSmall,{color:"textDescription"},"Anomalous metrics in the selected timeframe sorted from most anomalous to least."):n.createElement(d.TextSmall,null,"You haven't highlighted any timeframe yet.")},Q=(0,n.forwardRef)(((e,t)=>{let{error:a,loading:o,hasData:r,onRetry:l,totalDimensionsCount:i,...s}=e;return n.createElement(d.Flex,(0,w.A)({ref:t,column:!0,gap:2,padding:[4],background:"sideBar"},s),n.createElement(d.Flex,{gap:1,alignItems:"baseline"},n.createElement(d.H4,null,i?"".concat(i," "):"","Anomalous metrics"),n.createElement(R,null)),n.createElement($,{hasData:r,loading:o,error:a}),a?n.createElement(X,{onRetry:l}):n.createElement(j,{animate:o}))})),ee=(0,n.forwardRef)(((e,t)=>{const a=(0,o.w7)({extraKey:"anomalies"}),{loaded:r,loading:l,error:i,totalDimensionsCount:s}=(0,N.G9)({nodeIds:a,flavour:"anomaly"}),{sendLog:d,isReady:c}=(0,P.A)(),m=(0,n.useRef)();return(0,n.useEffect)((()=>{null!==m&&void 0!==m&&m.current||!c||!r||(d({feature:"AnomalyAdvisor",...!i&&r?{isSuccess:!0}:{},...i?{isFailue:!0}:{},...r?{totalDimensionsCount:s}:{}}),m.current=!0)}),[l,r,i,d,c]),n.createElement(Q,(0,w.A)({ref:t,loading:l,error:i,hasData:r,totalDimensionsCount:s},e))})),te={"anomaly_detection.anomaly_rate":{name:"Anomaly Rate",info:"This is the percentage of metrics that are anomalous."},"anomaly_detection.dimensions":{name:"Count of Anomalous Metrics",info:"Variance in the amount of anomalous metrics over time could indicate unexpected behavior that merits investigation."},"anomaly_detection.detector_events":{name:"Anomaly Events Detected ",info:"An anomaly event is a period of time when a node has persistently elevated anomaly rates across all metrics. This may indicate unexpected behavior that merits investigation."}},ae={"Anomaly advisor":{showAR:!1,name:"Anomaly advisor",info:n.createElement(d.Flex,{column:!0,gap:2},n.createElement(d.TextSmall,{color:"sectionDescription"},"Machine Learning powered automated anomaly detection running at the edge."),n.createElement(d.TextSmall,{color:"sectionDescription"},"Use this page as a starting point to explore potential anomalies. Learn more on"," ",n.createElement(g.A,{Component:d.TextSmall,href:"https://learn.netdata.cloud/docs/cloud/insights/anomaly-advisor",target:"_blank",rel:"noopener noreferrer"},"how to")," ","use Anomaly Advisor."),n.createElement(d.Flex,{gap:1,alignItems:"center"},n.createElement(d.Icon,{name:"highlightArea",color:"sectionDescription",size:"small"}),n.createElement(d.TextSmall,{color:"sectionDescription"},"Highlight a time-frame of interest to explore potential anomalies.")))},"Anomalous metrics":{info:n.createElement(ee,null)}},ne=Object.keys(te),oe=function(e,t){let{os:a,extraKey:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o={};const{menuGroups:r,subMenus:l,menuGroupChartIds:i}=((e,t)=>{const a={},n={},o={};return ne.forEach(((e,a)=>{t[e]={chartId:e,id:"Anomaly advisor",subMenuId:e,priority:-(a+1)}})),e.forEach(((e,a)=>{t[e]={chartId:e,id:"Anomalous metrics",subMenuId:e,priority:a+1}})),[...ne,...e].forEach((e=>{const r=t[e],l="".concat(r.id,"|").concat(r.subMenuId);n[l]||(n[l]=[]),a[r.id]||(a[r.id]=new Set),o[r.id]||(o[r.id]=[]),r.chartId&&(n[l].push(r.chartId),o[r.id].push(r.chartId)),l&&a[r.id].add(l)})),{chartMenus:t,menuGroups:a,subMenus:n,menuGroupChartIds:o}})(e,o),s={},d=Object.keys(r).reduce(((e,t)=>{const a=i[t],l=[...r[t]],s=o[a[0]];return e[t]={...s,...ae[t],level:0,id:t,subMenuIds:l,subMenuChartIds:a,link:"".concat((0,z.A)("menu_".concat(t))),size:24,forceVisibility:!0,arFlavour:"anomaly",extraKey:n},e}),{}),c=Object.keys(l).reduce(((e,t)=>{const a=l[t];if(!a.length)return e;const r=o[a[0]],{id:i}=d[r.id],[s,c]=r.chartId.split("::"),m=te[r.chartId];return e[t]={...r,name:c?"".concat(s," > ").concat(c):s,...m,level:1,id:t,menuGroupId:i,chartIds:a,link:"".concat((0,z.A)("menu_".concat(r.id,"_submenu_").concat(r.subMenuId))),size:24,forceVisibility:!0,arFlavour:"anomaly",showAR:!m,extraKey:n},e}),{}),m=Object.keys(r),h={},u=m.reduce(((e,t)=>{const n=d[t];return h[n.id]=!0,[...e,{...n,sticky:!0},...d[t].subMenuIds.reduce(((e,n)=>[...e,{...c[n],sticky:!0},...c[n].chartIds.map((e=>{const r=o[e];if(r)return s[e]=(0,B.Ay)({...r,id:e,context:e},{menuId:t,subMenuId:n,sectionInfo:c[n].info},{os:a}),{...s[e],level:2,size:365,menuKey:d[t].id,forceVisibility:!0}}))]),[])]}),[]);return o=null,{stickyIds:h,allElements:u,menuGroupIds:m,menuGroupById:d,subMenuById:c,menuItemAttributesById:s}};var re=a(79566),le=a(72253),ie=a(56489),se=a(67602),de=a(44741),ce=a(10952),me=a(12412);const he=e=>{let{id:t,...a}=e;return n.createElement(de.k,(0,w.A)({id:t},a),n.createElement(ce._,{id:t}),n.createElement(me.G,{id:t}))},ue=(0,n.memo)(he);var pe=a(31438),Le=a(80925),fe=a(36196),ge=(a(3064),a(72577),a(28973)),ye=a(13752),ve=a(92815),Ee=a(72582),Me=a(540),be=new(m())({id:"dashboard_add_chart",use:"dashboard_add_chart-usage",viewBox:"0 0 24 24",content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="dashboard_add_chart"><path d="M20.333 14.844V7.978l-3.889-3.89-6.666 6.667-2.223-2.222-3.888 3.89v3.4a4.514 4.514 0 0 0 4.51 4.51H13.4a5.066 5.066 0 0 1-.722-1.666h-4.5a2.85 2.85 0 0 1-2.845-2.845v-2.71l2.222-2.223 2.223 2.222 6.666-6.667 2.223 2.223v5.177a3.692 3.692 0 0 0-1.112-.177 3.893 3.893 0 0 0-3.889 3.888 3.893 3.893 0 0 0 3.89 3.89 3.893 3.893 0 0 0 3.888-3.89 3.85 3.85 0 0 0-1.11-2.71m-.555 3.545h-1.39v1.389h-1.666v-1.39h-1.389v-1.666h1.39v-1.389h1.666v1.39h1.389z" /></symbol>'});u().add(be);const Ae=be;var we=a(6504),xe=a(22332),Ce=a(46741);const ke=e=>{const{handleOpenModal:t}=(0,Me.A)("addToDashboardModal"),a=(0,xe.useChart)(),o=()=>{const e=a.getAttribute("id");t("",{chartId:e})},r=(0,Ce.JT)("dashboard:Update");return(0,n.useLayoutEffect)((()=>a.onKeyChange(["Alt","Shift","KeyD"],r?o:()=>{})),[r]),n.createElement(we.Button,(0,w.A)({icon:n.createElement(we.default,{svg:Ae,size:"16px"}),onClick:r?o:()=>{},title:r?"Add to dashboard":"You need to be logged in to create your custom dashboards and use this chart in them","data-testid":"chartHeaderToolbox-addDashboard",disabled:!r},e))},Ie=(0,n.memo)(ke);var Ze=a(83465);const De=(e,t)=>e&&e.getRoot().getChildren().find((e=>e.match({id:"anomalies-".concat(t)}))),_e=e=>t=>"overview-page::".concat(e.getAttribute("id"),"::").concat(t),He=e=>{let{id:t,...a}=e;const o=(0,k.ID)(),{height:r=0,...l}=(0,pe.aA)(t),i=(0,Le.e)(),{sendLog:s,isReady:d}=(0,P.A)(),c=(0,n.useMemo)((()=>{const e=De(i,o),a=Object.keys(te);let n=e.getNode({id:t});if(n)return n;const[s,d]=t.split("::");return n=i.makeChart({attributes:{contextScope:[s],height:(0,Ze.Oq)(e,t,r+260),id:t,roomId:o,selectedDimensions:d?[d]:[],groupBy:a.includes(t)?["node"]:["dimension"],...l},makeTrack:_e}),e.appendChild(n),n}),[i,o,t]);return(0,n.useEffect)((()=>{c&&d&&"function"===typeof s&&c.updateAttribute("logOptions",{sendLog:s,payload:{feature:"AnomalyAdvisor"}})}),[c,s,d]),n.createElement(fe.A,(0,w.A)({margin:[0,0,2],chart:c,"data-chartid":t,"data-track":c.track("container"),height:"300px",width:"100%"},a))},Te=n.memo(He,((e,t)=>e.id===t.id)),ze=e=>{let{id:t,subMenuId:a,...o}=e;return n.createElement(Te,(0,w.A)({id:t,role:"graphics-object","aria-roledescription":"chart","data-submenuid":a},o))},Be=(0,n.memo)(ze);var Ne=a(74258),Se=a(37031),Fe=a(6551);const Ve=e=>{let{id:t}=e;return n.createElement(Ne.t,{gap:0,id:t},n.createElement(Se.t,{id:t,margin:[1,0,0]}),n.createElement(Fe.X,{id:t}))},Re=(0,n.memo)(Ve),Ge=e=>{switch(e.level){case 0:return ue;case 1:return Re;case 2:return Be;default:return null}},Oe=e=>{let{onChartNameChange:t,initialChartName:a,dashboardOptions:o,linkToGo:r,contextToGo:l,...i}=e;const[s,,,d]=(0,se.A)("addToDashboardModal"),{setActiveMenuGroupId:c,setActiveSubMenuId:m}=(0,re.A)({onChartNameChange:t,initialChartName:a,linkToGo:r,contextToGo:l});return n.createElement(D.H,i,n.createElement(le.A,{onActiveMenuGroupId:c,onActiveSubMenuId:m,getComponent:Ge,dashboardOptions:o,initialChartName:a,checkVisibility:()=>!0}),s&&n.createElement(ie.A,{onClose:d}))},Ue=["alerts","info","config"],je=e=>{let{nodeIds:t}=e;const a=(0,Z.vt)(),o=(0,k.ID)(),[r,l,i,,s,d]=(0,_.Ay)(a,o,t),c=!l.length||!!s,m=(0,I.yO)(o,i),[h,{width:u}]=(0,x.A)(),[p,{height:L}]=(0,x.A)(),f=(0,n.useMemo)((()=>Math.ceil((L+32)/4)),[L]);((e,t,a)=>{let{width:o,host:r}=a;if(!r)throw"No host provided";const l=(0,Le.e)();(0,n.useMemo)((()=>{if(!l||!e)return;let a=De(l,e);return a?void 0:(a=l.makeContainer({attributes:{id:"anomalies-".concat(e),roomId:e,host:r,overlays:{proceeded:{type:"proceeded"}},nodesScope:t,containerWidth:o,toolboxElements:[Ee.default,ye.default,ve.default,Ie]}}),l.appendChild(a),(0,ge.unregister)((0,Ze.ml)(l,a)))}),[l,r,e,t]),(0,n.useEffect)((()=>{if(!l||!e)return;let a=De(l,e);a&&a.getNodes().forEach((e=>{e.updateAttribute("nodesScope",t),e.getAttribute("active")&&"chart"===e.type&&e.trigger("fetch")}))}),[l,e,t]),(0,n.useEffect)((()=>()=>{if(!l||!e)return;let t=De(l,e);t&&t.destroy()}),[e])})(o,t,{host:(0,Z.dg)()?"".concat(window.envSettings.agentApiUrl,"/api/v2"):"".concat(window.envSettings.apiUrl,"/api/v3/spaces/").concat(a,"/rooms/").concat(o),width:u});const[g,y]=(0,H.N9)("chartName",{key:o,extraKey:"anomalies",flavour:"val"}),[v,E]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{E(!!l.length)}),[l.length]),n.createElement(D.A,{getObject:m,ids:r,getMenu:oe,extraKey:"anomalies"},n.createElement(C.A,{ref:h,position:"relative",sidebar:n.createElement(T.Ay,{nodeIds:t,title:"Anomalies",initialChartName:g,hiddenTabs:Ue,flavour:"anomalies",loaded:!0,hasSearch:!1})},n.createElement(Oe,(0,w.A)({initialChartName:g,onChartNameChange:y,linkToGo:v&&(0,z.A)("menu_Anomalous metrics")},c&&{padding:[0,0,f,4]})),c&&n.createElement(ee,{ref:p,position:"absolute",bottom:0,right:0,left:0,zIndex:35,onRetry:d})))},Ke=()=>{const e=(0,o.w7)({extraKey:"anomalies",merge:!1,scoped:!0}),t=(0,s.CK)(),a=(0,s.nj)(),{predicting:d}=(e=>{const t=(0,r.BU)(),a=(0,r.Gt)(t);return(0,n.useMemo)((()=>a.reduce(((t,a)=>{const{capabilities:{ml:n}}=a;return null!==n&&void 0!==n&&n.enabled?t.predicting=[...t.predicting,l(a,e)]:t.incapable=[...t.incapable,l(a,e)],t}),{predicting:[],incapable:[]})),[t.length,e])})("id");if(a&&!t.length)return n.createElement(q.Ay,{feature:"Anomalies",mode:"NoNodesView"},n.createElement(i.A,null));const c=d.length>0;return a&&!c?n.createElement(q.Ay,{feature:"Anomalies",mode:"NoConfiguredNodesView"},n.createElement(A,null)):n.createElement(q.Ay,{feature:"Anomalies"},n.createElement(je,{nodeIds:e}))}}}]); \ No newline at end of file