summaryrefslogtreecommitdiffstats
path: root/src/web/gui/v2/4680.0c75b44bbc80f4591fdd.chunk.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/gui/v2/4680.0c75b44bbc80f4591fdd.chunk.js')
-rw-r--r--src/web/gui/v2/4680.0c75b44bbc80f4591fdd.chunk.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/web/gui/v2/4680.0c75b44bbc80f4591fdd.chunk.js b/src/web/gui/v2/4680.0c75b44bbc80f4591fdd.chunk.js
new file mode 100644
index 0000000000..6129bf4e7c
--- /dev/null
+++ b/src/web/gui/v2/4680.0c75b44bbc80f4591fdd.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]="279ed034-b2c6-47d3-9371-b6bea9116ce8",e._sentryDebugIdIdentifier="sentry-dbid-279ed034-b2c6-47d3-9371-b6bea9116ce8")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"08864407160b3973b9b88c5ae92687282b21e2f4"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[4680],{667:(e,t,n)=>{n.d(t,{A:()=>l});n(62953);var a=n(96540),o=n(27776),r=n(38819);const l=()=>{const e=(0,r.PP)(),[t,n]=(0,o.XL)(),{reset:l}=(0,o.b8)(),c=(0,a.useCallback)((()=>{l(),(0,r.Z8)({...e,integrationsModalOpen:"true"}),n("true")}),[l,e]);return{isIntegrationsVisible:t,hideIntegrations:(0,a.useCallback)((()=>{(0,r.Z8)({...e,integrationsModalOpen:""}),n("")}),[e]),onIntegrationsClick:c}}},84680:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ee});n(62953);var a=n(96540),o=n(10058),r=n(5668),l=n(58168),c=(n(41393),n(81454),n(8711)),i=n(47767),s=n(68831),d=n(87659),u=n(43529),p=n(78862),m=n(29217),g=n(37944),h=n(3914);const f=e=>{let{...t}=e;const n=(0,g.A)();return(0,h.dg)()?null:a.createElement(m.A,{content:"Space settings"},a.createElement(o.Flex,{padding:[0,1]},a.createElement(o.Button,(0,l.A)({flavour:"borderless",icon:"gear",neutral:!0,onClick:n,small:!0,"data-ga":"left-sidebar::click-space-settings::global-view","data-testid":"workspaceBar-manageSpace"},t))))};var E=n(50105),b=n(74293),x=n(71847),v=n(64754),w=n(76634),k=n(54972),C=n(96382);const y=()=>{const e=(0,C.ae)("email"),{handleOpenProfileModal:t}=(0,k.A)();return"loading"===e.state||e.state.hasError?null:a.createElement(o.IconButton,{flavour:"borderless","data-testid":"open-email-notification",cursor:"pointer",width:"20px",height:"20px",onClick:()=>t("notifications"),icon:e.contents.email?"notification_shortcut_enabled":"notification_shortcut_disabled",tooltip:"Email Notifications","data-ga":"left-sidebar::click-user-notification-settings::global-view",iconColor:"iconColor"})},I=(0,a.memo)(y);const A=(0,n(92155).A)(v.A),S=c.default.div.withConfig({displayName:"spaces__Separator",componentId:"sc-1gbju6k-0"})(["height:1px;width:",";background:",";"],(0,o.getSizeBy)(3),(0,o.getColor)("border")),F=(0,c.default)(o.Button).withConfig({displayName:"spaces__DocButton",componentId:"sc-1gbju6k-1"})(["&&{> .button-icon{width:20px;height:20px;}}"]),N=(0,c.default)(o.Button).withConfig({displayName:"spaces__ExpandButton",componentId:"sc-1gbju6k-2"})(["&&{> .button-icon{width:6px;height:9px;}}"]),_={onClickOut:()=>(0,x.H)("header-help","click-out-modal","global-view"),onCloseClick:()=>(0,x.H)("header-help","click-close","global-view"),onOpenIssueClick:()=>(0,x.H)("header-help","click-\u03bfpen-issue","global-view"),onContributeClick:()=>(0,x.H)("header-help","click-contribute","global-view"),onOpenBugClick:()=>(0,x.H)("header-help","click-bug","global-view"),onSupportClick:()=>(0,x.H)("header-help","click-support","global-view"),onVisitDocumentClick:()=>(0,x.H)("header-help","click-visit-doc","global-view"),onGoToDemoClick:()=>(0,x.H)("header-help","click-go-to-demo","global-view")},P=e=>{let{spacePanelCollapsed:t,toggleSpacePanel:n}=e;const r=(0,h.Pk)(),c=(0,h.vt)(),[g,,x,v]=(0,d.A)(),k=(0,i.Zp)(),C=(0,a.useCallback)((function(){let{slug:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k("/spaces/".concat(e))}),[]);return a.createElement(o.Flex,{background:"sideBarMini","data-testid":"workspaceBar",padding:[3,0],column:!0,alignItems:"center",gap:6,height:"100vh",justifyContent:"between"},a.createElement(o.Flex,{column:!0,"data-testid":"workspaceBar-spaces-list",gap:4,alignItems:"center",overflow:"hidden"},a.createElement(u.A,{"data-testid":"workspaceBar-netdataLogo"}),t&&a.createElement(N,{"data-testid":"workspaceBar-expandButton",onClick:n,icon:"chevron_right_s",neutral:!0,flavour:"borderless",small:!0}),a.createElement(o.Flex,{column:!0,"data-testid":"workspaceBar-spacesList",gap:4,overflow:{vertical:"auto"}},r.map((e=>a.createElement(p.A,{testIdPrefix:"workspaceBar-space",key:e,spaceId:e,active:e===c})))),a.createElement(w.A,{permission:"user:CreateSpace"},a.createElement(S,{"data-testid":"workspaceBar-separator"})),a.createElement(m.A,{content:"Create a new Space",align:"right"},a.createElement(A,{permission:"user:CreateSpace",ifForbidden:"hide",icon:"plus",onClick:x,"data-testid":"workspaceBar-addSpace-button",feature:"CreateSpace",isStart:!0}))),a.createElement(o.Flex,{column:!0,"data-testid":"workspaceBar-actionsList",gap:4,alignItems:"center"},a.createElement(o.Flex,{column:!0,gap:1,alignItems:"center"},a.createElement(w.A,{permission:"user:ChangeSpaceRoomNotifications"},a.createElement(I,null)),a.createElement(o.Documentation,(0,l.A)({app:"cloud",demoUrl:s.A.demoUrl},_),(e=>a.createElement(m.A,{content:"Read documentation, engage with the community and let us know about any feature requests or bugs",align:"right"},a.createElement(F,{neutral:!0,flavour:"borderless",icon:"question",onClick:e,"data-ga":"header-help::click-help::global-view","data-testid":"documentation-button",title:"Need help?"})))),a.createElement(f,null)),a.createElement(b.A,null)),g&&a.createElement(E.A,{onClose:v,onDone:C}))};n(30067),n(93518),n(25440),n(17333),n(3064),n(98992),n(54520),n(72577);var T=n(22292),B=n(26655),R=n(9224),O=n(47762),j=n(87337),D=n(63129),L=n(45123),W=n(56915),H=n(24266),U=n(91069);const z=(0,c.default)(o.Icon).withConfig({displayName:"styled__TrashIcon",componentId:"sc-1hr9uxl-0"})(["&:hover{fill:",";opacity:0.6;}"],(0,o.getColor)("textFocus")),M=(0,c.default)(o.TextSmall).withConfig({displayName:"styled__UrlWrapper",componentId:"sc-1hr9uxl-1"})(["overflow-wrap:anywhere;"]),V=(0,c.default)(o.Icon).withConfig({displayName:"styled__StyledIcon",componentId:"sc-1hr9uxl-2"})(["transform:",";"],(e=>{let{right:t}=e;return t?"rotate(0)":"rotate(180deg)"})),G=e=>{/https?:\/\//.test(e)||(e="http://".concat(e)),location.replace(e)},J=function(e,t){let{openList:n,setSelectedId:o}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(0,T.uW)("isAnonymous"),l=(0,a.useRef)(),c=(0,h.UV)("ids"),i=(0,h.jw)(c);return(0,a.useCallback)((async()=>{if(o(e),l.current||(l.current=await(async(e,t)=>{let{spaces:n=[],id:a,isAnonymous:o=!1}=t;if(!o){const{data:e}=await(0,R.ys)(a);let t;if(e.length&&(t=await Promise.any(n.map((t=>B.A.get((0,U.t)({spaceId:t.id})).then((n=>{let{data:a}=n;return Promise.any(a.map((n=>(0,D.uQ)({roomId:n.id,spaceId:t.id}).then((a=>{let{data:o}=a;const r=o.find((t=>{let{id:n}=t;return e.includes(n)}));if(!r)throw new Error("can't find matching node");return"".concat(window.envSettings.cloudUrl,"/spaces/").concat(t.slug,"/rooms/").concat(n.slug,"/nodes/").concat(r.id)})))))}))))).then((e=>e)).catch((()=>{}))),t)return t}const r=e.filter((e=>!/netdata\.cloud\//.test(e)));if(r.length)return await Promise.any(r.map((e=>{let t=/^https?:\/\//.test(e)?e:"http://".concat(e);return t=t.replace(/\/+$/,""),B.A.get("".concat(t,"/api/v1/registry?action=hello")).then((()=>t))}))).then((e=>e)).catch((()=>{}))})(t,{spaces:i,id:e,isAnonymous:r})),o(),!l.current)return n();G(l.current)}),[t,i])},Y=e=>{let{id:t,selectedId:n,setSelectedId:r}=e;const l=(0,O.xY)(t,"name"),[c,,i,s]=(0,d.A)(),u=(0,j.rE)(),p=(0,O.xY)(t,"urls"),m=J(t,p,{openList:i,setSelectedId:r}),g=(0,a.useCallback)((()=>{c?s():m()}),[c,m]),h=n===t;return a.createElement(a.Fragment,null,a.createElement(L.A,{onClick:g,isSidebar:!0,padding:[1,2,1,4],testid:"visitedNodes-".concat(l),disabled:!!n&&!h,selected:h,loading:h,iconColor:"textNoFocus",textColor:"textNoFocus",Wrapper:o.TextSmall},l),c&&a.createElement(o.Flex,{column:!0,margin:[1,3],padding:[2],border:{side:"all",color:"placeholder"},round:2},a.createElement(o.Text,{textAlign:"center"},"We couldn't connect to any of your instances, here is the list:"),p.map((e=>a.createElement(L.A,{key:e,onClick:()=>G(e),isSidebar:!0,testid:"visitedNodes-node-".concat(e),actions:a.createElement(o.Flex,{flex:!1,margin:[0,0,0,1]},a.createElement(z,{name:"trashcan",size:"small",color:"textNoFocus",onClick:n=>{n.stopPropagation(),u(t,e)},width:"16px",height:"16px"})),padding:[2],Wrapper:M,iconColor:"textNoFocus",textColor:"textNoFocus"},e)))))},Z=()=>{const e=(0,j.iw)(),[t,n]=(0,d.A)(e.length>0);(0,a.useEffect)((()=>{t||n()}),[e.length]);const[r,l]=(0,a.useState)(""),c=(0,j.vS)(r),[i,s]=(0,a.useState)();return e.length?a.createElement(W.A,{isOpen:t,toggleOpen:n,label:a.createElement(o.Flex,{padding:[1,0],flex:!0,justifyContent:"between",alignItems:"center"},a.createElement(o.Flex,{alignItems:"center",gap:2},a.createElement(o.Icon,{name:"node_hollow",color:"textNoFocus",width:"14px",height:"14px"}),a.createElement(o.TextSmall,{color:"textNoFocus"},"Visited Nodes")),a.createElement(V,{right:!t,name:"chevron_down",size:"small",color:"textNoFocus"})),headerTestId:"visitedNodes"},e.length>3&&a.createElement(o.Flex,{padding:[1,2,2,4]},a.createElement(o.SearchInput,{"data-testid":"search-visited-nodes-input",onChange:l,value:r,size:"tiny"})),a.createElement(o.Flex,{padding:[0,0,2],column:!0},c.length?c.map((e=>a.createElement(Y,{key:e,id:e,selectedId:i,setSelectedId:s}))):a.createElement(o.Text,{padding:[3,5]},"No nodes match your search"))):null},q=(0,a.memo)((()=>a.createElement(H.Ay,{fallback:""},a.createElement(a.Suspense,{fallback:""},a.createElement(Z,null)))));var Q=n(79412),X=n(77279),$=n(46741);const K=e=>t=>{const n=(0,h.vt)();return a.createElement(e,(0,l.A)({},t,{key:n}))};var ee=n(12938);const te={isSidebar:!0,padding:[1,2,1,4],textColor:"textNoFocus",Wrapper:o.TextSmall},ne=K((()=>{const e=(0,$.JT)("room:Create"),t=(0,$.JT)("room:Read"),[n,r]=(0,d.A)(t),[l,,c,i]=(0,d.A)(!1),s=(0,a.useCallback)((t=>{t.stopPropagation(),e&&c()}),[e]);return a.createElement(a.Fragment,null,a.createElement(W.A,{"data-testid":"workspaceRooms-menuList",disabled:!t,headerTestId:"workspaceRooms-warRooms",isOpen:n,label:a.createElement(o.Flex,{padding:[1,0],margin:[0,0,1,0],flex:!0,justifyContent:"between",alignItems:"center",height:"24px"},a.createElement(o.Flex,{alignItems:"center",gap:2},a.createElement(o.Icon,{name:"space_new",color:"textNoFocus",width:"14px",height:"14px"}),a.createElement(o.TextSmall,{color:"textNoFocus"},"Rooms")),a.createElement(o.Flex,{alignItems:"center",gap:2},a.createElement(m.A,{content:"Create a new room",align:"right"},a.createElement(v.A,{permission:"room:Create",tiny:!0,icon:"plus",onClick:s,"data-testid":"workspaceRooms-addWarRoom-button"})),a.createElement(X.v,{right:!n,name:"chevron_down",size:"small",color:"textNoFocus"}))),toggleOpen:r},a.createElement(o.Flex,{column:!0,"data-testid":"workspaceRooms-warRoomsList",padding:[0,0,1]},a.createElement(ee.A,te))),l&&a.createElement(Q.n,{onClose:i,isSubmodal:!1}))}));var ae=n(39225),oe=n(67602);const re=(0,c.default)(o.Flex).attrs({alignItems:"center",justifyContent:"center",width:10,height:4,round:.5,background:"sideBarMini"}).withConfig({displayName:"styled__AdminPill",componentId:"sc-1ps23b1-0"})(["opacity:0;",":hover &{opacity:1;}"],L.G),le=(0,ae.A)((()=>n.e(2007).then(n.bind(n,62007))),"CurrentPlan"),ce=e=>{let{children:t,onToggle:n}=e;return a.createElement(o.Flex,{column:!0,gap:1},a.createElement(o.Flex,{justifyContent:"between",alignItems:"center"},a.createElement(o.Flex,{alignItems:"center"},t),a.createElement(o.Button,{onClick:n,icon:"chevron_left",neutral:!0,flavour:"hollow",small:!0})),a.createElement(a.Suspense,{fallback:""},a.createElement(le,null)))};var ie=n(38413),se=n(53285),de=n(667);const ue=(0,ae.A)((()=>n.e(7436).then(n.bind(n,57436)).then((e=>({default:e.TrialWarning})))),"TrialWarning"),pe=(0,c.default)(W.N).attrs({padding:[2],color:"textLite"}).withConfig({displayName:"spacePanel__ListHeader",componentId:"sc-1275zgk-0"})([""]),me=e=>a.createElement(o.Flex,(0,l.A)({alignItems:"center",gap:2},e),a.createElement(re,null,a.createElement(o.TextFemto,{strong:!0,color:"text"},"ADMIN")),a.createElement(o.Flex,{opacity:"medium"},a.createElement(o.Icon,{name:"padlock",size:"small",width:"18px",height:"18px",color:"text"}))),ge={iconWidth:"14px",iconHeight:"14px",padding:[1,2],gap:2,isSidebar:!0,textColor:"textNoFocus",iconColor:"textNoFocus",Wrapper:o.TextSmall},he=e=>{let{toggleSpacePanel:t}=e;const n=(0,h.ap)(),[r,,c,i]=(0,d.A)(),[,s]=(0,oe.A)("manageInvitations"),u=(0,h.dg)(),{onIntegrationsClick:p}=(0,de.A)();return a.createElement(a.Fragment,null,r&&a.createElement(ie.A,{title:"Integrations",onClose:i}),a.createElement(W.A,{"data-testid":"spacesPanel",isOpen:!0,label:a.createElement(ce,{onToggle:t},n.name),headerTestId:"spacesPanel-activeSpaceHeader",Header:pe},a.createElement(o.Flex,{column:!0,padding:[2,0,1],"data-testid":"spacesPanel-menuList"},a.createElement(a.Suspense,{fallback:""},a.createElement(ue,{flavour:"sidebar"})),a.createElement(L.A,(0,l.A)({onClick:p,testid:"agentDashboard-addIntegrations",dataGa:"integrations::click-add-integrations::sideMenu",icon:"integrations"},ge),"Integrations"),u?null:a.createElement(a.Fragment,null,a.createElement(se.A,{permission:"node:Create"},(e=>a.createElement(L.A,(0,l.A)({actions:e?null:a.createElement(me,{"data-testid":"adminWarning-notAdmin"}),disabled:!e,onClick:c,testid:"spacesPanel-claimNodes",icon:"nodes_hollow"},ge),"Connect Nodes"))),a.createElement(se.A,{permission:"space:InviteUser"},(e=>a.createElement(L.A,(0,l.A)({actions:e?null:a.createElement(me,{"data-testid":"adminWarning-cannotInvite"}),disabled:!e,onClick:s,testid:"spacesPanel-inviteUsers",icon:"user"},ge),"Invite Users")))))))},fe=e=>{let{spacePanelCollapsed:t,toggleSpacePanel:n}=e;return a.createElement(o.Collapsible,{width:56,background:"sideBar",border:{side:"right",color:"borderSecondary"},open:!t,direction:"horizontal"},a.createElement(o.Flex,{flex:!0,width:56,column:!0,overflow:{vertical:"hidden"},padding:[2,0],position:"relative"},a.createElement(he,{toggleSpacePanel:n}),a.createElement(o.Flex,{overflow:{vertical:"auto"},flex:!0,column:!0},a.createElement(ne,null),a.createElement(q,null))))},Ee=(0,a.memo)((()=>{const[e,t]=(0,r.tF)("spacePanelCollapsed"),{isIntegrationsVisible:n,hideIntegrations:l}=(0,de.A)(),c=(0,a.useCallback)((()=>t(!e)),[e]);return(0,a.useLayoutEffect)((()=>{const e=setTimeout((()=>window.dispatchEvent(new Event("resize"))),400);return()=>clearTimeout(e)}),[e]),a.createElement(o.Flex,null,a.createElement(P,{spacePanelCollapsed:e,toggleSpacePanel:c}),a.createElement(fe,{spacePanelCollapsed:e,toggleSpacePanel:c}),n&&a.createElement(ie.A,{title:"Integrations",onClose:l,flavour:"integrations"}))}))},84428:(e,t,n)=>{var a=n(78227)("iterator"),o=!1;try{var r=0,l={next:function(){return{done:!!r++}},return:function(){o=!0}};l[a]=function(){return this},Array.from(l,(function(){throw 2}))}catch(c){}e.exports=function(e,t){try{if(!t&&!o)return!1}catch(c){return!1}var n=!1;try{var r={};r[a]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(c){}return n}},87290:(e,t,n)=>{var a=n(50516),o=n(19088);e.exports=!a&&!o&&"object"==typeof window&&"object"==typeof document},50516:e=>{e.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},19088:(e,t,n)=>{var a=n(24475),o=n(44576);e.exports="process"===o(a.process)},16193:(e,t,n)=>{var a=n(79504),o=Error,r=a("".replace),l=String(new o("zxcasd").stack),c=/\n\s*at [^:]*:[^\n]*/,i=c.test(l);e.exports=function(e,t){if(i&&"string"==typeof e&&!o.prepareStackTrace)for(;t--;)e=r(e,c,"");return e}},80747:(e,t,n)=>{var a=n(66699),o=n(16193),r=n(24659),l=Error.captureStackTrace;e.exports=function(e,t,n,c){r&&(l?l(e,t):a(e,"stack",o(n,c)))}},24659:(e,t,n)=>{var a=n(79039),o=n(6980);e.exports=!a((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",o(1,7)),7!==e.stack)}))},77584:(e,t,n)=>{var a=n(20034),o=n(66699);e.exports=function(e,t){a(t)&&"cause"in t&&o(e,"cause",t.cause)}},32603:(e,t,n)=>{var a=n(655);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:a(e)}},10916:(e,t,n)=>{var a=n(24475),o=n(80550),r=n(94901),l=n(92796),c=n(33706),i=n(78227),s=n(87290),d=n(50516),u=n(96395),p=n(77388),m=o&&o.prototype,g=i("species"),h=!1,f=r(a.PromiseRejectionEvent),E=l("Promise",(function(){var e=c(o),t=e!==String(o);if(!t&&66===p)return!0;if(u&&(!m.catch||!m.finally))return!0;if(!p||p<51||!/native code/.test(e)){var n=new o((function(e){e(1)})),a=function(e){e((function(){}),(function(){}))};if((n.constructor={})[g]=a,!(h=n.then((function(){}))instanceof a))return!0}return!t&&(s||d)&&!f}));e.exports={CONSTRUCTOR:E,REJECTION_EVENT:f,SUBCLASSING:h}},90537:(e,t,n)=>{var a=n(80550),o=n(84428),r=n(10916).CONSTRUCTOR;e.exports=r||!o((function(e){a.all(e).then(void 0,(function(){}))}))},17145:(e,t,n)=>{var a=n(46518),o=n(1625),r=n(42787),l=n(52967),c=n(77740),i=n(2360),s=n(66699),d=n(6980),u=n(77584),p=n(80747),m=n(72652),g=n(32603),h=n(78227)("toStringTag"),f=Error,E=[].push,b=function(e,t){var n,a=o(x,this);l?n=l(new f,a?r(this):x):(n=a?this:i(x),s(n,h,"Error")),void 0!==t&&s(n,"message",g(t)),p(n,b,n.stack,1),arguments.length>2&&u(n,arguments[2]);var c=[];return m(e,E,{that:c}),s(n,"errors",c),n};l?l(b,f):c(b,f,{name:!0});var x=b.prototype=i(f.prototype,{constructor:d(1,b),message:d(1,""),name:d(1,"AggregateError")});a({global:!0,constructor:!0,arity:2},{AggregateError:b})},30067:(e,t,n)=>{n(17145)},93518:(e,t,n)=>{var a=n(46518),o=n(69565),r=n(79306),l=n(97751),c=n(36043),i=n(1103),s=n(72652),d=n(90537),u="No one promise resolved";a({target:"Promise",stat:!0,forced:d},{any:function(e){var t=this,n=l("AggregateError"),a=c.f(t),d=a.resolve,p=a.reject,m=i((function(){var a=r(t.resolve),l=[],c=0,i=1,m=!1;s(e,(function(e){var r=c++,s=!1;i++,o(a,t,e).then((function(e){s||m||(m=!0,d(e))}),(function(e){s||m||(s=!0,l[r]=e,--i||p(new n(l,u)))}))})),--i||p(new n(l,u))}));return m.error&&p(m.value),a.promise}})}}]); \ No newline at end of file