MOON
Server: Apache
System: Linux server1.studioinfinity.com.br 2.6.32-954.3.5.lve1.4.90.el6.x86_64 #1 SMP Tue Feb 21 12:26:30 UTC 2023 x86_64
User: artinside (517)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/netdata/usr/share/netdata/web/v3/124.c6b1c16e2deddee5f313.chunk.js
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"0725d67f2585acd82a0d73d488b6cd9060c3224d"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e8b48a69-a92b-4ae3-9107-edf93ea8c118",e._sentryDebugIdIdentifier="sentry-dbid-e8b48a69-a92b-4ae3-9107-edf93ea8c118")}catch(e){}}(),(globalThis.webpackChunkcloud_frontend=globalThis.webpackChunkcloud_frontend||[]).push([[124],{42318(e,t,n){n.d(t,{A:()=>s});var o=n(96540),a=n(61661),i=n(6988),r=n(32465);const s=()=>{const e=(0,a.AR)(),t=(0,r.A)(),[n,s]=(0,a.oE)(),l=(0,a.WB)(),d=(0,o.useMemo)(()=>(0,i.Cj)({searchTerm:n,integrations:e}),[n,e]),c=n?(0,i.M6)(d,t):l;return{integrations:(0,i.Fd)((0,i.xM)(c)),setSearchTerm:s}}},51318(e,t,n){n.d(t,{A:()=>r});var o=n(96540),a=n(61661),i=n(89942);const r=()=>{const e=(0,i.PP)(),[t,n]=(0,a.XL)(),{reset:r}=(0,a.b8)(),s=(0,o.useCallback)(()=>{r(),(0,i.Z8)({...e,integrationsModalOpen:"true"}),n("true")},[r,n,e]);return{isIntegrationsVisible:t,hideIntegrations:(0,o.useCallback)(()=>{(0,i.Z8)({...e,integrationsModalOpen:""}),n("")},[e,n]),onIntegrationsClick:s}}},4703(e,t,n){n.d(t,{A:()=>p});var o=n(882),a=n(78904),i=n(74891),r=n(74848);const s=(0,i.A)(a.IconButton),l=(0,o.default)(s).attrs({icon:"x",neutral:!0,tooltip:"Skip, doesn't apply to me"}).withConfig({displayName:"taskItem__SkipButton",componentId:"sc-1mf27rk-0"})(["opacity:0;transition:opacity 0.2s;"]),d=(0,o.default)(a.Flex).attrs({gap:3,alignItems:"center",padding:[4],border:!0,round:1,cursor:"pointer"}).withConfig({displayName:"taskItem__ChecklistItem",componentId:"sc-1mf27rk-1"})(["background:",";transition:border-color 0.2s,background 0.2s;&:hover{border-color:",";background:",";","{opacity:1;}}"],e=>{let{completed:t}=e;return(0,a.getColor)(t?"mainBackground":"panelBg")},(0,a.getColor)("primary"),(0,a.getColor)("mainBackground"),l),c=(0,o.default)(a.Flex).attrs({width:"24px",height:"24px",alignItems:"center",justifyContent:"center",flex:!1}).withConfig({displayName:"taskItem__CheckIcon",componentId:"sc-1mf27rk-2"})(["",""],e=>{let{completed:t}=e;return!t&&`\n    border-radius: 50%;\n    border: 2px solid ${(0,a.getColor)("borderSecondary")};\n  `}),p=e=>{let{task:t,completed:n,onClick:o,onSkip:i,children:s}=e;return(0,r.jsxs)(d,{completed:n,onClick:o,children:[(0,r.jsx)(c,{completed:n,children:n&&(0,r.jsx)(a.Icon,{name:"check",color:"primary",width:"32px",height:"32px"})}),(0,r.jsxs)(a.Flex,{column:!0,gap:1,flex:!0,children:[(0,r.jsx)(a.Text,{strong:!0,color:n?"textLite":void 0,children:t.title}),(0,r.jsx)(a.TextSmall,{color:n?"textNoFocus":"textLite",children:s||t.description})]}),!n&&i&&(0,r.jsx)(l,{onClick:e=>{e.stopPropagation(),i?.()}})]})}},97926(e,t,n){n.d(t,{A:()=>p});var o=n(96540),a=n(41716),i=n(10602),r=n(67294),s=n(24609),l=n(86706),d=n(41258),c=n(31246);const p=()=>{const e=(0,i.nj)(),t=(0,i.CK)(),n=(0,a.s)("ids")||[],p=(0,a.s)("loaded"),g=(0,s.vt)();(0,d.A)(g);const u=(0,l.Gi)(),h=(0,l.gk)(),m=(0,r.q)(),x=(0,r.RQ)();return(0,o.useMemo)(()=>e&&p&&h&&x?{[c.aL.welcome]:!0,[c.aL.firstNodeConnected]:t.length>=1,[c.aL.firstAlertTriggered]:n.length>=1,[c.aL.secondNodeConnected]:t.length>=2,[c.aL.threeOrMoreNodes]:t.length>=3,[c.aL.firstTeamMemberInvited]:Array.isArray(u)&&u.length>1,[c.aL.firstDashboardCreated]:Array.isArray(m)&&m.length>=1}:null,[e,t.length,p,n.length,h,u,x,m])}},74290(e,t,n){n.d(t,{A:()=>g});n(74423),n(98992),n(23215),n(54520),n(81454),n(8872);var o=n(96540),a=n(24285),i=n(99728),r=n(24609),s=n(76571),l=n(56523),d=n(97926),c=n(17115),p=n(31246);const g=()=>{const{milestones:e,recordMilestones:t,markMilestonesSeen:n,settingsLoaded:g}=(0,l.A)(),u=(0,d.A)(),h=(0,c.Ay)(),m=(0,i.Sk)(),x=(0,c.Ex)(),f=(0,a.xd)("isLoaded"),b=(0,a.xd)("onboardingFormData"),k=(0,r.vt)(),C=(0,r.ap)("loaded"),j=(0,s.t5)(k,"channels"),w=(0,s.t5)(k,"loaded"),I=Array.isArray(j)?j.length:0,v=!!b?.usageType;(0,o.useEffect)(()=>{if(!g||!u)return;const n=Object.entries(u).filter(t=>{let[n,o]=t;return o&&!e.completed[n]?.completedAt});if(n.length>0){const e=n.map(e=>{let[t]=e;return t});t(e)}},[u,e.completed,t,g]),(0,o.useEffect)(()=>{if(!g||!w||!C||!f)return;const t={segment:h,permissions:m,isLargeTeam:x,channelCount:I,hasOnboarding:v},o=Object.entries(e.completed).reduce((e,n)=>{let[o,a]=n;if(!a.completedAt||a.seenAt)return e;const i=((e,t)=>{let{segment:n,permissions:o,isLargeTeam:a,channelCount:i,hasOnboarding:r}=t;return(p.a7[e]||[]).filter(e=>r?!!e.segments.includes(n)&&!(e.permission&&!o[e.permission])&&!(e.requiresLargeTeam&&!a)&&!(void 0!==e.maxChannels&&i>e.maxChannels):e.isFeatureAnnouncement)})(o,t);if(!i.length)return e;const r=a.tasks||{};return i.every(e=>r[e.id])&&e.push(o),e},[]);o.length&&n(o)},[I,w,v,x,n,m,e.completed,h,g,C,f])}},81187(e,t,n){n.d(t,{A:()=>b});var o=n(96540),a=n(76667),i=n(34843),r=n(24609),s=n(41716),l=n(19186),d=n(67294),c=n(92726),p=n(14070),g=n(49108),u=n(51318),h=n(42318),m=n(78069),x=n(97394),f=n(56523);const b=function(){let{onBeforeAction:e,skipCompletedCheck:t=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,a.Zp)(),b=(0,r.bq)(),k=(0,l.QW)(),{markTaskCompleted:C}=(0,f.A)(),{onIntegrationsClick:j}=(0,u.A)(),{setSearchTerm:w}=(0,h.A)(),{open:I}=(0,g.A)(),{handleOpenProfileModal:v}=(0,m.A)(),y=(0,i.Xr)(x.TZ),A=(0,s.s)("ids"),[,S]=(0,p.A)(),T=(0,d.q)(),F=(0,c.fz)(T?.[0],"slug"),P=(0,o.useCallback)(e=>t||!e.completed,[t]);return(0,o.useCallback)(t=>{e?.();let o=location.pathname,a={};if(t.openIntegrations)return t.integrationsSearchTerm&&w(t.integrationsSearchTerm),j(),void(P(t)&&C(t.milestoneId,t.id));if(t.openAiPanel)return I(),void(P(t)&&C(t.milestoneId,t.id));if(t.openProfileModal)return v(t.openProfileModal),t.spotlight?void y({...t.spotlight,taskId:t.id,milestoneId:t.milestoneId,targetPath:location.pathname}):void(P(t)&&C(t.milestoneId,t.id));if(t.openFirstDashboard&&F)return o=`/spaces/${b}/rooms/${k}/dashboards/${F}`,n(o),t.spotlight?void y({...t.spotlight,taskId:t.id,milestoneId:t.milestoneId,targetPath:o}):void(P(t)&&C(t.milestoneId,t.id));if(t.route){const e=t.isSpaceRoute?`/spaces/${b}`:`/spaces/${b}/rooms/${k}`;void 0!==t.alertTabIndex&&(a.alertTabIndex=t.alertTabIndex),o=`${e}/${t.route}`,n(o,{state:a}),t.openFirstAlert&&A?.[0]&&S({alertId:A[0]})}t.spotlight?y({...t.spotlight,taskId:t.id,milestoneId:t.milestoneId,targetPath:o}):P(t)&&C(t.milestoneId,t.id)},[e,n,b,k,C,j,w,I,v,y,A,S,F,P])}},17115(e,t,n){n.d(t,{Ay:()=>d,Ex:()=>l});var o=n(96540),a=n(24285),i=n(19186),r=n(31246);const s=()=>{const e=(0,a.xd)("onboardingFormData"),t=(0,i.XA)("memberCount")||0,n=(0,i.XA)("nodeCount")||0;return(0,o.useMemo)(()=>{const o=e?.usageType;return"Personal (homelab)"===o?r.JF.homelabber:"Work"===o?t>2||n>=50?r.JF.largeOrg:r.JF.smallOrg:r.JF.homelabber},[e?.usageType,t,n])},l=()=>{const e=s(),t=(0,i.XA)("memberCount")||0;return e===r.JF.largeOrg&&t>10},d=s},70124(e,t,n){n.r(t),n.d(t,{default:()=>Xe});var o=n(96540),a=n(78904),i=n(24285),r=n(76667),s=n(18121),l=n(17702),d=n(6304),c=n(32742),p=(n(98992),n(81454),n(882)),g=n(24609),u=n(70140),h=n(24655),m=n(74848);const x=(0,p.default)(a.Flex).attrs(e=>({width:"100%",column:!0,alignItems:"center",overflow:{vertical:"auto",horizontal:"hidden"},...e})).withConfig({displayName:"spacesList__SpacesListContainer",componentId:"sc-vabwjt-0"})(["margin-top:-8px;&&{margin-bottom:8px;}"]),f=()=>{const e=(0,g.vt)(),t=(0,u.A)(),{spaceIds:n,colors:o}=t||{};return(0,m.jsx)(x,{"data-testid":"workspaceBar-spacesList",children:n.map(t=>{const n=o?.[t];return(0,m.jsx)(h.A,{testIdPrefix:"workspaceBar-space",spaceId:t,active:t===e,backgroundColor:n},t)})})};var b=n(72679),k=n(74891);const C=(0,k.A)(a.IconButton),j=()=>{const e=(0,g.dg)(),t=(0,b.A)();return(0,m.jsx)(C,{icon:"gear",iconColor:"text",neutral:!0,onClick:t,"data-testid":"settings-button",width:"16px",height:"16px",tooltip:{title:e?"Settings":"Space Settings",description:e?"Configure your Netdata settings and preferences":"Manage space members, permissions, and configurations"},tooltipProps:{align:"right"}})};var w=n(30582),I=(n(54520),n(34843)),v=(n(74423),n(23215),n(30670),n(99728)),y=n(76571),A=n(56523),S=n(97926),T=n(17115),F=n(31246);const P=()=>{const{milestones:e,settingsLoaded:t}=(0,A.A)(),{completed:n}=e,a=(0,S.A)(),r=(0,T.Ay)(),s=(0,v.Sk)(),l=(0,T.Ex)(),d=(0,i.xd)("isLoaded"),c=(0,i.xd)("onboardingFormData"),p=(0,g.vt)(),u=(0,g.ap)("loaded"),h=(0,y.t5)(p,"channels"),m=(0,y.t5)(p,"loaded"),x=Array.isArray(h)?h.length:0;return(0,o.useMemo)(()=>{if(!t||!m||!u||!d||!a)return[];const e=!!c?.usageType,o=Object.entries(a).filter(e=>{let[,t]=e;return t}).map(e=>{let[t]=e;return t}).filter(e=>n[e]?.completedAt);if(o.length>0&&o.every(e=>{if(!n[e]?.seenAt)return!1;const t=F.a7[e]||[],o=n[e]?.tasks||{};return t.every(e=>o[e.id])}))return[];return o.flatMap(e=>(F.a7[e]||[]).map(t=>({...t,milestoneId:e}))).filter(t=>e?!!t.segments.includes(r)&&(!(t.permission&&!s[t.permission])&&(!(t.requiresLargeTeam&&!l)&&!(void 0!==t.maxChannels&&x>t.maxChannels))):t.isFeatureAnnouncement).map(e=>{const t=n[e.milestoneId]?.tasks?.[e.id];return e.channelAwareContent&&x>0?{...e,title:e.channelAwareContent.title,description:e.channelAwareContent.description,completed:!!t}:{...e,completed:!!t}})},[n,a,r,s,l,x,t,m,u,d,c])};var _=n(74290),B=n(97394),L=n(56473),M=n(81187),N=n(4703);const O=(0,p.default)(a.Flex).attrs({column:!0,round:.5,border:{side:"all",color:"border"},background:"panelBg",padding:[4,0],gap:4,overflow:"hidden"}).withConfig({displayName:"sidebarPanel__Panel",componentId:"sc-i29dhk-0"})(["width:min(420px,90vw);box-shadow:0 4px 4px rgba(0,0,0,0.25);"]),$=(0,p.default)(a.Flex).attrs({justifyContent:"between",alignItems:"start",gap:4,padding:[0,4]}).withConfig({displayName:"sidebarPanel__Header",componentId:"sc-i29dhk-1"})([""]),E=(0,p.default)(a.Flex).attrs({alignItems:"center",gap:2,padding:[0,4]}).withConfig({displayName:"sidebarPanel__Progress",componentId:"sc-i29dhk-2"})([""]),H=e=>{let{description:t}=e;return`${(0,L.PP)({extraKey:"runningAlerts"}).length} ${t}`},D=()=>{const[e,t]=(0,I.fp)(B.xL),{dismissOnboarding:n,markTaskCompleted:i}=(0,A.A)(),r=P(),s=(0,o.useCallback)(()=>t(!1),[t]),l=(0,M.A)({onBeforeAction:s,skipCompletedCheck:!1}),d=(0,o.useCallback)(e=>i(e.milestoneId,e.id),[i]),{totalTasks:c,completedTasks:p}=(0,o.useMemo)(()=>({totalTasks:r.length,completedTasks:r.filter(e=>e.completed).length}),[r]);(0,o.useEffect)(()=>{e&&!c&&t(!1)},[e,c,t]);const g=(0,o.useCallback)(()=>{n(),t(!1)},[n,t]);return e&&c?(0,m.jsx)(a.Layer,{full:"vertical",onClickOutside:s,onEsc:s,margin:[5,14],position:"bottom-left",children:(0,m.jsxs)(O,{"data-testid":"onboarding-sidebar-panel",children:[(0,m.jsxs)($,{children:[(0,m.jsxs)(a.Flex,{column:!0,gap:1,children:[(0,m.jsx)(a.Text,{strong:!0,children:"Getting started"}),(0,m.jsx)(a.TextSmall,{color:"textLite",children:"Stay on track with your onboarding tasks"})]}),(0,m.jsx)(a.IconButton,{icon:"x",neutral:!0,onClick:s})]}),(0,m.jsxs)(E,{children:[(0,m.jsx)(a.Icon,{name:p===c?"checkmark":p>0?"checkmark_s":"checkmark_partial_s",color:"primary"}),(0,m.jsxs)(a.TextSmall,{color:"textLite",children:[p," of ",c," tasks completed"]})]}),(0,m.jsx)(a.Flex,{column:!0,gap:2,overflow:"auto",flex:!0,padding:[0,4],children:r.map(e=>(0,m.jsx)(N.A,{task:e,completed:e.completed,onClick:()=>l(e),onSkip:()=>d(e),children:e.dynamicDescription?(0,m.jsx)(o.Suspense,{fallback:e.description,children:(0,m.jsx)(H,{description:e.description})}):e.description},`${e.milestoneId}-${e.id}`))}),(0,m.jsxs)(a.Flex,{justifyContent:"between",alignItems:"center",padding:[0,4],children:[(0,m.jsx)(a.Button,{flavour:"hollow",label:"Skip onboarding",onClick:g}),(0,m.jsx)(a.Button,{label:"Close",onClick:s})]})]})}):null},R=p.default.button.attrs({type:"button"}).withConfig({displayName:"sidebarButton__Button",componentId:"sc-23z3a0-0"})(["background:transparent;border:none;padding:0;cursor:pointer;display:flex;align-items:center;justify-content:center;outline:none;&:hover{filter:drop-shadow(0 0 0 ",");}"],(0,a.getColor)("primary")),z=(0,p.default)(a.Flex).attrs({alignItems:"center",justifyContent:"center"}).withConfig({displayName:"sidebarButton__Ring",componentId:"sc-23z3a0-1"})(["width:36px;height:36px;border-radius:50%;padding:2px;background:",";transition:background 0.2s,transform 0.2s;transform:",";"],e=>{const t=Math.round(360*e.progress);return`conic-gradient(${(0,a.getColor)("primary")(e)} ${t}deg, ${(0,a.getColor)("borderSecondary")(e)} ${t}deg 360deg)`},e=>{let{isOpen:t}=e;return t?"scale(1.05)":"scale(1)"}),W=(0,p.default)(a.Flex).attrs({alignItems:"center",justifyContent:"center",round:"50%",width:"100%",height:"100%"}).withConfig({displayName:"sidebarButton__Inner",componentId:"sc-23z3a0-2"})(["background:",";border:1px solid ",";"],(0,a.getColor)("sideBarMini"),(0,a.getColor)("border")),q=(0,p.default)(a.TextSmall).withConfig({displayName:"sidebarButton__Count",componentId:"sc-23z3a0-3"})(["font-weight:700;"]),J=(0,k.A)(e=>{let{progress:t,remaining:n,isOpen:o,onClick:a}=e;return(0,m.jsx)(R,{onClick:a,"data-testid":"onboarding-sidebar-button","aria-label":`${n} onboarding ${1===n?"task":"tasks"} remaining`,"aria-pressed":o,children:(0,m.jsx)(z,{progress:t,isOpen:o,children:(0,m.jsx)(W,{children:(0,m.jsx)(q,{color:"primary",children:n>9?"9+":n})})})})}),G=()=>{(0,_.A)();const[e,t]=(0,I.fp)(B.xL),n=P(),{totalTasks:a,completedTasks:i}=(0,o.useMemo)(()=>({totalTasks:n.length,completedTasks:n.filter(e=>e.completed).length}),[n]),r=(0,o.useCallback)(()=>t(e=>!e),[t]),s=a-i;if(!a||s<=0)return null;const l=i/a;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(J,{onClick:r,progress:l,remaining:s,isOpen:e,tooltip:{title:"Onboarding",description:`${i} of ${a} tasks completed`},tooltipProps:{align:"right"}}),(0,m.jsx)(D,{})]})};var U=n(99722),X=n(51571),Z=n(39175);const V=(0,k.A)(a.IconButton),Y=e=>{let{modalProps:t={},...n}=e;const o=(0,g.vt)(),i=(0,Z.ES)(o);return(0,m.jsx)(a.News,{app:Z.Ay?i?"agent":["cloud","agent"]:"cloud",modalProps:t,children:e=>{let{toggle:t,upToDate:o}=e;return(0,m.jsx)(V,{icon:"insights",iconColor:o?"text":"attention",onClick:t,"data-ga":"news::click-news::global-view","data-testid":"cloud-app-news",neutral:o,width:"20px",height:"20px",tooltip:{title:"News & Announcements",description:"Stay updated with the latest Netdata features and improvements"},tooltipProps:{align:"right"},...n})}})};var K=n(41514),Q=n(92318);const ee=(0,k.A)(a.IconButton),te=(0,p.default)(a.Flex).attrs(e=>({width:"32px",height:"32px",alignItems:"center",justifyContent:"center",border:{side:"all",color:e.isOpen?"primary":"border"},round:"50%",...e})).withConfig({displayName:"spaceInfo__Accessor",componentId:"sc-1jvcnnq-0"})([""]),ne=(0,p.default)(a.Flex).attrs(e=>({column:!0,gap:1,alignItems:"center",...e})).withConfig({displayName:"spaceInfo__IconsContainer",componentId:"sc-1jvcnnq-1"})(["",""],e=>{let{visible:t}=e;return t?"":"visibility: hidden;"}),oe={onClickOut:()=>(0,K.H)("header-help","click-out-modal","global-view"),onCloseClick:()=>(0,K.H)("header-help","click-close","global-view"),onOpenIssueClick:()=>(0,K.H)("header-help","click-\u03bfpen-issue","global-view"),onContributeClick:()=>(0,K.H)("header-help","click-contribute","global-view"),onOpenBugClick:()=>(0,K.H)("header-help","click-bug","global-view"),onSupportClick:()=>(0,K.H)("header-help","click-support","global-view"),onVisitDocumentClick:()=>(0,K.H)("header-help","click-visit-doc","global-view"),onGoToDemoClick:()=>(0,K.H)("header-help","click-go-to-demo","global-view")},ae=()=>{const[e,t]=(0,s.useHovered)({},[]),n=t,i=(0,o.useCallback)(()=>{window.open("https://status.netdata.cloud","_blank")},[]);return(0,m.jsxs)(a.Flex,{id:"space-info-container",width:"100%",alignItems:"center",ref:e,column:!0,gap:2,children:[(0,m.jsxs)(ne,{visible:n,children:[(0,m.jsx)(a.Documentation,{app:"cloud",demoUrl:Q.A.demoUrl,modalProps:{"data-testid":"space-info-content-container"},...oe,children:e=>(0,m.jsx)(ee,{icon:"question",iconColor:"primary",neutral:!1,onClick:e,"data-ga":"header-help::click-help::global-view","data-testid":"documentation-button",width:"16px",height:"16px",tooltip:{title:"Help & Resources",description:"Read documentation, engage with the community and let us know about any feature requests or bugs"},tooltipProps:{align:"right"}})}),(0,m.jsx)(ee,{icon:"antenna",iconColor:"primary",neutral:!1,onClick:i,width:"16px",height:"16px",tooltip:{title:"Operational Status",description:"View service status, incidents, and maintenance updates for Netdata Cloud"},tooltipProps:{align:"right"}}),!window.envSettings.onprem&&(0,m.jsx)(o.Suspense,{fallback:"",children:(0,m.jsx)(Y,{iconColor:"primary",neutral:!1,modalProps:{"data-testid":"space-info-content-container"},width:"16px",height:"16px"})})]}),(0,m.jsx)(te,{isOpen:n,children:(0,m.jsx)(a.Icon,{name:"informationPress",color:n?"primary":"text"})})]})},ie=p.default.div.withConfig({displayName:"separator__Separator",componentId:"sc-met802-0"})(["height:1px;width:",";background:",";"],(0,a.getSizeBy)(3),(0,a.getColor)("border"));var re=n(49108),se=n(94404),le=n(78152);const de=(0,k.A)(X.A),ce=(0,k.A)(l.A),pe=(0,se.A)(de),ge=e=>{let{spacePanelCollapsed:t,toggleSpacePanel:n}=e;const[i,,l,p]=(0,d.A)(),g=(0,r.Zp)(),u=(0,o.useCallback)(function(){let{slug:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return g(`/spaces/${e}`)},[]),[h,x]=(0,s.useHovered)({},[]),{accessorEnabled:b,open:k}=(0,re.A)();return(0,m.jsxs)(a.Flex,{ref:h,height:"100vh",width:12,background:"sideBarMini","data-testid":"workspaceBar",padding:[3,0],column:!0,alignItems:"center",gap:6,justifyContent:"between",children:[(0,m.jsxs)(a.Flex,{width:"100%",column:!0,"data-testid":"workspaceBar-spaces-list",gap:4,alignItems:"center",overflow:"hidden",children:[t&&x?(0,m.jsx)(a.Flex,{"data-testid":"workspaceBar-expandButton",width:"32px",height:"32px",alignItems:"center",justifyContent:"center",cursor:"pointer",onClick:n,role:"button",children:(0,m.jsx)(a.Icon,{name:"chevron_right",color:"primary",width:"24px",height:"22px"})}):(0,m.jsx)(c.A,{"data-testid":"workspaceBar-netdataLogo"}),(0,m.jsx)(ce,{"data-testid":"workspaceBar-ai-button",icon:"conversationSubject",label:null,height:"24px",onClick:k,disabled:!b,tooltip:b?{title:"Netdata AI",description:"You can ask anything about your infrastructure"}:null,tooltipProps:{align:"right"}}),(0,m.jsx)(ie,{"data-testid":"workspaceBar-separator"}),(0,m.jsx)(f,{}),(0,m.jsx)(pe,{permission:"user:CreateSpace",ifForbidden:"hide",icon:"plus",onClick:l,"data-testid":"workspaceBar-addSpace-button",feature:"CreateSpace",isStart:!0,tooltip:{title:"Create New Space",description:"Spaces isolate infrastructure, providing fully independent administration and user management"},tooltipProps:{align:"right"},iconWidth:"20px",iconHeight:"20px",padding:[.5]}),(0,m.jsx)(ie,{"data-testid":"workspaceBar-separator"}),(0,m.jsx)(j,{})]}),(0,m.jsxs)(a.Flex,{column:!0,"data-testid":"workspaceBar-actionsList",gap:4,alignItems:"center",children:[(0,m.jsx)(ae,{}),le.OH&&(0,m.jsx)(G,{}),(0,m.jsx)(U.A,{})]}),i&&(0,m.jsx)(w.A,{onClose:p,onDone:u})]})};var ue=n(85005),he=n(98595),me=n(64602),xe=n(45087);const fe=e=>t=>{const n=(0,g.vt)();return(0,o.createElement)(e,{...t,key:n})};var be=n(31933);const ke={isSidebar:!0,padding:[1,2,1,4],textColor:"menuItem"},Ce=fe(()=>{const e=(0,v.JT)("room:Create"),t=(0,v.JT)("room:Read"),[n,i]=(0,d.A)(t),[r,,s,l]=(0,d.A)(!1),c=(0,o.useCallback)(t=>{t.stopPropagation(),e&&s()},[e]);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(he.A,{"data-testid":"workspaceRooms-menuList",disabled:!t,headerTestId:"workspaceRooms-warRooms",isOpen:n,label:(0,m.jsxs)(a.Flex,{padding:[1,0],margin:[0,0,1,0],flex:!0,justifyContent:"between",alignItems:"center",height:"24px",children:[(0,m.jsxs)(a.Flex,{alignItems:"center",gap:2,children:[(0,m.jsx)(a.Icon,{name:"space_new",color:"menuItem",width:"14px",height:"14px"}),(0,m.jsx)(a.Text,{color:"menuItem",children:"Rooms"})]}),(0,m.jsxs)(a.Flex,{alignItems:"center",gap:2,children:[(0,m.jsx)(xe.A,{content:"Create a new room",align:"right",children:(0,m.jsx)(X.A,{permission:"room:Create",icon:"plus",flavour:"hollow",onClick:c,"data-testid":"workspaceRooms-addWarRoom-button"})}),(0,m.jsx)(me.v,{right:!n,name:"chevron_down",size:"small",color:"textLite"})]})]}),toggleOpen:i,children:(0,m.jsx)(a.Flex,{column:!0,"data-testid":"workspaceRooms-warRoomsList",padding:[0,0,1],children:(0,m.jsx)(be.A,{...ke})})}),r&&(0,m.jsx)(ue.n,{onClose:l,isSubmodal:!1})]})});var je=n(7960),we=n(85720),Ie=n(98591);const ve=(0,p.default)(a.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;}"],we.G),ye=(0,je.A)(()=>n.e(35).then(n.bind(n,70035)),"CurrentPlan"),Ae=e=>{let{children:t,onToggle:n}=e;return(0,m.jsxs)(a.Flex,{column:!0,gap:1,children:[(0,m.jsxs)(a.Flex,{justifyContent:"between",alignItems:"center",children:[(0,m.jsx)(a.Flex,{alignItems:"center",overflow:"hidden",children:t}),(0,m.jsx)(a.Button,{onClick:n,icon:"chevron_left",neutral:!0,flavour:"hollow",small:!0})]}),(0,m.jsx)(o.Suspense,{fallback:"",children:(0,m.jsx)(ye,{})})]})};var Se=n(89590),Te=n(1174),Fe=n(51318),Pe=n(56284);const _e=(0,je.A)(()=>n.e(2201).then(n.bind(n,52201)).then(e=>({default:e.TrialWarning})),"TrialWarning"),Be=(0,p.default)(he.N).attrs({padding:[2],color:"textLite"}).withConfig({displayName:"spacePanel__ListHeader",componentId:"sc-1275zgk-0"})([""]),Le=e=>(0,m.jsxs)(a.Flex,{alignItems:"center",gap:2,...e,children:[(0,m.jsx)(ve,{children:(0,m.jsx)(a.TextFemto,{strong:!0,color:"text",children:"ADMIN"})}),(0,m.jsx)(a.Flex,{opacity:"medium",children:(0,m.jsx)(a.Icon,{name:"padlock",size:"small",width:"18px",height:"18px",color:"text"})})]}),Me={iconWidth:"14px",iconHeight:"14px",padding:[1,2],gap:2,isSidebar:!0,textColor:"menuItem",iconColor:"menuItem"},Ne=e=>{let{toggleSpacePanel:t}=e;const n=(0,g.ap)(),[i,,r,s]=(0,d.A)(),[,l]=(0,Ie.A)("manageInvitations"),c=(0,g.dg)(),{onIntegrationsClick:p}=(0,Fe.A)();return(0,m.jsxs)(m.Fragment,{children:[i&&(0,m.jsx)(Se.A,{onClose:s}),(0,m.jsx)(he.A,{"data-testid":"spacesPanel",isOpen:!0,label:(0,m.jsx)(Ae,{onToggle:t,children:(0,m.jsx)(Pe.default,{maxFontSize:20,Component:a.TextSmall,strong:!0,title:n.name,lineHeight:"unset",children:n.name})}),headerTestId:"spacesPanel-activeSpaceHeader",Header:Be,children:(0,m.jsxs)(a.Flex,{column:!0,padding:[2,0,1],"data-testid":"spacesPanel-menuList",children:[(0,m.jsx)(o.Suspense,{fallback:"",children:(0,m.jsx)(_e,{flavour:"sidebar"})}),(0,m.jsx)(we.A,{onClick:p,testid:"agentDashboard-addIntegrations",dataGa:"integrations::click-add-integrations::sideMenu",icon:"integrations",...Me,children:"Integrations"}),c?null:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(Te.A,{permission:"node:Create",children:e=>(0,m.jsx)(we.A,{actions:e?null:(0,m.jsx)(Le,{"data-testid":"adminWarning-notAdmin"}),disabled:!e,onClick:r,testid:"spacesPanel-claimNodes",icon:"nodes_hollow",...Me,children:"Connect Nodes"})}),(0,m.jsx)(Te.A,{permission:"space:InviteUser",children:e=>(0,m.jsx)(we.A,{actions:e?null:(0,m.jsx)(Le,{"data-testid":"adminWarning-cannotInvite"}),disabled:!e,onClick:l,testid:"spacesPanel-inviteUsers",icon:"user",...Me,children:"Invite Users"})})]})]})})]})},Oe=e=>{let{spacePanelCollapsed:t,toggleSpacePanel:n}=e;return(0,m.jsx)(a.Collapsible,{width:56,background:"sideBar",border:{side:"right",color:"borderSecondary"},open:!t,direction:"horizontal",children:(0,m.jsxs)(a.Flex,{flex:!0,width:56,column:!0,overflow:{vertical:"hidden"},padding:[2,0],position:"relative",children:[(0,m.jsx)(Ne,{toggleSpacePanel:n}),(0,m.jsx)(a.Flex,{overflow:{vertical:"auto"},flex:!0,column:!0,children:(0,m.jsx)(Ce,{})})]})})};var $e=n(29263),Ee=n(32788),He=n(37846),De=n(62718),Re=n(14815),ze=n(60908);const We=(0,je.A)(()=>Promise.all([n.e(8791),n.e(9462),n.e(6026)]).then(n.bind(n,89462))),qe={"data-testid":"addIntegrationModal"},Je={"data-testid":"addIntegration-header"},Ge={"data-testid":"addIntegration-content",overflow:"hidden",hasFooter:!1,padding:[0],hasModalTitle:!1},Ue=e=>{let{title:t="Integrations",onClose:n}=e;return(0,m.jsx)(ze.Ay,{feature:"IntegrationsModal",children:(0,m.jsxs)(He.GO,{right:!0,closeOnEsc:!0,closeOnOverlayClick:!0,onClose:n,...qe,children:[(0,m.jsx)($e.z,{title:(0,m.jsx)(a.TextBig,{color:"textLite",children:t}),onClose:n,...Je||{}}),(0,m.jsx)(Ee.Yv,{...Ge||{},children:(0,m.jsx)(o.Suspense,{fallback:(0,m.jsx)(De.H$,{}),children:(0,m.jsx)(We,{flavour:Re.D_.addNodesModal})})})]})})},Xe=(0,o.memo)(()=>{const[e,t]=(0,i.tF)("spacePanelCollapsed"),{isIntegrationsVisible:n,hideIntegrations:r}=(0,Fe.A)(),s=(0,o.useCallback)(()=>t(!e),[e,t]);return(0,o.useLayoutEffect)(()=>{const e=setTimeout(()=>window.dispatchEvent(new Event("resize")),400);return()=>clearTimeout(e)},[e]),(0,m.jsxs)(a.Flex,{children:[(0,m.jsx)(ge,{spacePanelCollapsed:e,toggleSpacePanel:s}),(0,m.jsx)(Oe,{spacePanelCollapsed:e,toggleSpacePanel:s}),n&&(0,m.jsx)(Ue,{onClose:r})]})})},48646(e,t,n){var o=n(69565),a=n(28551),i=n(1767),r=n(50851);e.exports=function(e,t){t&&"string"===typeof e||a(e);var n=r(e);return i(a(void 0!==n?o(n,e):e))}},30531(e,t,n){var o=n(46518),a=n(69565),i=n(79306),r=n(28551),s=n(1767),l=n(48646),d=n(19462),c=n(9539),p=n(96395),g=n(30684),u=n(84549);var h=!p&&!g("flatMap",function(){}),m=!p&&!h&&u("flatMap",TypeError),x=p||h||m||function(){try{var e=Iterator.prototype.flatMap.call(new Map([[4,5]]).entries(),function(e){return e});e.next(),e.return()}catch(t){return!0}}(),f=d(function(){for(var e,t,n=this.iterator,o=this.mapper;;){if(t=this.inner)try{if(!(e=r(a(t.next,t.iterator))).done)return e.value;this.inner=null}catch(i){c(n,"throw",i)}if(e=r(a(this.next,n)),this.done=!!e.done)return;try{this.inner=l(o(e.value,this.counter++),!1)}catch(i){c(n,"throw",i)}}});o({target:"Iterator",proto:!0,real:!0,forced:x},{flatMap:function(e){r(this);try{i(e)}catch(t){c(this,"throw",t)}return m?a(m,this,e):new f(s(this),{mapper:e,inner:null})}})},30670(e,t,n){n(30531)}}]);