diff options
Diffstat (limited to '')
-rw-r--r-- | web/gui/v2/2785.b5a9958703db6fd26399.chunk.js | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/web/gui/v2/2785.b5a9958703db6fd26399.chunk.js b/web/gui/v2/2785.b5a9958703db6fd26399.chunk.js deleted file mode 100644 index 57d454a46..000000000 --- a/web/gui/v2/2785.b5a9958703db6fd26399.chunk.js +++ /dev/null @@ -1 +0,0 @@ -!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5b560c71-414e-4807-8318-ef55425bd268",e._sentryDebugIdIdentifier="sentry-dbid-5b560c71-414e-4807-8318-ef55425bd268")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"8b7b01b6c705cf50f8050ce0fb8fc6b58fe68567"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[2785],{62785:function(e,t,n){n.r(t),n.d(t,{default:function(){return A}});var r=n(29439),l=(n(41539),n(88674),n(17727),n(21249),n(57640),n(9924),n(67294)),o=n(50308),a=n.n(o),c=n(93416),i=n(22648),s=n(93017),u=n(39979),d=n(63346),f=n(10082),m=(n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(4942)),b=n(93433),p=(n(47941),n(92222),n(85827),n(25387),n(2490),n(72608),n(69826),n(31672),n(59461),n(57327),n(88449),n(59849),n(71893));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}var v=(0,p.default)(c.MenuDropdown).attrs((function(e){return function(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,m.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}({background:"transparent",hideShadow:!0,height:{max:"300px"},width:{max:"600px"},overflow:"auto",padding:[2]},e)})).withConfig({displayName:"styled__CheckboxesContainer",componentId:"sc-8uj6na-0"})([""]),y=function(e){var t=e.index,n=e.item,r=e.onItemClick,o=n.group,a=n.label,i=n.value,s=n.node,u=void 0===s?{}:s,d=u.selected,f=u.disabled,m=o&&t>0?[3,0,1,0]:[1,0];return l.createElement(c.Flex,{padding:m},o?l.createElement(c.Flex,{gap:2,alignItems:"center"},l.createElement(c.Icon,{name:o.iconName,size:"small"}),l.createElement(c.Text,{color:o.textColor||"textFocus"},o.label)):l.createElement(c.Flex,null,l.createElement(c.Checkbox,{checked:d,disabled:f,onChange:function(e){f||r({value:i,label:a,checked:e})},label:a,value:i,labelPosition:"right"})))},E=n(43656);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var O={live:{iconName:"connectivityStatusLive",label:"Live",textColor:"primary"},offline:{iconName:"connectivityStatusOffline",label:"Offline",textColor:"textFocus"},stale:{iconName:"connectivityStatusStale",label:"Stale",textColor:"textFocus"}},x=function(e,t){var n;return t&&Object.keys(t)&&null!==(n=t[e])&&void 0!==n&&n.length?[{group:O[e]}].concat((0,b.Z)(t[e])):[]},w=function(e,t,n){var r=e.reduce((function(e,r){var l=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){(0,m.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},r),o=r.isLive?"live":r.isOffline?"offline":"stale";t.find((function(e){return e.value==r.id}))?l.selected=!0:n==t.length&&(l.disabled=!0);var a={label:r.name,value:r.id,node:l};return e[o]?e[o]=[].concat((0,b.Z)(e[o]),[a]):e[o]=[a],e}),{});return[].concat((0,b.Z)(x("live",r)),(0,b.Z)(x("offline",r)),(0,b.Z)(x("stale",r)))},N=function(e){var t=e.selectedNodes,n=e.setSelectedNodes,o=e.activeNodesLimit,a=void 0===o?0:o,c=(0,E.Z)().nodes,i=(0,l.useState)([]),s=(0,r.Z)(i,2),u=s[0],d=s[1],f=(0,l.useCallback)((function(e){var r=e.value,l=e.label,o=e.checked;o&&!t.find((function(e){return e.value==r}))?n((function(e){return[].concat((0,b.Z)(e),[{value:r,label:l}])})):!o&&t.find((function(e){return e.value==r}))&&n((function(e){return e.filter((function(e){return e.value!=r}))}))}),[t]);return(0,l.useEffect)((function(){c&&d(w(c,t,a))}),[c,t]),l.createElement(v,{items:u,Item:y,onItemClick:f,searchMargin:[0,0,4,0],hasSearch:!0})},S=n(5710),j=n(78266),P=n(87462),Z=n(45987),k=["label"];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}var I=function(e){var t=e.isTitle,n=e.value,r=e.selectedNodes,o=e.setSelectedNodes,i=void 0===o?a():o,s=e.children,u=(0,l.useCallback)((function(){t||i((function(e){return e.filter((function(e){return e.value!=n}))}))}),[t,n,r,i]),d=function(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,m.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}({gap:1,height:"18px",alignItems:"center",padding:[0,2],margin:[0,0,2,0],round:!0},t?{}:{background:"nodeBadgeBackground"});return l.createElement(c.Flex,d,!t&&l.createElement(c.Icon,{name:"x",size:"small",onClick:u,color:"text",cursor:"pointer"}),s)},D=function(e){var t=e.selectedNodes,n=e.setSelectedNodes;return t.length?l.createElement(c.Flex,{flexWrap:!0,gap:2},l.createElement(I,{isTitle:!0},l.createElement(c.TextBig,null,"Selected Nodes:")),t.map((function(e){var r=e.label,o=(0,Z.Z)(e,k);return l.createElement(I,(0,P.Z)({key:o.value,selectedNodes:t,setSelectedNodes:n},o),l.createElement(c.TextSmall,{color:"text"},r))}))):null},T=n(37503),B=n(34735),F=function(e){var t=e.selectedNodes,n=e.setSelectedNodes,r=e.loading,o=e.error,a=(0,B.Z)(),i=a.loaded,s=a.currentPlan,u=a.maxNodes;return l.createElement(c.Flex,{column:!0,gap:4},r&&i?l.createElement(j.Z,{height:"280px",title:"Saving selection..."}):l.createElement(l.Fragment,null,l.createElement(c.Flex,{column:!0,margin:[3,0,0,0],gap:4},l.createElement(c.TextBig,null,"Your current"," ",l.createElement(c.TextBig,{strong:!0},s.class," (",s.version,")")," ","plan does not allow more than ",l.createElement(c.TextBig,{strong:!0},u," active nodes"),"."),l.createElement(c.TextBig,null,"To proceed, select the ",l.createElement(c.TextBig,{strong:!0},u," Nodes")," that you wish to keep active. Any Nodes beyond this limit will be deactivated."),o&&l.createElement(c.Flex,{gap:2,alignItems:"center"},l.createElement(c.Icon,{name:"warning_triangle",size:"medium",color:"warning"}),l.createElement(c.TextBig,null,"For some reason, we coudn't save your selection. Please retry."))),l.createElement(f.Z,null),l.createElement(N,{selectedNodes:t,setSelectedNodes:n,activeNodesLimit:u}),l.createElement(f.Z,null),l.createElement(c.Flex,{column:!0,gap:4},l.createElement(D,{selectedNodes:t,setSelectedNodes:n}),l.createElement(c.TextBig,null,"Remember, you can"," ",l.createElement(T.Z,null,l.createElement(c.TextBig,{color:"primary"},"upgrade your space back to the Business plan"))," ","for unlimited access at any time."),l.createElement(c.TextBig,null,"The node selection isn't a commitment, you can modify the active Nodes any time on the"," ",l.createElement(S.Z,null,l.createElement(c.TextBig,{color:"primary"},"Space Settings page")),"."))))},_=(0,p.default)(c.ModalContent).attrs((function(e){return{width:e.isMobile?{base:"95vw"}:{base:150}}})).withConfig({displayName:"styled__PreferredNodesModalContent",componentId:"sc-1v8zr4l-0"})([""]),M=n(97945),L=n(65840),R=n(46667),z=(0,u.Z)(c.Button),A=function(e){var t=e.onSuccessfulSave,n=void 0===t?a():t,o=(0,L.HK)(),u=(0,i.m)(),f=(0,s.Z)(),m=(0,r.Z)(f,2),b=m[0],p=m[1],g=(0,M.dJ)(),v=(0,l.useState)([]),y=(0,r.Z)(v,2),E=y[0],h=y[1],O=(0,l.useState)(),x=(0,r.Z)(O,2),w=x[0],N=x[1],S=(0,R.Z)(),j=(0,r.Z)(S,4),P=j[0],Z=j[2],k=j[3],C=(0,l.useCallback)((function(){Z(),g(E.map((function(e){return e.value}))).then((function(){b({header:"Success",text:"You selection was successfully saved"}),n(),o()})).catch((function(){N(!0),p({header:"Error",text:"Selection failed to be saved"})})).finally((function(){k()}))}),[E,g]);return l.createElement(c.Modal,{backdropProps:{backdropBlur:!0}},l.createElement(d.ZP,{feature:"PreferredNodesModal"},l.createElement(_,{isMobile:u},l.createElement(c.ModalHeader,null,l.createElement(c.Flex,{gap:2,alignItems:"center"},l.createElement(c.Icon,{name:"netdataPress",color:"text"}),l.createElement(c.H4,null,"Required Action"))),l.createElement(c.ModalBody,null,l.createElement(F,{selectedNodes:E,setSelectedNodes:h,loading:P,error:w})),!P&&l.createElement(c.ModalFooter,null,l.createElement(c.Flex,{gap:4,justifyContent:"end",padding:[1,2]},l.createElement(z,{feature:"SavePreferredNodes",label:"Save",onClick:C,disabled:P||!E.length}))))))}},43656:function(e,t,n){var r=n(29439),l=n(37518),o=n(96929),a=n(41379),c=n(74059),i=n(97945),s=n(46667);t.Z=function(){var e=(0,l.Jb)().id,t=void 0===e?"":e,n=(0,o.X7)(t,"ids"),u=(0,o.X7)(t,"loaded"),d=(0,i.Ne)(n),f=(0,c.th)(),m=(0,s.Z)(),b=(0,r.Z)(m,4),p=b[0],g=b[3];return(0,a.Z)({id:t,spaceId:f,polling:!0}),{areDefaultRoomNodesLoaded:u,nodes:d,isClaimNodeModalOpen:p,closeClaimNodeModal:g}}}}]);
\ No newline at end of file |