diff options
Diffstat (limited to '')
-rw-r--r-- | src/web/gui/v2/9292.cc5055091db9a0826933.chunk.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/web/gui/v2/9292.cc5055091db9a0826933.chunk.js b/src/web/gui/v2/9292.cc5055091db9a0826933.chunk.js new file mode 100644 index 000000000..2c4b09179 --- /dev/null +++ b/src/web/gui/v2/9292.cc5055091db9a0826933.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]="9bf611d0-e74f-45a7-95ec-7650e01eea77",e._sentryDebugIdIdentifier="sentry-dbid-9bf611d0-e74f-45a7-95ec-7650e01eea77")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"30b1ba65cc8722be7e184f4a401fb43e6b21634d"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[9292],{82700:(e,t,n)=>{n.d(t,{Ay:()=>y,H5:()=>f,V$:()=>p,b1:()=>g});var a=n(58168),r=(n(17333),n(41393),n(14905),n(8159),n(98992),n(54520),n(81454),n(8872),n(37550),n(62953),n(96540)),l=n(63950),o=n.n(l),i=n(8711),s=n(27467),c=n(83199),d=n(54924),u=n(29217);const m=e=>e?e[0].toUpperCase()+e.slice(1):"Unknown",g=(0,i.default)(c.Flex).attrs((e=>({as:"li",role:"option",padding:[1,2],gap:1,justifyContent:"between",width:"100%",...e}))).withConfig({displayName:"checkboxes__ItemContainer",componentId:"sc-1vef46u-0"})(["cursor:",";opacity:",";align-items:",";"," ",""],(e=>{let{disabled:t}=e;return t?"default":"pointer"}),(e=>{let{stale:t,disabled:n,selected:a}=e;return!t&&!n||a?1:.6}),(e=>{let{alignItems:t}=e;return t||"center"}),(e=>{let{multi:t,selected:n,theme:a}=e;return!t&&n&&"\n background-color: ".concat((e=>{let{theme:t}=e;const{name:n}=t;return("Dark"===n?(0,c.getRgbColor)(["green","green20"]):(0,c.getRgbColor)(["green","green170"]))({theme:t})})({theme:a}),";\n ")}),(e=>{let{multi:t,selected:n,disabled:a,theme:r}=e;return!t&&!n&&!a&&"\n &:hover {\n background-color: ".concat((0,c.getColor)("secondaryHighlight")({theme:r}),";\n }\n ")})),p=(0,i.default)(c.MenuDropdown).attrs((e=>({background:"transparent",hideShadow:!0,height:{max:"300px"},width:{max:"600px"},overflow:"auto",...e}))).withConfig({displayName:"checkboxes__CheckboxesContainer",componentId:"sc-1vef46u-1"})([""]),h=e=>e,f={itemProps:{padding:[1,.5],multi:!0},itemsProps:{head:{textColor:"textLite"},row:{textColor:"text"}},Item:e=>{let{item:t,onItemClick:n,itemProps:l,...i}=e;const{value:s,disabled:p,onClick:h,label:f,selected:y,excluded:v,indeterminate:x,textColor:b,iconName:I,count:E,countLabel:C="results",actualCount:A,actualCountLabel:k,pill:w,info:S,level:P=0,stale:N,...F}=t,{capitalized:_}=l,{multi:K}=l,M=p||!K&&y,L=e=>{p||(h&&h(e),n({value:s,label:f,checked:!y,item:t}))};return r.createElement(g,(0,a.A)({"aria-selected":y,selected:y,disabled:M,stale:0===E||"0"===E||N||v},F,i,l,{"data-testid":"".concat(l.testIdPrefix,"-filters-item")}),r.createElement(c.Flex,{gap:2,alignItems:"center",padding:[0,0,0,4*P],width:"100%",overflow:"hidden"},K?r.createElement(c.Checkbox,{"data-testid":"".concat(l.testIdPrefix,"-filters-checkbox-").concat(f),checked:y,disabled:M,indeterminate:x,onChange:L,label:r.createElement(c.Flex,{gap:1,alignItems:"center",width:"100%"},I&&r.createElement(c.Icon,{name:I,size:"small",color:"textLite"}),r.createElement(d.default,{Component:c.TextSmall,text:"string"===typeof f&&_?m(f):f.toString(),color:b}))}):r.createElement(c.Flex,{flex:!0,gap:1,padding:[0,1],alignItems:"center",onClick:y?o():L,"data-testid":"".concat(l.testIdPrefix,"-filters-item-").concat(f)},r.createElement(d.default,{Component:c.TextSmall,text:"string"===typeof f&&_?m(f):f.toString(),color:b}))),(!isNaN(E)||/%/.test(E||"")||w)&&r.createElement(u.A,{align:"top",content:S||(A?"".concat(A," ").concat(k," aggregated in ").concat(E," ").concat(C):"".concat(E," ").concat(C))},r.createElement(c.Pill,{flavour:"neutral",hollow:!0,"data-testid":"".concat(l.testIdPrefix,"-filters-").concat(f,"-count"),size:"small"},!!A&&r.createElement(c.TextSmall,null,A," \u2283\xa0"),(w||E).toString())))},getValue:h,getLabel:h},y=(0,r.memo)((e=>{let{baseKey:t,extraKey:n,paramFlavour:l="arr",param:o,Item:i=f.Item,testIdPrefix:c,collection:d,getValue:u=f.getValue,getLabel:m=f.getLabel,itemsProps:g=f.itemsProps,itemProps:h=f.itemProps,capitalized:y=!0,multi:v=!0,merge:x=!1,...b}=e;const[I,E]=(0,s.N9)(o,{defaultValue:[],key:t,extraKey:n,flavour:l,merge:x});(0,r.useEffect)((()=>{if(!d.length||!I.length)return;const e=I.filter((e=>d.some((t=>u(t)===e))));e.length!==I.length&&E(e)}),[d.length,E]);const C=(0,r.useCallback)((e=>{let{value:t,checked:n}=e;E(v?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(t)?n?t:[]:n?[...e,t]:e.filter((e=>e!==t))}:()=>n?[t]:[])}),[E]),A=(0,r.useMemo)((()=>(e=>{let{collection:t,selected:n,getValue:a,getLabel:r,itemsProps:l,multi:o}=e;if(!t.length)return[];const i=o&&t.length<=n.length,s=o&&!i&&!!n.length;return t.reduce(((e,t)=>{const o=n.includes(a(t));return[...e,{...l.row,...t,value:a(t),label:r(t),selected:o}]}),o?[{...l.head,label:"Select all",value:t.map(a),selected:i,indeterminate:s}]:[])})({collection:d,selected:I,getValue:u,getLabel:m,itemsProps:g,multi:v})),[I,d]);return r.createElement(p,(0,a.A)({"data-testid":"".concat(c,"-filter-selections"),items:A,Item:i,onItemClick:C,value:I,"data-value":I.join(",")||"all-selected",hasSearch:d.length>5,searchMargin:[0,0,1],itemProps:{...h,testIdPrefix:c,capitalized:y,multi:v}},b))}),((e,t)=>e.baseKey===t.baseKey&&e.extraKey===t.extraKey&&e.multi===t.multi&&e.collection===t.collection))},59846:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(58168),r=(n(62953),n(96540)),l=n(83199),o=n(27467),i=n(87659),s=n(29217);const c=e=>{let{margin:t,title:n,testIdPrefix:c,baseKey:d,extraKey:u,param:m,paramFlavour:g="arr",children:p,multi:h=!0,defaultIsOpen:f=!0,border:y={side:"bottom",color:"borderSecondary"},required:v=!1,configElements:x,showCounter:b=!0,help:I,collapsible:E=!0,merge:C=!1,...A}=e;const[k,w]=(0,o.N9)(m,{key:d,extraKey:u,flavour:g,merge:C}),[S,P]=(0,i.A)(f||!(null===k||void 0===k||!k.length));return r.createElement(l.Flex,(0,a.A)({"data-testid":"".concat(c,"-filter"),column:!0,padding:[2,0,0],border:y},A),r.createElement(l.Flex,{justifyContent:"between",margin:!E||S?t:[0],gap:2,onClick:E?P:void 0,cursor:"pointer"},r.createElement(l.Flex,{alignItems:"center",gap:2,height:4.5},r.createElement(l.Flex,{gap:2},v&&!(null!==k&&void 0!==k&&k.length)&&r.createElement(l.Icon,{color:"error",name:"error",size:"small"}),r.createElement(l.Flex,{alignItems:"center",gap:.5},r.createElement(l.TextSmall,{strong:!0},n),!!I&&r.createElement(s.A,{align:"top",content:I},r.createElement(l.Flex,null,r.createElement(l.Icon,{name:"question",color:"textLite",width:"12px",height:"12px"})))),b&&!(null===k||void 0===k||!k.length)&&r.createElement(l.Pill,{flavour:"neutral",hollow:!0,"data-testid":"".concat(c,"-selected-count"),tiny:!0},null===k||void 0===k?void 0:k.length)),!v&&h&&!(null===k||void 0===k||!k.length)&&r.createElement(l.Button,{padding:[0],flavour:"borderless",onClick:e=>{e.stopPropagation(),w([])},"data-testid":"".concat(c,"-filter-resetAll"),label:"Reset",small:!0})),r.createElement(l.Flex,{gap:1,alignItems:"center"},"function"===typeof x?x({isOpen:S,collapsible:E}):x,E&&r.createElement(l.Icon,{name:"chevron_left",size:"small",color:"textLite",rotate:S?1:3}))),r.createElement(l.Collapsible,{open:!E||S,height:"100%"},p))}},42828:(e,t,n)=>{n.d(t,{Ay:()=>T,Ii:()=>A});var a=n(58168),r=(n(17333),n(14905),n(8159),n(98992),n(54520),n(8872),n(37550),n(25509),n(65223),n(60321),n(41927),n(11632),n(64377),n(66771),n(12516),n(68931),n(52514),n(35694),n(52774),n(49536),n(21926),n(94483),n(16215),n(62953),n(96540)),l=n(83199),o=n(66245),i=n.n(o),s=n(89935),c=n.n(s),d=n(84976),u=n(47762),m=n(11128),g=n(69418),p=n(54924),h=n(4659),f=n(88494),y=n(37019),v=n(82700),x=n(73865),b=n(47130);const I=(0,b.A)(p.default),E=(0,b.A)(l.Flex),C="By selecting a parent node, you apply your changes to all it's children nodes too.",A={Live:{head:{label:"Live nodes",textColor:"textLite",iconName:"connectivityStatusLive",hasML:!1,hasParentNode:!0,hasAlerts:!0,hasFn:!1},node:{textColor:"textFocus",showAlerts:!0,showMl:!1,showFn:!1,showParentNode:!0}},Stale:{head:{label:"Stale nodes",textColor:"textLite",iconName:"connectivityStatusStale"},node:{textColor:"textFocus"}},Offline:{head:{label:"Offline nodes",textColor:"textLite",iconName:"connectivityStatusOffline"},node:{textColor:"textLite"}}},k=e=>{let{toggle:t,expanded:n}=e;return r.createElement(l.Flex,{cursor:"pointer",role:"button",padding:[.5],gap:.5,onClick:e=>{e.preventDefault(),e.stopPropagation(),t(),setTimeout((()=>e.target.scrollIntoView({behavior:"smooth",block:"nearest"})))}},r.createElement(l.TextNano,{color:"textLite"},n?"Collapse":"Expand"),r.createElement(l.Icon,{name:"chevron_down",width:"10px",height:"10px",color:"textLite",rotate:n?2:null}))},w=(S=e=>{let{iconName:t,label:n,textColor:a,value:o,nodePath:i,nodeId:s,onAnchorClick:c,isParentNode:u,showParentNode:m,onToggleHidden:g,itemsHidden:p,status:f}=e;return r.createElement(l.Flex,{gap:2,alignItems:"center"},t&&r.createElement(l.Icon,{name:t,size:"small",color:"textLite"}),r.createElement(I,{Component:l.TextSmall,text:n,color:a,truncate:!0,tooltip:m&&u?C:null}),"Offline"!==f&&!Array.isArray(o)&&r.createElement(h.A,{as:d.N_,to:i,state:{nodeId:s},"data-testid":"filterNodes-item-gta",color:"textLite",hoverColor:"text",onClick:c},r.createElement(l.Icon,{name:"nav_arrow_goto",height:"10px",width:"10px"})),!!g&&r.createElement(k,{toggle:g,expanded:!p}))},e=>{let{limitationsApplied:t,...n}=e;return t&&Array.isArray(n.value)?r.createElement(S,n):r.createElement(l.Checkbox,{"data-testid":"filterNodes-checkbox-".concat(n.label),checked:n.selected,disabled:n.isDisabled,indeterminate:n.indeterminate,onChange:n.onSelect,label:r.createElement(S,n)})});var S;const P=e=>{let{item:{value:t,disabled:n,onClick:o,label:i,nodeId:s,selected:m,excluded:b,stale:I,status:A,indeterminate:S,textColor:P,iconName:N,hasAlerts:F,hasML:_,hasParentNode:K,hasFn:M,showAlerts:L,showMl:T,showParentNode:D,showFn:B,requireML:q,requireFn:V,capabilities:O,count:z,multi:H=!0,checkIsDisabled:W=c(),onToggleHidden:j,itemsHidden:G,isParent:R,isParentNode:U,hasExtraInfo:Q,flavour:Z,...Y},onItemClick:$,itemProps:J,close:X,...ee}=e;const[,,te]=(0,g.A)(),ne=(0,u.Zl)(s),{hasLimitations:ae,preferredNodes:re,maxNodes:le}=(0,x.A)(),oe=(0,r.useMemo)((()=>{var e;return!B||!O||(null===(e=O.funcs)||void 0===e?void 0:e.enabled)}),[B]),ie=(0,r.useMemo)((()=>{var e;return!B||!O||(null===(e=O.ml)||void 0===e?void 0:e.enabled)}),[B]),se=ae&&!re.includes(s),ce=!Array.isArray(t)&&se&&te>le,de=n||ce||q&&!ie||V&&!oe||!H&&m||W(s),ue=e=>{de||(o&&o(e),$({value:t,checked:!m,status:A}))},me=e=>{e.stopPropagation(),null===X||void 0===X||X()},ge=b||I,pe={status:A,limitationsApplied:se,iconName:N,isDisabled:de,indeterminate:S,label:i,textColor:P,value:t,nodePath:ne,nodeId:s,onAnchorClick:me,onSelect:ue,isStale:ge,excluded:b,selected:m,isParent:R,isParentNode:U,showParentNode:D,itemProps:J,onToggleHidden:j,itemsHidden:G,flavour:Z};return r.createElement(v.b1,(0,a.A)({"aria-selected":m,selected:m,disabled:de,stale:ge||0===z||"0"===z},Y,ee,J,{"data-testid":"filterNodes-item-".concat(i),multi:H}),r.createElement(l.Flex,(0,a.A)({gap:2,alignItems:"center",flex:!0},R?{}:{padding:[0,0,0,1.5]}),H?r.createElement(w,(0,a.A)({},pe,ce?{iconName:"padlock"}:{})):r.createElement(l.Flex,{gap:1,padding:[0,1],alignItems:"center",onClick:ue,"data-testid":"filterNodes-item-".concat(i),flex:!0},r.createElement(p.default,{Component:l.TextSmall,text:i,color:P}),"Offline"!==A&&!Array.isArray(t)&&r.createElement(h.A,{as:d.N_,to:ne,state:{nodeId:s},"data-testid":"filterNodes-item-gta",color:"textLite",hoverColor:"text",onClick:me},r.createElement(l.Icon,{name:"nav_arrow_goto",height:"10px",width:"10px"})),!!j&&r.createElement(k,{toggle:j,expanded:!G}))),Q&&r.createElement(l.Flex,{gap:1},L&&r.createElement(l.Flex,{gap:1,justifyContent:"center",width:17},r.createElement(y.A,{id:t,isLive:!0,name:i})),T&&r.createElement(l.Flex,{gap:1,justifyContent:"center",width:10},r.createElement(f.A,{badge:"ml","data-testid":"nodes-indicator-machine-learning",enabled:ie,name:i})),D&&r.createElement(E,{gap:1,justifyContent:"center",width:14,tooltip:U?C:null},U?r.createElement(l.Icon,{name:"check",color:"primary"}):null),B&&r.createElement(l.Flex,{gap:1,justifyContent:"center",width:10},r.createElement(f.A,{badge:"fn","data-testid":"nodes-indicator-fn",enabled:oe,name:i})),F&&r.createElement(l.Flex,{gap:1,justifyContent:"center",width:17},r.createElement(l.Icon,{name:"alarm",size:"small",color:"textLite"}),r.createElement(l.TextSmall,{strong:!0,color:"textLite"},"Alerts")),_&&r.createElement(l.Flex,{gap:1,justifyContent:"center",width:10},r.createElement(l.Icon,{name:"anomaliesLens",size:"small",color:"textLite"}),r.createElement(l.TextSmall,{strong:!0,color:"textLite"},"ML")),K&&r.createElement(l.Flex,{gap:1,justifyContent:"center",width:14},r.createElement(l.TextSmall,{strong:!0,color:"textLite"},"Parent")),M&&r.createElement(l.Flex,{gap:1,justifyContent:"center",width:10},r.createElement(l.Icon,{name:"functions",size:"small",color:"textLite"}),r.createElement(l.TextSmall,{strong:!0,color:"textLite"},"Fn")),!isNaN(z)&&r.createElement(l.Pill,{flavour:"neutral",hollow:!0,"data-testid":"".concat(J.testIdPrefix,"-filters-").concat(i,"-count"),size:"small"},z.toString())))},N=["dyncfg"],F=e=>{let{ids:t,status:n,selectedIds:a,excludedIds:r,filteredIds:l,nodesById:o,statusProps:i,multi:s=!0,nodeCounts:c,checkIsDisabled:d,setHidden:u,hidden:m,extraKey:g,flavour:p}=e;if(!t.length)return[];const h=s&&!t.some((e=>!a.includes(e))),f=s&&a.length&&!h&&t.some((e=>a.includes(e))),y=s&&!t.some((e=>!r.includes(e))),v=s&&r.length&&!y&&t.some((e=>r.includes(e))),x=!g||N.includes(g);return t.reduce(((e,t)=>{var u;if(m[n])return e;const{name:g,capabilities:h,labels:f,ni:y}=o[t];if("dyncfg"==p&&(null===h||void 0===h||null===(u=h.dyncfg)||void 0===u||!u.enabled))return e;const v=a.includes(t),b=!!r.length&&r.includes(t),I=s&&!l.includes(t)&&("dyncfg"==p||!!l.length),E=0==y||"true"==(null===f||void 0===f?void 0:f._is_parent);return[...e,{value:t,label:g,nodeId:t,selected:v,excluded:b,stale:I,status:n,capabilities:h,...i[n].node,multi:s,checkIsDisabled:d,count:c?c[t]||0:NaN,hasExtraInfo:x,isParentNode:E,flavour:p}]}),[{value:t,selected:h,indeterminate:f,disabled:!s,status:n,...i[n].head,multi:s,onToggleHidden:()=>u((e=>({...e,[n]:!m[n]}))),itemsHidden:m[n],excluded:y,someExcluded:v,isParent:!0,hasExtraInfo:x}])},_=e=>e,K=(e,t)=>e.isParentNode&&!t.isParentNode?-1:t.isParentNode&&!e.isParentNode?1:0,M=e=>{const t=e.filter((e=>e.isParent)),n=e.filter((e=>!e.isParent)).sort(K);return t.length>0?[t[0],...n]:n},L=e=>{let{baseKey:t,extraKey:n,statusProps:l=A,multi:o=!0,useFilteredIds:s=_,nodeCounts:c,checkIsDisabled:d,flavour:g,...p}=e;const[h,f]=(0,r.useState)((()=>({Stale:!0,Offline:!0}))),y=(0,m.w7)({extraKey:n,omit:"selectedNodeIds",merge:!0,emptyIfAll:!1}),x=(0,m.w7)({extraKey:n,merge:!1}),[b,I]=(0,m.Oj)({key:t,extraKey:n,merge:!1}),[E,C]=(0,m.PF)({key:t,extraKey:n,merge:!1}),k=s(y),w=(0,u.BU)(n?k:void 0),S=(0,u.Ig)(n?k:void 0),N=(0,u.GE)(n?k:void 0),K=(0,r.useCallback)((e=>{let{value:t,checked:n,excluded:a}=e;if("undefined"!==typeof a){if(!o)return void C((()=>n?[t]:[]));C((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(t)?n?[...new Set([...e,...t])]:i()(e,t):n?[...e,t]:e.filter((e=>e!==t))}))}I(o?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(t)?n?[...new Set([...e,...t])]:i()(e,t):n?[...e,t]:e.filter((e=>e!==t))}:()=>n?[t]:[])}),[b,I]),L=(0,u.ss)(),T=(0,r.useMemo)((()=>{const e=F({ids:w,status:"Live",selectedIds:b,excludedIds:E,filteredIds:x,nodesById:L,statusProps:l,multi:o,nodeCounts:c,checkIsDisabled:d,setHidden:f,hidden:h,extraKey:n,flavour:g}),t=F({ids:S,status:"Stale",selectedIds:b,excludedIds:E,filteredIds:x,nodesById:L,statusProps:l,multi:o,nodeCounts:c,checkIsDisabled:d,setHidden:f,hidden:h,extraKey:n,flavour:g}),a=F({ids:N,status:"Offline",selectedIds:b,excludedIds:E,filteredIds:x,nodesById:L,statusProps:l,multi:o,nodeCounts:c,checkIsDisabled:d,setHidden:f,hidden:h,extraKey:n,flavour:g});return"dyncfg"==g?M(e):M(e).concat(t,a)}),[b,E.length,k.length,x.length,c,d,h,g]);return r.createElement(v.V$,(0,a.A)({"data-testid":"filterNodes-drop",items:T,Item:P,onItemClick:K,value:b,"data-value":b.join(",")||"all-nodes",hasSearch:!0},p))},T=(0,r.memo)(L,((e,t)=>e.baseKey===t.baseKey&&e.extraKey===t.extraKey&&e.statusProps===t.statusProps&&e.multi===t.multi&&e.nodeCounts===t.nodeCounts&&e.useFilteredIds===t.useFilteredIds&&e.checkIsDisabled===t.checkIsDisabled))},93615:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(58168),r=n(96540),l=n(83199),o=n(64473);const i=e=>{let{onToggle:t,icon:n="node_hollow",isOpen:i,title:s,...c}=e;return r.createElement(o.A,(0,a.A)({dataTestId:"collapsed-header",iconClose:i?"arrow_w_line_right":"arrow_w_line_left",onClick:t},c),i&&r.createElement(l.Flex,{gap:2,alignItems:"center","data-testid":"sidebar-nodeName"},r.createElement(l.Icon,{name:n,color:"text",size:"small"}),r.createElement(l.TextSmall,{strong:!0},s)))},s=(0,r.memo)(i)},30577:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(58168),r=(n(41393),n(81454),n(96540)),l=n(83199);const o=e=>{let{iconName:t,label:n,onClick:o,containerStyles:i,textStyles:s}=e;return r.createElement(l.Flex,(0,a.A)({"data-testid":"sidebar-icon-item"},i,{column:!0,margin:[2,0],alignItems:"center"}),r.createElement(l.Flex,{"data-testid":"sidebar-icon-item-wrapper",margin:[0,0,.5,0],alignItems:"center",onClick:o,cursor:"pointer"},r.createElement(l.Icon,{name:t,color:"textLite",width:"18px",height:"18px"})),r.createElement(l.TextMicro,(0,a.A)({color:"text"},s),n))},i=e=>{let{onClickTab:t,availableTabs:n,tabsToShow:i,...s}=e;return r.createElement(l.Flex,(0,a.A)({"data-testid":"collapsed-sidebar",column:!0,justifyContent:"center"},s),i.map(((e,a)=>{const{iconName:l,label:i}=n[e];return r.createElement(o,{containerStyles:{border:{size:"2px",type:"solid",color:"mainBackground",side:"left"}},textStyles:{color:"textLite"},key:l,onClick:()=>t(a),iconName:l,label:i})})))},s=(0,r.memo)(i)},12352:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(58168),r=n(96540),l=n(83199);const o=e=>{let{children:t,iconName:n,name:o,size:i,testId:s="entry-line-text-container",...c}=e;const d="small"===i?l.TextSmall:l.Text,u="undefined"!==typeof t&&null!==t;return r.createElement(l.Flex,{alignItems:"start","data-testid":"entry-line"},n&&r.createElement(l.Flex,{"data-testid":"entry-line-icon-container",padding:[0,1,0,0]},r.createElement(l.Icon,{color:"textLite","data-testid":"entry-line-icon",name:n,width:"16px",height:"16px"})),r.createElement(l.Flex,(0,a.A)({column:!0,alignItems:"start","data-testid":s,gap:.5},c),r.createElement(d,{"data-testid":"entry-line-text-label",whiteSpace:"nowrap",color:"textDescription"},o,u&&": "),u&&r.createElement(l.TextSmall,{color:"textDescription","data-testid":"entry-line-text-value",strong:!0},t)))}},50065:(e,t,n)=>{n.d(t,{A:()=>g});var a=n(58168),r=(n(62953),n(8711)),l=n(96540),o=n(83199),i=n(87659),s=n(29217);const c=(0,r.default)(o.Icon).withConfig({displayName:"group__IconLink",componentId:"sc-9459pv-0"})(["&:hover{fill:",";}"],(0,o.getColor)("textDescription")),d=e=>e.stopPropagation(),u=e=>{let{children:t,isEnabled:n,link:a,onClick:r,open:i}=e;return l.createElement(o.Flex,{alignItems:"center",justifyContent:"between",height:8,onClick:n?r:null,cursor:n?"pointer":"default"},l.createElement(o.Flex,{gap:2,alignItems:"center"},l.createElement(o.TextSmall,{strong:!0},t),a&&l.createElement(o.Flex,{as:"a",href:a,target:"_blank",onClick:d},l.createElement(c,{height:"13px",width:"13px",name:"documentation",size:"small",color:"placeholder"}))),n&&l.createElement(o.Icon,{name:"chevron_left",size:"small",color:"textLite",rotate:i?1:3}))},m=(0,r.default)(o.Flex).withConfig({displayName:"group__StyledFlex",componentId:"sc-9459pv-1"})(["&:last-child{border:none;}"]),g=e=>{let{children:t,isEnabled:n=!0,link:r,name:c,noDataLabel:d,...g}=e;const[p,h]=(0,i.A)(!0),f=n?null:d;return l.createElement(s.A,{content:f,isBasic:!0},l.createElement(m,(0,a.A)({column:!0,border:{side:"bottom",color:"borderSecondary"},padding:[1,0,p?2:1],isEnabled:n},g),l.createElement(u,{isEnabled:n,open:p,onClick:h,link:r},c),l.createElement(o.Collapsible,{column:!0,open:p,gap:1},t)))}},64473:(e,t,n)=>{n.d(t,{A:()=>i});var a=n(58168),r=n(96540),l=n(83199),o=n(29217);const i=e=>{let{children:t,onClick:n,iconClose:i="x",icon:s,dataTestId:c,title:d,help:u,...m}=e;return r.createElement(l.Flex,(0,a.A)({"data-testid":c,height:12,alignItems:"center",justifyContent:"between",border:{side:"bottom",color:"borderSecondary"},padding:[0,2],flex:!1},m),d?r.createElement(l.Flex,{gap:2,alignItems:"center","data-testid":"sidebar-nodeName"},r.createElement(l.Icon,{name:s,color:"text",size:"small"}),r.createElement(l.TextSmall,{strong:!0},d),!!u&&r.createElement(o.A,{align:"top",content:u},r.createElement(l.Flex,null,r.createElement(l.Icon,{name:"question",color:"textLite",width:"12px",height:"12px"})))):t,r.createElement(l.Icon,{"data-testid":"sidebarHeader-icon",name:i,color:"textLite",onClick:n,cursor:"pointer"}))}},81638:(e,t,n)=>{n.d(t,{Ay:()=>o});var a=n(58168),r=n(96540),l=n(83199);const o=(0,r.memo)((e=>{let{children:t,collapsedComponent:n,isOpen:o,header:i,width:s=90,...c}=e;const d=!!n;return r.createElement(l.Collapsible,(0,a.A)({open:o,column:!0,closedValue:d?48:0,persist:d,direction:"horizontal",border:{side:"left",color:"borderSecondary"},width:s,flex:!0,basis:s},c),(e=>r.createElement(r.Fragment,null,i,e?t:n)))}))},92136:(e,t,n)=>{n.d(t,{A:()=>P});var a=n(58168),r=(n(62953),n(96540)),l=n(67602),o=n(83199),i=n(64118),s=n(15327),c=n(74618),d=n(40267),u=n(5871),m=n(28738),g=n(11164),p=n(52768);const h=(0,r.memo)((e=>{let{id:t}=e;const{fullyLoaded:n,nodeId:a,instance:l,lastStatusChangeValue:o,lastStatusChange:s,units:c,context:d,value:u,lastUpdated:m,status:h}=(0,i.JL)(t),f=(0,p.J4)(u,c),y=(0,p.J4)(o,c);return r.createElement(g.A,{instance:l,context:d,formattedLastValue:f,formattedLastStatusChangeValue:y,lastStatusChange:s,lastUpdated:m,isFormattedValueLoaded:"clear"===h||n,nodeId:a,status:h,testid:"alertDetailsModal"})}));n(9391);var f=n(3914),y=n(69765),v=n(47767),x=n(50876);const b=e=>{let{alertId:t,testid:n}=e;const a=(0,f.bq)(),l=(0,y.QW)(),i="/spaces/".concat(a,"/rooms/").concat(l,"/alerts/").concat(t),s=(0,v.Zp)(),{sendButtonClickedLog:c,isReady:d}=(0,x.A)(),u=(0,r.useCallback)((e=>{e.preventDefault(),c({dataGa:"".concat(n,"::view-alert-button")}).finally((()=>{s(i)}))}),[s,i,d]);return r.createElement(o.Button,{as:"a","data-testid":"".concat(n,"-view-alert-button"),"data-ga":"".concat(n,"::view-alert-button"),href:i,onClick:u,label:"View alert page",width:"224px"})};var I=n(43407),E=n(7660),C=n(4974),A=n(85686),k=n(73865),w=n(63314);const S=e=>{let{alertId:t,onClose:n}=e;const{isNodeRestricted:a}=(0,k.A)(),{name:l="unknown alert",status:g,fullyLoaded:p,info:f,nodeId:y}=(0,i.JL)(t);(0,i.yk)(t);const v=y&&a(y);return r.createElement(w.Ay,{mode:"AlertDetailsModal"},r.createElement(s.GO,{onClose:n},r.createElement(c.z,{onClose:n,title:l,"data-testid":"alertDetailsModal-alertName"},r.createElement(d.A,{flavour:g,icon:"alarm_bell","data-testid":"alertDetailsModal-alertPill"},g)),p?v?r.createElement(A.A,{flavour:"alert"}):r.createElement(r.Fragment,null,r.createElement(s.Yv,{overflow:{vertical:"auto"},hasModalTitle:!1,gap:2,hasFooter:!0},r.createElement(I.A,{iconName:"monitoring",iconSize:"20px"},"Time Values"),r.createElement(E.A,{alertId:t}),r.createElement(I.A,{iconName:"documentation"},"Alert Description"),r.createElement(o.Text,{"data-testid":"alertDetailsModal-info"},f),r.createElement(C.A,{alertId:t}),r.createElement(h,{id:t}),r.createElement(u.A,{id:t})),r.createElement(s.CG,null,r.createElement(b,{alertId:t,testid:"alertDetailsModal"}))):r.createElement(m.A,{title:"Loading alert..."})))},P=()=>{const[e,,t,n,o]=(0,l.A)("alertDetailsModal"),i=(0,r.useCallback)((e=>{let{alertId:n}=e;t("",{alertId:n})}),[]),s=(0,r.useMemo)((()=>r.createElement(S,(0,a.A)({onClose:n},o))),[o]);return[e,i,n,s]}},23452:(e,t,n)=>{n.d(t,{QD:()=>p,hv:()=>u,qr:()=>g});n(17333),n(41393),n(8159),n(98992),n(54520),n(81454),n(37550),n(62953);var a=n(47444),r=n(27467),l=n(69765),o=n(11128),i=n(64118);const s=e=>(t,n)=>!Array.isArray(n)||!n.length||n.includes(t[e]),c={alertStatuses:s("status"),alertNames:s("name"),alertContexts:s("context"),alertClasses:s("class"),alertRoles:s("recipient"),alertTypeComponents:(e,t)=>!Array.isArray(t)||!t.length||t.includes("".concat(e.type,"|").concat(e.component)),nodeIds:s("nodeId")},d=(0,a.K0)({key:"alertsFiltered",get:e=>{let{extraKey:t,roomId:n,omit:a,keepAll:l}=e;return e=>{let{get:s}=e;const d=s((0,r.GA)({key:n,extraKey:t,flavour:"arr"})),u=Object.keys(d).map((e=>[e,a&&a.split(":::").includes(e)?s((0,r.GA)({key:n,flavour:"arr",param:e})):d[e]]));if(!a||!a.includes("selectedNodeIds")){const e=s((0,o.QY)({key:n,extraKey:t,omit:a,keepAll:!1,merge:!1,scoped:!0}));null!==e&&void 0!==e&&e.length&&u.push(["nodeIds",e])}const m=s((0,i.Yo)(n)),g=(e=>t=>!e.some((e=>{let[n,a]=e;return!!c[n]&&!c[n](t,a)})))(u);return l?m.map((e=>g(e)?e:{...e,hidden:!0})):m.filter(g)}}}),u={alertStatuses:{critical:0,warning:0},alertClasses:{Errors:0,Latency:0,Utilization:0,Workload:0}},m={critical:0,warning:1},g={alertStatuses:(e,t)=>m[e.id]-m[t.id],default:(e,t)=>e.id.localeCompare(t.id,void 0,{sensitivity:"accent",ignorePunctuation:!0})},p=function(){let{extraKey:e,omit:t,keepAll:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=(0,l.ID)();return(0,a.vc)(d({extraKey:e,roomId:r,omit:t,keepAll:n}))}},81416:(e,t,n)=>{n.d(t,{Ay:()=>g,yD:()=>u,f_:()=>m});n(17333),n(41393),n(98992),n(54520),n(81454),n(62953);var a=n(96540),r=n(27467),l=n(61427);const o=function(e){let{after:t,before:n}=e,{offset:a,limit:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{offset:6e4,limit:Date.now()};const l=((e,t)=>{let{offset:n,limit:a}=t;const r=n/2;return e+r<=a?r:a<e?0:a-e})(n,{offset:a,limit:r});return[t-(a-l),n+l]};var i=n(50876),s=n(67276);const c=(e,t)=>e||t?o({after:parseInt(e),before:parseInt(t)},(e=>{const t=Date.now();return{limit:t,offset:t-e<6e4?3e4:15e3}})(t)):d,d=[null,null],u=()=>{const{after:e,before:t,highlight:n}=(0,r.rW)();if(!n.after||!n.before)return d;if(e<0){const t=Date.now();if(n.before<t+e)return d;if(n.after>t)return d}else{if(n.before<e)return d;if(n.after>t)return d}return[n.after,n.before]},m=(e,t,n)=>{const[o,d]=(0,a.useState)(),[m,g]=(0,a.useState)(!1),{sendLog:p}=(0,i.A)();let[h,f]=(()=>{const e=u();return(0,a.useMemo)((()=>c(...e)),[...e])})();const{after:y,before:v}=(0,r.rW)(),[x]=(0,l.er)({nodeIds:n,flavour:"rhs"},e,t);return[async()=>{const e=((e,t)=>{if(e<0){const n=Date.now();e=1e3*Math.floor(n/1e3+e),t=1e3*Math.floor(n/1e3)}return{after:e,before:t}})(y,v);g(!0);try{await x({flavour:"rhs",highlightAfter:h||e.after,highlightBefore:f||e.before,baselineAfter:h?e.after:null,baselineBefore:f?e.before:null,method:"anomaly-rate",aggregation:"avg",group:"average",nodeIds:n,options:["raw","null2zero"],groupBy:["context"]}),g(!1),p({action:s.o1.elementViewed,feature:"AnomalyRates-TOC",isSuccess:!0},!0)}catch(t){if(t.isCancel)return;d(t),g(!1),p({action:s.o1.elementViewed,feature:"AnomalyRates-TOC",isFailure:!0},!0)}},m,o]},g=(e,t,n)=>{const[o,s]=(()=>{const[e,t]=(0,a.useState)(0);return[e,(0,a.useCallback)((()=>t((e=>e+1))),[])]})(),[c,d]=(0,a.useState)(),[m,g]=u(),{after:p,before:h}=(0,r.rW)(),{contexts:f,metadata:y,getWeights:v,loading:x}=(0,l.Yy)({nodeIds:n,flavour:"anomaly"},e,t),{sendLog:b,isReady:I}=(0,i.A)();(0,a.useEffect)((()=>{if(m&&g&&g&&m)try{b({feature:"AnomalyAdvisor",isStart:!0}),v({highlightAfter:m,highlightBefore:g,baselineAfter:p,baselineBefore:h,method:"anomaly-rate",aggregation:"avg",group:"average",nodeIds:n,options:["null2zero","raw"],groupBy:["context","dimension"]})}catch(e){if(b({feature:"AnomalyAdvisor",isFailure:!0}),e.isCancel)return;d(e)}}),[n.length,g,m,o,I]);return[(0,a.useMemo)((()=>f.filter((e=>{var t;return((null===(t=y[e])||void 0===t?void 0:t.weight)||0)>0})).sort(((e,t)=>{const n=y[e].weight||0,a=y[t].weight||0;return n!=a?n>a?-1:1:0})).map((e=>{const t=e.split(",");return t.length>1?"".concat(t[1],"::").concat(t[0]):e}))),[f,y]),f,y,x,c,s]}},13271:(e,t,n)=>{n.d(t,{sK:()=>h,Um:()=>p,Ad:()=>m,rq:()=>f});n(17333),n(14905),n(8159),n(98992),n(54520),n(8872),n(37550),n(62953);var a=n(96540),r=n(47444),l=n(47767),o=n(23931),i=n(47762),s=n(69765),c=n(27467);const d=(0,r.Iz)({key:"chartsFilterValue",default:{filteredChartsIds:[],filteredChartsCount:0,chartsCount:0}}),u=()=>{const e=(0,s.ID)(),t=(0,i.nl)();return(0,a.useMemo)((()=>({roomId:e,nodeId:t})),[t,e])},m=()=>{const e=u();return(0,r.vc)(d(e))},g=()=>{const e=(0,s.ID)(),{nodeID:t}=(0,l.g)();return[e,t||"overview"]},p=()=>{const[e,t]=g();return(0,c.rW)("tocSearch",{key:e,extraKey:t,defaultValue:"",flavour:"val"})},h=()=>{const[e,t]=g();return(0,c.N9)("tocSearch",{key:e,extraKey:t,defaultValue:"",flavour:"val"})},f=function(e,t,n){let{shouldHide:l=(()=>!1),force:i=!1,cacheKey:s}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const m=(0,c.rW)("after"),g=(0,c.rW)("before"),h=(()=>{const e=p();return"string"!==typeof e?"":e.trim().toLowerCase()})(),f=(0,o.w1)(n),[y,v,x]=(0,a.useMemo)((()=>{let n=0,a=0;const r=Date.now()/1e3,o=h.split(/[\s,]+/).filter((e=>!!e));return[e.reduce(((e,t)=>{if(!e[t])return e;const{firstEntry:s,lastEntry:c,live:d}=e[t],u=!i&&e[t].visible||(m<0?d||r+m<c:!(m>1e3*c||g<1e3*s)),p=!u||!Object.keys(e[t]).some((n=>{const a=e[t][n];return null===o||void 0===o||!o.length||o.some((e=>"string"===typeof a&&a.includes(e)))})),h=!u||l(e[t]);return e[t]={...e[t],filteredOut:p,visible:u,hidden:h},p||!u||h||(n+=1),h||(a+=1),e}),{...t}),a,n]}),[h,e,m,g,i,s]),b=(()=>{const e=u();return(0,r.lZ)(d(e))})();return(0,a.useEffect)((()=>{f(y),b({filteredChartsCount:x,chartsCount:v})}),[y,v,x,n]),x}},82543:(e,t,n)=>{n.d(t,{A:()=>p,g:()=>g});n(62953);var a=n(96540),r=n(83199),l=n(29217),o=n(47762),i=n(11128),s=n(69765),c=n(3914),d=n(81416),u=n(94944),m=n(50876);const g=()=>{const e=(0,o.nl)(),t=(0,i.w7)();return e?[e]:t},p=e=>t=>{const n=(0,c.vt)(),o=(0,s.ID)(),i=g(),{pause:p}=(0,u.A)(),{sendButtonClickedLog:h}=(0,m.A)(),[f,y]=(0,d.f_)(n,o,i);return a.createElement(r.Flex,{alignItems:"center",justifyContent:"between",width:"100%"},a.createElement(l.A,{content:"Overlay the maximum chart anomaly rate on each menu section.",align:"bottom",activateOn:"hover",isBasic:!0},a.createElement(r.Button,{tiny:!0,label:y?null:"Anomaly%",isLoading:y,flavour:"hollow",onClick:()=>{p(),f(),h({feature:"AnomalyRates-TOC",label:"Anomaly%",isStart:!0},!0)},textTransform:"uppercase","data-track":"menu-anomaly-rates::click-ar-button"})),a.createElement(r.Flex,{column:!0},a.createElement(e,t)))}},18713:(e,t,n)=>{n.d(t,{C:()=>u,Ny:()=>c,Ud:()=>d,W7:()=>m});n(62953);var a=n(96540),r=n(86856),l=n(55483);const o=(0,r.q6)(""),i=(0,r.q6)(""),s=(0,r.q6)(""),c=e=>{let{menuGroupId:t="",subMenuId:n="",children:r}=e;const[l,c]=(0,a.useState)(t),[d,u]=(0,a.useState)(n),m=(0,a.useMemo)((()=>({setMenuGroupId:c,setSubMenuId:u})),[]);return a.createElement(o.Provider,{value:m},a.createElement(i.Provider,{value:l},a.createElement(s.Provider,{value:d},r)))},d=()=>(0,l.A)(o),u=e=>{return t=t=>e===t,(0,l.A)(i,t);var t},m=e=>(0,l.A)(s,e)},31438:(e,t,n)=>{n.d(t,{BK:()=>E,NF:()=>v,Tg:()=>b,aA:()=>f,dd:()=>y,i8:()=>u,qR:()=>x,uy:()=>I,vN:()=>p,yO:()=>C});var a=n(58168),r=(n(41393),n(81454),n(96540)),l=n(83488),o=n.n(l),i=n(86856),s=n(55483);const c=r.createContext({}),d=(0,i.q6)({}),u=(0,i.q6)({}),m=(0,i.q6)([]),g=(0,i.q6)({}),p=e=>{let{container:t,menuItemAttributesById:n,getObject:a,allElements:l,stickyIds:o,children:i}=e;return r.createElement(c.Provider,{value:t},r.createElement(d.Provider,{value:a},r.createElement(u.Provider,{value:n},r.createElement(m.Provider,{value:l},r.createElement(g.Provider,{value:o},i)))))},h={},f=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o();return(0,s.A)(u,(n=>t(n[e]||h)))},y=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o();return(0,s.A)(u,(n=>Array.isArray(e)?e.map((e=>t(n[e]||h,e))):[]))},v=()=>r.useContext(c),x=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o();return(0,s.A)(m,e)},b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o();return(0,s.A)(g,e)},I=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:o())(C()(e))},E=e=>(0,r.forwardRef)(((t,n)=>{let{id:l,...o}=t;const i=f(l),{chartId:s}=i,c=I(s);return r.createElement(e,(0,a.A)({ref:n,id:l,chart:c,menuChartAttributes:i},o))})),C=()=>(0,s.A)(d)},8320:(e,t,n)=>{n.d(t,{Cs:()=>o,Gr:()=>s,UH:()=>i});n(62953);var a=n(96540);const r=(0,a.createContext)(),l=(0,a.createContext)(),o=e=>{let{children:t}=e;const[n,o]=(0,a.useState)();return a.createElement(r.Provider,{value:n},a.createElement(l.Provider,{value:o},t))},i=()=>(0,a.useContext)(r),s=()=>(0,a.useContext)(l)},55309:(e,t,n)=>{n.d(t,{$V:()=>f,Ee:()=>m,HB:()=>g,Ss:()=>h,ox:()=>c,re:()=>u,sF:()=>d});var a=n(58168),r=n(96540),l=n(83488),o=n.n(l),i=n(86856),s=n(55483);const c=(0,i.q6)({}),d=e=>{let{menuGroupById:t,children:n}=e;return r.createElement(c.Provider,{value:t},n)},u=e=>(0,s.A)(c,e),m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o();return u((n=>t((null===n||void 0===n?void 0:n[e])||{})))},g=(e,t)=>n=>{let{id:l,...o}=n;const i=m(l,t);return r.createElement(e,(0,a.A)({id:l},i,o))},p=(0,i.q6)([]),h=e=>{let{ids:t,children:n}=e;return r.createElement(p.Provider,{value:t},n)},f=e=>t=>{const n=(0,s.A)(p,l);var l;return r.createElement(e,(0,a.A)({menuGroupIds:n},t))}},59090:(e,t,n)=>{n.d(t,{A:()=>g,Ie:()=>u,jR:()=>m,xw:()=>c,zK:()=>d});var a=n(58168),r=n(96540),l=n(83488),o=n.n(l),i=n(86856),s=n(55483);const c=(0,i.q6)({}),d=e=>{let{subMenuById:t,children:n}=e;return r.createElement(c.Provider,{value:t},n)},u=e=>(0,s.A)(c,e),m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o();return u((n=>t(null===n||void 0===n?void 0:n[e])))},g=(e,t)=>n=>{let{id:l,...o}=n;const i=m(l,t);return r.createElement(e,(0,a.A)({id:l},i,o))}},79566:(e,t,n)=>{n.d(t,{A:()=>f});var a=n(96540),r=n(31438),l=n(8320),o=n(55309),i=n(59090),s=n(18713),c=n(47444),d=n(47762),u=n(69765);const m=(0,c.Iz)({key:"activeMenuGroupIdValue",default:""}),g=()=>{const e=(()=>{const e=(0,u.ID)(),t=(0,d.nl)();return(0,a.useMemo)((()=>({roomId:e,nodeId:t})),[t,e])})();return(0,c.lZ)(m(e))},p=e=>(t,n)=>{const a=t.querySelector(n);a&&e(a)},h="scrollIntoViewIfNeeded"in document.body?p((e=>e.scrollIntoViewIfNeeded())):p((e=>e.scrollIntoView())),f=e=>{let{onMenuGroupClick:t,onSubMenuClick:n,onChartNameChange:c,initialChartName:d,linkToGo:u,contextToGo:m,loaded:p=!0}=e;const f=(0,r.NF)(),y=(0,l.UH)(),v=(0,o.re)(),x=(0,i.Ie)(),{setMenuGroupId:b,setSubMenuId:I}=(0,s.Ud)(),E=g(),C=(0,a.useRef)(d);(0,a.useLayoutEffect)((()=>{p&&y&&u&&!C.current&&y.goToLink(u)}),[y,u]),(0,a.useLayoutEffect)((()=>{p&&y&&m&&!C.current&&y.goToElement(m)}),[y,m]);const A=(0,a.useCallback)((e=>{b(e),E(e),h(f,'[data-sidebar="true"] [data-sidebar-menugroupid="'.concat(e,'"]')),e&&v[e]&&c(v[e].link)}),[v]),k=(0,a.useCallback)((e=>{I(e),e in x&&(b(x[e].menuGroupId),h(f,'[data-sidebar="true"] [data-sidebar-submenuid="'.concat(e,'"]')),c(x[e].link))}),[x]);(0,a.useLayoutEffect)((()=>{p&&C.current&&y&&y.goToLink(d)&&(C.current=null)}),[y]);return{setActiveMenuGroupId:A,setActiveSubMenuId:k,onMenuGroupClick:(0,a.useCallback)(((e,n)=>{n&&n.preventDefault(),y&&(y.goToElement(e),t(e))}),[y]),onSubMenuClick:(0,a.useCallback)(((e,t,a)=>{a&&a.preventDefault(),y&&(y.goToElement(t),n(e,t))}),[y])}}},11988:(e,t,n)=>{n.d(t,{l3:()=>o,Xt:()=>c,YS:()=>d});n(14905),n(98992),n(8872),n(62953);var a=n(47444);const r=(0,a.eU)({key:"alertIdsByNodeId",default:{}}),l=[],o=(0,a.gD)({key:"nodesAlertIdsState",get:e=>{let{get:t}=e;return t(r)},set:(e,t)=>{let{set:n}=e;return n(r,t)}}),i=(0,a.K0)({key:"nodeAlertIdsState",get:e=>t=>{let{get:n}=t;return n(r)[e]||l},set:e=>(t,n)=>{let{set:a}=t;a(r,(t=>({...t,[e]:[...n].sort(((e,t)=>e.id-t.id))})))}}),s=(0,a.K0)({key:"nodesAlertIdsState",get:e=>t=>{let{get:n}=t;const a=n(r);return(e=e.length?e:Object.keys(a)).reduce(((e,t)=>[...e,...a[t]||[]]),[])},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),c=e=>(0,a.vc)(i(e)),d=e=>(0,a.vc)(s(e))},28146:(e,t,n)=>{n.d(t,{A:()=>u});var a=n(58168),r=n(96540),l=n(29217),o=n(8711),i=n(83199);const s=(0,o.default)(i.Flex).attrs((()=>({width:{max:"315px"},overflow:"hidden"}))).withConfig({displayName:"styled__Container",componentId:"sc-t6teia-0"})([""]),c=e=>{let{children:t,...n}=e;return r.createElement(s,(0,a.A)({"data-testid":"nodeInfoContent"},n),t)};var d=n(82432);const u=e=>{let{align:t="bottom",badge:n,children:o,connectivityState:i,content:s,isBasic:u=!0,status:m,nodeName:g,nodeType:p,...h}=e;return r.createElement(l.A,(0,a.A)({align:t,content:()=>r.createElement(c,{"data-testid":"nodeInfoTooltip-tooltipContent"},s||(0,d.Bb)(n,i,m,g,p)),"data-testid":"nodeInfoTooltip",isBasic:u},h),o)}},60072:(e,t,n)=>{n.d(t,{A:()=>i});var a=n(96540),r=n(12352),l=n(50065),o=n(82432);const i=e=>{let{node:t}=e;const{_cloud_instance_region:n,_cloud_instance_type:i,_cloud_provider_type:s}=t.labels||{};return(0,o.Po)(n)&&(0,o.Po)(i)&&(0,o.Po)(s)?null:a.createElement(l.A,{name:"Cloud Instance Info"},a.createElement(r.A,{iconName:"ipNetworking",name:"Cloud provider",size:"small",testId:"sidebar-nodeInfoContent-cloudProvider"},(0,o.ws)(s)),a.createElement(r.A,{iconName:"universe",name:"Cloud region",size:"small",testId:"sidebar-nodeInfoContent-cloudRegion"},(0,o.ws)(n)),a.createElement(r.A,{iconName:"disk",name:"Instance type",size:"small",testId:"sidebar-nodeInfoContent-instanceType"},(0,o.ws)(i)))}},25825:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(96540),r=n(50065),l=n(12352),o=n(82432),i=n(55905),s=n(33931);const c=e=>{let{node:t}=e;const n=(0,o.GM)(t.state);return a.createElement(r.A,{link:"https://learn.netdata.cloud/docs/agent/aclk",name:"Connection"},a.createElement(l.A,{size:"small",name:"Status",iconName:"integrations",testId:"sidebar-connectionGroup-connectionStatus"},a.createElement(s.A,{rawState:n})),a.createElement(l.A,{size:"small",name:"Netdata Agent",iconName:"netdata",testId:"sidebar-connectionGroup-agentVersion"},t.version),t.updateSeverity&&a.createElement(l.A,{size:"small",name:"Update Status",iconName:"update",testId:"sidebar-connectionGroup-agentVersion"},a.createElement(i.A,{name:t.name,os:t.os.id,container:t.hw.container,warningLevel:t.updateSeverity,labels:t.labels||{},version:t.version,text:t.updateSeverity})))}},17240:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(96540),r=n(50065),l=n(83199),o=n(18682);const i=e=>{let{node:t}=e;return a.createElement(r.A,{name:"Files"},a.createElement(l.Flex,{gap:1,padding:[0,1],alignItems:"center"},a.createElement(l.Box,{sx:{fontWeight:"500",letterSpacing:"1px"},as:l.Text,color:"textLite"},"{;}"),a.createElement(l.TextSmall,null,"View node info in"),a.createElement(l.Flex,{cursor:"pointer",gap:1,onClick:(0,o.C)(JSON.stringify(t),{text:"JSON copied to clipboard"})},a.createElement(l.TextSmall,{color:"primary"},"json"),a.createElement(l.Icon,{color:"primary",size:"small",name:"copy"}))))},s=(0,a.memo)(i)},58010:(e,t,n)=>{n.d(t,{A:()=>o});n(17333),n(41393),n(98992),n(54520),n(81454);var a=n(96540),r=n(50065),l=n(12352);const o=e=>{let{node:{labels:t={}}={}}=e;const n=Object.keys(t).filter((e=>!e.startsWith("_")));return a.createElement(r.A,{link:"https://learn.netdata.cloud/guides/using-host-labels",name:"Host labels",isEnabled:n.length>0,noDataLabel:"No Data"},n.length>0&&n.map((e=>a.createElement(l.A,{size:"small",key:e,name:e,testId:"sidebar-hostLabelsGroup-label"},t[e]))))}},80618:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(96540),r=n(83199),l=n(50065),o=n(12352),i=n(82432);const s={},c=e=>{let{node:t}=e;const n=t.hw||s,c=t.os||s,d=(0,i.Pg)(n.container,n.virtualization);return a.createElement(l.A,{name:"System info"},a.createElement(o.A,{size:"small",name:"Type",iconName:"virtualization",testId:"sidebar-nodeInfoContent-type"},a.createElement(r.Pill,{hollow:!0,icon:d.icon,flavour:"neutral"},d.label)),a.createElement(o.A,{size:"small",name:"O/S version",iconName:"database",testId:"sidebar-nodeInfoContent-osVersions"},(0,i.Ud)(c.nm,c.v,", ")),a.createElement(o.A,{iconName:"viewSingleNode",name:"Architecture",size:"small",testId:"sidebar-nodeInfoContent-architecture"},(0,i.ws)(n.architecture)),!!c.kernel&&a.createElement(o.A,{size:"small",name:"Kernel",iconName:"metrics_explorer",testId:"sidebar-nodeInfoContent-kernel"},(0,i.Ud)(c.kernel.nm,c.kernel.v,", ")),a.createElement(o.A,{size:"small",name:"CPU",iconName:"cpu",testId:"sidebar-nodeInfoContent-cpu"},(0,i.O)(n.cpuFrequency)," (",(0,i.ws)(n.cpus,1===n.cpus?"Core":"Cores"),")"),a.createElement(o.A,{size:"small",name:"Memory",iconName:"ram",testId:"sidebar-nodeInfoContent-ram"},(0,i.ws)((0,i.RI)(n.memory),"RAM")),a.createElement(o.A,{size:"small",name:"Hard disk size",iconName:"disk",testId:"sidebar-nodeInfoContent-disk"},(0,i.RI)(n.diskSpace)))}},37019:(e,t,n)=>{n.d(t,{A:()=>d});var a=n(58168),r=n(96540),l=n(83199),o=n(64118),i=n(11988),s=n(82432),c=n(28146);const d=e=>{let{id:t,isLive:n,name:d,onClick:u,...m}=e;const g=(0,i.Xt)(t),{critical:p,warning:h}=(0,o.AO)(g),f={...(null===m||void 0===m?void 0:m["data-testid"])&&{dataTestId:null===m||void 0===m?void 0:m["data-testid"]},isLive:n},y=(0,s.t3)({count:p,type:"critical",...f}),v=(0,s.t3)({count:h,type:"warning",...f});return r.createElement(c.A,(0,a.A)({badge:"alerts","data-testid":"node-alerts",nodeName:d},m),r.createElement(l.AlertMasterCard,{onClick:y.text||v.text?u:null,pillLeft:y,pillRight:v,size:"small"}))}},88494:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(58168),r=n(96540),l=n(83199),o=n(82432),i=n(28146);const s=e=>{let{children:t,badge:n,enabled:s,name:c,onClick:d,...u}=e;const m=(0,o.lw)(s);return r.createElement(i.A,(0,a.A)({badge:n,"data-testid":"node-".concat(n,"-status"),status:m.status,nodeName:c},u),r.createElement(l.Flex,{alignItems:"center",gap:1,onClick:s?d:void 0,cursor:s&&d?"pointer":"default","data-ga":"nodes-list::click-capability::".concat(m.label)},t,r.createElement(l.Pill,{flavour:m.flavour,size:"small"},m.label)))}},61427:(e,t,n)=>{n.d(t,{UG:()=>I,Ip:()=>b,er:()=>v,Yy:()=>E,G9:()=>x});n(9920),n(14905),n(98992),n(3949),n(8872),n(62953);var a=n(96540),r=n(47444),l=n(27467),o=n(9224);const i={byContext:{},loaded:!1,loading:!1,method:null,options:null,group:"average",totalDimensionsCount:0},s=(0,r.Iz)({key:"weights",default:i}),c=(0,r.K0)({key:"weightsState",get:e=>t=>{let{get:n}=t;return n(s(e))},set:e=>(t,n)=>{let{set:a}=t;return a(s(e),n)},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),d={ci:"context",ni:"node",ii:"instance",di:"dimension"},u=(e,t)=>n=>({[d[e.name]]:t[e.dictionary][n]}),m={ni:u,ii:(e,t)=>(n,a,r)=>({[d[e.name]]:t[e.dictionary][n]?"".concat(t[e.dictionary][n],"@").concat(t.nodes[a[r.ni]]):null}),ci:u,di:u,row_type:e=>t=>({type:e.value[t]}),weight:()=>e=>({weight:e}),timeframe:e=>t=>({highlight:e.labels.reduce(((e,n,a)=>({...e,[n]:t[a]})),{})}),"baseline timeframe":e=>t=>({baseline:e.labels.reduce(((e,n,a)=>({...e,[n]:t[a]})),{})})},g={contexts:"ci",nodes:"ni",instances:"ii",dimensions:"di"},p={contexts:"id",nodes:"nodeId",instances:"id",dimensions:"id"},h=(e,t)=>null===e||e>t?t:e,f=(e,t)=>null===e||e<t?t:e,y=e=>{let{flavour:t,data:n,aggregation:a,options:r}=e,l={},o=0;if(n.v_schema){var i;const e=(null===(i=n.v_schema)||void 0===i?void 0:i.items)||[];l=n.result.reduce(((t,n)=>{let{id:r,v:l}=n;return t[r]=e.reduce(((e,t,n)=>{let{name:r,labels:o}=t;const i=o.indexOf(a);return e[r]=l[n][i],e}),{}),t}),{})}else{const e=(e=>{const t=Object.keys(e.dictionaries).reduce(((t,n)=>{t[n]||(t[n]={});const a=p[n];return e.dictionaries[n].forEach((e=>t[n][e[g[n]]]="nodeId"===a?e.nd||e.mg:e[a])),t}),{}),n={},a=e.schema.items.reduce(((e,a,r)=>{const l=(m[a.name]||m.default)(a,t);return e.push(l),n[a.name]=r,e}),[]);return e=>e.reduce(((t,r,l)=>({...t,...a[l](r,e,n)})),{})})(n);l=n.result.reduce(((t,n)=>{const{dimension:a,node:l,context:i,instance:s,type:c,weight:d,highlight:u,baseline:m}=e(n);if("node"===c)return t;const g=(p=t,y=i,function(e,t,n,a,r){let l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:h;n&&(n&&"undefined"===typeof p[y][t][n]&&(p[y][t][n]={}),"undefined"===typeof p[y][t][n][e]&&(p[y][t][n][e]=null),a&&(p[y][t][n][e]=l(p[y][t][n][e],r)))});var p,y;t[i]||(t[i]={dimensions:{},instances:{},nodes:{},weight:null});const v=!!r&&r.includes("anomaly-bit");g("weight","dimensions",a,"dimension"===c,d,v?f:h),g("weight","instances",s,"instance"===c,d,v?f:h),g("weight","nodes",l,"node"===c,d,v?f:h);const x=u?100*u.anomaly_count/u.count:0;g("arHighlight","dimensions",a,"dimension"===c,x,f),g("arHighlight","instances",s,"instance"===c,x,f),g("arHighlight","nodes",l,"node"===c,x,f);const b=m?100*(m.anomaly_count-u.anomaly_count)/(m.count-u.count)===0?1:m.count-u.count:0;g("arBaseline","dimensions",a,"dimension"===c,b,f),g("arBaseline","instances",s,"instance"===c,b,f),g("arBaseline","nodes",l,"node"===c,b,f);const I=b?x/b:0;return g("score","dimensions",a,"dimension"===c,I,f),g("score","instances",s,"instance"===c,I,f),g("score","nodes",l,"node"===c,I,f),"context"===c?t[i].weight=null===t[i].weight||t[i].weight>d?d:t[i].weight:"dimension"===c&&(o+=1),t}),{})}return{byContext:l,totalDimensionsCount:o}},v=(e,t,n)=>{const l=(0,a.useRef)();return[(0,r.Zs)((a=>{let{set:r}=a;return a=>{let{flavour:s,highlightAfter:d,highlightBefore:u,baselineAfter:m,baselineBefore:g,method:p,options:h,group:f,context:v,nodeIds:x,aggregation:b,groupBy:I}=a;return r(c(e),{...i,loading:!0}),l.current&&l.current.cancel(),l.current=(0,o.e0)(t,n,{highlightAfter:d,highlightBefore:u,baselineAfter:m,baselineBefore:g,method:p,options:h,group:f,context:v,nodeIds:x,aggregation:b,groupBy:I}),l.current.then((t=>{let{data:n}=t;const{byContext:a,totalDimensionsCount:l}=y({flavour:s,data:n,aggregation:b,options:h});r(c(e),{loading:!1,loaded:!0,byContext:a,options:h,totalDimensionsCount:l,method:p,group:f,groupBy:I,error:null})})).catch((t=>{var n;if(!t.isCancel)throw r(c(e),{...i,error:(null===t||void 0===t||null===(n=t.response)||void 0===n?void 0:n.data)||t}),t}))}}),[e]),(0,r.Zs)((t=>{let{reset:n}=t;return()=>{l.current&&l.current.cancel(),n(c(e))}}),[e])]},x=e=>(0,r.vc)(c(e)),b=e=>(0,r.E0)(c(e)),I=.01,E=(e,t,n)=>{const[r,o]=v(e,t,n),{loaded:i,loading:s,byContext:c,totalDimensionsCount:d,options:u,groupBy:m}=x(e),g=(()=>{const e=(0,l.rW)("threshold");return e?Number.parseFloat(e):I})(),[p,h,f]=(0,a.useMemo)((()=>{let e=0;const t=null===u||void 0===u?void 0:u.includes("raw"),n=(m||[]).length?c:Object.keys(c).reduce(((n,a)=>{const r=Object.keys(c[a].dimensions).reduce(((e,n)=>(!t&&c[a].dimensions[n].weight>g||(e[n]=c[a].dimensions[n]),e)),{}),l=Object.keys(r).length;return e+=l,l?(n[a]={...c[a],dimensions:r},n):n}),{});return[n,Object.keys(n),e]}),[i,g]);return{threshold:g,metadata:p,contexts:h,dimensionsCount:f,totalDimensionsCount:d,loaded:i,loading:s,getWeights:r,resetWeights:o}}},23931:(e,t,n)=>{n.d(t,{Zr:()=>c,b0:()=>b,YP:()=>x,Uo:()=>y,GR:()=>A,Bu:()=>k,yO:()=>C,bD:()=>w,OL:()=>h,aZ:()=>f,rx:()=>m,bo:()=>u,_0:()=>d,R7:()=>I,jI:()=>g,w1:()=>E,DQ:()=>p});n(14905),n(8159),n(98992),n(8872),n(37550),n(25509),n(65223),n(60321),n(41927),n(11632),n(64377),n(66771),n(12516),n(68931),n(52514),n(35694),n(52774),n(49536),n(21926),n(94483),n(16215),n(62953);var a=n(96540),r=n(47444);const l={loaded:!1,fullyLoaded:!1,loading:!1,id:"",name:"",chartType:"",context:"",family:"",firstEntry:0,lastEntry:0,module:"",plugin:"",priority:0,updateEvery:0,visible:!1,filteredOut:!1,hidden:!1,domain:"room"};var o=n(69765),i=n(65570);const s={ids:(0,r.Iz)({key:"roomChartIds",default:[]}),updatedAt:(0,r.Iz)({key:"roomChartsUpdatedAt",default:""}),loaded:(0,r.Iz)({key:"roomChartsLoaded",default:!1}),error:(0,r.Iz)({key:"roomChartsError",default:null}),versions:(0,r.Iz)({key:"versions",default:{}}),fetchedFor:(0,r.Iz)({key:"fetchedFor",default:[]})},c=(0,r.K0)({key:"roomChartState",get:e=>{let{id:t,key:n}=e;return e=>{let{get:a}=e;return a(s[n](t))}},set:e=>{let{id:t,key:n}=e;return(e,a)=>{let{set:r}=e;r(s[n](t),a)}}}),d=e=>!!(0,r.vc)(c({id:e,key:"loaded"})),u=e=>(0,r.vc)(c({id:e,key:"fetchedFor"})),m=e=>(0,r.vc)(c({id:e,key:"error"})),g=e=>(0,r.vc)(c({id:e,key:"versions"})),p=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=(0,r.lZ)(c({id:e,key:"versions"}));return(0,a.useCallback)((e=>n((n=>(e="function"===typeof e?e(n):e,t?e:(0,i.Ay)(n,e,{omit:["contextsSoftHash"]})?n:n.contextsHardHash&&"invalidating"!==n.contextsHardHash?e:n)))),[])},h=e=>(0,r.vc)(c({id:e,key:"ids"})),f=(e,t)=>(0,r.vc)(c({id:e,key:t})),y=(0,r.K0)({key:"roomChartsState/ids",get:e=>{let{roomId:t}=e;return e=>{let{get:n}=e;return n(s.ids(t))}},set:e=>{let{roomId:t,merge:n=!0}=e;return(e,a)=>{let{set:r}=e;r(s.ids(t),(e=>{const t=n?[...new Set([...a,...e])]:a;return n&&(0,i.Ay)(t,e)?e:t}))}}}),v=(0,r.Iz)({key:"roomsChartBatchState",default:{}}),x=(0,r.K0)({key:"roomChartsState",get:e=>{let{id:t,key:n}=e;return e=>{let{get:a}=e;const r=a(v(t))||l;return n?r[n]:r}},set:e=>{let{id:t,key:n}=e;return(e,a)=>{let{set:r}=e;"function"!==typeof a?Object.keys(a).length<1||r(v(t),(e=>({...e,[n]:a}))):r(v(t),(e=>({...e,[n]:a(e[n])})))}}}),b=(0,r.K0)({key:"roomChartsState/initialize",set:function(){let{id:e,merge:t=!0,nodeIds:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(a,r)=>{let{set:o}=a,{values:s,merge:d}=r;o(c({id:e,key:"fetchedFor"}),n),o(v(e),(e=>{const n=Object.keys(s).reduce(((n,a)=>{const{id:r}=s[a];return n[r]={...l,...(t||d)&&e[r],...s[a],loaded:!0},n}),t?{...e}:{});return t&&(0,i.Ay)(n,e,{omit:["lastEntry","firstEntry","family"]})?e:n}))}}}),I=(e,t)=>(0,r.vc)(x({id:e,key:t})),E=e=>(0,r.Zs)((t=>{let{set:n}=t;return t=>n(v(e),t)}),[]),C=(e,t)=>(0,r.Zs)((n=>{let{snapshot:a}=n;return n=>({...a.getLoadable(x({id:e,key:n})).contents,...(null===t||void 0===t?void 0:t[n])||{}})}),[e,t]),A=e=>{var t,n,a;const l=(0,o.ID)(),i=(0,r.vc)(v(l));return(null===(t=i[e])||void 0===t?void 0:t.visible)&&!(null!==(n=i[e])&&void 0!==n&&n.filteredOut)&&!(null!==(a=i[e])&&void 0!==a&&a.hidden)},k=e=>{const t=(0,o.ID)(),n=(0,r.vc)(v(t));return e.some((e=>{var t,a,r;return(null===(t=n[e])||void 0===t?void 0:t.visible)&&!(null!==(a=n[e])&&void 0!==a&&a.filteredOut)&&!(null!==(r=n[e])&&void 0!==r&&r.hidden)}))},w=()=>{const e=(0,o.ID)(),t=(0,r.vc)(v(e));return(0,a.useCallback)((e=>e.some((e=>{var n,a,r;return(null===(n=t[e])||void 0===n?void 0:n.visible)&&!(null!==(a=t[e])&&void 0!==a&&a.filteredOut)&&!(null!==(r=t[e])&&void 0!==r&&r.hidden)}))),[e,t])},S=(0,r.Iz)({key:"instancesByContextAtom",default:{}}),P=(0,r.K0)({key:"roomChartInstancesState",get:e=>{let{id:t,context:n}=e;return e=>{let{get:a}=e;const r=a(S(t));return n?r[n]:r}},set:e=>{let{id:t,context:n}=e;return(e,a)=>{let{set:r}=e;"function"!==typeof a?Object.keys(a).length<1||r(S(t),(e=>({...e,[n]:a}))):r(S(t),(e=>({...e,[n]:a(e[n])})))}}});(0,r.K0)({key:"roomChartInstances/initialize",set:e=>(t,n)=>{let{set:a}=t;a(S(e),(e=>({...e,...n})))}}),(0,r.K0)({key:"roomChartsInstancesState",get:e=>{let{id:t,contexts:n=[]}=e;return e=>{let{get:a}=e;const r=a(P({id:t}));return n.reduce(((e,t)=>(r[t]&&(e[t]=r[t]),e)),{})}}})},20687:(e,t,n)=>{n.d(t,{A:()=>E});n(41393),n(81454),n(62953);var a=n(96540),r=n(83199),l=n(47762),o=n(11988),i=n(64118),s=n(27467),c=n(29217),d=n(4659),u=n(8711),m=n(47767),g=n(45588),p=n(21290),h=n(45976);const f=(0,u.default)(r.Flex).withConfig({displayName:"alert__AlertContainer",componentId:"sc-ndxwzg-0"})(["transition:opacity 0.3s ease-in-out;&:hover{& ","{opacity:0.7;}}"],r.Text),y={overview:"overview",k8s:"kubernetes",singleNode:"nodes/:nodeId"},v=e=>{let{alert:t,onAlertClick:n,flavour:o}=e;const{value:i,instance:s,lastStatusChange:u,id:v,status:x,units:b,name:I,summary:E,nodeId:C}=t,A=(0,l.xY)(C,"name"),{localeTimeString:k,localeDateString:w}=(0,p.$j)(),S=(0,a.useMemo)((()=>{const e=new Date(1e3*u);return isNaN(e.valueOf())?"":"".concat(w(e,{long:!1})," ").concat(k(e,{secs:!1}))}),[u,k,w]),P=(0,a.useCallback)((()=>{n({alertId:v})}),[]),N=(0,m.g)(),F=(0,m.Zp)();return a.createElement(f,{column:!0,padding:[4,0],gap:1,border:{color:"border",side:"bottom"},"data-testid":"alertItem","data-test-name":"alertItem-".concat(I)},a.createElement(r.Flex,{column:!0},a.createElement(c.A,{plain:!0,content:E,isBasic:!0},a.createElement(r.Text,{strong:!0,"data-testid":"alertItem-alertName"},I)),a.createElement(r.TextSmall,{wordBreak:"break-all","data-testid":"alertItem-chartId"},s," @ ",A)),a.createElement(r.Flex,{alignItems:"center",justifyContent:"between"},a.createElement(h.A,{loaded:!0,status:x,units:b,value:i,flex:!1,"data-testid":"alertItem-alertValuePill"}),a.createElement(r.TextMicro,{color:"textLite","data-testid":"alertItem-alertDate"},S)),a.createElement(r.Flex,{gap:1},!!y[o]&&a.createElement(a.Fragment,null,a.createElement(d.A,{Component:r.TextMicro,onClick:()=>{F((0,g.tW)("/spaces/:spaceSlug/rooms/:roomSlug/".concat(y[o]),N),{replace:!0,state:{alertId:v}})}},"Plot on chart"),a.createElement(r.TextMicro,{color:"textLite"},"\u2022")),a.createElement(d.A,{Component:r.TextMicro,onClick:P},"Show info")))};var x=n(92136);const b=(e,t)=>e.status===t.status?0:"critical"===e.status?-1:1,I={nodesView:!0},E=e=>{let{nodeIds:t,flavour:n}=e;const[u,m]=(0,s.r$)("sidebarNodeId",{flavour:"val",extraKey:n}),g=(0,l.xY)(u),p=(0,o.YS)(u?[u]:t),h=(0,i.Gq)(p),f=(0,a.useMemo)((()=>[...h].sort(b)),[h]),[y,E,,C]=(0,x.A)(),A=h.length?"(".concat(h.length,")"):"";return a.createElement(r.Flex,{width:"100%",column:!0,overflow:"hidden"},a.createElement(r.Flex,{column:!0,gap:5,padding:[2]},a.createElement(r.Flex,{column:!0},a.createElement(c.A,{content:"Currently Active alerts",align:"bottom"},a.createElement(r.TextBig,{strong:!0,"data-testid":"nodeAlertsView-activeAlerts-header"},"Alerts ",A)),!!I[n]&&a.createElement(r.TextMicro,null,"Showing ",g.id?a.createElement(r.TextMicro,{strong:!0},g.name):"room"," alerts"," ",!!g.id&&a.createElement(a.Fragment,null," ","-"," ",a.createElement(d.A,{Component:r.TextMicro,onClick:()=>m("")},"Show all")))),!h.length&&a.createElement(r.Flex,{column:!0,gap:8,padding:[0,5],"data-testid":"nodesAlertsView-blankSlate",alignItems:"center"},a.createElement(r.Icon,{name:"checkmark",width:"90px",height:"90px"}),a.createElement(r.H4,{textAlign:"center"},1!==t.length?"No":"This node has no"," active alerts, you are all good!"))),a.createElement(r.Flex,{column:!0,overflow:{vertical:"auto"},padding:[0,2]},f.map((e=>a.createElement(v,{key:e.id,alert:e,onAlertClick:E,flavour:n})))),y&&C)}},94177:(e,t,n)=>{n.d(t,{A:()=>i});var a=n(58168),r=n(96540),l=n(42828),o=n(59846);const i=e=>{let{baseKey:t,extraKey:n,testIdPrefix:i,groupProps:s,...c}=e;return r.createElement(o.A,(0,a.A)({title:"Nodes",testIdPrefix:i,baseKey:t,extraKey:n,param:"selectedIds",defaultIsOpen:!1,help:"Select nodes individually. By selecting nodes in this filter, you bypass the rest of the filters."},s),r.createElement(l.Ay,(0,a.A)({baseKey:t,extraKey:n,itemProps:{padding:[1,1,1,.5]},searchMargin:[0,0,1],height:{max:"300px"},testIdPrefix:i},c)))}},99292:(e,t,n)=>{n.d(t,{kO:()=>Xe,Ay:()=>lt});var a=n(58168),r=(n(17333),n(41393),n(98992),n(54520),n(81454),n(62953),n(96540)),l=n(8711),o=n(83199),i=n(27467),s=n(81638),c=n(30577),d=n(93615),u=n(64473),m=n(47762),g=n(12352),p=n(60072),h=n(80618),f=n(25825),y=n(50065);const v=[{name:"MySQL",title:"MySQL",iconName:"serviceMySQL",logoFilename:"mysql.svg",category:"Databases",collectors:["python.d.plugin:mysql","go.d.plugin:mysql"],contexts:["mysql.queries","mysql.net","mysql.connections"],priority:1},{name:"MariaDB",title:"MariaDB",iconName:"serviceMariaDB",logoFilename:"mariadb.svg",category:"Databases",collectors:["python.d.plugin:mysql","go.d.plugin:mysql"],contexts:["mysql.queries","mysql.net","mysql.connections"],priority:2},{name:"Oracle Database",title:"Oracle Database",iconName:"osOracle",logoFilename:"oracle.svg",category:"Databases",collectors:["python.d.plugin:oracledb"],contexts:["oracledb.session_count","oracledb.physical_disk_read_writes","oracledb.tablespace_usage_in_percent"],priority:3},{name:"PostgreSQL",title:"PostgreSQL",iconName:"servicePostgreSQL",logoFilename:"postgresql.svg",category:"Databases",collectors:["python.d.plugin:postgres"],contexts:["postgres.checkpointer","postgres.archive_wal","postgres.db_size"],priority:4},{name:"MongoDB",title:"MongoDB",iconName:"serviceMongoDB",logoFilename:"mongodb.svg",category:"Databases",collectors:["python.d.plugin:mongodb"],contexts:["mongodb.active_clients","mongodb.read_operations","mongodb.write_operations"],priority:5},{name:"ElasticSearch",title:"ElasticSearch",iconName:"serviceElasticSearch",logoFilename:"elasticsearch.svg",category:"Databases",collectors:["python.d.plugin:elasticsearch"],contexts:["elastic.search_performance_total","elastic.index_performance_total","elastic.index_segments_memory"],priority:6},{name:"CouchDB",title:"CouchDB",iconName:"serviceCouchDB",logoFilename:"couchdb.svg",category:"Databases",collectors:["python.d.plugin:couchdb"],contexts:["couchdb.activity","couchdb.response_codes"],priority:7},{name:"Proxy SQL",title:"Proxy SQL",iconName:"serviceProxySQL",logoFilename:"proxysql.svg",category:"Databases",collectors:["python.d.plugin:proxysql"],contexts:["proxysql.questions","proxysql.pool_status","proxysql.pool_overall_net"],priority:8},{name:"Redis",title:"Redis",iconName:"serviceRedis",logoFilename:"redis.svg",category:"Databases",collectors:["python.d.plugin:redis"],contexts:["redis.operations","redis.net","redis.connections"],priority:9},{name:"MemCached",title:"MemCached",iconName:"serviceMemCached",logoFilename:"memcached.svg",category:"Databases",collectors:["python.d.plugin:memcached"],contexts:["memcached.cache","memcached.net","memcached.connections"],priority:10},{name:"RethinkDB",title:"RethinkDB",iconName:"serviceRethinkDB",logoFilename:"rethinkdb.svg",category:"Databases",collectors:["python.d.plugin:rethinkdbs"],contexts:["rethinkdb.cluster_queries","rethinkdb.cluster_clients_active","rethinkdb.cluster_connected_servers"],priority:11},{name:"Solr",title:"Solr",iconName:"serviceSolr",logoFilename:"solr.svg",category:"Databases",collectors:["go.d.plugin:solr"],contexts:["solr.search_requests","solr.update_requests"],priority:12},{name:"RabbitMQ",title:"RabbitMQ",iconName:"serviceRabbitMQ",logoFilename:"rabbitmq.svg",category:"Messaging",collectors:["python.d.plugin:rabbitmq","go.d.plugin:rabbitmq"],contexts:["rabbitmq.queued_messages","rabbitmq.erlang_run_queue"],priority:1},{name:"Beanstalkd",title:"Beanstalkd",iconName:"serviceBeanstalk",logoFilename:"beanstalkd.svg",category:"Messaging",collectors:["python.d.plugin:beanstalk"],contexts:["beanstalk.total_jobs_rate","beanstalk.connections_rate","beanstalk.current_tubes"],priority:2},{name:"Apache",title:"Apache",iconName:"serviceApache",logoFilename:"apache.svg",category:"Web, Proxies, LBs, Streaming",collectors:["python.d.plugin:apache","go.d.plugin:apache"],contexts:["apache.requests","apache.connections","apache.net"],priority:1},{name:"nginx",title:"nginx",iconName:"serviceNginx",logoFilename:"nginx.svg",category:"Web, Proxies, LBs, Streaming",collectors:["python.d.plugin:nginx","go.d.plugin:nginx"],contexts:["nginx.requests","nginx.connections"],priority:2},{name:"nginx+",title:"nginx+",iconName:"serviceNginxPlus",logoFilename:"nginx-plus.svg",category:"Web, Proxies, LBs, Streaming",collectors:["python.d.plugin:nginx_plus"],contexts:["nginx_plus.requests_total","nginx_plus.connections_statistics"],priority:3},{name:"lighthttpd",title:"lighthttpd",iconName:"serviceLighthttpd",logoFilename:"lighthttpd.svg",category:"Web, Proxies, LBs, Streaming",collectors:["python.d.plugin:lighttpd","go.d.plugin:lighttp"],contexts:["lighttpd.requests","lighttpd.net"],priority:4},{name:"lighthttpd2",title:"lighthttpd2",iconName:"serviceLighthttpd2",logoFilename:"lighthttpd.svg",category:"Web, Proxies, LBs, Streaming",collectors:["go.d.plugin:lighttpd2"],contexts:["lighttpd2.requests","lighttpd2.traffic"],priority:5},{name:"LiteSpeed",title:"LiteSpeed",iconName:"serviceLiteSpeed",logoFilename:"litespeed.svg",category:"Web, Proxies, LBs, Streaming",collectors:["python.d.plugin:litespeed"],contexts:["litespeed.requests","litespeed.requests_processing"],priority:6},{name:"Tomcat",title:"Tomcat",iconName:"serviceApacheTomcat",logoFilename:"tomcat.svg",category:"Web, Proxies, LBs, Streaming",collectors:["python.d.plugin:tomcat"],contexts:["tomcat.accesses","tomcat.processing_time","tomcat.bandwidth"],priority:7},{name:"PHP FPM",title:"PHP FPM",iconName:"servicePhpFpm",logoFilename:"php-fpm.svg",category:"Web, Proxies, LBs, Streaming",collectors:["python.d.plugin:phpfm"],contexts:["phpfpm.performance","phpfpm.requests","phpfpm.connections"],priority:8},{name:"HAproxy",title:"HAproxy",iconName:"serviceHAProxy",logoFilename:"haproxy.svg",category:"Web, Proxies, LBs, Streaming",collectors:["python.d.plugin:haproxy"],contexts:["haproxy_f.scur","haproxy_f.bin","haproxy_f.bout"],priority:9},{name:"Squid",title:"Squid",iconName:"serviceSquid",logoFilename:"squid.svg",category:"Web, Proxies, LBs, Streaming",collectors:["python.d.plugin:squid"],contexts:["squid.clients_requests","squid.clients_net"],priority:10},{name:"Traefik",title:"Traefik",iconName:"serviceTraefik",logoFilename:"traefik.svg",category:"Web, Proxies, LBs, Streaming",collectors:["python.d.plugin:traefik"],contexts:["traefik.response_codes"],priority:11},{name:"Varnish",title:"Varnish",iconName:"serviceVarnish",logoFilename:"varnish.svg",category:"Web, Proxies, LBs, Streaming",collectors:["python.d.plugin:varnish"],contexts:["varnish.session_connection","varnish.client_requests"],priority:12},{name:"IPVS",title:"IPVS",iconName:"serviceIPVS",logoFilename:"load-balancer.svg",category:"Web, Proxies, LBs, Streaming",collectors:["proc.plugin:/proc/net/ip_vs_stats"],contexts:["ipvs.sockets","ipvs.packets","ipvs.net"],priority:13},{name:"Web Log",title:"Web Log",iconName:"serviceWebLog",logoFilename:"log-file.svg",category:"Web, Proxies, LBs, Streaming",collectors:["python.d.plugin:web_log","go.d.plugin:web_log"],contexts:["web_log.response_codes","web_log.bandwidth"],priority:14},{name:"IPFS",title:"IPFS",iconName:"serviceIPFS",logoFilename:"ipfs.svg",category:"Web, Proxies, LBs, Streaming",collectors:["python.d.plugin:ipfs"],contexts:["ipfs.bandwidth","ipfs.peers"],priority:15},{name:"IceCast Media Streaming",title:"IceCast Media Streaming",iconName:"serviceIceCast",logoFilename:"icecast.svg",category:"Web, Proxies, LBs, Streaming",collectors:["python.d.plugin:icecast"],contexts:["icecast.listeners"],priority:16},{name:"RetroShare",title:"RetroShare",iconName:"serviceRetroShare",logoFilename:"retroshare.svg",category:"Web, Proxies, LBs, Streaming",collectors:["python.d.plugin:retroshare"],contexts:["retroshare.bandwidth","retroshare.peers"],priority:17},{name:"HTTP Check",title:"HTTP Check",iconName:"serviceHTTPCheck",logoFilename:"server-connection.svg",category:"Web, Proxies, LBs, Streaming",collectors:["python.d.plugin:httpcheck","go.d.plugin:httpcheck"],contexts:["httpcheck.responsetime","httpcheck.status"],priority:18},{name:"x509 Check",title:"x509 Check",iconName:"serviceX509Check",logoFilename:"data-encryption.svg",category:"Web, Proxies, LBs, Streaming",collectors:["go.d.plugin:x509check"],contexts:["x509check.time_until_expiration"],priority:19}].reduce(((e,t)=>({...e,[t.name]:t})),{}),x=e=>{var t;return(null===(t=v[e])||void 0===t?void 0:t.iconName)||"services"},b=e=>{var t;let{node:n}=e;return null!==(t=n.services)&&void 0!==t&&t.length?r.createElement(y.A,{link:"https://learn.netdata.cloud/docs/agent/collectors/collectors#service-and-application-collectors",name:"Services"},n.services.map((e=>r.createElement(g.A,{size:"small",key:e,iconName:x(e),name:e,testId:"sidebar-ServicesGroup-service-".concat(e)})))):null};var I=n(58010),E=n(17240);const C=e=>{let{nodeIds:t,flavour:n}=e;const a=(0,i.l6)("sidebarNodeId",{defaultValue:t[0],flavour:"val",extraKey:n}),l=(0,m.xY)(a);return l.id?r.createElement(o.Flex,{column:!0,gap:1,overflow:{horizontal:"hidden",vertical:"auto"},padding:[2],width:"100%"},r.createElement(o.TextBig,{strong:!0},"Info"),r.createElement(o.Flex,{column:!0,padding:[2,0,3],border:{side:"bottom",color:"borderSecondary"}},false,r.createElement(o.TextSmall,{"data-testid":"sidebar-nodeInfoContent-hostname",strong:!0},"Hostname: ",l.name)),r.createElement(f.A,{node:l}),r.createElement(p.A,{node:l}),r.createElement(h.A,{node:l}),r.createElement(I.A,{node:l}),r.createElement(b,{node:l}),r.createElement(E.A,{node:l})):r.createElement(o.Text,null,"Select a node to see its\u2019 info")};var A=n(29217),k=n(20687),w=(n(25440),n(55309)),S=n(20982),P=n(18713),N=n(59090);const F=e=>e&&"0"!==e?"".concat(parseFloat(e).toFixed(2),"%"):"-";n(14905),n(8872);var _=n(82543),K=n(61427);const M=e=>{let{chartIds:t,weightKey:n,flavour:l="rhs",...i}=e;const[s,c,d]=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],{flavour:t,weightKey:n="weight"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a=(0,_.g)(),{loaded:l,byContext:o}=(0,K.G9)({nodeIds:a,flavour:t});return(0,r.useMemo)((()=>{if(!l)return[!1,null,null];let t=null;const a=e.reduce(((e,a)=>{let r;if(/::/.test(a)){const e=a.split("::");a=e[0],r=e[1]}const[l,i]=r?((e,t,n,a)=>{var r,l;let{max:o,maxWeightContext:i,weightKey:s}=a;const c="".concat(n,",").concat(t);return e[c]&&((null===(r=e[c])||void 0===r?void 0:r[s])||0)>o?[(null===(l=e[c])||void 0===l?void 0:l[s])||0,t]:[o,i]})(o,a,r,{max:e,maxWeightContext:t,weightKey:n}):((e,t,n)=>{let{max:a,maxWeightContext:r,weightKey:l}=n;return e[t]&&(e[t][l]||0)>a?[e[t][l]||0,t]:[a,r]})(o,a,{max:e,maxWeightContext:t,weightKey:n});return t=i,l}),0);return[!0,a,t]}),[e,o])}(t,{flavour:l,weightKey:n});return s?r.createElement(A.A,{content:d,align:"top",enterDelay:200,activateOn:"hover"},r.createElement(o.Pill,(0,a.A)({hollow:!0,flavour:"neutral",tiny:!0,cursor:i.onClick?"pointer":"auto"},i),F(c))):null},L=(0,l.default)(o.IconButton).attrs((e=>({flavour:"borderless",cursor:"pointer",width:"12px",height:"12px",iconColor:"textLite",padding:[0],...e}))).withConfig({displayName:"config__ConfigButton",componentId:"sc-1q0bfbp-0"})([""]),T=(0,l.default)(o.Flex).withConfig({displayName:"menuSettings__SettingsContainer",componentId:"sc-1nq4zzt-0"})(["display:",";"],(e=>e.active&&!e.hasSubmenuActive?"flex":"none")),D=(0,l.css)(["","{display:flex;"," .button-icon__color{fill:"," !important;}}"],T,L,(0,o.getColor)("text")),B=e=>{let{id:t,chartIds:n,arFlavour:a,showAR:l=!0,showConfig:i,weightKey:s,active:c,hasSubmenuActive:d,extraKey:u}=e;return r.createElement(o.Flex,{gap:1,alignItems:"center"},!1,l&&r.createElement(M,{chartIds:n,flavour:a,weightKey:s}))},q=(0,l.default)(o.TextSmall).attrs((e=>{let{active:t,id:n,name:a,link:r,children:l,...o}=e;return{strong:t,children:a||l||n,href:"#".concat(r),"data-sidebar-submenuid":n,truncate:!0,whiteSpace:"normal",color:"textLite",wordWrap:"break-word",...o}})).withConfig({displayName:"menuItem__MenuLabelWrapper",componentId:"sc-18613h0-0"})(["&&&{text-decoration:none;}"]),V=(0,l.css)(["border-left:1px solid ",";","{color:",";}"],(0,o.getColor)("key"),q,(0,o.getColor)("key")),O=(0,l.default)(o.Flex).attrs((e=>{let{active:t,...n}=e;return{width:"98%",padding:[.5,1,.5,4],role:"listitem",as:"a","aria-current":t,active:t,...n}})).withConfig({displayName:"menuItem__Container",componentId:"sc-18613h0-1"})(["&&&{border-left:1px solid transparent;"," "," text-decoration:none;cursor:pointer;&:hover{"," ","}}"],(e=>e.active&&V),(e=>e.active&&"".concat(q," { font-weight: bold; }")),V,D),z=(0,N.A)(q,(e=>{let{name:t,id:n}=e;return{children:t||n}})),H=(0,r.forwardRef)(((e,t)=>{let{id:n,useItemsAreVisible:l,...o}=e;const i=l(o.chartIds);return o.forceVisibility||i?r.createElement(O,(0,a.A)({ref:t,as:"a",gap:2,alignItems:"center",justifyContent:"between","data-sidebar-menugroupid":n},o)):null})),W=(0,N.A)(H,(e=>{let{id:t,link:n,chartIds:a,forceVisibility:r}=e;return{id:t,href:"#".concat(n),chartIds:a,forceVisibility:r}})),j=(0,N.A)((e=>t=>{let{id:n,...l}=t;const o=(0,P.W7)((e=>n===e));return r.createElement(e,(0,a.A)({active:o,id:n},l))})((G=e=>{let{id:t,...n}=e;return r.createElement(W,(0,a.A)({id:t},n),r.createElement(z,{id:t}),r.createElement(B,(0,a.A)({},n,{id:t})))},e=>{let{id:t,onSubMenuClick:n,...l}=e;const o=(0,r.useMemo)((()=>n&&(e=>n(t,e))),[n,t]);return r.createElement(G,(0,a.A)({onClick:o,id:t},l))})));var G;const R=(0,l.default)(o.Text).attrs({color:"textLite"}).withConfig({displayName:"menuGroup__MenuGroupLabelWrapper",componentId:"sc-1q9pvct-0"})(["font-weight:500;"]),U=(0,l.default)(o.Flex).attrs({flex:!1,color:"textLite",width:6,alignItems:"center",justifyContent:"center"}).withConfig({displayName:"menuGroup__FaIcon",componentId:"sc-1q9pvct-1"})([""]),Q=(0,l.css)(["border-left:2px solid ",";","{color:",";}"],(0,o.getColor)("text"),R,(0,o.getColor)("text")),Z=(0,l.default)(o.Flex).attrs({width:"98%"}).withConfig({displayName:"menuGroup__Container",componentId:"sc-1q9pvct-2"})(["&&&{border-left:2px solid transparent;"," "," text-decoration:none;cursor:pointer;&:hover{"," ","}}"],(e=>e.active&&Q),(e=>e.active&&"".concat(R," { font-weight: bold; }")),Q,D),Y=(0,w.HB)(R,(e=>{let{name:t,id:n}=e;return{children:t||n}})),$=(0,w.HB)((e=>{let{icon:t}=e;return t?r.createElement(U,null,o.iconsList[t]?r.createElement(o.Icon,{name:t,size:"small",color:"text"}):r.createElement(S.g,{icon:t})):null}),(e=>{let{icon:t}=e;return{icon:t}})),J=(0,r.forwardRef)(((e,t)=>{let{id:n,subMenuChartIds:l,useItemsAreVisible:o,...i}=e;const s=o(l);return i.forceVisibility||s?r.createElement(Z,(0,a.A)({ref:t,as:"a",gap:2,padding:[1],alignItems:"center",justifyContent:"between","data-sidebar-menugroupid":n},i)):null})),X=(0,w.HB)(J,(e=>{let{id:t,link:n,subMenuChartIds:a,forceVisibility:r}=e;return{id:t,href:"#".concat(n),subMenuChartIds:a,forceVisibility:r}})),ee=e=>{let{id:t,...n}=e;return r.createElement(X,(0,a.A)({id:t},n),r.createElement(o.Flex,null,r.createElement($,{id:t}),r.createElement(Y,{id:t})),r.createElement(B,(0,a.A)({},n,{id:t})))},te=(0,w.HB)((e=>{let{subMenuIds:t,onSubMenuClick:n,useItemsAreVisible:l,...i}=e;return r.createElement(o.Flex,(0,a.A)({column:!0,role:"list",padding:[0,0,2,0]},i),t.map((e=>r.createElement(j,{key:e,id:e,onSubMenuClick:n,useItemsAreVisible:l}))))}),(e=>{let{subMenuIds:t}=e;return{subMenuIds:t}})),ne=(0,r.forwardRef)(((e,t)=>r.createElement(o.Flex,(0,a.A)({as:"li",column:!0,ref:t},e)))),ae=(e=>t=>{let{id:n,...l}=t;const o=(0,P.C)(n),i=(0,P.W7)((e=>!!e));return r.createElement(e,(0,a.A)({active:o,hasSubmenuActive:i,id:n},l))})((e=>t=>{let{id:n,onMenuGroupClick:l,onSubMenuClick:o,...i}=t;const s=(0,r.useMemo)((()=>l&&(e=>l(n,e))),[l,n]),c=(0,r.useMemo)((()=>o&&((e,t)=>o(n,e,t))),[o,n]);return r.createElement(e,(0,a.A)({id:n,onMenuGroupClick:s,onSubMenuClick:c},i))})((e=>{let{id:t,active:n,hasSubmenuActive:l,onMenuGroupClick:o,onSubMenuClick:i,showChildren:s=!0,useItemsAreVisible:c,...d}=e;const u=(0,w.Ee)(t);return u?r.createElement(ne,d,r.createElement(ee,(0,a.A)({},u,{id:t,onClick:o,active:n,hasSubmenuActive:l,chartIds:u.subMenuChartIds,useItemsAreVisible:c})),s&&n&&r.createElement(te,{id:t,onSubMenuClick:i,useItemsAreVisible:c})):null}))),re=(0,r.forwardRef)(((e,t)=>r.createElement(o.Flex,(0,a.A)({as:"ul",width:"100%",role:"complementary",column:!0,overflow:{vertical:"auto"},"data-sidebar":"true",ref:t},e)))),le=()=>!0,oe=(0,r.memo)((e=>{let{menuGroupIds:t,onMenuGroupClick:n,onSubMenuClick:l,menuGroupProps:o,useItemsAreVisible:i=le,extraKey:s,...c}=e;return r.createElement(re,c,t.map((e=>r.createElement(ae,(0,a.A)({key:e,id:e,onMenuGroupClick:n,onSubMenuClick:l,useItemsAreVisible:i,extraKey:s},o)))))})),ie=(0,w.$V)(oe),se=(0,r.memo)(ie);var ce=n(79566),de=n(71847),ue=n(73700),me=n(13271);const ge=()=>{const[e,t]=(0,me.sK)(),n=(0,r.useCallback)((0,ue.s)(300,(e=>{t(e.target.value),(0,de.H)("toc-search","search-automatic-trigger","charts-view",e.target.value)})),[]),[a,l,,,{resetValue:i}]=(0,o.useInputValue)({value:e,onChange:n}),s=(0,r.useCallback)((()=>{t(""),i(),(0,de.H)("toc-search","clear-search-button","charts-view")}),[]);return r.createElement(o.TextInput,{value:a,onChange:l,size:"small",iconRight:a&&r.createElement(o.Icon,{name:"x",color:"textLite",cursor:"pointer",size:"small",onClick:s,"data-testid":"filterChartsInput-clearButton"}),placeholder:"Search charts",name:"Search charts","data-testid":"filterChartsInput",containerStyles:{width:"100%"}})};var pe=n(47767),he=n(4659),fe=n(97054);const ye=(0,ue.s)(300,((e,t)=>(0,de.H)("toc-search","search-results","charts-view",e,"".concat(t," -- charts")))),ve=()=>{const e=(0,pe.Zp)(),[t]=(0,fe.Ay)(),n=(0,me.Um)(),{filteredChartsCount:a,chartsCount:l}=(0,me.Ad)();(0,r.useEffect)((()=>{n&&ye(n,a)}),[n,a]);const i=(0,r.useCallback)((n=>{n.preventDefault(),e("/spaces/".concat(t,"/settings/configurations"),{replace:!0})}),[t,e]);return r.createElement(r.Fragment,null,r.createElement(o.TextMicro,{alignSelf:"end",color:"textLite",margin:[1,0,0],"data-testid":"numberOfChartsIndication"},"Showing"," ",r.createElement(o.TextMicro,{strong:!0,color:"textDescription","data-testid":"numberOfChartsIndication-filteredChartsCount"},a)," ","of total"," ",r.createElement(o.TextMicro,{strong:!0,color:"textDescription","data-testid":"numberOfChartsIndication-chartsCount"},l)," ","charts"),r.createElement(he.A,{Component:o.TextMicro,alignSelf:"end","data-ga":"toc-search::click-link-collectors::".concat(name),onClick:i,target:"_blank",rel:"noopener noreferrer"},"Add more charts"))},xe=()=>{const{filteredChartsCount:e}=(0,me.Ad)();return e?null:r.createElement(o.Flex,{width:"100%",gap:1,margin:[4,0,0],padding:[2],round:1,background:"disabledBackground",alignItems:"center","data-testid":"noResultsWereFound"},r.createElement(o.Icon,{name:"information",color:"textDescription"}),r.createElement(o.TextMicro,{strong:!0,color:"textDescription"},"No results were found"))},be=(0,_.A)(ve),Ie=()=>r.createElement(o.Flex,{column:!0,alignItems:"center",height:{min:"65px"}},r.createElement(ge,null),r.createElement(be,null),r.createElement(xe,null));var Ee=n(23931),Ce=n(8320),Ae=n(68831),ke=n(87659),we=n(3914),Se=n(69765);const{demoSlug:Pe,demoFavourites:Ne}=Ae.A,Fe=(0,l.default)(o.Icon).attrs({size:"small",name:"chevron_left",color:"textLite"}).withConfig({displayName:"favourites__StyledChevron",componentId:"sc-mwcyj8-0"})(["transition:transform 0.2s ease-in-out;"]),_e={showChildren:!1},Ke=e=>{let{onMenuGroupClick:t,onSubMenuClick:n,initialChartName:a,flavour:l}=e;const i=(0,we.bq)(),s=(0,Se.QW)(),c=Pe===i&&Ne[s]||[],d=(0,w.re)((u=c,e=>u.reduce(((t,n)=>e[n]?[...t,n]:t),[])));var u;const{onMenuGroupClick:m,onSubMenuClick:g}=(0,ce.A)({onMenuGroupClick:t,onSubMenuClick:n}),[p,h]=(0,ke.A)(!0),f=(0,Ce.UH)();return(0,r.useEffect)((()=>{f&&!a&&d.length&&t(d[0])}),[f,a]),d.length?r.createElement(o.Flex,{column:!0,gap:1,border:{side:"bottom",color:"borderSecondary"},padding:[0,0,2]},r.createElement(o.Flex,{onClick:h,cursor:"pointer",alignItems:"center",justifyContent:"between"},r.createElement(o.Flex,{gap:1,alignItems:"center"},r.createElement("i",{className:"fa-regular fa-star"}),r.createElement(o.Text,{strong:!0,color:"textFocus"},"Favourites")),r.createElement(Fe,{rotate:p?1:3,alignSelf:"end"})),r.createElement(o.Collapsible,{open:p,padding:[0,0,0,2]},r.createElement(oe,{menuGroupIds:d,onMenuGroupClick:m,onSubMenuClick:g,menuGroupProps:_e,extraKey:l}))):null},Me={nodesView:()=>!0,default:Ee.Bu},Le=e=>(0,de.H)("metric-sidebar","click-".concat(De(e)),"mn-overview"),Te=e=>{const t=De(e);(0,de.H)("metric-sidebar","click-".concat(t),"mn-overview",t)},De=e=>e.startsWith("Kubernetes")?"k8s":e.replace(/[^\w]/g,"-").toLowerCase(),Be=e=>{let{initialChartName:t,loaded:n,hasSearch:a=!0,flavour:l}=e;const{onMenuGroupClick:i,onSubMenuClick:s}=(0,ce.A)({onMenuGroupClick:Le,onSubMenuClick:Te,loaded:n}),c=Me[l]||Me.default;return r.createElement(r.Fragment,null,a&&r.createElement(o.Flex,{column:!0,position:"sticky",top:"0",gap:1,padding:[0,2]},r.createElement(o.Text,{strong:!0},"Sections and Charts"),r.createElement(Ie,null)),n&&r.createElement(r.Fragment,null,r.createElement(Ke,{onMenuGroupClick:i,onSubMenuClick:s,initialChartName:t,useItemsAreVisible:c,flavour:l}),r.createElement(se,{position:"relative",onMenuGroupClick:i,onSubMenuClick:s,width:"100%",useItemsAreVisible:c,extraKey:l})))};var qe=n(23452),Ve=n(59846),Oe=n(82700);const ze=e=>e.id,He=e=>{let{baseKey:t,param:n,paramKey:l,extraKey:o,testIdPrefix:s,title:c,groupProps:d}=e;const u=(e=>{let{extraKey:t,param:n,paramKey:a}=e;const l=(0,qe.QD)({extraKey:t,omit:n,keepAll:!0}),o=(0,i.l6)(n,{extraKey:t,flavour:"arr"});return(0,r.useMemo)((()=>Object.entries(l.reduce(((e,t)=>(e[t[a]]=(e[t[a]]||0)+(t.hidden?0:1),e)),{...qe.hv[n]||{}})).map((e=>{let[t,n]=e;return{id:t,count:n}})).sort(qe.qr[n]||qe.qr.default)),[l.filter((e=>e.hidden)).length,o])})({param:n,extraKey:o,paramKey:l});return u.length?r.createElement(Ve.A,(0,a.A)({title:c,testIdPrefix:s,baseKey:t,extraKey:o,param:n,help:"Filter the alerts. Count next to each item refer to the number of alerts that will be selected."},d),r.createElement(Oe.Ay,{param:n,baseKey:t,extraKey:o,testIdPrefix:s,collection:u,getValue:ze,getLabel:ze})):null};n(30237),n(32679),n(8159),n(30670),n(37550),n(25509),n(65223),n(60321),n(41927),n(11632),n(64377),n(66771),n(12516),n(68931),n(52514),n(35694),n(52774),n(49536),n(21926),n(94483),n(16215);var We=n(66245),je=n.n(We),Ge=n(45467);const Re=e=>{const{baseKey:t,extraKey:n,param:l,testIdPrefix:o,itemsProps:s,itemProps:c,groupProps:d,...u}={...Oe.H5,...e},m=(e=>{let{extraKey:t,param:n}=e;const a=(0,qe.QD)({extraKey:t,omit:n,keepAll:!0}),l=(0,i.l6)(n,{extraKey:t,flavour:"arr"});return(0,r.useMemo)((()=>Object.entries(a.reduce(((e,t)=>{let{type:n,component:a,hidden:r}=t;return e[n]=e[n]||{count:0,children:{}},e[n].count=(e[n].count||0)+(r?0:1),e[n].children[a]=(e[n].children[a]||0)+(r?0:1),e}),{})).reduce(((e,t)=>{let[n,{count:a,children:r}]=t;return e.push({id:n,count:a,children:Object.entries(r).map((e=>{let[t,a]=e;return{value:"".concat(n,"|").concat(t),label:t,count:a,level:1}}))}),e}),[]).sort(qe.qr[n]||qe.qr.default)),[a.filter((e=>e.hidden)).length,l])})({param:l,extraKey:n}),[g,p]=(0,i.N9)(l,{defaultValue:[],key:t,extraKey:n,flavour:"arr"});(0,Ge.A)((()=>{m.length&&g.length&&p((e=>e.filter((e=>m.some((t=>t.children.some((t=>t.value===e))))))))}),[m.length,p]);const h=(0,r.useCallback)((e=>{let{value:t,checked:n}=e;p((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(t)?n?[...new Set([...e,...t])]:je()(e,t):n?[...e,t]:e.filter((e=>e!==t))}))}),[p]),f=(0,r.useMemo)((()=>(e=>{let{options:t,selected:n,itemsProps:a={}}=e;if(!t.length)return[];const r=t.flatMap((e=>e.children.map((e=>e.value)))),l=r.length===n.length,o=!l&&!!n.length;return[{...a.head,label:"Select all",value:r,selected:l,indeterminate:o},...t.flatMap((e=>{let{id:t,children:r,count:l}=e;const o=n.length&&!r.some((e=>!n.includes(e.value))),i=!o&&n.length&&r.some((e=>n.includes(e.value)));return r.reduce(((e,t)=>{const r=n.includes(t.value);return[...e,{...a.row,...t,selected:r}]}),[{...a.head,label:t,value:r.map((e=>e.value)),selected:o,indeterminate:i,count:l}])}))]})({options:m,selected:g,itemsProps:s})),[g,p,m]);return m.length?r.createElement(Ve.A,(0,a.A)({title:"Alert type & component",testIdPrefix:o,baseKey:t,extraKey:n,param:l,help:"Filter the alerts. Count next to each item refer to the number of alerts that will be selected."},d),r.createElement(Oe.V$,(0,a.A)({"data-testid":"".concat(o,'-filter-selections"'),searchMargin:[0,0,1],items:f,onItemClick:h,value:g,"data-value":g.join(",")||"all-selected",hasSearch:m.length>5,itemProps:{testIdPrefix:o,...c}},u))):null};var Ue=n(11128);const Qe=e=>e.id,Ze=e=>{let{baseKey:t,param:n,paramKey:l,extraKey:o,testIdPrefix:s,title:c,groupProps:d,...u}=e;const m=(e=>{let{extraKey:t,param:n,paramKey:a}=e;const l=(0,Ue.eO)({extraKey:t,omit:n,keepAll:!0,scoped:!!t}),o=(0,i.l6)(n,{extraKey:t,flavour:"arr"});return(0,r.useMemo)((()=>Object.entries(l.reduce(((e,t)=>(e[t[a]]=(e[t[a]]||0)+(t.hidden?0:1),e)),{})).map((e=>{let[t,n]=e;return{id:t,count:n}})).sort(Ue.qr[n]||Ue.qr.default)),[l.filter((e=>e.hidden)).length,o])})({param:n,extraKey:o,paramKey:l});return m.length?r.createElement(Ve.A,(0,a.A)({title:c,testIdPrefix:s,baseKey:t,extraKey:o,param:n,defaultIsOpen:!1},d),r.createElement(Oe.Ay,(0,a.A)({param:n,baseKey:t,extraKey:o,testIdPrefix:s,collection:m,getValue:Qe,getLabel:Qe},u))):null};n(9920),n(3949);const Ye=e=>{const{baseKey:t,extraKey:n,param:l,testIdPrefix:o,itemsProps:s,itemProps:c,groupProps:d,...u}={...Oe.H5,...e},m=(e=>{let{extraKey:t,param:n}=e;const a=(0,Ue.eO)({extraKey:t,omit:n,keepAll:!0,merge:!0}),l=(0,i.l6)(n,{extraKey:t,flavour:"arr"});return(0,r.useMemo)((()=>Object.entries(a.reduce(((e,t)=>{let{labels:n,hidden:a}=t;return Object.keys(n).forEach((t=>{e[t]=e[t]||{count:0,children:{}},e[t].count=(e[t].count||0)+(a?0:1),e[t].children[n[t]]=(e[t].children[n[t]]||0)+(a?0:1)})),e}),{})).reduce(((e,t)=>{let[n,{count:a,children:r}]=t;return e.push({id:n,count:a,children:Object.entries(r).map((e=>{let[t,a]=e;return{value:"".concat(n,"|").concat(t),label:t,count:a,level:1}}))}),e}),[]).sort(Ue.qr[n]||Ue.qr.default)),[a.filter((e=>e.hidden)).length,l])})({param:l,extraKey:n}),[g,p]=(0,i.N9)(l,{defaultValue:[],key:t,extraKey:n,flavour:"arr",merge:!1});(0,Ge.A)((()=>{m.length&&g.length&&p((e=>e.filter((e=>m.some((t=>t.children.some((t=>t.value===e))))))))}),[m.length,p]);const h=(0,r.useCallback)((e=>{let{value:t,checked:n}=e;p((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(t)?n?[...new Set([...e,...t])]:je()(e,t):n?[...e,t]:e.filter((e=>e!==t))}))}),[p]),f=(0,r.useMemo)((()=>(e=>{let{options:t,selected:n,itemsProps:a={}}=e;if(!t.length)return[];const r=t.flatMap((e=>e.children.map((e=>e.value)))),l=r.length===n.length,o=!l&&!!n.length;return[{...a.head,label:"Select all",value:r,selected:l,indeterminate:o},...t.flatMap((e=>{let{id:t,children:r,count:l}=e;const o=n.length&&!r.some((e=>!n.includes(e.value))),i=!o&&n.length&&r.some((e=>n.includes(e.value)));return r.reduce(((e,t)=>{const r=n.includes(t.value);return[...e,{...a.row,...t,selected:r}]}),[{...a.head,label:t,value:r.map((e=>e.value)),selected:o,indeterminate:i,count:l}])}))]})({options:m,selected:g,itemsProps:s})),[g,p,m]);return m.length?r.createElement(Ve.A,(0,a.A)({title:"Host labels",testIdPrefix:o,baseKey:t,extraKey:n,param:l},d),r.createElement(Oe.V$,(0,a.A)({"data-testid":"".concat(o,'-filter-selections"'),searchMargin:[0,0,1],items:f,onItemClick:h,value:g,"data-value":g.join(",")||"all-selected",hasSearch:m.length>3,itemProps:{testIdPrefix:o,...c}},u))):null};var $e=n(94177);const Je=(0,r.memo)((e=>{let{flavour:t,groupProps:n,...l}=e;const i=(0,Se.ID)();return r.createElement(o.Flex,(0,a.A)({column:!0,overflow:{vertical:"auto"},padding:[0,2,30]},l),"alerts"===t&&r.createElement(r.Fragment,null,r.createElement(He,{title:"Alert status",testIdPrefix:"alert-status",baseKey:i,extraKey:t,param:"alertStatuses",paramKey:"status",groupProps:n}),r.createElement(He,{title:"Alert name",testIdPrefix:"alert-name",baseKey:i,extraKey:t,param:"alertNames",paramKey:"name",groupProps:n}),r.createElement(He,{title:"Alert context",testIdPrefix:"alert-context",baseKey:i,extraKey:t,param:"alertContexts",paramKey:"context",groupProps:n}),r.createElement(He,{title:"Alert class",testIdPrefix:"alert-class",baseKey:i,extraKey:t,param:"alertClasses",paramKey:"class",groupProps:n}),r.createElement(Re,{testIdPrefix:"alert-type-component",baseKey:i,extraKey:t,param:"alertTypeComponents",groupProps:n}),r.createElement(He,{title:"Alert role",testIdPrefix:"alert-role",baseKey:i,extraKey:t,param:"alertRoles",paramKey:"recipient",groupProps:n})),"singleNode"!==t&&"anomalies"!==t&&r.createElement(r.Fragment,null,r.createElement(Ye,{testIdPrefix:"node-labels",baseKey:i,extraKey:t,param:"nodeLabels",groupProps:n}),r.createElement(Ze,{title:"Node status",testIdPrefix:"node-status",baseKey:i,extraKey:t,param:"nodeStatuses",paramKey:"nodeStatus",groupProps:n}),r.createElement(Ze,{title:"Netdata version",testIdPrefix:"node-version",baseKey:i,extraKey:t,param:"nodeVersions",paramKey:"version",groupProps:n})),!!t&&"singleNode"!==t&&r.createElement($e.A,{testIdPrefix:"node-ids",baseKey:i,extraKey:t,groupProps:{defaultIsOpen:"anomalies"===t,...n}}))})),Xe={color:{active:"success",notActive:"textLite"},minWidth:"auto"},et={chartIndexing:{...Xe,iconName:"charts_view",Content:Be,dataTestId:"nodeInfo-chartIndexing",label:"Charts"},filters:{...Xe,iconName:"filterList",Content:Je,dataTestId:"nodeInfo-filters",label:"Filters"},alerts:{...Xe,iconName:"alarm_bell",Content:k.A,dataTestId:"nodeInfo-alertsTab",label:"Alerts"},info:{...Xe,iconName:"information",dataTestId:"nodeInfo-alertsTab",Content:C,label:"Info"}},tt=[],nt=(0,l.default)(o.Tabs).withConfig({displayName:"sidebar__StyledTabs",componentId:"sc-1d5ify6-0"})(["overflow:hidden;height:100%;"]),at=e=>{let{flavour:t,children:n}=e;return r.createElement(r.Fragment,null,n)},rt=e=>{let{isActive:t,color:n,name:a,label:l}=e;return r.createElement(A.A,{plain:!0,content:l},r.createElement(o.Icon,{name:a,color:t?n.active:n.notActive,height:"18px",width:"18px"}))},lt=e=>{let{tabs:t=et,hiddenTabs:n=tt,includedTabs:l=tt,title:m,help:g,nodeIds:p=tt,onClose:h,baseWidth:f,...y}=e;const[v,x]=(0,i.r$)("sidebarTab",{defaultValue:"",flavour:"val",extraKey:y.flavour}),b=(0,r.useMemo)((()=>Object.keys(t).filter((e=>(!l.length||l.includes(e))&&!n.includes(e)))),[n]),I=(0,r.useMemo)((()=>{const e=b.findIndex((e=>e===v));return-1===e?0:e}),[v]),[E,C]=(0,i.r$)("sidebarOpen",{defaultValue:!0,flavour:"bool"}),A=(0,r.useCallback)((e=>{x(b[e]),C(!0)}),[b]);return r.createElement(s.Ay,{collapsedComponent:y.flavour&&r.createElement(c.A,{onClickTab:A,availableTabs:t,tabsToShow:b}),isOpen:E,header:y.flavour?r.createElement(d.A,{isOpen:E,onToggle:()=>C(!E),title:m}):r.createElement(u.A,{title:m,help:g,onClick:h}),width:f},r.createElement(o.Flex,{"data-testid":"sidebar-tabs",column:!0,overflow:"hidden",height:"100%"},r.createElement(nt,{selected:I,onChange:A,noDefaultBorder:!0,TabsHeader:(0,r.useMemo)((()=>e=>r.createElement(at,(0,a.A)({flavour:y.flavour},e))),[y.flavour])},b.map(((e,n)=>{const{iconName:l,Content:i,dataTestId:s,color:c,label:d,...u}=t[e];return r.createElement(o.Tab,(0,a.A)({style:{display:1===b.length?"none":"inherit"},"data-testid":s,maxWidth:"100%",key:l,small:!0,label:r.createElement(rt,{isActive:v===n,name:l,color:c,label:d})},u),r.createElement(o.Flex,{column:!0,overflow:"hidden",height:"100%",position:"relative",gap:3,padding:[1,0]},r.createElement(i,(0,a.A)({nodeIds:p},y))))})))))}},55483:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(96540),r=n(83488),l=n.n(r),o=n(2404),i=n.n(o),s=n(86856);const c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l();const n=(0,a.useRef)();return(0,s.i7)(e,(e=>{const a=t(e);return i()(n.current,a)||(n.current=a),n.current}))}}}]);
\ No newline at end of file |