summaryrefslogtreecommitdiffstats
path: root/web/gui/v2/714.b3173197d7dc5e16cc3e.chunk.js
blob: 35cc82afb06d08653a3a5a813bc846996605edbe (plain)
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]="e5029619-da82-4b92-afd5-d4f18b26943a",e._sentryDebugIdIdentifier="sentry-dbid-e5029619-da82-4b92-afd5-d4f18b26943a")}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([[714],{39434:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var l=o?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(r,a,l):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(67294)),o=i(n(53087)),a=i(n(81743)),l=["text","maxLength","Component","noTooltip"];function i(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}var u=function(e){var t=e.text,n=e.maxLength,i=void 0===n?15:n,c=e.Component,u=void 0===c?"div":c,s=e.noTooltip,d=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,l),f=(0,r.useMemo)((function(){return t?(0,o.default)(t,i):null}),[t,i]);return s||f===t?r.default.createElement(u,d,f):r.default.createElement(a.default,{content:t},r.default.createElement(u,d,f))};t.default=u},40644:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return C}});n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(29439),o=n(4942),a=n(93433),l=(n(41539),n(64211),n(2490),n(41874),n(26699),n(32023),n(85827),n(25387),n(72608),n(92222),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(57327),n(88449),n(59849),n(21249),n(57640),n(9924),n(47941),n(67294)),i=n(48286),c=n(91966),u=n.n(c),s=n(89250),d=n(97945),f=n(97193),p=n(95248),g=n(46667),m=n(27261),b=n(9458),h=n(15557),v=n(6973),y=(0,l.forwardRef)((function(e,t){var n=e.selectedNodesNumber;return l.createElement(h.Flex,{"data-testid":"selectNodesIndicator",ref:t,cursor:"pointer"},l.createElement(h.Box,{margin:[0,1,0,0]},l.createElement(h.TextSmall,null,"Selected")),l.createElement(h.Flex,{border:{size:"1px",type:"solid",color:"dropdown"},round:!0,padding:[0,1],width:{min:7.5},height:5,background:"mainBackground",as:h.TextSmall,justifyContent:"center",alignItems:"center",color:"textDescription"},n||"-"))})),x=n(91128),O=n(4514);function w(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 E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var j={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"}}},S=[],k=function(e,t,n,r){var o=!e.some((function(e){return!n.includes(e)})),l=n.length&&!o&&e.some((function(e){return n.includes(e)}));return e.length?e.reduce((function(e,o){var l=r[o],i=l.name,c=l.capabilities,u=n.includes(o);return[].concat((0,a.Z)(e),[E(E({value:o,label:i,nodeId:o,selected:u,status:t,capabilities:c},j[t].node),{},{maxLength:80})])}),[E(E({value:e,selected:o,indeterminate:l,status:t},j[t].head),{},{maxLength:80})]):[]},C=(0,l.memo)((function(){var e=(0,p.wT)(),t=(0,r.Z)(e,2),n=t[0],o=t[1],c=(0,l.useState)(n||S),w=(0,r.Z)(c,2),E=w[0],j=w[1];(0,l.useEffect)((function(){j(n||S)}),[n]);var C=(0,g.Z)(!1),L=(0,r.Z)(C,4),P=L[0],Z=L[1],_=L[3],I=(0,l.useCallback)((function(){P&&(o(E),_())}),[E]),M=(0,d.HZ)(),N=(0,d.e5)(),T=(0,d.mf)(),D=(0,d.Y0)(),F=(0,l.useCallback)((function(e){var t=e.value,n=e.checked;j((function(e){return Array.isArray(t)?n?(0,a.Z)(new Set([].concat((0,a.Z)(e),(0,a.Z)(t)))):u()(e,t):n?[].concat((0,a.Z)(e),[t]):e.filter((function(e){return e!==t}))}))}),[]),A=(0,l.useMemo)((function(){return{live:{counter:M.length,statusText:"Live"},stale:{counter:N.length,statusText:"Stale"},offline:{counter:T.length,statusText:"Offline"},unseen:{counter:D.length,statusText:"Unseen"}}}),[M.length,N.length,T.length,D.length]),R=(0,s.bS)("/spaces/:spaceSlug/rooms/:roomSlug/nodes/:nodeId"),B=(0,x.Z)();(0,i.Z)((function(){B(P)}),[P]);var W=(0,d.d$)(),z=(0,l.useMemo)((function(){var e=k(M,"Live",E,W),t=k(N,"Stale",E,W),n=k(T,"Offline",E,W);return e.concat(t,n)}),[E,M.length,N.length,T.length]);return l.createElement(h.Menu,{dropProps:{align:{top:"bottom",left:"left"},"data-toolbox":!0},dropdownProps:{height:{max:"60vh"},width:{max:"600px"},overflow:"auto",padding:[0,0,3],"data-testid":"filterNodes-drop"},itemProps:{padding:[1,4],maxLength:60},disabled:!!R,items:z,Item:f.c,onChange:F,value:E,"data-value":E.join(",")||"all-nodes",closeOnClick:!1,onClose:I,hasSearch:!0},l.createElement(O.Z,{"data-testid":"nodesIndicator",round:"2px",alignItems:"center",justifyContent:"end",width:{min:75},background:"elevationLevelOne",disabled:!!R},l.createElement(h.Flex,{cursor:"pointer",onClick:Z,padding:[2,3],gap:2,alignItems:"center"},l.createElement(h.TextSmall,{strong:!0},"Nodes"),l.createElement(b.Z,null),Object.keys(A).map((function(e){return l.createElement(l.Fragment,{key:e},l.createElement(m.Z,{statusText:A[e].statusText,counter:A[e].counter,statusColor:v.B[e]}),l.createElement(b.Z,null))})),l.createElement(y,{selectedNodesNumber:E.length}),l.createElement(h.Icon,{name:"chevron_down",size:"small",color:"textLite"}))))}))},2814:function(e,t,n){var r=n(17854),o=n(47293),a=n(1702),l=n(41340),i=n(53111).trim,c=n(81361),u=a("".charAt),s=r.parseFloat,d=r.Symbol,f=d&&d.iterator,p=1/s(c+"-0")!==-1/0||f&&!o((function(){s(Object(f))}));e.exports=p?function(e){var t=i(l(e)),n=s(t);return 0===n&&"-"==u(t,0)?-0:n}:s},61874:function(e,t,n){var r=n(82109),o=n(2814);r({target:"Number",stat:!0,forced:Number.parseFloat!=o},{parseFloat:o})},92087:function(e,t,n){var r=n(17854),o=n(19781),a=n(47045),l=n(67066),i=n(47293),c=r.RegExp,u=c.prototype;o&&i((function(){var e=!0;try{c(".","d")}catch(i){e=!1}var t={},n="",r=e?"dgimsy":"gimsy",o=function(e,r){Object.defineProperty(t,e,{get:function(){return n+=r,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var l in e&&(a.hasIndices="d"),a)o(l,a[l]);return Object.getOwnPropertyDescriptor(u,"flags").get.call(t)!==r||n!==r}))&&a(u,"flags",{configurable:!0,get:l})},82481:function(e,t,n){n(82109)({target:"String",proto:!0},{repeat:n(38415)})}}]);