summaryrefslogtreecommitdiffstats
path: root/web/gui/v2/367.cf3f661f1c7bdb62b59b.chunk.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/gui/v2/367.cf3f661f1c7bdb62b59b.chunk.js')
-rw-r--r--web/gui/v2/367.cf3f661f1c7bdb62b59b.chunk.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/web/gui/v2/367.cf3f661f1c7bdb62b59b.chunk.js b/web/gui/v2/367.cf3f661f1c7bdb62b59b.chunk.js
new file mode 100644
index 000000000..d16b5ef93
--- /dev/null
+++ b/web/gui/v2/367.cf3f661f1c7bdb62b59b.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]="7b297f8f-801b-4789-9b60-685e570b28f6",e._sentryDebugIdIdentifier="sentry-dbid-7b297f8f-801b-4789-9b60-685e570b28f6")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"068845a823c962888381794c354a8f6b6e263031"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[367],{46742:function(e,t,n){n.d(t,{lG:function(){return w},om:function(){return h}});var r=n(29439),o=n(93433),a=n(87462),i=n(45987),c=n(4942),l=(n(47042),n(92222),n(41539),n(39714),n(85827),n(25387),n(2490),n(72608),n(26699),n(32023),n(21249),n(57640),n(9924),n(57327),n(88449),n(59849),n(64211),n(41874),n(47941),n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),u=n(60677),s=n(95248),d=n(15557),f=n(39434),m=["item","onItemClick","itemProps"],p=["value","disabled","onClick","label","selected","indeterminate","textColor","iconName","count","level"],g=["baseKey","extraKey","param","Item","testIdPrefix","collection","getValue","getLabel","itemsProps","itemProps","capitalized","multi"];function v(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 y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){(0,c.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b=function(e){return e[0].toUpperCase()+e.slice(1)},h=(0,u.default)(d.Flex).attrs((function(e){return y({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:",";"," ",""],(function(e){return e.disabled?"default":"pointer"}),(function(e){var t=e.disabled;return e.stale||t?.7:1}),(function(e){return e.alignItems||"center"}),(function(e){var t=e.multi,n=e.selected,r=e.theme;return!t&&n&&"\n background-color: ".concat(function(e){var t=e.theme;return("Dark"===t.name?(0,d.getRgbColor)(["green","netdata"],.3):(0,d.getRgbColor)(["green","frostee"]))({theme:t})}({theme:r}),";\n ")}),(function(e){var t=e.multi,n=e.selected,r=e.theme;return!t&&!n&&"\n &:hover {\n background-color: ".concat((0,d.getColor)("borderSecondary")({theme:r}),";\n }\n ")})),w=(0,u.default)(d.Checkbox).withConfig({displayName:"checkboxes__FullWidthCheckbox",componentId:"sc-1vef46u-1"})(["width:100%;"]),x=function(e){var t=e.baseKey,n=e.extraKey,c=e.param,u=e.Item,f=e.testIdPrefix,m=e.collection,p=e.getValue,v=e.getLabel,b=e.itemsProps,h=e.itemProps,w=e.capitalized,x=void 0===w||w,O=e.multi,k=void 0===O||O,C=(0,i.Z)(e,g),I=(0,s.I0)(c,{defaultValue:[],key:t,extraKey:n}),P=(0,r.Z)(I,2),E=P[0],j=P[1];(0,l.useEffect)((function(){if(m.length&&E.length){var e=E.filter((function(e){return m.some((function(t){return p(t)===e}))}));e.length!==E.length&&j(e)}}),[m.length,j]);var L=(0,l.useCallback)((function(e){var t=e.value,n=e.checked;j(k?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(t)?n?t:[]:n?[].concat((0,o.Z)(e),[t]):e.filter((function(e){return e!==t}))}:function(){return n?[t]:[]})}),[j]),Z=(0,l.useMemo)((function(){return function(e){var t=e.collection,n=e.selected,r=e.getValue,a=e.getLabel,i=e.itemsProps,c=e.multi;if(!t.length)return[];var l=c&&t.length<=n.length,u=c&&!l&&!!n.length;return t.reduce((function(e,t){var c=n.includes(r(t));return[].concat((0,o.Z)(e),[y(y(y({},i.row),t),{},{value:r(t),label:a(t),selected:c})])}),c?[y(y({},i.head),{},{label:"Select all",value:t.map(r),selected:l,indeterminate:u})]:[])}({collection:m,selected:E,getValue:p,getLabel:v,itemsProps:b,multi:k})}),[E,j,m]);return l.createElement(d.MenuDropdown,(0,a.Z)({hideShadow:!0,height:{max:"300px"},width:{max:"600px"},background:"mainBackground",overflow:"auto","data-testid":"".concat(f,'-filter-selections"'),searchMargin:[0,0,2],items:Z,Item:u,onItemClick:L,value:E,"data-value":E.join(",")||"all-selected",hasSearch:m.length>5,itemProps:y(y({},h),{},{testIdPrefix:f,capitalized:x,multi:k})},C))},O=function(e){return e};x.defaultProps={itemProps:{padding:[1,.5],maxLength:30,multi:!0},itemsProps:{head:{textColor:"textLite"},row:{textColor:"text"}},Item:function(e){var t=e.item,n=e.onItemClick,r=e.itemProps,o=(0,i.Z)(e,m),c=t.value,u=t.disabled,s=t.onClick,g=t.label,v=t.selected,y=t.indeterminate,x=t.textColor,O=t.iconName,k=t.count,C=t.level,I=void 0===C?0:C,P=(0,i.Z)(t,p),E=r.capitalized,j=r.multi,L=u||!j&&v,Z=function(e){u||(s&&s(e),n({value:c,label:g,checked:!v,item:t}))};return l.createElement(h,(0,a.Z)({"aria-selected":v,selected:v,disabled:L,stale:0===k||"0"===k},P,o,r,{"data-testid":"".concat(r.testIdPrefix,"-filters-item")}),l.createElement(d.Flex,{gap:2,alignItems:"center",padding:[0,0,0,4*I],width:"100%"},j?l.createElement(w,{"data-testid":"".concat(r.testIdPrefix,"-filters-checkbox-").concat(g),checked:v,disabled:L,indeterminate:y,onChange:Z,label:l.createElement(d.Flex,{gap:1,alignItems:"center",width:"100%"},O&&l.createElement(d.Icon,{name:O,size:"small",color:"textLite"}),l.createElement(f.default,{Component:d.TextSmall,title:g,text:"string"===typeof g&&E?b(g):g.toString(),maxLength:r.maxLength||80,color:x}))}):l.createElement(d.Flex,{gap:1,padding:[0,1],alignItems:"center",onClick:Z,"data-testid":"".concat(r.testIdPrefix,"-filters-item-").concat(g)},l.createElement(f.default,{Component:d.TextSmall,title:g,text:"string"===typeof g&&E?b(g):g.toString(),maxLength:r.maxLength||80,color:x}))),!isNaN(k)&&l.createElement(d.Pill,{flavour:"neutral",hollow:!0,"data-testid":"".concat(r.testIdPrefix,"-filters-").concat(g,"-count")},k.toString()))},getValue:O,getLabel:O},t.ZP=x},97193:function(e,t,n){n.d(t,{c:function(){return P}});var r=n(29439),o=n(4942),a=n(93433),i=n(87462),c=n(45987),l=(n(92222),n(41539),n(39714),n(64211),n(2490),n(41874),n(26699),n(32023),n(85827),n(25387),n(72608),n(57327),n(88449),n(59849),n(66992),n(70189),n(78783),n(88921),n(96248),n(13599),n(11477),n(64362),n(15389),n(90401),n(45164),n(91238),n(54837),n(87485),n(56767),n(76651),n(61437),n(35285),n(39865),n(33948),n(47941),n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),u=n(91966),s=n.n(u),d=n(79655),f=n(97945),m=n(95248),p=n(15557),g=n(39434),v=n(91008),y=n(72233),b=n(39583),h=n(46742),w=["value","disabled","onClick","label","nodeId","selected","status","indeterminate","textColor","iconName","hasAlerts","hasML","hasFn","showAlerts","showMl","showFn","requireML","requireFn","capabilities","count","multi"],x=["item","onItemClick","itemProps","close"],O=["baseKey","extraKey","statusProps","multi","useFilteredIds","nodeCounts"];function k(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 C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var I={Live:{head:{label:"Live nodes",textColor:"textLite",iconName:"connectivityStatusLive",hasML:!0,hasAlerts:!0,hasFn:!0},node:{textColor:"text",showAlerts:!0,showMl:!0,showFn:!0}},Stale:{head:{label:"Stale nodes",textColor:"textLite",iconName:"connectivityStatusStale",hasML:!0},node:{textColor:"text",showMl:!0}},Offline:{head:{label:"Offline nodes",textColor:"textLite",iconName:"connectivityStatusOffline"},node:{textColor:"textLite"}}},P=function(e){var t=e.item,n=t.value,r=t.disabled,o=t.onClick,a=t.label,u=t.nodeId,s=t.selected,m=t.status,O=t.indeterminate,k=t.textColor,C=t.iconName,I=t.hasAlerts,P=t.hasML,E=t.hasFn,j=t.showAlerts,L=t.showMl,Z=t.showFn,S=t.requireML,_=t.requireFn,N=t.capabilities,D=t.count,A=t.multi,F=void 0===A||A,U=(0,c.Z)(t,w),M=e.onItemClick,T=e.itemProps,R=e.close,B=(0,c.Z)(e,x),G=(0,f.m3)(u),K=(0,l.useMemo)((function(){var e;return!Z||!N||(null===(e=N.funcs)||void 0===e?void 0:e.enabled)}),[Z]),V=(0,l.useMemo)((function(){var e;return!Z||!N||(null===(e=N.ml)||void 0===e?void 0:e.enabled)}),[Z]),z=r||S&&!V||_&&!K||!F&&s,J=function(e){z||(o&&o(e),M({value:n,checked:!s,status:m}))},H=function(e){e.stopPropagation(),null===R||void 0===R||R()};return l.createElement(h.om,(0,i.Z)({"aria-selected":s,selected:s,disabled:z,stale:0===D||"0"===D},U,B,T,{"data-testid":"filterNodes-item-".concat(a),multi:F}),l.createElement(p.Flex,{gap:2,alignItems:"center",flex:!0},F?l.createElement(l.Fragment,null,l.createElement(h.lG,{"data-testid":"filterNodes-checkbox-".concat(a),checked:s,disabled:z,indeterminate:O,onChange:J,label:l.createElement(p.Flex,{gap:1,alignItems:"center"},C&&l.createElement(p.Icon,{name:C,size:"small",color:"textLite"}),l.createElement(g.default,{Component:p.TextSmall,title:a,text:a,maxLength:(null===T||void 0===T?void 0:T.maxLength)||80,color:k,truncate:!0}),"Offline"!==m&&!Array.isArray(n)&&l.createElement(v.Z,{as:d.rU,to:G,state:{nodeId:u},"data-testid":"filterNodes-item-gta",color:"textLite",hoverColor:"text",onClick:H},l.createElement(p.Icon,{name:"nav_arrow_goto",height:"10px",width:"10px"})))})):l.createElement(p.Flex,{gap:1,padding:[0,1],alignItems:"center",onClick:J,"data-testid":"filterNodes-item-".concat(a),flex:!0},l.createElement(g.default,{Component:p.TextSmall,title:a,text:a,maxLength:(null===T||void 0===T?void 0:T.maxLength)||80,color:k}),"Offline"!==m&&!Array.isArray(n)&&l.createElement(v.Z,{as:d.rU,to:G,state:{nodeId:u},"data-testid":"filterNodes-item-gta",color:"textLite",hoverColor:"text",onClick:H},l.createElement(p.Icon,{name:"nav_arrow_goto",height:"10px",width:"10px"})))),l.createElement(p.Flex,{gap:1},j&&l.createElement(p.Flex,{gap:1,justifyContent:"center",width:17},l.createElement(b.Z,{id:n,isLive:!0,name:a})),L&&l.createElement(p.Flex,{gap:1,justifyContent:"center",width:10},l.createElement(y.Z,{badge:"ml","data-testid":"nodes-indicator-machine-learning",enabled:V,name:a})),Z&&l.createElement(p.Flex,{gap:1,justifyContent:"center",width:10},l.createElement(y.Z,{badge:"fn","data-testid":"nodes-indicator-fn",enabled:K,name:a})),I&&l.createElement(p.Flex,{gap:1,justifyContent:"center",width:17},l.createElement(p.Icon,{name:"alarm",size:"small",color:"textLite"}),l.createElement(p.TextSmall,{strong:!0,color:"textLite"},"Alerts")),P&&l.createElement(p.Flex,{gap:1,justifyContent:"center",width:10},l.createElement(p.Icon,{name:"anomaliesLens",size:"small",color:"textLite"}),l.createElement(p.TextSmall,{strong:!0,color:"textLite"},"ML")),E&&l.createElement(p.Flex,{gap:1,justifyContent:"center",width:10},l.createElement(p.Icon,{name:"functions",size:"small",color:"textLite"}),l.createElement(p.TextSmall,{strong:!0,color:"textLite"},"Fn")),!isNaN(D)&&l.createElement(p.Pill,{flavour:"neutral",hollow:!0,"data-testid":"".concat(T.testIdPrefix,"-filters-").concat(a,"-count")},D.toString())))},E=function(e){var t=e.ids,n=e.status,r=e.selectedIds,o=e.nodesById,i=e.statusProps,c=e.multi,l=void 0===c||c,u=e.nodeCounts;if(!t.length)return[];var s=l&&!t.some((function(e){return!r.includes(e)})),d=l&&r.length&&!s&&t.some((function(e){return r.includes(e)}));return t.reduce((function(e,t){var c=o[t],s=c.name,d=c.capabilities,f=r.includes(t);return[].concat((0,a.Z)(e),[C(C({value:t,label:s,nodeId:t,selected:f,status:n,capabilities:d},i[n].node),{},{multi:l,count:u?u[t]||0:NaN})])}),[C(C({value:t,selected:s,indeterminate:d,disabled:!l,status:n},i[n].head),{},{multi:l})])},j=function(e){return e};t.Z=function(e){var t=e.baseKey,n=e.extraKey,o=e.statusProps,u=void 0===o?I:o,d=e.multi,g=void 0===d||d,v=e.useFilteredIds,y=void 0===v?j:v,b=e.nodeCounts,h=(0,c.Z)(e,O),w=y((0,m.H7)()),x=(0,m.wT)({defaultValue:[],key:t,extraKey:n}),k=(0,r.Z)(x,2),C=k[0],L=k[1];(0,l.useEffect)((function(){if(w.length&&C.length){var e=C.filter((function(e){return w.includes(e)}));e.length!==C.length&&L(e)}}),[w]);var Z=(0,f.HZ)(w),S=(0,f.e5)(w),_=(0,f.mf)(w),N=(0,l.useCallback)((function(e){var t=e.value,n=e.checked;L(g?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(t)?n?(0,a.Z)(new Set([].concat((0,a.Z)(e),(0,a.Z)(t)))):s()(e,t):n?[].concat((0,a.Z)(e),[t]):e.filter((function(e){return e!==t}))}:function(){return n?[t]:[]})}),[L]),D=(0,f.d$)(),A=(0,l.useMemo)((function(){var e=E({ids:Z,status:"Live",selectedIds:C,nodesById:D,statusProps:u,multi:g,nodeCounts:b}),t=E({ids:S,status:"Stale",selectedIds:C,nodesById:D,statusProps:u,multi:g,nodeCounts:b}),n=E({ids:_,status:"Offline",selectedIds:C,nodesById:D,statusProps:u,multi:g,nodeCounts:b});return e.concat(t,n)}),[C,Z.length,S.length,_.length,b]);return l.createElement(p.MenuDropdown,(0,i.Z)({hideShadow:!0,height:{max:"60vh"},width:{max:"600px"},overflow:"auto","data-testid":"filterNodes-drop",searchMargin:[2],items:A,Item:P,onItemClick:N,value:C,"data-value":C.join(",")||"all-nodes",hasSearch:!0},h))}},48450:function(e,t,n){n.d(t,{Kp:function(){return d},MN:function(){return w},ND:function(){return m},hN:function(){return y},jc:function(){return h},sr:function(){return g},uk:function(){return f}});var r=n(4942),o=(n(21249),n(57640),n(9924),n(41539),n(88674),n(92087),n(74916),n(15306),n(92222),n(82481),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(26398)),a=n(66152),i=n(78710);function c(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 l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=function(e){return{id:e.roomID,alertCounter:e.alarmCounter,unreachableCount:e.unreachableCount,state:e.state}},s=function(e){return{results:(e.results||[]).map(u)}},d=function(e){return(0,i.Ly)(e)?Promise.resolve({data:{results:[]}}):o.Z.get("/api/v2/spaces/".concat(e,"/alarms"),{transform:s})},f=function(e){return(0,i.Ly)(e)?Promise.resolve({data:null}):o.Z.get("/api/v2/spaces/".concat(e,"/alarms/metas"))},m={contexts:null,names:null,roles:null},p=function(e){var t=e.alerts,n=void 0===t?[]:t,r=e.nodes,o=void 0===r?[]:r,i=e.alert_instances,c=void 0===i?[]:i;return(0,a.k5)(c.map((function(e){var t=e.ni,r=e.ati,a=e.tr_i,i=e.tr_v,c=e.tr_t,l=e.cfg,u=e.info,s=e.fami,d=e.ch,f=e.ch_n,m=void 0===f?d:f,p=e.ctx,g=e.v,v=e.t,y=e.flags,b=e.st,h=e.src,w=e.units,x=e.to,O=e.cl,k=e.cm,C=e.tp,I=o[t],P=n[r],E=P.nm,j=P.cr,L=P.wr,Z=P.cl,S=P.er,_=P.in,N=P.nd,D=P.cfg;return{mg:I.mg,nd:I.nd,nodeId:I.nd||I.mg,id:a,context:p,value:g,status:b.toLowerCase(),name:E,displayName:(E||"unknown_alert").replace(/_/g," "),alert:alert,criticalCount:j,warningCount:L,clearCount:Z,errorCount:S,instanceCount:_,nodeCount:N,configCount:D,lastStatusChangeValue:i,lastStatusChange:c,configHash:l,info:u,family:s,instance:d,instanceName:m,lastUpdated:v,flags:y,units:w,source:h,recipient:x,class:O,component:k,type:C}})))},g=function(e,t){return(0,i.Ly)(e)?o.Z.get("/api/v2/alerts?options=summary,instances,values,minify&status=raised",{baseURL:window.envSettings.agentApiUrl,transform:p}):o.Z.post("/api/v2/spaces/".concat(e,"/rooms/").concat(t,"/alerts"),{scope:{nodes:[],contexts:[]},selectors:{status:["raised"]},options:["summary","values","instances"]},{transform:p})},v=function(e){var t=e.transitions,n=void 0===t?[]:t;if(!n[0])return{};var r=n[0],o=r.config_hash_id,a=r.context,i=r.machine_guid,c=r.info,l=r.transition_id,u=r.node_id,s=r.alert,d=r.new,f=d.status,m=d.value,p=r.when,g=r.old,v=g.status,y=g.value,b=g.duration,h=r.instance,w=r.instance_n,x=void 0===w?h:w,O=r.units;return{configHash:o,context:a,name:s,id:l,mg:i,nodeId:u||i,nd:u,alert:s,info:c,displayName:(s||"unknown_alert").replace(/_/g," "),status:f.toLowerCase(),lastStatusChange:p,lastStatusChangeValue:m,prevStatus:v.toLowerCase(),prevValue:y,prevDuration:b,instance:h,instanceName:x,units:O}},y=function(e,t,n){return(0,i.Ly)(e)?o.Z.get("/api/v2/alert_transitions?options=minify&transition=".concat(n),{baseURL:window.envSettings.agentApiUrl,transform:v}).then((function(n){var r=n.data;return O(e,t,r.configHash,r)})):o.Z.post("/api/v2/spaces/".concat(e,"/rooms/").concat(t,"/alert_transitions"),{transition:n},{transform:v}).then((function(n){var r=n.data;return O(e,t,r.configHash,r)}))},b=function(e){var t=e.alerts;return(void 0===t?[]:t).map((function(e){var t=e.nm,n=e.cr,r=e.wr,o=e.cl,a=e.er,i=e.in,c=e.nd,l=e.cfg;return{name:t,displayName:(t||"unknown_alert").replace(/_/g," "),criticalCount:n,warningCount:r,clearCount:o,errorCount:a,instanceCount:i,nodeCount:c,configCount:l}}))},h=function(e,t){return(0,i.Ly)(e)?o.Z.get("/api/v2/alerts?options=minify",{baseURL:window.envSettings.agentApiUrl,transform:b}).then((function(e){return e.data})):o.Z.post("/api/v2/spaces/".concat(e,"/rooms/").concat(t,"/alerts"),{scope:{nodes:[]}},{transform:b}).then((function(e){return e.data}))},w=function(e,t,n){return(0,i.Ly)(e)?o.Z.get("/api/v2/alerts?options=summary,values,instances,minify&alert=".concat(n),{baseURL:window.envSettings.agentApiUrl,transform:p}).then((function(e){return e.data})):o.Z.post("/api/v2/spaces/".concat(e,"/rooms/").concat(t,"/alerts"),{scope:{nodes:[]},selectors:{alert:[n]},options:["summary","instances","values"]},{transform:p}).then((function(e){return e.data}))},x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=t.class,r=t.component,o=t.type,a=t.info,i=t.value,c=i.calc,u=void 0===c?"":c,s=i.update_every,d=i.units,f=i.db,m=t.status,p=t.notification||{},g=p.type,v=p.exec,y=p.to,b=p.delay,h=p.repeat||{},w=h.warn,x=h.crit,O=m||{},k=O.warn,C=O.crit,I=O.green,P=O.red,E=f||{},j=E.dimensions,L=E.method,Z=E.after,S=E.before,_=E.options;return l(l({info:a},e),{},{configInfo:a,class:n,component:r,type:o,calculation:u,updateEvery:s,units:d,warning:k,critical:C,lookupDimensions:j,lookupMethod:L,lookupAfter:Z,lookupBefore:S,lookupOptions:_,notificationType:g,exec:v,recipient:y,delay:b,warnRepeatEvery:w,critRepeatEvery:x,green:I,red:P})}},O=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,i.Ly)(e)?o.Z.get("/api/v2/alert_config?options=minify&config=".concat(n),{baseURL:window.envSettings.agentApiUrl,transform:x(r)}):o.Z.post("/api/v2/spaces/".concat(e,"/rooms/").concat(t,"/alert_config"),{config:n},{transform:x(r)})}},84074:function(e,t,n){n.d(t,{E3:function(){return i},Gs:function(){return d},HI:function(){return s},IG:function(){return u},bc:function(){return c},p$:function(){return l}});var r=n(4480),o=n(80239),a=n(48450),i={id:null,loaded:!1,nodeId:null,instance:null,instanceName:null,name:"",calculation:"",lookupAfter:0,lookupBefore:0,status:"unknown",date:"",fullyLoaded:!1,fullyLoading:!1,info:"",configInfo:"",warning:"",critical:"",updateEvery:0,source:"",recipient:"Unknown",units:"",delayUpDuration:null,delayDownDuration:null,delayMaxDuration:null,delayMultiplier:null,delayUpToTimestamp:null,lookupDimensions:"",lookupMethod:"",lookupOptions:"",class:"Unknown",type:"Unknown",component:"Unknown"};t.ZP=(0,r.cn)({key:"alert",default:{}});var c=(0,r.cn)({key:"selectedAlert",default:null}),l=(0,r.cn)({key:"alertsTabsAtom",default:o.U}),u=(0,r.xu)({key:"alertConfigurations",default:function(e){var t=e.spaceId,n=e.roomId;return(0,a.jc)(t,n)}}),s=(0,r.xu)({key:"alertInstances",default:function(e){var t=e.spaceId,n=e.roomId,r=e.name;return(0,a.MN)(t,n,r)}}),d=(0,r.xu)({key:"selectedAlertConfiguration",default:{alertName:null,nodeId:null}})},12008:function(e,t,n){n.d(t,{Bk:function(){return P},E5:function(){return b},ER:function(){return x},E_:function(){return C},JU:function(){return Z},O0:function(){return h},__:function(){return S},fp:function(){return y},n_:function(){return j},sb:function(){return k},v3:function(){return _},w4:function(){return L},yx:function(){return O}});var r=n(4942),o=(n(21249),n(57640),n(9924),n(57327),n(41539),n(88449),n(2490),n(59849),n(85827),n(25387),n(72608),n(47941),n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),a=n(4480),i=n(37518),c=n(96929),l=n(99322),u=n(97945),s=n(80239),d=n(74059),f=n(84074),m=n(48450),p=n(45771);function g(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 v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y=(0,a.CG)({key:"alertState",get:function(e){var t=e.id,n=e.key;return function(e){var r=(0,e.get)(f.ZP)[t]||f.E3;return n?r[n]:r}},set:function(e){var t=e.id,n=e.key;return function(e,o){var a=e.set;a(f.ZP,n?"function"!==typeof o?function(e){return v(v({},e),{},(0,r.Z)({},t,v(v({},e[t]),{},(0,r.Z)({},n,o))))}:function(e){return v(v({},e),{},(0,r.Z)({},t,v(v({},e[t]),{},(0,r.Z)({},n,o(e[t][n])))))}:function(e){return v(v({},e),{},(0,r.Z)({},t,v(v(v({},f.E3),e[t]),o)))})}}}),b=function(e,t){return(0,a.sJ)(y({id:e,key:t}))},h=function(){return(0,a.FV)(f.bc)},w=(0,a.CG)({key:"alertsState",get:function(e){return function(t){var n=t.get;return e.map((function(e){return n(y({id:e}))}))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),x=function(e){return(0,a.sJ)(w(e))},O=function(e){var t=(0,i.UL)(),n=(0,d.th)(),r=(0,a._8)((function(r){var o=r.set;return function(){o(y({id:e,key:"fullyLoading"}),!0);var r=(0,m.hN)(n,t,e);return r.then((function(t){var n=t.data;return o(y({id:e}),v(v({},n),{},{fullyLoaded:!0,fullyLoading:!1,loaded:!0}))})).catch((function(){return o(y({id:e,key:"fullyLoading"}),!1)})),function(){return r.cancel()}}}),[t,n]);(0,o.useEffect)((function(){e&&r()}),[e,r])},k=function(){var e=I(),t=(0,c.zN)(),n=(0,u.Ne)(t);return(0,o.useMemo)((function(){return n.map((function(t){var n=e.filter((function(e){return e.nodeId===t.id}));if(!n.length)return t;var o=n.map((function(e){return e.status}));return v(v({},t),{},(0,r.Z)({},s.nb.alertStatus,(0,p.j)(o)))}))}),[e,n])},C=(0,a.CG)({key:"roomAlerts",get:function(e){return function(t){var n=t.get,r=n((0,l.e8)({id:e,key:"ids"}));return n(w(r))}}}),I=function(){var e=(0,i.UL)();return(0,a.sJ)(C(e))},P=function(){var e=(0,i.UL)();return(0,a.sJ)((0,l.e8)({id:e,key:"loaded"}))},E={warning:0,critical:0,clear:0},j=function(e){var t=x(e);return(0,o.useMemo)((function(){return t.reduce((function(e,t){var n=t.status;return e[n]=e[n]+1,e}),v({},E))}),[e])},L=function(){var e=(0,d.th)(),t=(0,i.UL)();return(0,a.sJ)((0,f.IG)({spaceId:e,roomId:t}))},Z=function(e,t){var n=(0,d.th)(),r=(0,i.UL)(),c=(0,a.sJ)((0,f.HI)({spaceId:n,roomId:r,name:e}));return(0,o.useMemo)((function(){return t?c.filter((function(e){return e.nodeId===t})):c}),[c,t])},S=function(){var e=(0,i.UL)();return(0,a.FV)((0,f.Gs)(e))},_=function(){var e=(0,i.UL)();return(0,a.rb)((0,f.Gs)(e))}},45771:function(e,t,n){n.d(t,{J:function(){return r},j:function(){return o}});n(9653),n(61874),n(26699),n(32023);var r=function(e){var t=e<1?Number(e).toPrecision(3):Number(e).toFixed(2),n=Number.parseFloat(t);return Math.abs(n)>=1e9||Math.abs(n)<=1e-5&&0!==n?n.toExponential(3):n},o=function(e){return e.includes("critical")?"critical":e.includes("warning")?"warning":e.includes("clear")?"clear":e[0]}},77796:function(e,t,n){n.d(t,{in:function(){return s},ev:function(){return m},rw:function(){return p}});var r=n(93433),o=n(4942),a=(n(2707),n(85827),n(41539),n(25387),n(2490),n(72608),n(92222),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(4480)),i=(0,a.cn)({key:"alertIdsByNodeId",default:{}});function c(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 l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=[],s=(0,a.nZ)({key:"nodesAlertIdsState",get:function(e){return(0,e.get)(i)},set:function(e,t){return(0,e.set)(i,t)}}),d=(0,a.CG)({key:"nodeAlertIdsState",get:function(e){return function(t){return(0,t.get)(i)[e]||u}},set:function(e){return function(t,n){(0,t.set)(i,(function(t){return l(l({},t),{},(0,o.Z)({},e,(0,r.Z)(n).sort((function(e,t){return e.id-t.id}))))}))}}}),f=(0,a.CG)({key:"nodesAlertIdsState",get:function(e){return function(t){var n=(0,t.get)(i);return e.reduce((function(e,t){return[].concat((0,r.Z)(e),(0,r.Z)(n[t]||[]))}),[])}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),m=function(e){return(0,a.sJ)(d(e))},p=function(e){return(0,a.sJ)(f(e))}},4312:function(e,t,n){n.d(t,{Z:function(){return p}});var r=n(87462),o=n(45987),a=n(67294),i=n(82351),c=n(60677),l=n(15557),u=(0,c.default)(l.Flex).attrs((function(){return{width:{max:"315px"},overflow:"hidden"}})).withConfig({displayName:"styled__Container",componentId:"sc-d9qxpb-0"})(["color:",";"],(0,l.getColor)("bright")),s=["children"],d=function(e){var t=e.children,n=(0,o.Z)(e,s);return a.createElement(u,(0,r.Z)({"data-testid":"nodeInfoContent"},n),t)},f=n(89050),m=["align","badge","base","children","connectivityState","content","isBasic","status","nodeName","nodeType"],p=function(e){var t=e.align,n=void 0===t?"bottom":t,c=e.badge,l=e.base,u=void 0===l?{background:"main",padding:[2]}:l,s=e.children,p=e.connectivityState,g=e.content,v=e.isBasic,y=void 0===v||v,b=e.status,h=e.nodeName,w=e.nodeType,x=(0,o.Z)(e,m);return a.createElement(i.Z,(0,r.Z)({align:n,base:u,content:function(){return a.createElement(d,{"data-testid":"nodeInfoTooltip-tooltipContent"},g||(0,f.yK)(c,p,b,h,w))},"data-testid":"nodeInfoTooltip",isBasic:y},x),s)}},39583:function(e,t,n){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(45987),i=n(67294),c=n(15557),l=n(12008),u=n(77796),s=n(89050),d=n(4312),f=["id","isLive","name","onClick"];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 p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=e.id,n=e.isLive,o=e.name,m=e.onClick,g=(0,a.Z)(e,f),v=(0,u.ev)(t),y=(0,l.n_)(v),b=y.critical,h=y.warning,w=p(p({},(null===g||void 0===g?void 0:g["data-testid"])&&{dataTestId:null===g||void 0===g?void 0:g["data-testid"]}),{},{isLive:n}),x=(0,s.kR)(p({count:b,type:"critical"},w)),O=(0,s.kR)(p({count:h,type:"warning"},w));return i.createElement(d.Z,(0,r.Z)({badge:"alerts","data-testid":"node-alerts",nodeName:o},g),i.createElement(c.AlertMasterCard,{onClick:x.text||O.text?m:null,pillLeft:x,pillRight:O}))}},72233:function(e,t,n){var r=n(87462),o=n(45987),a=n(67294),i=n(15557),c=n(89050),l=n(4312),u=["children","badge","enabled","name","onClick"];t.Z=function(e){var t=e.children,n=e.badge,s=e.enabled,d=e.name,f=e.onClick,m=(0,o.Z)(e,u),p=(0,c.Dy)(s);return a.createElement(l.Z,(0,r.Z)({badge:n,"data-testid":"node-".concat(n,"-status"),status:p.status,nodeName:d},m),a.createElement(i.Flex,{alignItems:"center",gap:2,onClick:s?f:void 0,cursor:s&&f?"pointer":"default","data-ga":"nodes-list::click-capability::".concat(p.label)},t,a.createElement(i.Pill,{background:p.background,borderColor:p.border,color:p.color,padding:[1,2],textSize:"small"},p.label)))}},99322:function(e,t,n){n.d(t,{e8:function(){return i},uy:function(){return c}});var r=n(4480),o=n(37518),a={ids:(0,r.xu)({key:"roomAlertIds",default:[]}),error:(0,r.xu)({key:"roomAlertError",default:null}),updatedAt:(0,r.xu)({key:"roomAlertsUpdatedAt",default:""}),loaded:(0,r.xu)({key:"roomAlertsLoaded",default:!1})},i=(0,r.CG)({key:"roomAlertState",get:function(e){var t=e.id,n=e.key;return function(e){return(0,e.get)(a[n](t))}},set:function(e){var t=e.id,n=e.key;return function(e,r){(0,e.set)(a[n](t),r)}}}),c=function(e){return function(e,t){return(0,r.sJ)(i({id:e,key:t}))}((0,o.UL)(),e)}}}]); \ No newline at end of file