From c21c3b0befeb46a51b6bf3758ffa30813bea0ff0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 9 Mar 2024 14:19:22 +0100 Subject: Adding upstream version 1.44.3. Signed-off-by: Daniel Baumann --- web/gui/v2/2376.9257ccae3f66af1cac88.chunk.js | 1 - 1 file changed, 1 deletion(-) delete mode 100644 web/gui/v2/2376.9257ccae3f66af1cac88.chunk.js (limited to 'web/gui/v2/2376.9257ccae3f66af1cac88.chunk.js') diff --git a/web/gui/v2/2376.9257ccae3f66af1cac88.chunk.js b/web/gui/v2/2376.9257ccae3f66af1cac88.chunk.js deleted file mode 100644 index d808aedb1..000000000 --- a/web/gui/v2/2376.9257ccae3f66af1cac88.chunk.js +++ /dev/null @@ -1 +0,0 @@ -!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]="a60e8cd0-020a-4d19-b225-711746c757f0",e._sentryDebugIdIdentifier="sentry-dbid-a60e8cd0-020a-4d19-b225-711746c757f0")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"0c0a7a41a0e7ecb4870dbce38dbd7d5e0913bb7f"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[2376],{52629:function(e,t,n){n.d(t,{Z:function(){return At}});var r=n(67294),o=n(37518),a=n(96929),i=n(36560),c=n(63346),l=n(29439),u=(n(92222),n(88553)),s=n(91268),d=n(97945),m=n(74059),f=n(74662),p=n(4822),g=n(71181),h=n(59978),v=n(20046),b=n(4942),y=n(87462),E=(n(69826),n(41539),n(47941),n(82526),n(57327),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(92432)),w=n(46667),x=n(53030),O=n(89149),k=n(15861),C=n(64687),I=n.n(C),Z=n(4480),j=n(83338),S=n(8018);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=t.key,r=t.shouldPersist,o=void 0===r||r,a=(0,Z.Zl)(T({id:e,key:n})),i=(0,S.O9)(e);return(0,Z._8)((function(t){var r=t.snapshot;return function(){var t=(0,k.Z)(I().mark((function t(c){var l;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a(c),o){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,r.getPromise(T({id:e}));case 5:return l=t.sent,t.prev=6,t.next=9,i({settings:N(N({},l),n?(0,b.Z)({},n,c):c)});case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(6),a(n?l[n]:l);case 14:case"end":return t.stop()}}),t,null,[[6,11]])})));return function(e){return t.apply(this,arguments)}}()}),[e,n,i])}(e,{key:t});return[n,r]},B=n(45987),F=(n(21249),n(57640),n(9924),n(16645)),A=n(7693),_=n(92903),L=n(5429),R=n(29495),V=n(40970),z=n(89479),K=function(){},G=function(e){var t=e.roomId,n=e.id,a=e.onRemove,i=void 0===a?K:a,c=(0,o.tE)(t,"name"),u=(0,R.xQ)(t,n,"title"),s=(0,R.c0)(t),d=(0,w.Z)(),m=(0,l.Z)(d,4),f=m[0],p=m[2],g=m[3],v=function(){var e=(0,k.Z)(I().mark((function e(){return I().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s(n);case 2:i();case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return r.createElement(r.Fragment,null,r.createElement(h.Button,{danger:!0,flavour:"hollow",onClick:p,label:"Delete metric","data-testid":"remove-metric"}),f&&r.createElement(h.ConfirmationDialog,{"data-ga":"remove-metric-dialog","data-testid":"removeMetricDialog",handleConfirm:v,handleDecline:g,message:r.createElement(r.Fragment,null,"You are about to remove ",r.createElement("strong",null,u)," metric.",r.createElement("br",null),"Are you sure you want to continue?"),title:"Remove metric from ".concat(c)}))},H=["title","help","link","disclaimer","children"],U=function(e){var t=e.link,n=e.children;return r.createElement(h.Flex,{as:"a",target:"_blank",href:t,gap:1,alignItems:"end"},r.createElement(h.TextNano,{textDecoration:"undeline"},n),r.createElement(h.Icon,{color:"text",name:"question",width:"16px",height:"16px"}))},W=function(e){var t=e.title,n=e.help,o=e.link,a=e.disclaimer,i=e.children,c=(0,B.Z)(e,H);return r.createElement(h.Flex,(0,y.Z)({gap:1,column:!0},c),r.createElement(h.Flex,{justifyContent:"between",alignItems:"baseline"},r.createElement(h.Text,{as:"label",margin:[0]},t),n&&r.createElement(U,{link:o},n)),i,a&&r.createElement(h.TextSmall,null,a))},q=n(93433),Q=n(26398),J=n(62200),X={value:"all",label:"All"},Y=function(e){var t=e.dimensions,n=e.units;return{dimensions:t?[X].concat((0,q.Z)(t.map((function(e){return{value:e.id,label:e.name}})))):[X],units:n}},$=["spaceId","roomId","id","onClose"];function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e){for(var t=1;t span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:",";}"],(0,h.getColor)("text"),(0,h.getSizeBy)(0),(0,h.getSizeBy)(25)),ie=(0,oe.default)(h.Flex).attrs({height:"1px",margin:[4,0]}).withConfig({displayName:"styled__Divider",componentId:"sc-1czrg41-1"})(["background-color:rgba(0,0,0,0.12);"]),ce=(0,oe.default)(h.ListItem).withConfig({displayName:"styled__ListItem",componentId:"sc-1czrg41-2"})(["align-items:center;display:flex;flex-direction:row;font-size:",";justify-content:space-between;padding-left:",";"],(0,h.getSizeBy)(3),(0,h.getSizeBy)(0)),le=(0,oe.default)(h.Drop).attrs({align:{top:"bottom",right:"right"},animation:!0,background:"dropdown",column:!0,margin:[.5,0,0],overflow:{vertical:"auto"},padding:[4],round:1,width:70}).withConfig({displayName:"styled__MetricsDropdown",componentId:"sc-1czrg41-3"})(["box-sizing:content-box;"]),ue=(0,oe.default)(h.Button).attrs({neutral:!0,flavour:"borderless",small:!0}).withConfig({displayName:"styled__OptionButton",componentId:"sc-1czrg41-4"})(["&&&{font-size:14px;font-weight:normal;justify-content:flex-start;padding-left:",";}"],(0,h.getSizeBy)(2)),se=(0,oe.default)(h.Button).withConfig({displayName:"styled__PencilButton",componentId:"sc-1czrg41-5"})(["> svg.button-icon{width:",";height:",";opacity:0;}"],(0,h.getSizeBy)(4),(0,h.getSizeBy)(4)),de=(0,oe.default)(h.Button).withConfig({displayName:"styled__MetricsButton",componentId:"sc-1czrg41-6"})(["&&&{width:100%;}"]),me=function(e){var t=e.isOpen,n=e.onClose,o=e.onEdit,a=e.roomId,i=e.targetRef,c=(0,R.dh)(a),u=(0,l.Z)(c,2),s=u[0],d=u[1];if(!i.current||!t)return null;var m=function(e){o(e),n()};return r.createElement(le,{close:n,"data-testid":"metricsMenu",onClickOutside:n,onEsc:n,target:i.current},s.map((function(e){return r.createElement(ce,{"data-testid":"metricsMenu-metric-".concat(e.title),key:e.id},r.createElement(ae,{checked:!e.hidden,"data-testid":"metricsMenu-metricCheckbox",label:e.title,onChange:function(){return d(e.id,"hidden",!e.hidden)}}),r.createElement(se,{"data-testid":"metricsMenu-editMetric",flavour:"borderless",icon:"pencilSolid",neutral:!0,onClick:function(){return m(e.id)}}))})),s.length>0&&r.createElement(ie,{"data-testid":"metricsMenu-divider"}),r.createElement(ce,{"data-testid":"metricsMenu-addMetricItem"},r.createElement(de,{"data-testid":"metricsMenu-addMetricButton",label:"Add new metric",icon:"plus",onClick:function(){return m("new")},small:!0})))},fe=function(e){var t=e.spaceId,n=e.roomId,o=(0,w.Z)(),a=(0,l.Z)(o,4),i=a[0],c=a[2],u=a[3],s=(0,r.useState)(null),d=(0,l.Z)(s,2),m=d[0],f=d[1],p=(0,r.useRef)();return r.createElement(r.Fragment,null,r.createElement(h.Button,{"data-ga":"metric-setting::click-metric-setting::hm-nodes","data-testid":"metricSettings-button",flavour:"hollow",icon:"gear",neutral:!0,onClick:c,ref:p,label:"Metrics",small:!0}),r.createElement(me,{isOpen:i,onClose:u,onEdit:f,roomId:n,targetRef:p}),m&&r.createElement(re,{"data-testid":"metricsManagement",spaceId:t,roomId:n,id:m,onClose:function(){return f(null)}}))},pe=n(38671),ge=n(39979);function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{},r=n.getGrouping,o=n.extraKey,a={},i=function(e,t){var n=t.getNode,r=t.getGrouping,o=t.nodeMenus,a={};return e.forEach((function(e){var t=n(e);if(t){var a=r(t),i=a.name,c=a.priority,l=a.icon;o[e]=je(je({},t),{},{groupId:i,subMenuId:e,priority:c,groupIcon:l})}})),(0,q.Z)(e).sort((function(e,t){var n,r,a,i;return(null===(n=o[e])||void 0===n?void 0:n.priority)-(null===(r=o[t])||void 0===r?void 0:r.priority)||((null===(a=o[e])||void 0===a?void 0:a.name)||"").localeCompare((null===(i=o[t])||void 0===i?void 0:i.name)||"",void 0,{sensitivity:"accent"})})).forEach((function(e){var t=o[e];if(t){var n="".concat(t.groupId,"|").concat(t.subMenuId);a[t.groupId]||(a[t.groupId]=new Set),n&&a[t.groupId].add(t.id)}})),{menuGroups:a}}(e,{getNode:t,getGrouping:r,nodeMenus:a}),c=i.menuGroups,l={},u=Object.keys(c).reduce((function(e,t){var n=(0,q.Z)(c[t]),r=a[n[0]];return e[t]={level:0,name:r.groupId,id:t,subMenuIds:n,link:"".concat((0,Ce.Z)("menu_".concat(t))),size:24,forceVisibility:!0,icon:r.groupIcon,extraKey:o},n.forEach((function(e){var n,r,i,c,u=a[e];l[e]=je(je({},u),{},{level:1,id:e,menuGroupId:t,link:"".concat((0,Ce.Z)("menu_".concat(t,"_submenu_").concat(e))),size:24,forceVisibility:!0,icon:(null===(n=Ie._[null===(r=u.os)||void 0===r?void 0:r.nm])||void 0===n?void 0:n.iconName)||(null===(i=Ie.V[null===(c=u.os)||void 0===c?void 0:c.id])||void 0===i?void 0:i.iconName)||"os",extraKey:o})})),e}),{}),s=Object.keys(c),d=s.reduce((function(e,t){1;var n=je(je({},u[t]),{},{sticky:!0});return[].concat((0,q.Z)(e),[n],(0,q.Z)(u[t].subMenuIds.reduce((function(e,t){1;var n=l[t];return[].concat((0,q.Z)(e),[n])}),[])))}),[]);return a=null,{stickyIds:{},allElements:d,menuGroupIds:s,menuGroupById:u,subMenuById:l}},Ne=n(62340),Te=n(22965),De={alertStatus:(Se={},(0,b.Z)(Se,Ne.Z.critical,1),(0,b.Z)(Se,Ne.Z.warning,2),(0,b.Z)(Se,Ne.Z.clear,3),(0,b.Z)(Se,Ne.Z.unreachable,4),Se),nodeStatus:{Live:1,Stale:2,Offline:3}},Me={nodeStatus:function(e){return(0,Te.Q5)(e.state)},alertStatus:function(e){return(0,Te.hC)(e)}},Be=n(15394),Fe=n(53499),Ae=n(69743),_e=n(56102),Le=n(11835),Re=["id"],Ve=function(e){var t=e.id,n=(0,B.Z)(e,Re);return r.createElement(Ae.d,(0,y.Z)({id:t},n),r.createElement(_e.Y,{id:t}),r.createElement(Le.f,{id:t}))},ze=(0,r.memo)(Ve),Ke=n(3322),Ge=n(24093),He=n(33335),Ue=n(6585),We=n(97279),qe=(0,oe.default)(h.Button).attrs({flavour:"hollow",neutral:!0,tiny:!0}).withConfig({displayName:"styled__ActionButton",componentId:"sc-31e37b-0"})(["&&&{border-color:",";&:hover{background-color:",";}.button-icon{"," fill:",";}}"],(0,h.getColor)("nodeBadgeBorder"),(0,h.getColor)("nodeBadgeBackground"),(function(e){var t=e.iconSize;return t&&"\n height: ".concat(t,";\n width: ").concat(t,";\n ")}),(0,h.getColor)("textDescription")),Qe=(0,oe.default)(qe).attrs({icon:"trashcan",iconSize:"15px"}).withConfig({displayName:"styled__ObsoleteButton",componentId:"sc-31e37b-1"})([""]),Je=(0,oe.default)(qe).attrs({icon:"removeNode"}).withConfig({displayName:"styled__RemoveButton",componentId:"sc-31e37b-2"})([""]),Xe=(0,oe.default)(h.Box).attrs({background:"placeholder",height:4,width:.25}).withConfig({displayName:"styled__InfoSeparator",componentId:"sc-31e37b-3"})([""]),Ye=(0,oe.default)(h.Flex).withConfig({displayName:"styled__NodeActions",componentId:"sc-31e37b-4"})(["display:none;"]),$e=(0,oe.default)(h.Flex).attrs({alignItems:"center",gap:1}).withConfig({displayName:"styled__NodeNameContainer",componentId:"sc-31e37b-5"})(["&:hover{h5{color:#00ab44;text-decoration:underline;text-decoration-color:#00ab44;}svg{fill:#00ab44;}}"]),et=(0,oe.default)(h.H5).attrs((function(e){var t=e.isLive;return{cursor:t?"pointer":"auto",color:t?"text":"textDescription"}})).withConfig({displayName:"styled__NodeName",componentId:"sc-31e37b-6"})([""]),tt=["connectivity","id","name"],nt=function(e){var t=e.connectivity,n=e.id,a=e.name,i=(0,B.Z)(e,tt),c=(0,He.gI)("node:Delete"),u=!(0,o.Hm)().untouchable,s=(0,w.Z)(),d=(0,l.Z)(s,4),m=d[0],f=d[2],p=d[3],g=(0,w.Z)(),h=(0,l.Z)(g,4),v=h[0],b=h[2],E=h[3];return r.createElement(Ye,(0,y.Z)({alignSelf:"end",gap:1,"data-testid":"node-actions"},i),u&&r.createElement(r.Fragment,null,r.createElement(Ge.Z,{badge:"actionRemove","data-testid":"remove-node-action"},r.createElement(Je,{"data-ga":"nodes-table-row::click-remove-node::nodes-view",onClick:b})),v&&r.createElement(We.ZP,{ids:[n],name:a,onClose:E})),c&&"Offline"===t&&r.createElement(r.Fragment,null,r.createElement(Ge.Z,{badge:"actionObsolete","data-testid":"obsolete-node-action"},r.createElement(Qe,{"data-ga":"nodes-table-row::click-obsolete-node::nodes-view",onClick:f})),m&&r.createElement(Ue.ZP,{ids:[n],name:a,onClose:p})))},rt=n(56001),ot=["instanceType","name","providerType"],at=function(e){var t=e.instanceType,n=e.name,o=e.providerType,a=(0,B.Z)(e,ot);return r.createElement(Ge.Z,(0,y.Z)({badge:"cloudInfo","data-testid":"node-cloud-info",nodeName:n},a),r.createElement(h.Flex,{alignItems:"center",gap:1},r.createElement(h.Icon,{color:"textDescription","data-testid":"node-cloud-info-icon",name:"ipNetworking",width:"18px",height:"18px"}),r.createElement(h.TextSmall,{color:"textDescription","data-testid":"node-cloud-info-text"},(0,Te.MC)(o)," \u2022 ",(0,Te.MC)(t))))},it=["connectivity","name"],ct=function(e){var t=e.connectivity,n=e.name,o=(0,B.Z)(e,it);return r.createElement(Ge.Z,(0,y.Z)({badge:"connectivity",connectivityState:t,"data-testid":"node-connectivity",nodeName:n},o),r.createElement(h.Icon,{name:"connectivityStatus".concat(t),width:"18px",height:"18px"}))},lt=["onClick"],ut=function(e){var t=e.onClick,n=(0,B.Z)(e,lt);return r.createElement(Ge.Z,(0,y.Z)({badge:"info","data-testid":"node-info-cta"},n),r.createElement(h.Icon,{color:"textDescription",cursor:"pointer",height:"18px",width:"18px",name:"information",onClick:t}))},st=["name"],dt=function(e){var t=e.name,n=(0,B.Z)(e,st);return r.createElement(Ge.Z,(0,y.Z)({badge:"k8s","data-testid":"node-kubernetes",nodeName:t},n),r.createElement(h.Flex,{alignItems:"center",gap:1},r.createElement(h.Icon,{color:"textDescription","data-testid":"node-kubernetes-icon",name:"serviceKubernetes",width:"18px",height:"18px"}),r.createElement(h.TextSmall,{color:"textDescription","data-testid":"node-kubernetes-text"},"k8s")))},mt=["kernelName","kernelVersion","name"],ft=function(e){var t=e.kernelName,n=e.kernelVersion,o=e.name,a=(0,B.Z)(e,mt);return r.createElement(Ge.Z,(0,y.Z)({badge:"kernel","data-testid":"node-kernel",nodeName:o},a),r.createElement(h.TextSmall,{color:"textDescription"},(0,Te.cB)(t,n)))},pt=n(72132),gt=n(79655),ht=["id","state","isLive","name"],vt=function(e){var t=e.isLive,n=e.name;return r.createElement(r.Fragment,null,r.createElement(et,{"data-testid":"node-name-text",isLive:t},n),r.createElement(h.Icon,{color:"placeholder","data-testid":"node-name-icon",name:"goToNode",width:"18px",height:"18px"}))},bt=function(e){var t=e.id,n=e.state,o=e.isLive,a=e.name,i=(0,B.Z)(e,ht),c=(0,d.m3)(t);return"stale"===n||o?r.createElement(gt.rU,(0,y.Z)({"data-testid":"node-name-link",to:c},i),r.createElement($e,{"data-testid":"node-name-container"},r.createElement(vt,{isLive:o,name:a}))):r.createElement(vt,{isLive:o,name:a})},yt=["architecture","cpuFrequency","cpus","diskSpace","memory","name","os","osName"],Et=function(e){var t,n,o=e.architecture,a=e.cpuFrequency,i=e.cpus,c=e.diskSpace,l=e.memory,u=e.name,s=e.os,d=e.osName,m=(0,B.Z)(e,yt);return r.createElement(Ge.Z,(0,y.Z)({badge:"systemInfo","data-testid":"node-system-info",nodeName:u},m),r.createElement(h.Flex,{alignItems:"center",gap:1},r.createElement(h.Icon,{color:"textDescription","data-testid":"node-system-info-icon",name:(null===(t=Ie._[d])||void 0===t?void 0:t.iconName)||(null===(n=Ie.V[s])||void 0===n?void 0:n.iconName)||"os",width:"16px",height:"16px"}),r.createElement(h.TextSmall,{color:"textDescription","data-testid":"node-system-info-text"},(0,Te.MC)(d)," \u2022 ",(0,Te.ys)(a)," \u2022"," ",(0,Te.MC)(i,1===i?"Core":"Cores")," \u2022 ",(0,Te.MC)(o)," ","\u2022 ",(0,Te.MC)((0,Te.yo)(l),"RAM")," \u2022"," ",(0,Te.MC)((0,Te.yo)(c),"HD"))))},wt=["container","name","virtualization"],xt=function(e){var t=e.container,n=e.name,o=e.virtualization,a=(0,B.Z)(e,wt),i=(0,Te.jo)(t,o);return r.createElement(Ge.Z,(0,y.Z)({badge:"type","data-testid":"node-type",nodeName:n,nodeType:i.label},a),r.createElement(h.Flex,{alignItems:"center",gap:1},r.createElement(h.Icon,{color:"textDescription","data-testid":"node-type-icon",name:i.icon,height:i.iconSize,width:i.iconSize}),r.createElement(h.TextSmall,{color:"textDescription","data-testid":"node-type-text"},i.label)))},Ot=n(83925),kt=n(9058),Ct=(n(31672),n(59461),n(74916),n(4723),function(e,t){return e&&e.getRoot().getChildren().find((function(e){return e.match({id:"nodes-".concat(t)})}))}),It=n(16978),Zt=function(e){var t=e.id,n=e.roomId,o=e.nodeId,a=e.context,i=e.dimensions,c=(0,kt.e)(),l=(0,r.useMemo)((function(){var e=Ct(c,n),r=[t,o,a].join("-");if(!e)return null;var l=e.getNode({id:r});return l?(l.updateAttribute("selectedDimensions",i.map((function(e){return e.name}))),l):(l=c.makeChart({attributes:{id:r,nodesScope:[o],contextScope:[a],pixelsPerPoint:20,selectedDimensions:i.map((function(e){return e.name}))}}),e.appendChild(l),l)}),[a,t,o,n,c]);return l?r.createElement(It.Z,{chart:l,hasHeader:!1,hasFooter:!1,hasFilters:!1}):null},jt=(0,r.memo)(Zt),St=n(38626),Pt=function(e){var t=e.id,n=e.context,a=e.nodeId,i=e.isLive,c=e.hidden,l=e.title,u=e.dimensions,s=(0,o.UL)();return c||!i?null:r.createElement(h.Flex,{column:!0,"data-testid":"metrics-chart-".concat(n),flex:"grow",basis:"174px"},r.createElement(St.Z,{text:l||n,maxLength:19,TextComponent:h.TextSmall,color:"textDescription",margin:[1,0,1,2],as:"div"}),r.createElement(jt,{id:t,context:n,nodeId:a,roomId:s,dimensions:u}))},Nt=function(e){var t,n,a=e.id,i=e.name,c=e.hw,l=e.os,u=e.capabilities,s=e.container,d=e.updateSeverity,m=e.labels,f=e.isLive,g=e.state,v=e.version,b=e.extraKey,E=(0,o.UL)(),w=null===(t=u.funcs)||void 0===t?void 0:t.enabled,x=null===(n=u.ml)||void 0===n?void 0:n.enabled,O=(0,Te.Q5)(g),k=m||{},C=k._cloud_instance_type,I=k._cloud_provider_type,Z="true"===(null===m||void 0===m?void 0:m._is_k8s_node),j=!(0,Te.O2)(C)||!(0,Te.O2)(I),S=(0,p.Sf)("sidebarTab",{flavour:"val",extraKey:b}),P=(0,p.Sf)("sidebarOpen",{flavour:"bool"}),N=(0,p.Sf)("sidebarNodeId",{flavour:"val",extraKey:b}),T=(0,r.useCallback)((function(e){P(!0),S(e),N(a)}),[a]),D=(0,r.useCallback)((function(){return T("alerts")}),[T]),M=(0,r.useCallback)((function(){return T("info")}),[T]),B=(0,Ke.Eq)(),F=(0,R.uA)(E);return r.createElement(h.Flex,{"data-testid":"nodeRow-".concat(i),"data-submenuid":a,padding:[1],column:!0,gap:1,round:!0},r.createElement(h.Flex,{alignItems:"center","data-testid":"nodeRow-basic-info",gap:2,height:{min:6}},r.createElement(ct,{connectivity:O,"data-testid":"nodeRow-connectivity-".concat(O.toLowerCase()),name:i}),r.createElement(Xe,{"data-testid":"nodeRow-separator"}),r.createElement(bt,{"data-testid":"nodeRow-name",id:a,name:i,isLive:f,state:g}),r.createElement(Xe,{"data-testid":"nodeRow-separator"}),r.createElement(ut,{onClick:M,"data-testid":"nodeRow-more-info-cta"}),r.createElement(Xe,{"data-testid":"nodeRow-separator"}),r.createElement(rt.Z,{id:a,isLive:f,"data-testid":"nodeRow-alerts",name:i,onClick:D}),r.createElement(Xe,{"data-testid":"nodeRow-separator"}),r.createElement(pt.Z,{badge:"ml","data-testid":"nodeRow-machine-learning-status",enabled:x,name:i},r.createElement(h.Icon,{name:"anomaliesLens",size:"small",color:"text"})),r.createElement(Xe,{"data-testid":"nodeRow-separator"}),r.createElement(pt.Z,{badge:"fn","data-testid":"nodeRow-fn-status",enabled:w,name:i,onClick:function(){return B(a)}},r.createElement(h.Icon,{name:"functions",size:"small",color:"text"})),d&&r.createElement(r.Fragment,null,r.createElement(Xe,{"data-testid":"nodeRow-separator"}),r.createElement(Ot.Z,{name:i,os:l.id,container:s,warningLevel:d,labels:m,version:v,text:d,"data-testid":"nodeRow-needs-update"})),r.createElement(nt,{"data-testid":"nodeRow-node-actions",id:a,name:i,connectivity:O})),r.createElement(h.Flex,{alignItems:"center","data-testid":"nodeRow-detailed-info",gap:2},r.createElement(Et,{architecture:c.architecture,cpuFrequency:c.cpuFrequency,cpus:c.cpus,"data-testid":"nodeRow-system-info",diskSpace:c.diskSpace,memory:c.memory,name:i,osName:l.nm,os:l.id}),r.createElement(Xe,{"data-testid":"nodeRow-separator"}),!(null===l||void 0===l||!l.kernel)&&r.createElement(ft,{"data-testid":"nodeRow-kernel",kernelName:l.kernel.nm,kernelVersion:l.kernel.v,name:i}),r.createElement(Xe,{"data-testid":"nodeRow-separator"}),Z&&r.createElement(r.Fragment,null,r.createElement(dt,{"data-testid":"nodeRow-kubernetes",name:i}),r.createElement(Xe,{"data-testid":"nodeRow-separator"})),r.createElement(xt,{container:c.container,"data-testid":"nodeRow-type",name:i,virtualization:c.virtualization}),j&&r.createElement(r.Fragment,null,r.createElement(Xe,{"data-testid":"nodeRow-separator"}),r.createElement(at,{"data-testid":"nodeRow-cloud-info",instanceType:C,name:i,providerType:I}))),!(null===F||void 0===F||!F.length)&&r.createElement(h.Flex,{"data-testid":"nodeRow-charts",gap:1},F.map((function(e){return r.createElement(Pt,(0,y.Z)({key:e.id},e,{nodeId:a,isLive:f}))}))))},Tt=function(e){switch(e.level){case 0:return ze;case 1:return Nt;default:return null}},Dt=["onChartNameChange","initialChartName","dashboardOptions","linkToGo","contextToGo"],Mt=function(e){var t=e.onChartNameChange,n=e.initialChartName,o=e.dashboardOptions,a=e.linkToGo,i=e.contextToGo,c=(0,B.Z)(e,Dt),l=(0,Be.Z)({onChartNameChange:t,initialChartName:n,linkToGo:a,contextToGo:i}),u=l.setActiveMenuGroupId,s=l.setActiveSubMenuId;return r.createElement(f.v,c,r.createElement(Fe.Z,{onActiveMenuGroupId:u,onActiveSubMenuId:s,getComponent:Tt,dashboardOptions:o,initialChartName:n,checkVisibility:function(){return!0}}))},Bt=["config"],Ft=function(){var e=(0,m.th)(),t=(0,o.UL)(),n=function(){var e=(0,o.UL)(),t=D(e,"groupMode")||"nodeStatus",n=Me[t]||Me.nodeStatus;return(0,r.useCallback)((function(e){var r,o=n(e);return{name:o,priority:Me[t]?null===De||void 0===De||null===(r=De[t])||void 0===r?void 0:r[o]:De.nodeStatus,icon:"nodeStatus"===t?"connectivityStatus".concat(o):null}}),[t])}(),a=(0,p.H7)({extraKey:"nodesView"}),i=(0,d.wU)(),c=(0,u.Z)(),h=(0,l.Z)(c,2),v=h[0],b=h[1].width;!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.host,a=n.width,i=(0,kt.e)(),c=(0,r.useRef)();(0,r.useMemo)((function(){if(i){var n=Ct(i,e);n&&n.destroy(),n=i.makeContainer({attributes:{host:o,enabledXAxis:!1,id:"nodes-".concat(e),hasToolbox:!1,height:"75px",groupingMethod:"average",groupBy:["dimension"],aggregationMethod:"avg",legend:!1,axisLabelFontSize:7,yAxisLabelWidth:20,hasYlabel:!1,nodesScope:t,width:a}}),c.current=n,i.appendChild(n)}}),[e]),(0,r.useMemo)((function(){c.current&&(c.current.setAttribute("width",a),c.current.getNodes().forEach((function(e){return e.updateAttribute("width",a)})))}),[c.current,a]),(0,r.useLayoutEffect)((function(){return function(){return c.current&&c.current.destroy()}}),[])}(t,a,{host:(0,m.Q6)()?"".concat(window.envSettings.agentApiUrl,"/api/v2"):"".concat(window.envSettings.apiUrl,"/api/v3/spaces/").concat(e,"/rooms/").concat(t),width:b});var y=(0,p.I0)("nodeIdToGo",{key:t,extraKey:"nodesView",flavour:"val"}),E=(0,l.Z)(y,2),w=E[0],x=E[1];return r.createElement(f.Z,{getObject:i,ids:a,getMenu:Pe,getGrouping:n,deps:[n],extraKey:"nodesView"},r.createElement(s.Z,{ref:v,position:"relative",sidebar:r.createElement(g.ZP,{hiddenTabs:Bt,nodeIds:a,title:"Nodes",initialChartName:w,flavour:"nodesView",loaded:!0,hasSearch:!1})},r.createElement(ke,null),r.createElement(Mt,{initialChartName:w,onChartNameChange:x})))},At=function(){var e=(0,o.UL)(),t=(0,a.zN)();return(0,a.X7)(e,"loaded")&&!t.length?r.createElement(c.ZP,{feature:"NodesView",mode:"NoNodesView"},r.createElement(i.Z,null)):r.createElement(c.ZP,{feature:"NodesView"},r.createElement(Ft,null))}},36560:function(e,t,n){n.d(t,{H:function(){return F},Z:function(){return A}});var r=n(87462),o=n(29439),a=n(67294),i=n(59978),c=n(46667),l=n(37518),u=n(86242),s=n(28350),d=n(36459),m=(n(19601),n(21249),n(57640),n(9924),n(71893)),f=n(94666),p=n(31203),g=n(52428),h=(0,m.default)(i.Flex).withConfig({displayName:"adminsList__RowFlex",componentId:"sc-1pb9ob2-0"})(["&:hover{background:",";}"],(0,i.getColor)("elementBackground")),v=(0,m.default)(i.Icon).withConfig({displayName:"adminsList__StyledIcon",componentId:"sc-1pb9ob2-1"})(["cursor:pointer;"]),b=function(e){var t=Object.assign({},((0,d.Z)(e),e)),n=(0,f.nP)();return a.createElement(i.Flex,(0,r.Z)({column:!0,border:{side:"top",color:"borderSecondary"},flex:"grow",padding:[1,0],height:{max:50},overflow:"auto"},t),n.map((function(e){return a.createElement(h,{flex:{grow:0,shrink:0},key:e.id,padding:[0,4],justifyContent:"between",height:10,alignItems:"center"},a.createElement(i.Flex,{key:e.id,gap:2,alignItems:"center"},a.createElement(p.Z,{src:e.avatarURL,title:e.name}),a.createElement(i.Text,null,e.name),a.createElement(i.Text,{color:"textLite"},e.email)),a.createElement(v,{onClick:(0,g.J)(e.email,{text:"Admin email address copied to your clipboard."}),size:"small",name:"copy",color:"primary"}))})))},y=(0,m.default)(i.Icon).withConfig({displayName:"styled__StyledWarningIcon",componentId:"sc-q96c2w-0"})(["border-radius:50%;overflow:hidden;background:",";"],(0,i.getColor)(["neutral","white"])),E=(0,m.default)(i.Icon).withConfig({displayName:"styled__StyledCheckmarkIcon",componentId:"sc-q96c2w-1"})(["border-radius:50%;overflow:hidden;background:",";padding:6px;width:24px;height:24px;"],(0,i.getColor)("elementBackground")),w=(0,m.default)(i.Icon).withConfig({displayName:"styled__StyledIcon",componentId:"sc-q96c2w-2"})(["transform:",";"],(function(e){return e.closed?"none":"rotate(180deg)"})),x=n(45987),O=n(91008),k=["gaPrefix"],C=function(e){var t=e.gaPrefix,n=void 0===t?"onboarding":t,o=(0,x.Z)(e,k);return a.createElement(i.Flex,(0,r.Z)({column:!0,gap:1,color:"textDescription"},o),a.createElement(i.Text,null,"Need help?"),a.createElement(i.Text,null,"Use our"," ",a.createElement(O.Z,{href:"https://community.netdata.cloud/",target:"_blank","data-ga":"".concat(n,"::click-forums::allpages")},"forums")," ","or public"," ",a.createElement(O.Z,{href:"https://discord.gg/mPZ6WZKKG2",target:"_blank","data-ga":"".concat(n,"::click-discord::allpages")},"discord channel")))},I=n(72911),Z=n(91268),j=n(33335),S=n(46189),P=n(89250),N=n(92432),T=S.Z.demoSlug,D=(0,m.default)(i.Button).withConfig({displayName:"headerButtons__StyledButton",componentId:"sc-11mwk9m-0"})(["&&{padding:2px 16px;font-size:12px;height:auto;width:auto;min-width:96px;}"]),M=function(){var e=(0,P.s0)();return a.createElement(i.Flex,{gap:4},a.createElement(O.Z,{href:"https://learn.netdata.cloud/docs/architecture/deployment-strategies",rel:"noopener noreferrer",target:"_blank"},"Possible Deployment Strategies"),!window.envSettings.onprem&&a.createElement(D,{"data-ga":"no-nodes-view::click-demo::no-nodes-header",flavour:"default",onClick:function(t){e("/spaces/".concat(T)),(0,N.L)("no-nodes-view","click-demo","no-nodes-header"),t.preventDefault()},label:"Live Demo"}))},B=n(8741),F=function(){return a.createElement(a.Fragment,null,a.createElement(i.Flex,{column:!0,"data-testid":"noNodesView-memberSection",gap:1},a.createElement(i.Flex,{alignItems:"center","data-testid":"noNodesView-memberHeader",gap:4,height:10,padding:[0,3]},a.createElement(E,{"data-testid":"noNodesView-memberHeaderIcon",name:"checkmark_s",color:"textLite"}),a.createElement(i.Flex,{justifyContent:"between",flex:!0},a.createElement(i.H3,{color:"textDescription","data-testid":"noNodesView-memberHeaderText"},"You are a member and only space admins can connect new nodes"),a.createElement(M,null))),a.createElement(i.Flex,{"data-testid":"noNodesView-memberDescription",padding:[0,0,2,13]},a.createElement(i.Text,{color:"textDescription","data-testid":"noNodesView-memberDescriptionText"},"Please contact anyone from the list in order to do so"))),a.createElement(i.Flex,{"data-testid":"noNodesView-memberAdminsListSection",padding:[0,0,0,12]},a.createElement(b,{"data-testid":"noNodesView-memberAdminsList"})))},A=function(e){var t=e.videoId,n=(0,l.UL)(),d=(0,u.Z)(n),m=(0,o.Z)(d,2),f=m[0],p=m[1],g=p.onAddNodes,h=p.selectedNodes,v=f.claimedNodeIds.length>0,b=(0,c.Z)(!0),x=(0,o.Z)(b,2),O=x[0],k=x[1],S=(0,j.gI)("node:Create");return a.createElement(Z.Z,{column:!1,"data-testid":"noNodesViewPage",gap:12,padding:[6],margin:[0,0,8],overflow:"auto"},a.createElement(i.Flex,{column:!0,"data-testid":"noNodesView-cmdSection",flex:{grow:0,shrink:1},width:"100%",gap:2},a.createElement(i.Flex,{"data-testid":"noNodesView-warningBanner",alignItems:"center",background:"warningBackground",gap:4,height:{min:10},padding:[0,3],round:!0},a.createElement(y,{"data-testid":"noNodesView-warningBannerIcon",name:"exclamation",color:"warning"}),a.createElement(i.Text,{color:"bright","data-testid":"noNodesView-warningBannerText"},"You have no nodes.")),S&&a.createElement(a.Fragment,null,a.createElement(i.Flex,{alignItems:"center","data-testid":"noNodesView-adminSection",justifyContent:"between",onClick:v?k:null,cursor:v?"pointer":null},a.createElement(i.Flex,{alignItems:"center","data-testid":"noNodesView-adminHeader",gap:4,height:10,padding:[0,3]},a.createElement(E,{"data-testid":"noNodesView-adminHeaderIcon",name:"checkmark_s",color:"textLite"}),a.createElement(i.H3,{"data-testid":"noNodesView-adminHeaderText",color:"textDescription"},"Connect new nodes")),a.createElement(i.Flex,{gap:4,alignItems:"center"},a.createElement(M,null),v&&a.createElement(w,{closed:!O,"data-testid":"noNodesView-adminClaimedNodesIcon",name:"chevron_down",color:"textLite"}))),a.createElement(i.Collapsible,{"data-testid":"noNodesView-adminClaimNodesContainer",open:O},a.createElement(i.Flex,{"data-testid":"noNodesView-adminClaimNodes",padding:[0,0,0,12]},a.createElement(B.Z,{rooms:[n]})))),!S&&a.createElement(F,null),v&&a.createElement(a.Fragment,null,a.createElement(i.Flex,{alignItems:"center","data-testid":"noNodesView-availableNodesHeader",gap:4,height:10,padding:[0,3]},a.createElement(E,{"data-testid":"noNodesView-availableNodesHeaderIcon",name:"checkmark_s",color:"textLite"}),a.createElement(i.H3,{color:"textDescription","data-testid":"noNodesView-availableNodesHeaderText"},"Add already available nodes")),a.createElement(i.Flex,{height:"100%","data-testid":"noNodesView-availableNodesContainer",padding:[0,0,0,12]},a.createElement(s.Z,(0,r.Z)({"data-testid":"noNodesView-availableNodesList"},f,{onAddNodes:g,canAddNodes:!!h.length,padding:[2,0,8]}))))),t&&a.createElement(i.Flex,{column:!0,"data-testid":"noNodesView-videoSection",flex:{shrink:0,grow:0}},a.createElement(I.Z,{"data-testid":"noNodesView-onboardingVideo",height:296,width:520,videoId:t}),a.createElement(C,{"data-testid":"noNodesView-needHelp",padding:[8,0]})))}},2077:function(e,t,n){n.d(t,{mt:function(){return C},yp:function(){return k},VG:function(){return x},d5:function(){return I},$g:function(){return O}});n(82526),n(57327),n(88449),n(59849),n(38880),n(49337),n(33321),n(69070);var r=n(29439),o=n(4942),a=(n(92222),n(85827),n(41539),n(25387),n(2490),n(72608),n(47941),n(15581),n(34514),n(54747),n(82772),n(26699),n(32023),n(61874),n(9653),n(67294)),i=n(4480),c=n(4822),l=n(18761),u={byContext:{},loaded:!1,loading:!1,method:null,options:null,group:"average",totalDimensionsCount:0},s=(0,i.xu)({key:"weights",default:u});function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;tt?t:e},E=function(e,t){return null===e||e5&&void 0!==arguments[5]?arguments[5]:y;n&&(n&&"undefined"===typeof p[g][t][n]&&(p[g][t][n]={}),"undefined"===typeof p[g][t][n][e]&&(p[g][t][n][e]=null),r&&(p[g][t][n][e]=a(p[g][t][n][e],o)))});e[c]||(e[c]={dimensions:{},instances:{},nodes:{},weight:null});var v=!!r&&r.includes("anomaly-bit");h("weight","dimensions",o,"dimension"===s,d,v?E:y),h("weight","instances",u,"instance"===s,d,v?E:y),h("weight","nodes",i,"node"===s,d,v?E:y);var b=m?100*m.anomaly_count/m.count:0;h("arHighlight","dimensions",o,"dimension"===s,b,E),h("arHighlight","instances",u,"instance"===s,b,E),h("arHighlight","nodes",i,"node"===s,b,E);var w=f?100*(f.anomaly_count-m.anomaly_count)/(f.count-m.count)===0?1:f.count-m.count:0;h("arBaseline","dimensions",o,"dimension"===s,w,E),h("arBaseline","instances",u,"instance"===s,w,E),h("arBaseline","nodes",i,"node"===s,w,E);var x=w?b/w:0;return h("score","dimensions",o,"dimension"===s,x,E),h("score","instances",u,"instance"===s,x,E),h("score","nodes",i,"node"===s,x,E),"context"===s?e[c].weight=null===e[c].weight||e[c].weight>d?d:e[c].weight:"dimension"===s&&(a+=1),e}),{})}return{byContext:o,totalDimensionsCount:a}},x=function(e,t,n){var r=(0,a.useRef)();return[(0,i._8)((function(o){var a=o.set;return function(o){var i=o.flavour,c=o.highlightAfter,s=o.highlightBefore,d=o.baselineAfter,p=o.baselineBefore,g=o.method,h=o.options,v=o.group,b=o.context,y=o.nodeIds,E=o.aggregation,x=o.groupBy;return a(f(e),m(m({},u),{},{loading:!0})),r.current&&r.current.cancel(),r.current=(0,l.B3)(t,n,{highlightAfter:c,highlightBefore:s,baselineAfter:d,baselineBefore:p,method:g,options:h,group:v,context:b,nodeIds:y,aggregation:E,groupBy:x}),r.current.then((function(t){var n=t.data,r=w({flavour:i,data:n,aggregation:E,options:h}),o=r.byContext,c=r.totalDimensionsCount;a(f(e),{loading:!1,loaded:!0,byContext:o,options:h,totalDimensionsCount:c,method:g,group:v,groupBy:x,error:null})})).catch((function(t){var n;if(!t.isCancel)throw a(f(e),m(m({},u),{},{error:(null===t||void 0===t||null===(n=t.response)||void 0===n?void 0:n.data)||t})),t}))}}),[e]),(0,i._8)((function(t){var n=t.reset;return function(){r.current&&r.current.cancel(),n(f(e))}}),[e])]},O=function(e){return(0,i.sJ)(f(e))},k=function(e){return(0,i.rb)(f(e))},C=.01,I=function(e,t,n){var o=x(e,t,n),i=(0,r.Z)(o,2),l=i[0],u=i[1],s=O(e),d=s.loaded,f=s.loading,p=s.byContext,g=s.totalDimensionsCount,h=s.options,v=s.groupBy,b=function(){var e=(0,c.by)("threshold");return e?Number.parseFloat(e):C}(),y=(0,a.useMemo)((function(){var e=0,t=null===h||void 0===h?void 0:h.includes("raw"),n=(v||[]).length?p:Object.keys(p).reduce((function(n,r){var o=Object.keys(p[r].dimensions).reduce((function(e,n){return!t&&p[r].dimensions[n].weight>b||(e[n]=p[r].dimensions[n]),e}),{}),a=Object.keys(o).length;return e+=a,a?(n[r]=m(m({},p[r]),{},{dimensions:o}),n):n}),{});return[n,Object.keys(n),e]}),[d,b]),E=(0,r.Z)(y,3),w=E[0],k=E[1],I=E[2];return{threshold:b,metadata:w,contexts:k,dimensionsCount:I,totalDimensionsCount:g,loaded:d,loading:f,getWeights:l,resetWeights:u}}},89479:function(e,t,n){n.d(t,{W2:function(){return f},Q7:function(){return O},PP:function(){return x},dA:function(){return E},Ni:function(){return Z},pT:function(){return j},MS:function(){return I},If:function(){return S},jg:function(){return b},QX:function(){return y},Uq:function(){return g},hH:function(){return p},Cd:function(){return k},qU:function(){return h},z3:function(){return C},w4:function(){return v}});n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(93433),a=(n(66992),n(41539),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(92222),n(47941),n(85827),n(25387),n(2490),n(72608),n(64211),n(41874),n(67294)),i=n(4480),c=n(37394),l=n(37518),u=n(41331),s={ids:(0,i.xu)({key:"roomChartIds",default:[]}),updatedAt:(0,i.xu)({key:"roomChartsUpdatedAt",default:""}),loaded:(0,i.xu)({key:"roomChartsLoaded",default:!1}),error:(0,i.xu)({key:"roomChartsError",default:null}),versions:(0,i.xu)({key:"versions",default:{}}),fetchedFor:(0,i.xu)({key:"fetchedFor",default:[]})};function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=e.merge,r=void 0===n||n,o=e.nodeIds;return function(e,n){var a=e.set,i=n.values,l=n.merge;a(f({id:t,key:"fetchedFor"}),o),a(w(t),(function(e){var t=Object.keys(i).reduce((function(t,n){var o=i[n].id;return t[o]=m(m(m(m({},c.a),(r||l)&&e[o]),i[n]),{},{loaded:!0}),t}),r?m({},e):{});return r&&(0,u.ZP)(t,e,{omit:["lastEntry","firstEntry","family"]})?e:t}))}}}),k=function(e,t){return(0,i.sJ)(x({id:e,key:t}))},C=function(e){return(0,i._8)((function(t){var n=t.set;return function(t){return n(w(e),t)}}),[])},I=function(e,t){return(0,i._8)((function(n){var r=n.snapshot;return function(n){return m(m({},r.getLoadable(x({id:e,key:n})).contents),(null===t||void 0===t?void 0:t[n])||{})}}),[e,t])},Z=function(e){var t,n,r,o=(0,l.UL)(),a=(0,i.sJ)(w(o));return(null===(t=a[e])||void 0===t?void 0:t.visible)&&!(null!==(n=a[e])&&void 0!==n&&n.filteredOut)&&!(null!==(r=a[e])&&void 0!==r&&r.hidden)},j=function(e){var t=(0,l.UL)(),n=(0,i.sJ)(w(t));return e.some((function(e){var t,r,o;return(null===(t=n[e])||void 0===t?void 0:t.visible)&&!(null!==(r=n[e])&&void 0!==r&&r.filteredOut)&&!(null!==(o=n[e])&&void 0!==o&&o.hidden)}))},S=function(){var e=(0,l.UL)(),t=(0,i.sJ)(w(e));return(0,a.useCallback)((function(e){return e.some((function(e){var n,r,o;return(null===(n=t[e])||void 0===n?void 0:n.visible)&&!(null!==(r=t[e])&&void 0!==r&&r.filteredOut)&&!(null!==(o=t[e])&&void 0!==o&&o.hidden)}))}),[e,t])},P=(0,i.xu)({key:"instancesByContextAtom",default:{}}),N=(0,i.CG)({key:"roomChartInstancesState",get:function(e){var t=e.id,n=e.context;return function(e){var r=(0,e.get)(P(t));return n?r[n]:r}},set:function(e){var t=e.id,n=e.context;return function(e,o){var a=e.set;"function"!==typeof o?Object.keys(o).length<1||a(P(t),(function(e){return m(m({},e),{},(0,r.Z)({},n,o))})):a(P(t),(function(e){return m(m({},e),{},(0,r.Z)({},n,o(e[n])))}))}}});(0,i.CG)({key:"roomChartInstances/initialize",set:function(e){return function(t,n){(0,t.set)(P(e),(function(e){return m(m({},e),n)}))}}}),(0,i.CG)({key:"roomChartsInstancesState",get:function(e){var t=e.id,n=e.contexts,r=void 0===n?[]:n;return function(e){var n=(0,e.get)(N({id:t}));return r.reduce((function(e,t){return n[t]&&(e[t]=n[t]),e}),{})}}})},20046:function(e,t,n){n.d(t,{Z:function(){return y}});var r=n(29439),o=(n(92222),n(21249),n(57640),n(9924),n(57327),n(41539),n(88449),n(2490),n(59849),n(67294)),a=n(93433),i=(n(26699),n(32023),n(59978)),c=n(27856),l=n(82351),u=function(e){var t=e.message,n=e.children,u=e.warningMessage,s=(0,o.useRef)(),d=(0,o.useRef)([]),m=(0,i.useNavigationArrows)(s,d,n,!0),f=(0,r.Z)(m,3),p=f[0],g=f[1],h=f[2];(0,o.useEffect)((function(){if(s.current){var e=s.current,t=(0,c.D)(300,(function(){h()}));return t(),e.addEventListener("scroll",h),window.addEventListener("resize",t),function(){e.removeEventListener("scroll",h),window.removeEventListener("resize",t)}}}),[n]);var v=(0,o.useCallback)((function(e){e&&(d.current.includes(e)||(d.current=[].concat((0,a.Z)(d.current),[e])),n.length0))return o.createElement("div",null);var u=l.length!==c.length?"Some of the nodes you have selected are unreachable, therefore their metrics are not included in the charts.":"";return o.createElement(i.Flex,{width:"100%",overflow:"hidden"},o.createElement(s,{warningMessage:u,message:"You have selected ".concat(c.length," ").concat((0,v.V6)(c.length))},c.map((function(e){return o.createElement(b,{key:e,onRemove:function(){return a(n.filter((function(t){return t!==e})))},nodeId:e})}))))}))},4571:function(e,t,n){n.d(t,{Z:function(){return St}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(87462),o=n(4942),a=n(67294),i=n(89250),c=n(74662),l=n(36560),u=n(29439),s=n(2077),d=n(5441),m=n(25517),f=n(4822),p=n(91268),g=n(43969),h=n(78266),v=n(59978),b=n(37518),y=n(72911),E=n(8741),w=n(62200),x=n(91008),O=n(33335),k=n(41898),C=function(){var e=(0,b.UL)(),t=(0,O.gI)("node:Create");return a.createElement(p.Z,{column:!1,"data-testid":"noNodesViewPage",gap:12,padding:[6]},a.createElement(v.Flex,{column:!0,gap:5,flex:{shrink:0,grow:0},"data-testid":"noKubernetesView-videoSection"},a.createElement(y.Z,{"data-testid":"noNodesView-onboardingVideo",height:350,width:850,videoId:w.mX[0]}),a.createElement(y.Z,{"data-testid":"noNodesView-onboardingVideo",height:350,width:850,videoId:w.mX[1]})),a.createElement(v.Flex,{column:!0,gap:4},a.createElement(v.Box,{border:{side:"bottom",color:"borderSecondary"}},a.createElement(v.Box,{margin:[0,0,2,0]},a.createElement(x.Z,{href:"https://learn.netdata.cloud/guides/monitor/kubernetes-k8s-netdata",target:"_blank",rel:"noopener noreferrer","data-ga":"k8s-tab::click-link-guides::kubernetes-overview-and-visualizations"},a.createElement(v.TextBig,{color:"primary"},"Kubernetes monitoring with Netdata: Overview and visualizations"))),a.createElement(v.Box,{margin:[0,0,2,0]},a.createElement(x.Z,{href:"https://learn.netdata.cloud/docs/cloud/visualize/kubernetes",target:"_blank",rel:"noopener noreferrer","data-ga":"k8s-tab::click-link-guides::kubernetes-visualizations"},a.createElement(v.TextBig,{color:"primary"},"Kubernetes visualizations")))),a.createElement(v.Flex,{column:!0,gap:4},t?a.createElement(E.Z,{integrationId:k.O_,rooms:[e]}):a.createElement(l.H,null))))},I=n(45987),Z=(n(26699),n(32023),n(92222),n(39714),n(71893)),j=n(48286),S=n(92432),P=n(82351),N=n(97945),T=n(74059),D=(n(69826),Z.default.div.withConfig({displayName:"selections__Separator",componentId:"sc-1cc7y18-0"})(["width:1px;height:",";background:",";"],(0,v.getSizeBy)(2.5),(0,v.getColor)("borderSecondary"))),M=[{label:"Volume",value:"volume"},{label:"KS2",value:"ks2"}],B=[{label:"Average",value:"average"},{label:"Median",value:"median"},{label:"Min",value:"min"},{label:"Max",value:"max"},{label:"Stddev",value:"stddev"}],F=[{label:"Metrics",value:""},{label:"Anomaly Rate",value:"anomaly-bit"}],A=function(){return a.createElement(v.Flex,{column:!0,gap:1,alignItems:"center",width:"220px"},a.createElement(v.TextMicro,{color:"white"},"Choose the algorithm you want to be used to identify correlations across metrics:"),a.createElement(v.TextMicro,null,a.createElement(v.TextMicro,{color:"white",strong:!0},"KS2:")," ","A statistical test comparing the distribution of the highlighted window to the baseline."),a.createElement(v.TextMicro,null,a.createElement(v.TextMicro,{color:"white",strong:!0},"Volume:")," ","Percentage change in averages between highlighted window and baseline."))},_=function(){return a.createElement(v.Flex,{column:!0,gap:1,alignItems:"center",width:"220px"},a.createElement(v.TextMicro,{color:"white"},"What aggregation function do you want to apply when aggregating multiple datapoints for metric correlations."))},L=function(){return a.createElement(v.Flex,{column:!0,gap:1,alignItems:"center",width:"220px"},a.createElement(v.TextMicro,{color:"white"},"Do you want to find correlations over the metric values or the anomaly rates of each metric."))},R=function(e){var t=e.runGetWeights,n=e.nodeIds,r=e.flavour,i=(0,s.$g)({nodeIds:n,flavour:r}),c=i.method,l=i.options,u=i.group,d=null!==l&&void 0!==l&&l.includes(F[1].value)?F[1].value:"",m=(0,a.useCallback)((function(e){return function(n){var r=n.value;r="options"!==e?r:r?[r]:[];var a=(0,o.Z)({method:c,options:[l],group:u},e,r);t(a)}}),[c,l,u]),f=(0,a.useMemo)((function(){return{method:M.find((function(e){return e.value===c})),group:B.find((function(e){return e.value===u})),option:F.find((function(e){return e.value===d}))}}),[c,u,d]);return u?a.createElement(v.Flex,{gap:2},a.createElement(v.Flex,{gap:1,alignItems:"center"},a.createElement(v.TextSmall,{color:"textLite"},"Method:"),a.createElement(v.Select,{options:M,value:f.method,onChange:m("method")}),a.createElement(P.Z,{isBasic:!0,plain:!0,content:A,align:"bottom"},a.createElement(v.Icon,{name:"information",color:"textDescription",size:"small"}))),a.createElement(D,null),a.createElement(v.Flex,{gap:1,alignItems:"center"},a.createElement(v.TextSmall,{color:"textLite"},"Aggregation:"),a.createElement(v.Select,{options:B,value:f.group,onChange:m("group")}),a.createElement(P.Z,{isBasic:!0,plain:!0,content:_,align:"bottom"},a.createElement(v.Icon,{name:"information",color:"textDescription",size:"small"}))),a.createElement(D,null),a.createElement(v.Flex,{gap:1,alignItems:"center"},a.createElement(v.TextSmall,{color:"textLite"},"Data:"),a.createElement(v.Select,{options:F,value:f.option,onChange:m("options")}),a.createElement(P.Z,{isBasic:!0,plain:!0,content:L,align:"bottom"},a.createElement(v.Icon,{name:"information",color:"textDescription",size:"small"}))),a.createElement(D,null)):null},V=n(89405),z=function(e){var t=e.highlightAfter,n=e.highlightBefore,r=e.baseline,o=(0,V.rA)(),i=o.localeDateString,c=o.localeTimeString,l=new Date(t),u=new Date(n),s=new Date(r),d=new Date(t),m=Math.round((n-t)/1e3),p=Math.round((t-r)/1e3),g=(0,f.TQ)("highlight");return a.createElement(v.Flex,{gap:4,alignItems:"center"},a.createElement(v.Flex,{gap:2},a.createElement(v.Flex,{column:!0,gap:1},a.createElement(v.TextSmall,{color:"textLite"},"Selected area:"),a.createElement(v.TextSmall,{color:"textLite"},"Reference baseline:")),a.createElement(v.Flex,{column:!0,gap:1},a.createElement(v.TextSmall,{"data-testid":"metricCorrelation-selectedArea"},i(l,{long:!1}),","," ",c(l),"\xa0->\xa0",i(u,{long:!1}),","," ",c(u)),a.createElement(v.TextSmall,{"data-testid":"metricCorrelation-referenceBaseline"},i(s,{long:!1}),","," ",c(s),"\xa0->\xa0",i(d,{long:!1}),","," ",c(d))),a.createElement(v.Flex,{column:!0,gap:1},a.createElement(v.TextSmall,{color:"textLite"},"Duration:"),a.createElement(v.TextSmall,{color:"textLite"},"Duration:")),a.createElement(v.Flex,{column:!0,gap:1},a.createElement(v.TextSmall,{"data-testid":"metricCorrelation-selecteArea-duration"},m,"\xa0secs"),a.createElement(v.TextSmall,{"data-testid":"metricCorrelation-referenceBaseline-duration"},p,"\xa0secs"))),a.createElement(P.Z,{content:"Clear selection",align:"bottom",isBasic:!0},a.createElement(v.Button,{neutral:!0,flavour:"borderless",icon:"trashcan",onClick:function(){g({after:null,before:null})},"data-ga":"metric-correlation::click-delete::charts-view","data-testid":"metricCorrelation-delete"})))},K=n(39979),G=n(63346);function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var U=(0,K.Z)(v.Button),W=(0,Z.default)(v.Button).withConfig({displayName:"correlation__LogoButton",componentId:"sc-15d72m3-0"})(["&&{pointer-events:none;}"]),q=(0,Z.default)(v.Button).withConfig({displayName:"correlation__CloseButton",componentId:"sc-15d72m3-1"})(["position:absolute !important;top:-3px;right:-3px;"]),Q=(0,K.Z)(q),J=(0,Z.default)(v.Button).attrs({padding:[0],margin:[0,0,0,1.5],width:"auto"}).withConfig({displayName:"correlation__StyledButton",componentId:"sc-15d72m3-2"})(["height:16px !important;> span{margin:0 !important;}"]),X=function(e){var t=e.flavour,n=(0,T.th)(),r=(0,b.UL)(),i=(0,N.pG)(),c=(0,a.useMemo)((function(){return i?[i]:[]}),[i]),l=(0,f.TA)({extraKey:t,defaultValue:c}),d="singleNode"===t?c:l,m=(0,a.useState)(!1),p=(0,u.Z)(m,2),g=p[0],h=p[1],y=(0,a.useState)(),E=(0,u.Z)(y,2),w=E[0],x=E[1],O=(0,s.d5)({nodeIds:d,flavour:t},n,r),k=O.threshold,C=O.totalDimensionsCount,I=O.dimensionsCount,Z=O.loaded,D=O.loading,M=O.getWeights,B=O.resetWeights,F=(0,s.$g)({nodeIds:d,flavour:t}),A=F.method,_=F.options,L=F.group,V=(0,f.by)("highlight"),K=V.after,q=V.before,X=K-4*(q-K),Y=!!K;(0,a.useEffect)((function(){if(Z){var e="default-result";if(L){var t=null!==_&&void 0!==_&&_.includes("anomaly-bit")?"anomaly-bit":"metrics";e="default-result-".concat(A,"-").concat(L,"-").concat(t)}return(0,S.L)("metrics-correlation",e,"charts-view",I.toString())}}),[Z]),(0,j.Z)((function(){K&&h(!0)}),[K]);var $=(0,f.TQ)("correlation"),ee=(0,f.TQ)("threshold"),te=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h(!1),x(),M(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return{selectedDimensions:e.dimensions?Object.keys(e.dimensions):nt,selectedInstances:e.instances?Object.keys(e.instances):nt,selectedNodes:e.nodes?Object.keys(e.nodes):nt,weight:e.weight}},ot=function(e){var t=e.id,n=(0,I.Z)(e,Ye),o=(0,b.UL)(),i=(0,De.u)(),c=(0,Ie.nI)(t),l=c.height,u=void 0===l?0:l,s=(0,I.Z)(c,$e),d=(0,Te.e)(),m=(0,Xe.Z)(),f=m.sendLog,p=m.isReady,g=(0,a.useMemo)((function(){var e=i.getNode({id:t});return e||(e=d.makeChart({attributes:tt({contextScope:[t],height:(0,Je.C)(i,t,u+360),id:t,roomId:o},s),makeTrack:Be}),i.appendChild(e),e)}),[i,o,t]);(0,a.useEffect)((function(){g&&p&&"function"===typeof f&&g.updateAttribute("logOptions",{sendLog:f,payload:{feature:"Overview"}})}),[g,f,p]);var h=(0,Ie.Q8)(t,rt),v=h.weight,y=h.selectedDimensions,E=h.selectedInstances,w=h.selectedNodes;return(0,a.useEffect)((function(){g&&v&&(g.updateAttributes({selectedDimensions:y,selectedInstances:E,selectedNodes:w}),g.trigger("fetch"))}),[o,t,v,y.length,E.length,w.length]),a.createElement(Ne.Z,(0,r.Z)({margin:[0,0,2],chart:g,"data-chartid":t,"data-track":g.track("container")},n))},at=a.memo(ot,(function(e,t){return e.id===t.id})),it=["id","subMenuId"],ct=function(e){var t=e.id,n=e.subMenuId,o=(0,I.Z)(e,it);return a.createElement(at,(0,r.Z)({id:t,role:"graphics-object","aria-roledescription":"chart","data-submenuid":n},o))},lt=(0,a.memo)(ct),ut=n(14048),st=n(12664),dt=function(e){var t=e.id,n=e.isActiveSticky;return a.createElement(ut.D,{gap:0,id:t},a.createElement(st.o,{id:t,margin:[1,0,0],hasTooltip:n}),!n&&a.createElement(Ue,{id:t}))},mt=(0,a.memo)(dt),ft=function(e){var t=e.id,n=(0,b.UL)(),r=(0,Te.e)(),o=(0,Ie.MS)(),i=(0,je.nk)(t).subMenuChartIds,c=(0,De.u)(),l=(0,a.useMemo)((function(){var e=(0,u.Z)(i,1)[0],a=(o(e),c.getChildren().find((function(e){return e.match({id:t})})));if(a)return a;var l=i.map((function(e){return{value:e,label:o(e).context}}));return a=r.makeChart({attributes:{id:t,contextScope:[e],roomId:n,composite:!0,chartLibrary:"groupBoxes",groupBy:["label"],groupByLabel:["k8s_namespace","k8s_pod_name"],aggregationMethod:"avg",eliminateZeroDimensions:!1,contextItems:l},makeTrack:Be}),c.appendChild(a),a}),[t,c]);return a.createElement(Ne.Z,{margin:[0,0,2],chart:l,"data-chartid":t,"data-track":l.track("container")})},pt=["id"],gt=function(e){var t=e.id,n=(0,I.Z)(e,pt);return a.createElement(we.d,{id:t,padding:[6,0,0]},a.createElement(xe.Y,{id:t}),a.createElement(Oe.f,{id:t,padding:[2,0,0]}),a.createElement(ft,(0,r.Z)({id:t},n)))},ht={k8s:(0,a.memo)(gt)},vt=function(e){if(ht[e.flavour])return ht[e.flavour];switch(e.level){case 0:return Qe;case 1:return mt;case 2:return lt;default:return null}},bt=function(e){var t=e.onChartNameChange,n=e.initialChartName,r=e.dashboardOptions,o=e.linkToGo,i=e.contextToGo,l=(0,Ee.Z)("addToDashboardModal"),s=(0,u.Z)(l,4),d=s[0],m=s[3],f=(0,ve.Z)({onChartNameChange:t,initialChartName:n,linkToGo:o,contextToGo:i}),p=f.setActiveMenuGroupId,g=f.setActiveSubMenuId;return a.createElement(c.v,null,a.createElement(be.Z,{onActiveMenuGroupId:p,onActiveSubMenuId:g,getComponent:vt,dashboardOptions:r,initialChartName:n}),d&&a.createElement(ye.Z,{onClose:m}))},yt=n(71181);function Et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var wt=(0,a.memo)((function(){var e=(0,ae.O0)(),t=(0,u.Z)(e,2),n=t[0],r=t[1],i=(0,Te.e)(),c=!!n&&!!i&&i.getNode({id:n.context}),l=function(){if(r(null),null!==n&&void 0!==n&&n.context&&c){var e=function(e){for(var t=1;tn.lastStatusChange&&" exceeds agent data retention settings"),a.createElement(v.Flex,{flex:!1},a.createElement(v.Icon,{name:"x",color:"bright",onClick:l,size:"small"}))))})),xt=wt;function Ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kt(e){for(var t=1;t0,noDataLabel:"No Data"},o.length>0&&o.map((function(e){return c.createElement(v.Z,{size:"small",key:e,name:e,testId:"sidebar-hostLabelsGroup-label"},r[e])})))}),Z=(n(38862),n(52428)),j=function(e){var t=e.node;return c.createElement(h.Z,{name:"Files"},c.createElement(s.Flex,{gap:1,padding:[0,1],alignItems:"center"},c.createElement(s.Box,{sx:{fontWeight:"500",letterSpacing:"1px"},as:s.Text,color:"textLite"},"{;}"),c.createElement(s.TextSmall,null,"View node info in"),c.createElement(s.Flex,{cursor:"pointer",gap:1,onClick:(0,Z.J)(JSON.stringify(t),{text:"JSON copied to clipboard"})},c.createElement(s.TextSmall,{color:"primary"},"json"),c.createElement(s.Icon,{color:"primary",size:"small",name:"copy"}))))},S=(0,c.memo)(j),P=function(e){var t,n=e.nodeIds,r=e.flavour,o=(0,d.tk)("sidebarNodeId",{defaultValue:n[0],flavour:"val",extraKey:r}),a=(0,g.iy)(o),i=(0,b.jo)(a.container,a.virtualization);return a.id?c.createElement(s.Flex,{column:!0,gap:1,overflow:{horizontal:"hidden",vertical:"auto"},padding:[2,1,2,0],width:"100%"},c.createElement(s.TextBig,{strong:!0},"Info"),c.createElement(s.Flex,{column:!0,padding:[2,0,3],border:{side:"bottom",color:"borderSecondary"}},false,c.createElement(s.TextSmall,{"data-testid":"sidebar-nodeInfoContent-hostname",strong:!0},"Hostname: ",a.name)),c.createElement(x,{node:a}),c.createElement(y,{node:a}),c.createElement(h.Z,{name:"System info"},c.createElement(v.Z,{size:"small",name:"Type",iconName:"virtualization",testId:"sidebar-nodeInfoContent-type"},c.createElement(s.Pill,{hollow:!0,icon:i.icon,iconSize:i.iconSize,flavour:"neutral"},i.label)),c.createElement(v.Z,{size:"small",name:"O/S version",iconName:"database",testId:"sidebar-nodeInfoContent-osVersions"},(0,b.cB)(a.os.nm,a.os.v,", ")),c.createElement(v.Z,{iconName:"viewSingleNode",name:"Architecture",size:"small",testId:"sidebar-nodeInfoContent-architecture"},(0,b.MC)(a.hw.architecture)),!(null===(t=a.os)||void 0===t||!t.kernel)&&c.createElement(v.Z,{size:"small",name:"Kernel",iconName:"metrics_explorer",testId:"sidebar-nodeInfoContent-kernel"},(0,b.cB)(a.os.kernel.nm,a.os.kernel.v,", ")),c.createElement(v.Z,{size:"small",name:"CPU",iconName:"cpu",testId:"sidebar-nodeInfoContent-cpu"},(0,b.ys)(a.hw.cpuFrequency)," (",(0,b.MC)(a.hw.cpus,1===a.hw.cpus?"Core":"Cores"),")"),c.createElement(v.Z,{size:"small",name:"Memory",iconName:"ram",testId:"sidebar-nodeInfoContent-ram"},(0,b.MC)((0,b.yo)(a.hw.memory),"RAM")),c.createElement(v.Z,{size:"small",name:"Hard disk size",iconName:"disk",testId:"sidebar-nodeInfoContent-disk"},(0,b.yo)(a.hw.diskSpace))),c.createElement(I,{node:a}),c.createElement(C,{node:a}),c.createElement(S,{node:a})):c.createElement(s.Text,null,"Select a node to see its' info")},N=n(82351),T=n(93433),D=(n(2707),n(77796)),M=n(12008),B=n(91008),F=(n(92222),n(89250)),A=n(12599),_=n(89405),L=n(50358),R=(0,u.default)(s.Flex).withConfig({displayName:"alert__AlertContainer",componentId:"sc-ndxwzg-0"})(["transition:opacity 0.3s ease-in-out;&:hover{& ","{opacity:0.7;}}"],s.Text),V={overview:"overview",k8s:"kubernetes",singleNode:"nodes/:nodeId"},z=function(e){var t=e.alert,n=e.onAlertClick,r=e.flavour,o=t.value,a=t.instance,i=t.lastStatusChange,l=t.id,u=t.status,d=t.units,m=t.name,f=t.summary,p=t.nodeId,h=(0,g.iy)(p,"name"),v=(0,_.rA)(),b=v.localeTimeString,y=v.localeDateString,E=(0,c.useMemo)((function(){var e=new Date(1e3*i);return isNaN(e.valueOf())?"":"".concat(y(e,{long:!1})," ").concat(b(e,{secs:!1}))}),[i,b,y]),w=(0,c.useCallback)((function(){n({alertId:l})}),[]),x=(0,F.UO)(),O=(0,F.s0)();return c.createElement(R,{column:!0,padding:[4,0],gap:1,border:{color:"border",side:"bottom"},"data-testid":"alertItem","data-test-name":"alertItem-".concat(m)},c.createElement(s.Flex,{column:!0},c.createElement(N.Z,{plain:!0,content:f,isBasic:!0},c.createElement(s.Text,{strong:!0,"data-testid":"alertItem-alertName"},m)),c.createElement(s.TextSmall,{wordBreak:"break-all","data-testid":"alertItem-chartId"},a," @ ",h)),c.createElement(s.Flex,{alignItems:"center",justifyContent:"between"},c.createElement(L.Z,{loaded:!0,status:u,units:d,value:o,flex:!1,"data-testid":"alertItem-alertValuePill"}),c.createElement(s.TextMicro,{color:"textLite","data-testid":"alertItem-alertDate"},E)),c.createElement(s.Flex,{gap:1},!!V[r]&&c.createElement(c.Fragment,null,c.createElement(B.Z,{Component:s.TextMicro,onClick:function(){O((0,A.Gn)("/spaces/:spaceSlug/rooms/:roomSlug/".concat(V[r]),x),{replace:!0,state:{alertId:l}})}},"Plot on chart"),c.createElement(s.TextMicro,{color:"textLite"},"\u2022")),c.createElement(B.Z,{Component:s.TextMicro,onClick:w},"Show info")))},K=n(61294),G=function(e,t){return e.status===t.status?0:"critical"===e.status?-1:1},H={nodesView:!0},U=function(e){var t=e.nodeIds,n=e.flavour,r=(0,d.D0)("sidebarNodeId",{flavour:"val",extraKey:n}),a=(0,o.Z)(r,2),i=a[0],l=a[1],u=(0,g.iy)(i),m=(0,D.rw)(i?[i]:t),f=(0,M.ER)(m),p=(0,c.useMemo)((function(){return(0,T.Z)(f).sort(G)}),[f]),h=(0,K.Z)(),v=(0,o.Z)(h,4),b=v[0],y=v[1],E=v[3],w=f.length?"(".concat(f.length,")"):"";return c.createElement(s.Flex,{width:"100%",column:!0,overflow:"hidden",padding:[2,0]},c.createElement(s.Flex,{column:!0,gap:5},c.createElement(s.Flex,{column:!0},c.createElement(N.Z,{content:"Currently Active alerts",align:"bottom"},c.createElement(s.TextBig,{strong:!0,"data-testid":"nodeAlertsView-activeAlerts-header"},"Alerts ",w)),!!H[n]&&c.createElement(s.TextMicro,null,"Showing ",u.id?c.createElement(s.TextMicro,{strong:!0},u.name):"room"," alerts"," ",!!u.id&&c.createElement(c.Fragment,null," ","-"," ",c.createElement(B.Z,{Component:s.TextMicro,onClick:function(){return l("")}},"Show all")))),!f.length&&c.createElement(s.Flex,{column:!0,gap:8,padding:[0,5],"data-testid":"nodesAlertsView-blankSlate",alignItems:"center"},c.createElement(s.Icon,{name:"checkmark",width:"90px",height:"90px"}),c.createElement(s.H4,{textAlign:"center"},1!==t.length?"No":"This node has no"," active alerts, you are all good!"))),c.createElement(s.Flex,{column:!0,overflow:{vertical:"auto"}},p.map((function(e){return c.createElement(z,{key:e.id,alert:e,onAlertClick:y,flavour:n})}))),b&&E)},W=(n(74916),n(15306),n(30181)),q=n(15394),Q=n(92432),J=n(6609),X=n(89479),Y=(n(85827),n(25387),n(72608),n(85993)),$=n(45335),ee=n(46189),te=n(46667),ne=n(74059),re=n(37518),oe=ee.Z.demoSlug,ae=ee.Z.demoFavourites,ie=(0,u.default)(s.Icon).attrs({size:"small",name:"chevron_left",color:"textLite"}).withConfig({displayName:"favourites__StyledChevron",componentId:"sc-mwcyj8-0"})(["transition:transform 0.2s ease-in-out;"]),ce={showChildren:!1},le=function(e){var t,n=e.onMenuGroupClick,r=e.onSubMenuClick,a=e.initialChartName,i=e.flavour,l=(0,ne.uk)(),u=(0,re.vf)(),d=oe===l&&ae[u]||[],m=(0,Y.UG)((t=d,function(e){return t.reduce((function(t,n){return e[n]?[].concat((0,T.Z)(t),[n]):t}),[])})),f=(0,q.Z)({onMenuGroupClick:n,onSubMenuClick:r}),p=f.onMenuGroupClick,g=f.onSubMenuClick,h=(0,te.Z)(!0),v=(0,o.Z)(h,2),b=v[0],y=v[1],E=(0,$.sm)();return(0,c.useEffect)((function(){E&&!a&&m.length&&n(m[0])}),[E,a]),m.length?c.createElement(s.Flex,{column:!0,gap:1,border:{side:"bottom",color:"borderSecondary"},padding:[0,0,2]},c.createElement(s.Flex,{onClick:y,cursor:"pointer",alignItems:"center",justifyContent:"between"},c.createElement(s.Flex,{gap:1,alignItems:"center"},c.createElement("i",{className:"fa-regular fa-star"}),c.createElement(s.Text,{strong:!0,color:"textFocus"},"Favourites")),c.createElement(ie,{rotate:b?1:3,alignSelf:"end"})),c.createElement(s.Collapsible,{open:b,padding:[0,0,0,2]},c.createElement(W.v,{menuGroupIds:m,onMenuGroupClick:p,onSubMenuClick:g,menuGroupProps:ce,extraKey:i}))):null},ue={nodesView:function(){return!0},default:X.pT},se=function(e){return(0,Q.L)("metric-sidebar","click-".concat(me(e)),"mn-overview")},de=function(e){var t=me(e);(0,Q.L)("metric-sidebar","click-".concat(t),"mn-overview",t)},me=function(e){return e.startsWith("Kubernetes")?"k8s":e.replace(/[^\w]/g,"-").toLowerCase()},fe=function(e){var t=e.initialChartName,n=e.loaded,r=e.hasSearch,o=void 0===r||r,a=e.flavour,i=(0,q.Z)({onMenuGroupClick:se,onSubMenuClick:de,loaded:n}),l=i.onMenuGroupClick,u=i.onSubMenuClick,d=ue[a]||ue.default;return c.createElement(c.Fragment,null,o&&c.createElement(s.Flex,{column:!0,position:"sticky",top:"0",gap:1},c.createElement(s.Text,{strong:!0},"Sections and Charts"),c.createElement(J.Z,null)),n&&c.createElement(c.Fragment,null,c.createElement(le,{onMenuGroupClick:l,onSubMenuClick:u,initialChartName:t,useItemsAreVisible:d,flavour:a}),c.createElement(W._,{position:"relative",onMenuGroupClick:l,onSubMenuClick:u,width:"100%",useItemsAreVisible:d,extraKey:a})))},pe=n(97193),ge=n(8144),he=["roomId","flavour"],ve=function(e){var t=e.roomId,n=e.flavour,o=(0,a.Z)(e,he),i=function(e){return(0,c.useMemo)((function(){return{Live:{head:{label:"Live nodes",textColor:"textLite",iconName:"connectivityStatusLive",hasAlerts:!0},node:{textColor:"text",showAlerts:!0}},Stale:{head:{label:"Stale nodes",textColor:"textLite",iconName:"connectivityStatusStale",hasAlerts:!0},node:{textColor:"text",showAlerts:!0}},Offline:{head:{label:"Offline nodes",textColor:"textLite",iconName:"connectivityStatusOffline",disabled:!0},node:{textColor:"textLite",disabled:!0}}}}),[e])}(n);return"singleNode"===n?null:c.createElement(ge.Z,(0,r.Z)({title:"Nodes",testIdPrefix:"nodes",baseKey:t,extraKey:n,param:"selectedIds"},o),c.createElement(pe.Z,{baseKey:t,extraKey:n,statusProps:i,background:"mainBackground",itemProps:{padding:[1,1,1,.5],maxLength:24},searchMargin:[0,0,2],height:{max:"300px"}}))},be=(n(69720),n(597)),ye=n(80239),Ee=n(46742);function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var xe=function(e){var t=e.extraKey,n=e.param,r=e.paramKey,a=(0,be.K)({extraKey:t,omit:[n],keepAll:!0}),l=(0,d.tk)(n,{extraKey:t,flavour:"arr"});return(0,c.useMemo)((function(){return Object.entries(a.reduce((function(e,t){return e[t[r]]=(e[t[r]]||0)+(t.hidden?0:1),e}),function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(t)?n?(0,T.Z)(new Set([].concat((0,T.Z)(e),(0,T.Z)(t)))):Ie()(e,t):n?[].concat((0,T.Z)(e),[t]):e.filter((function(e){return e!==t}))}))}),[y]),w=(0,c.useMemo)((function(){return function(e){var t=e.options,n=e.selected,r=e.itemsProps;if(!t.length)return[];var o=t.flatMap((function(e){return e.children.map((function(e){return e.value}))})),a=o.length===n.length,i=!a&&!!n.length;return[Se(Se({},r.head),{},{label:"Select all",value:o,selected:a,indeterminate:i})].concat((0,T.Z)(t.flatMap((function(e){var t=e.id,o=e.children,a=e.count,i=n.length&&!o.some((function(e){return!n.includes(e.value)})),c=!i&&n.length&&o.some((function(e){return n.includes(e.value)}));return o.reduce((function(e,t){var o=n.includes(t.value);return[].concat((0,T.Z)(e),[Se(Se(Se({},r.row),t),{},{selected:o})])}),[Se(Se({},r.head),{},{label:t,value:o.map((function(e){return e.value})),selected:i,indeterminate:c,count:a})])}))))}({options:g,selected:b,itemsProps:m})}),[b,y,g]);return g.length?c.createElement(ge.Z,{title:"Alert type & component",testIdPrefix:u,baseKey:t,extraKey:n,param:i},c.createElement(s.MenuDropdown,(0,r.Z)({hideShadow:!0,height:{max:"300px"},width:{max:"600px"},background:"mainBackground",overflow:"auto",padding:[0,0,3],"data-testid":"".concat(u,'-filter-selections"'),searchMargin:[0,0,2],items:w,onItemClick:E,value:b,"data-value":b.join(",")||"all-selected",hasSearch:g.length>5,itemProps:Se({testIdPrefix:u},f)},p))):null};Pe.defaultProps=Ee.ZP.defaultProps;var Ne=Pe,Te=["flavour"],De=(0,c.memo)((function(e){var t=e.flavour,n=(0,a.Z)(e,Te),o=(0,re.UL)();return c.createElement(s.Flex,(0,r.Z)({column:!0,overflow:{vertical:"auto"},padding:[0,0,30]},n),"alerts"===t&&c.createElement(c.Fragment,null,c.createElement(ke,{title:"Alert status",testIdPrefix:"alert-status",baseKey:o,extraKey:t,param:"alertStatuses",paramKey:"status"}),c.createElement(ke,{title:"Alert class",testIdPrefix:"alert-class",baseKey:o,extraKey:t,param:"alertClasses",paramKey:"class"}),c.createElement(Ne,{testIdPrefix:"alert-type-component",baseKey:o,extraKey:t,param:"alertTypeComponents"}),c.createElement(ke,{title:"Alert role",testIdPrefix:"alert-role",baseKey:o,extraKey:t,param:"alertRoles",paramKey:"recipient"})),c.createElement(ve,{roomId:o,flavour:t}))})),Me=["tabs","hiddenTabs","title","nodeIds"],Be=["iconName","Content","dataTestId","color","label"];function Fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ae(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{})},value:{id:"value",header:"#",accessorKey:"value",cell:function(e){var t=e.getValue;return l.createElement(u.TextSmall,{strong:!0},t())}},goToDashboard:{id:"goToDashboard",accessorKey:"value",header:"",cell:function(e){var t=e.cell,n=e.getValue,r=t.row.original.path,o=(0,y.s0)(),a=(0,l.useCallback)((function(){(0,b.L)("total-cust-dashboard","click-cust-dasbhoard","hm-page",n()),o("".concat(r,"/").concat(n()))}),[r,n()]);return l.createElement(P,{name:"goToNode",width:"14px",height:"14px",color:"textDescription",onClick:a})}},progressBar:function(e){return{id:"value",accessorKey:"value",header:e.header,cell:function(e){var t=e.cell,n=e.getValue,r=t.row.original,o=r.name,a=r.total,i=r.color,c=a?n()/a:0,s=(0,D.e)(c);return l.createElement(u.Flex,{column:!0,margin:[1,0,0,0]},o?l.createElement(u.Flex,{justifyContent:"between"},l.createElement(u.TextSmall,null,o),l.createElement(u.TextSmall,{strong:!0},n())):null,l.createElement(u.ProgressBar,{color:i,width:s}))}}}},F=[B.name("VM"),B.value],A=[B.name("Containers"),B.value],_=[B.name("Latest Updated",{maxLength:24}),B.goToDashboard],L=[B.progressBar({header:"OS",dataEntry:"nodesByOS"})],R=[B.progressBar({header:"Agent Version",dataEntry:"nodesByAgentVersion"})],V=(0,l.memo)((function(e){var t=e.data,n=e.schemaKey,o=e.testId,a=Object.values(t).reduce((function(e,t){return e+t}),0),i=Object.keys(t).map((function(e){return{name:e,value:t[e],total:a}})).sort((function(e,t){return t.value-e.value}));return l.createElement(u.Flex,{padding:[0,4],height:"100%","data-testid":"".concat(o,"-table-container"),overflow:"hidden"},l.createElement(T,{columns:r[n],data:i,layout:"progressBar"}))}),(function(e,t){return C()(e,t)}));function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;t2",color:["yellow","seaBuckthorn"]}},se=function(){return l.createElement(u.Flex,{column:!0,gap:1,alignItems:"center",width:"220px","data-testid":"nodesByDataReplication-information-text",overflow:"hidden"},l.createElement(u.TextMicro,{color:"white"},l.createElement(u.TextMicro,{color:"white",strong:!0},"Replication factor 1:")," ","The node's data are only on the node itself. Lose the node, lose the data!"),l.createElement(u.TextMicro,{color:"white"},l.createElement(u.TextMicro,{color:"white",strong:!0},"Replication factor 2:")," ","The node's metrics are replicated to one parent. The parent can trigger alerts for the child."),l.createElement(u.TextMicro,{color:"white"},l.createElement(u.TextMicro,{color:"white",strong:!0},"Replication factor ",">2",":")," ","Same as 2, but with the metrics replicated to more than one parent. Each parent in the hierarchy can trigger alerts for its children."),l.createElement(u.TextMicro,{color:"white",margin:[2,0]},"Aim to have most of your nodes with at least a factor of 2 and your critical ones with ",">2","."))},de=function(e){var t=(0,l.useMemo)((function(){var t=Object.keys(ue).reduce((function(t,n,r){var o,a=e[n]||0;return[].concat((0,h.Z)(t),[ie(ie({key:n},ue[n]),{},{value:a,sumValue:((null===(o=t[r-1])||void 0===o?void 0:o.sumValue)||0)+a})])}),[]);return[t,t[t.length-1].sumValue]}),[e]),n=(0,i.Z)(t,2),r=n[0],o=n[1];return l.createElement(u.Flex,{column:!0,margin:[6,0,0]},l.createElement(u.Flex,{margin:[0,0,2],gap:1},l.createElement(u.TextSmall,null,"Replication factor"),l.createElement(oe.Z,{isBasic:!0,plain:!0,content:se,align:"bottom"},l.createElement(u.Icon,{name:"information",color:"textDescription",size:"small"}))),l.createElement(u.Flex,{justifyContent:"between",margin:[0,0,1],"data-testid":"nodesByDataReplication-replications"},r.map((function(e){return l.createElement(me,{key:e.key,name:e.label,value:e.value,background:e.color})}))),l.createElement(u.ProgressBar,{background:"nodeBadgeBackground",value:r.map((function(e){return{width:(0,D.e)(e.value/o),color:e.color}}))}))},me=function(e){var t=e.name,n=e.value,r=void 0===n?"-":n,o=e.background,a=void 0===o?"text":o;return l.createElement(u.Flex,{alignItems:"center"},l.createElement(u.Flex,{width:"4px",height:"16px",background:a,round:3,margin:[0,1,0,0]}),l.createElement(u.TextSmall,{color:"textDescription",margin:[0,3,0,0]},t),l.createElement(ce,{color:"textDescription",strong:!0},r))},fe=function(e){var t=e.parentChild,n=e.replication;return l.createElement(u.Flex,{column:!0,margin:[4,4,1],"data-testid":"nodesByDataReplication-container"},l.createElement(le,t),l.createElement(de,n))},pe={dataReplication:function(){return(0,b.L)("nodes-data-replication","click-link-stream-replication","hm-page")}},ge=function(){var e=(0,m.A3)(),t=(0,y.s0)(),n=(0,E.yi)(),r=(0,w.Z)("manageWarRoom").handleOpenModal,o=(0,l.useCallback)((function(){return r("users")}),[]);return{claimedNodes:{props:{title:"Nodes",description:"Number of nodes claimed to Netdata in current room",basis:"calc(100%/12)",flex:{grow:"1",shrink:"0"},onClick:function(){return t("".concat(e,"/nodes"))},testId:"claimedNodes"},Component:O,selector:function(e){var t=e.nodes;return t?{count:t.offline+t.online+t.stale,updatedAt:t.updatedAt}:{count:"-"}}},nodesByStatus:{props:{title:"Nodes by status",description:"Breakdown of the nodes by their status in regards to Netdata",tooltip:l.createElement(u.Flex,{column:!0,width:{max:"200px"},gap:2},l.createElement(u.TextMicro,{color:"white"},l.createElement(u.TextMicro,{color:"white",strong:!0},"Live:")," ","Node is actual collecting and streaming metrics to Netdata"),l.createElement(u.TextMicro,{color:"white"},l.createElement(u.TextMicro,{color:"white",strong:!0},"Stale:")," ","Node is currently offline and not streaming metrics to Netdata. It can show historical data from a parent node"),l.createElement(u.TextMicro,{color:"white"},l.createElement(u.TextMicro,{color:"white",strong:!0},"Offline:")," ","Node is currently offline, not streaming metrics to Netdata and not available in any parent nodes"),l.createElement(u.TextMicro,{color:"white"},l.createElement(u.TextMicro,{color:"white",strong:!0},"Unseen:")," ","Nodes have never been connected to Netdata, they are claimed but no successful connection was established")),basis:"calc(100%/6)",flex:{grow:"2",shrink:"0"},testId:"nodesByStatus"},Component:ee,selector:function(n){var r=n.nodes,o=function(e){var t;return null!==(t=null===r||void 0===r?void 0:r[e])&&void 0!==t?t:"-"},a=function(){return t("".concat(e,"/nodes"))};return{chartData:[{title:"Live",value:o("online"),color:"live",onClick:a},{title:"Stale",value:o("stale"),color:"stale",onClick:a},{title:"Offline",value:o("offline"),color:"offline",onClick:a},{title:"Unseen",value:o("unseen"),color:"unseen",onClick:a}],hasData:!!r&&!r.error,updatedAt:null===r||void 0===r?void 0:r.updatedAt}}},nodesByML:{props:{title:"Nodes by ML",description:"Breakdown of the nodes in regards to our ML features",basis:"calc(100%/6)",flex:{grow:"2",shrink:"0"},onClick:function(){return t("".concat(e,"/anomalies"))},testId:"nodesByML"},Component:ee,selector:function(e){var t,n,r,o,a,i,c=e.nodes;return{chartData:[{title:"Enabled",value:null!==(t=null===c||void 0===c||null===(n=c.ml)||void 0===n?void 0:n.enabled)&&void 0!==t?t:"-",color:["blue","aquamarine"]},{title:"Disabled",value:null!==(r=null===c||void 0===c||null===(o=c.ml)||void 0===o?void 0:o.disabled)&&void 0!==r?r:"-",color:["yellow","yellow100"]},{title:"Not Capable",value:null!==(a=null===c||void 0===c||null===(i=c.ml)||void 0===i?void 0:i.notCapable)&&void 0!==a?a:"-",color:"placeholder"}],hasData:!!c&&!c.error,updatedAt:null===c||void 0===c?void 0:c.updatedAt}}},nodesByMachine:{props:{title:"Nodes over type of machine/technology",description:"Breakdown of the machines/technology where Netdata is running on",basis:"550px",flex:{grow:"5",shrink:"0"},testId:"nodesByMachine"},Component:re,selector:function(e){var t,n,r,o,a,i,c,l,u,s,d,m=e.nodes;return{data:{vm:null!==(t=null===m||void 0===m?void 0:m.vmTechnology)&&void 0!==t?t:{},docker:null!==(n=null===m||void 0===m?void 0:m.containerRuntime)&&void 0!==n?n:{},chartData:[{title:"Bare Metal",value:null!==(r=null===m||void 0===m||null===(o=m.type)||void 0===o?void 0:o.bareMetal)&&void 0!==r?r:"-",color:["blue","indigo"]},{title:"VM",value:null!==(a=null===m||void 0===m||null===(i=m.type)||void 0===i?void 0:i.virtualMachine)&&void 0!==a?a:"-",color:["blue","cyan"]},{title:"Container",value:null!==(c=null===m||void 0===m||null===(l=m.type)||void 0===l?void 0:l.container)&&void 0!==c?c:"-",color:["purple","lilac"]}].concat((0,h.Z)(null!==m&&void 0!==m&&null!==(u=m.type)&&void 0!==u&&u.unknown?[{title:"Unknown",value:null!==(s=null===m||void 0===m||null===(d=m.type)||void 0===d?void 0:d.unknown)&&void 0!==s?s:"-",color:"placeholder"}]:[])),hasData:!!m&&!m.error},updatedAt:null===m||void 0===m?void 0:m.updatedAt}}},nodesByDataReplication:{props:{title:"Nodes by data replication",description:l.createElement(l.Fragment,null,"Summary of your"," ",l.createElement(v.Z,{Component:u.TextMicro,href:"https://learn.netdata.cloud/docs/metrics-storage-management/enable-streaming",target:"_blank",onClick:pe.dataReplication},"streaming and replication")," ","status across your nodes"),basis:"calc(100%/6)",flex:{grow:"1",shrink:"0"},minWidth:"250px",testId:"nodesByDataReplication"},Component:fe,selector:function(e){var t=e.nodes;return t&&!t.error?{parentChild:{parent:t.parent,child:t.child},replication:t.replicationFactor,updatedAt:t.updatedAt}:{parentChild:{},replication:{}}}},nodesByOS:{props:{title:"Nodes by O/S version",description:"Breakdown of the nodes in regards to the O/S version they are running",basis:"430px",flex:{grow:"5",shrink:"0"},schemaKey:"OSTableSchema",dataGa:"node-os-version",testId:"nodesByOS"},Component:V,selector:function(e){var t=e.nodes;return t&&!t.error?{data:t.osVersion,updatedAt:t.updatedAt}:{data:{}}}},nodesByAgentVersion:{props:{title:"Nodes by Agent version",description:"Breakdown of the nodes in regards to the Agent version running on them",basis:"430px",flex:{grow:"5",shrink:"0"},schemaKey:"agentTableSchema",dataGa:"node-agent-version",testId:"nodesByAgentVersion"},Component:V,selector:function(e){var t=e.nodes;return t&&!t.error?{data:t.agentVersion,updatedAt:t.updatedAt}:{data:{}}}},activeAlerts:{props:{title:"Active Alerts",description:"Breakdown of the active alerts by status across all live nodes",basis:"calc(100%/6)",flex:{grow:"0",shrink:"0"},testId:"activeAlerts"},Component:ee,selector:function(e){var t=e.alarms;return t&&!t.error?{chartData:[{title:"Critical",value:t.critical,color:"errorText",onClick:function(){return n("critical")}},{title:"Warning",value:t.warning,color:"warningText",onClick:function(){return n("warning")}}],label:t.critical+t.warning,hasData:!!t&&!t.error&&t.critical+t.warning,updatedAt:t.updatedAt}:{chartData:[{title:"Critical",value:"-",color:"errorText",onClick:function(){return n("critical")}},{title:"Warning",value:"-",color:"warningText",onClick:function(){return n("warning")}}],hasData:!!t&&!t.error}}},usersByRole:{props:{title:"Users by role",description:"Breakdown of the users by their role",basis:"calc(100%/6)",flex:{grow:"0",shrink:"0"},onClick:function(){return o()},testId:"usersByRole"},Component:ee,selector:function(e){var t=e.spaceroom;return t&&!t.error?{chartData:[{title:"admin",value:t.admin,color:["green","green140"]},{title:"user",value:t.user,color:["purple","lilac"]}],label:t.admin+t.user,hasData:!!t&&!t.error,updatedAt:t.updatedAt}:{chartData:[{title:"admin",value:"-",color:["green","green140"]},{title:"user",value:"-",color:["purple","lilac"]}],hasData:!!t&&!t.error}}},totalDashboards:{props:{title:"Total Dashboards",description:"Number of the currently available custom dashboards in room",basis:"calc(100%/6)",flex:{grow:"0",shrink:"0"},testId:"totalDashboards"},Component:U,selector:function(e){var t=e.dashboards;return t&&!t.error?{count:t.dashboards,data:t.lastUpdated,updatedAt:t.updatedAt}:{count:"-",data:[]}}}}},he=function(e){var t=e.title,n=e.description,r=e.tooltip;return l.createElement(u.Flex,{column:!0,margin:[4,4,3],height:{min:12}},l.createElement(u.Flex,{gap:1,alignItems:"center"},l.createElement(u.Text,{color:"text","data-testid":"metrics-header-title"},t),r&&l.createElement(oe.Z,{isBasic:!0,plain:!0,content:r,align:"bottom"},l.createElement(u.Icon,{name:"information",color:"textDescription",size:"small"}))),l.createElement(u.TextMicro,{color:"textDescription","data-testid":"metrics-header-description"},n))},ve=(0,l.memo)(he),be=n(43337),ye=n(20709),Ee=function(e){var t=e.updatedAt,n=(0,l.useState)(),r=(0,i.Z)(n,2)[1],o=function(e){if(!e)return"";var t=new Date(e);return t.getTime()?(0,ye.Z)(t,new Date):""}(t);return(0,be.Z)((function(){return r(Math.random())}),6e4),l.createElement(u.Flex,{justifyContent:"end",margin:[2,4]},l.createElement(u.TextFemto,{color:"textLite","data-testid":"metrics-footer-last-updated"},"Last updated: ",o||"-"))},we=n(4822),xe=n(96929),Oe=n(36560),ke=n(20046),Ce=n(63346),Ie=["basis","title","flex","description","tooltip","minWidth","onClick","testId"];function Ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function je(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{}).polling,o=void 0===n||n,m=(0,a._8)((function(e){var n=e.set;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).data,o=void 0===e?[]:e;n((0,s.e)({id:t,key:"ids"}),o.map((function(e){return e.id}))),n((0,s.e)({id:t,key:"loaded"}),!0),n((0,s.e)({id:t,key:"updatedAt"}),(new Date).toISOString()),n((0,s.e)({id:t,key:"error"}),null),o.forEach((function(e){n((0,c.fp)({id:e.id}),(function(t){return f(f({},t),{},{loaded:!0},e)}))}));var a=o.reduce((function(e,t){var n=t.id,o=t.nodeId;return e[o]=[].concat((0,r.Z)(e[o]||[]),[n]),e}),{});n(u.in,a)}}),[e,t]),p=(0,a._8)((function(e){var n=e.set;return function(e){n((0,s.e)({id:t,key:"error"}),(0,d.Z)(e))}}));(0,i.Z)((function(){return{enabled:!!e&&!!t,polling:o,fetch:function(){return(0,l.sr)(e,t)},onFail:p,onReceive:m,force:!0}}),[e,t])}},40970:function(e,t,n){n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(29439),a=(n(47941),n(92222),n(67294)),i=n(44536),c=n(68035),l=n(89479),u=n(4822),s=n(25819),d=n(42448);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{},r=n.spaceId,m=n.autorun,p=void 0!==m&&m,g=(0,a.useState)(null),h=(0,o.Z)(g,2),v=h[0],b=h[1],y=(0,u.by)(),E=y.after,w=y.before,x=(0,a.useRef)();x.current={after:E<0?E:Math.floor(E/1e3),before:E<0?0:Math.ceil(w/1e3)};var O=function(e){if(e&&null!==e&&void 0!==e&&e.response){var t=e.response.data.errorMsgKey;b(t)}else b(e)},k=(0,a.useMemo)((function(){return(0,d.V)(v)?5e3:65e3}),[v]),C=(0,a.useRef)(),I=(0,l.w4)(e),Z=function(e){var t=e.results,n=e.versions;I((function(e){return f(f({},e),n)})),b((!t||!Object.keys(t).length)&&"No data for this period")},j=(0,l.qU)(e).contextsHardHash,S=(0,i.Z)(j);return(0,c.Z)((function(){return{cache:!1,key:"spaces.".concat(r,".rooms.").concat(e,".charts"),polling:!1,autorun:p||Boolean(r&&e),fetch:function(){return(0,s.Mn)(r,e,t,f({},x.current))},association:{getIds:function(){return(0,l.dA)({roomId:e,merge:C.current===t})},getError:function(){return(0,l.W2)({id:e,key:"error"})},getLoaded:function(){return(0,l.W2)({id:e,key:"loaded"})},getUpdatedAt:function(){return(0,l.W2)({id:e,key:"updatedAt"})}},getResource:function(t){return(0,l.PP)({id:e,key:t})},getResourcesInitializer:function(){var n=(0,l.Q7)({id:e,merge:C.current===t,nodeIds:t});return C.current=t,n},getResourceInitialState:function(e){return f({fullyLoaded:!0},e)},onFail:O,pollingOptions:{pollingInterval:k},onReceive:Z,after:E,nodeIds:t,force:!0}}),[r,e,t,k,!!S&&!!j&&S!==j,E,w]),v}},29748:function(e,t,n){var r=n(4942),o=(n(2707),n(41539),n(15581),n(2490),n(34514),n(54747),n(21249),n(57640),n(9924),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(49337),n(33321),n(69070),n(4480)),a=n(47133),i=n(18997),c=n(74059),l=n(37518),u=n(25819),s=n(5934);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{}).data,r=(void 0===e?{}:e).results;if(n((0,s.oq)({id:t,key:"loaded"}),!0),null!==r&&void 0!==r&&r.length){var o=r.sort((function(e,t){return e.name.localeCompare(t.name,void 0,{sensitivity:"accent"})}));o.forEach((function(e){return n((0,a.lz)(e.id),(function(t){return m(m({},t),{},{loaded:!0},e)}))}));var i=o.map((function(e){return e.id}));n((0,s.oq)({id:t,key:"ids"}),i)}}}));(0,i.Z)((function(){return{enabled:!!e&&!!t,fetch:function(){return(0,u.j2)(e,t)},onReceive:n}}),[e,t])}},39904:function(e,t,n){n(92222);var r=n(68035),o=n(274),a=n(34912),i=n(44197),c=n(1229),l=n(33335);t.Z=function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).polling,u=void 0===n||n,s=(0,l.gI)("room:ReadUsers");(0,r.Z)((function(){return{key:"spaces.".concat(e,".rooms.").concat(t,".members"),autorun:!!e&&!!t&&s,fetch:function(){return(0,o.fQ)(e,t)},polling:u,association:{getError:function(){return(0,c.Ci)({id:t,key:"error"})},getIds:function(){return(0,c.Ci)({id:t,key:"ids"})},getLoaded:function(){return(0,c.Ci)({id:t,key:"loaded"})},getUpdatedAt:function(){return(0,c.Ci)({id:t,key:"updatedAt"})}},sort:function(e,t){return e.name.localeCompare(t.name,void 0,{sensitivity:"accent"})},getResource:function(e){return(0,a.mX)({id:e})},getResourcesInitializer:function(){return a.Bb},getResourceInitialState:function(){return i.E},pollingOptions:{pollingInterval:18e4}}}),[e,t])}},29516:function(e,t,n){var r=n(18997),o=n(4480),a=n(48450),i=n(45781),c=n(95383),l=n(33335);t.Z=function(e){var t=(0,o._8)((function(t){var n=t.set;return function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).data.results;n((0,i.e)({id:e}),t)}})),n=(0,o._8)((function(t){var n=t.set;return function(t){return n((0,i.e)({id:e,key:"error"}),t)}})),u=(0,c.y3)(e,"loaded"),s=(0,l.gI)("alert:ReadAll");(0,r.Z)((function(){return{enabled:s&&!!e&&u,fetch:function(){return(0,a.Kp)(e)},onFail:n,onReceive:t,pollingOptions:{pollingInterval:15e4}}}),[e,!!u])}},29983:function(e,t,n){var r=n(4480),o=n(68035),a=n(274),i=n(34912),c=n(94666),l=n(1229),u=n(33335);t.Z=function(e){var t=(0,r._8)((function(t){var n=t.set;return function(t){var r=t.results;return n((0,c.J9)(e),r)}})),n=(0,u.gI)("user:ReadAll");(0,o.Z)((function(){return{key:"spaces.".concat(e,".members"),autorun:!!e&&n,fetch:function(){return(0,a.Q5)(e)},association:{getError:function(){return(0,l.Ci)({id:e,key:"error"})},getIds:function(){return(0,c.WA)({id:e,key:"ids"})},getLoaded:function(){return(0,c.WA)({id:e,key:"loaded"})},getUpdatedAt:function(){return(0,c.WA)({id:e,key:"updatedAt"})}},sort:function(e,t){return e.name.localeCompare(t.name,void 0,{sensitivity:"accent"})},getResource:function(e){return(0,i.mX)({id:e})},getResourcesInitializer:function(){return i.Bb},onReceive:t,pollingOptions:{pollingInterval:315e3}}}),[e])}},37682:function(e,t,n){var r=n(67294),o=n(6557),a=n.n(o),i=n(18446),c=n.n(i),l=n(44682);t.Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a(),n=(0,r.useRef)();return(0,l.Sz)(e,(function(e){var r=t(e);return c()(n.current,r)||(n.current=r),n.current}))}},69063:function(e,t,n){n(92222),n(74916),n(77601);var r=n(67294),o=n(89250),a=n(9058),i=n(24298),c=n(74059),l=n(37518);t.Z=function(){var e=(0,a.e)(),t=function(){var e=(0,c.uk)(),t=(0,l.vf)();return"/spaces/".concat(e,"/rooms/").concat(t,"/overview")}(),n=(0,o.s0)();(0,r.useEffect)((function(){if(e)return(0,i.unregister)(e.on("goToLink",(function(e,r){var o,a=location.pathname;return e&&e.getParent().getAttribute("roomId")&&(a=e.getParent().getId(),a=/^\/spaces/.test(a)?a:t),n(a,r?{state:{chartName:r},replace:!0}:{state:{contextToGo:null===e||void 0===e||null===(o=e.getAttribute("contextScope"))||void 0===o?void 0:o[0]},replace:!0})})))}),[e,t])}},9449:function(e,t,n){var r=n(67294),o=n(44682);t.Z=function(e){var t=(0,r.useRef)();return(0,o.Sz)(e,(function(e){return t.current=e,!1})),t}},18997:function(e,t,n){var r=n(29439),o=(n(41539),n(88674),n(17727),n(67294)),a=n(50308),i=n.n(a),c=n(9058),l=n(46189),u=n(29283),s=n(13477);t.Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=(0,c.e)(),a=(0,o.useMemo)((function(){return n?n.getRoot():null}),[n]),d=(0,o.useMemo)(e,t),m=(0,o.useRef)(!0),f=(0,o.useRef)({timeoutId:null,promise:null}),p=(0,u.Z)(),g=(0,r.Z)(p,2)[1],h=(0,o.useCallback)((function(e){m.current=!1;var t=d.fetch,n=d.onStart,r=void 0===n?i():n,o=d.onFail,c=void 0===o?i():o,u=d.onPollingFail,s=void 0===u?i():u,p=d.onReceive,h=void 0===p?i():p,v=d.onSettle,b=void 0===v?i():v,y=d.onBlurMode,E=void 0===y?i():y,w=d.polling,x=void 0===w||w,O=d.pollingOptions;r(e),f.current={timeoutId:null,promise:null};var k=function(){return f.current.promise=t(e),f.current.promise.then(h).catch((function(e){if(!e.isCancel)throw e})),f.current.promise},C=function e(){f.current.timeoutId=setTimeout((function(){if(null!==O&&void 0!==O&&O.shouldPause&&a&&(a.getAttribute("hovering")||a.getAttribute("paused"))||!g.current&&(!a||!a.getAttribute("autofetchOnWindowBlur")))return E(),e();k().then((function(){return!m.current&&x&&e()})).catch((function(t){t.isCancel||s(t),!m.current&&!t.isCancel&&x&&e()}))}),(null===O||void 0===O?void 0:O.pollingInterval)||l.Z.pollingInterval)};return k().then((function(){return!m.current&&x&&C()})).catch((function(e){e.isCancel||c(e),m.current||!x||e.isCancel||C()})).finally(b),function(){var e,t;m.current=!0,null===(e=f.current.promise)||void 0===e||null===(t=e.cancel)||void 0===t||t.call(e),clearTimeout(f.current.timeoutId)}}),t),v=(0,s.Iy)("isAnonymous");return(0,o.useEffect)((function(){var e=d.enabled,t=void 0===e||e,n=d.force,r=void 0!==n&&n,o=d.skip;if((!v||r)&&!(void 0!==o&&o))return t?h():void 0}),[h]),h.clearRef=f,h}},3975:function(e,t,n){n.d(t,{QF:function(){return l},vq:function(){return u}});var r=n(67294),o=n(89250),a=n(37518),i=n(74059),c=function(e,t,n){var o=t();(0,r.useLayoutEffect)((function(){o!==e&&n(e)}),[o,e])},l=function(){var e=(0,o.UO)().roomSlug,t=(0,a.TF)();return c(e,a.vf,t),e},u=function(){var e=(0,o.UO)().spaceSlug,t=(0,i.$v)();return c(e,i.uk,t),e};t.ZP=function(){return[u(),l()]}}}]); \ No newline at end of file -- cgit v1.2.3