File: //opt/netdata/usr/share/netdata/web/v3/9341.507a808c94593d8b0c38.chunk.js
try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="72293da7-47ad-4e18-9d0b-1e1e7b13fd38",e._sentryDebugIdIdentifier="sentry-dbid-72293da7-47ad-4e18-9d0b-1e1e7b13fd38")}()}catch(e){}!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"553c63cf6c9afe8a8ef298d5e602e53feac44b0d"}}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[9341],{41073:(e,t,n)=>{n.d(t,{A:()=>g,G:()=>j});n(98992),n(72577),n(3949),n(81454),n(8872);var s=n(88055),r=n.n(s),a=n(72337),i=n(57377),l=n(52154);const o=90,d=110,c=160,u=1e3,x={minSize:1,maxSize:5e3},h=50,m={uniqueKey:{size:o,downLimit:o-h,upLimit:o+h},bar:{size:o,downLimit:o-h,upLimit:o+h},value:{size:d,downLimit:d-h,upLimit:d+h},feedTemplate:{size:u,downLimit:u-h,upLimit:u+h,minSize:1,maxSize:5e3,fullWidth:!0},pill:{size:d,downLimit:d-h,upLimit:d+h},timestamp:{size:c,downLimit:c-h,upLimit:c+h},datetime:{size:c,downLimit:c-h,upLimit:c+h}},j=(e,t)=>{const{updateEvery:n,merge:s,reset:o,groupBy:c,items:u,direction:j,dataOnly:g,showIds:p=!1!==e.showIds,facetsDelta:f,histogramDelta:T,itemsDelta:w,aggregatedView:y,...v}=t;let b=o?t.columns:g?r()(e.columns):r()(s?(0,a.A)(t.columns,e.columns):t.columns),C=o?{}:{...e.sortedColumnsObj};const A=v.hasHistory||e.hasHistory,N=g?e.pagination:t.pagination;let I=Object.keys(b).reduce(((t,n)=>{const s=b[n],{name:r,sticky:a,visible:i,index:l,id:c=n}=s;return s.displayName=p?c||n:r,t.columnVisibility[s.displayName]=!o&&e.loaded?!!t.columnVisibility[s.displayName]:i,!a||!o&&e.loaded||t.pinnedColumns.push(s.displayName),s.valueOptions=s.valueOptions||{},s.cellSize=(e=>{let{visualization:t,type:n,fullWidth:s=!1,uniqueKey:r}=e;return{...x,fullWidth:s,...(r&&"timestamp"!==n?m.uniqueKey:m[n])||m[t]||{minSize:1,maxSize:5e3,size:d,downLimit:d-h,upLimit:d+h}}})(s),s.sortable=s.sortable&&!N?.enabled,"undefined"!==typeof l&&(C[C[l]!==n?s.displayName:l]=n),t}),{columnVisibility:o?{}:{...e.columnVisibility||{}},pinnedColumns:o?[]:[...e.pinnedColumns||[]]}),k=o||!e.alphabetical?.length?Object.keys(b).sort(((e,t)=>(b[e].displayName||b[e].name).localeCompare(b[t].displayName||b[t].name,void 0,{sensitivity:"accent",ignorePunctuation:!0}))):e.alphabetical,S=o?t.aggregations:s?r()(e.aggregations):t.aggregations||r()(e.aggregations);f&&Array.isArray(S)&&f.forEach((e=>{const t=S.find((t=>t.id===e.id));t?e.options.forEach((e=>{if(isNaN(e.count))return;const n=t.options.find((t=>t.id===e.id));n?n.count=(n.count||0)+(e?.count||0):t.options.push(e)})):S.push(e)}));let z=o?t.histogram:s?r()(e.histogram):t.histogram||r()(e.histogram);if(T){if(!o&&e.histogram?.id!==T?.id)return;const t=z.chart.result.labels;if((0,i.Ay)(t,T.chart.result.labels))z.chart.result.data=[...z.chart.result.data,...T.chart.result.data];else{const e=((e,t)=>{const n=t.reduce(((t,n,s)=>{const r=e.findIndex((e=>n===e));return-1===r||(t[r]=s),t}),{});return t=>e.reduce(((e,s,r)=>("undefined"===typeof n[r]?e.push([0,0,0]):e.push(t[n[r]]),e)),[])})(t,T.chart.result.labels);T.chart.result.data.forEach((t=>z.chart.result.data.push(e(t))))}}let D={};Object.keys(t.columns).forEach((e=>{D[t.columns[e].index]=e}));let O=t.data.map((e=>e.reduce(((e,t,n)=>{const s=D[n];return s?(e[s]=t,e):e}),{}))),F=o?O:s?"forward"===j?O.concat(e.data||[]):(e.data||[]).concat(O):O;v.tail&&F.slice(0,500);let E=N?.enabled&&N.column&&Array.isArray(F)&&F[F.length-1]?.[N.column]&&F[0]?.[N.column]?{anchorBefore:F[F.length-1][N.column],anchorAfter:F[0][N.column],anchorUnits:N.units}:{};const L=t.defaultSortColumn||e.defaultSortColumn,$=(o?t.acceptedParams||[]:t.acceptedParams||e.acceptedParams).includes("direction");let V=0;y&&(V=F.reduce(((e,t)=>e+(t[y.column]||0)),0));const _={...e||l.zb.table,...v,groupByColumns:o?c:c||e.groupByColumns,data:F,columns:b,updatedAt:(new Date).getTime(),updateEvery:n||e.updateEvery,sortedColumns:Object.values(C),sortColumn:b[L]?.displayName,sortDirection:L?b[L].sort:"descending",...I,...E,totalSize:v.totalSize||u?.matched||(!g||"forward"===j||O.length||t.partial?(e.totalSize||0)+(w?w.matched:0):0),actualSize:V,...!!A&&{hasNextPage:!(g&&"forward"!==j&&!O.length&&!t.partial)&&(!u||0!==u.after)},...!!A&&$&&{hasPrevPage:!v.tail&&(!(g&&"forward"===j&&!O.length&&!t.partial)&&(!u||0!==u.before))},offset:s?null:u?.before||null,loading:!1,loaded:!0,showIds:p,merged:s,latestDirection:j,hasHistory:A,hasDirection:$,aggregations:S,histogram:z,sortedColumnsObj:C,filtersToRefresh:(v.requiredParams||[]).reduce(((e,t)=>t.uniqueView?{...e,[t.id]:!0}:e),{}),reset:o,aggregatedView:y,alphabetical:k,transactionId:null};return C=null,z=null,S=null,E=null,I=null,b=null,D=null,O=null,F=null,k=null,_},g=(e,t)=>{e((e=>j(e,t)))}},61533:(e,t,n)=>{n.d(t,{A:()=>ce});n(98992),n(8872);var s=n(96540),r=n(63766),a=n(65687),i=n(74848);const l=e=>{let{value:t,...n}=e;return(0,i.jsx)(a.Ay,{value:t.value,...n})};var o=n(45087);const d=e=>{let{description:t="",maxValue:n,strong:s,type:l,value:d,valueOptions:c={},wrap:u,...x}=e;const h=100*d/n,m="bar"===l,j=x?.["data-testid"]||"progressValue",g=(0,a.k4)(d,c);return(0,i.jsx)(o.A,{content:(0,i.jsx)(a.$f,{description:t,value:d,units:c.units}),isBasic:!0,stretch:"align",children:(0,i.jsxs)(r.Flex,{column:!0,"data-testid":j,gap:1,flexWrap:u,flex:!0,children:[!m&&(0,i.jsx)(a.WT,{strong:s,testid:j,justifyContent:"end",children:g}),null!==d&&(0,i.jsx)(r.ProgressBar,{background:"border",border:"none",color:["green","netdata"],containerWidth:"100%","data-testid":`${j}-bar`,height:2,width:`${h}%`})]})})};n(81454);const c=e=>{let{value:t,wrap:n}=e;return t=Array.isArray(t)?t:[t],(0,i.jsx)(r.Flex,{alignItems:"center",justifyContent:"center",flexWrap:n,children:t.map(((e,t)=>(0,i.jsx)(r.Pill,{flavour:"neutral","data-testid":"pillValueComponent",margin:[.3],normal:!1,children:e},`${e}-${t}`)))})};var u=n(24609),x=n(19186),h=n(33185),m=n(75894);const j=e=>{let{hide:t,user:n}=e;return t||!n?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.Text,{children:"by"}),(0,i.jsx)(g,{children:n})]})},g=e=>{let{color:t="text",...n}=e;return(0,i.jsx)(r.Text,{color:t,strong:!0,...n})},p=e=>{let{type:t,text:n=t,hollow:s}=e;return(0,i.jsx)(m.A,{flavour:t.toLowerCase(),...s&&{border:!1},children:n})},f=(0,h.default)(r.Flex).attrs({gap:1,flexWrap:!0,alignItems:"center"}).withConfig({displayName:"components__Container",componentId:"sc-b5rk6g-0"})([""]);var T=n(88934),w=n(24013),y=n(79748);const v={CLEAR:0,WARNING:1,CRITICAL:2,UNINITIALIZED:3,UNDEFINED:4},b=e=>{let{chart:t,context:n,nodeId:a,nodeName:l,spaceSlug:d,roomSlug:c,alert:u}=e;const x=(0,T.Zp)(),h=(0,w.Zl)(a),m=(0,s.useCallback)((()=>{x(h,u?.id?{state:{alertId:u.id}}:{state:{contextToGo:n?.name?.[0]}})}),[h,u]),j=`/spaces/${d}/rooms/${c}/alerts/${u?.id}`,{current:b,name:C,previous:A}=u;if("ERROR"===b.status)return(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"For the alert"}),(0,i.jsx)(y.A,{Component:g,as:T.N_,to:j,children:C}),(0,i.jsx)(r.Text,{children:"for"}),(0,i.jsx)(y.A,{Component:g,onClick:m,children:t.name}),(0,i.jsx)(r.Text,{children:"on"}),(0,i.jsx)(y.A,{Component:g,onClick:m,children:l}),(0,i.jsx)(r.Text,{children:"we couldn't calculate the current value"}),(0,i.jsx)(o.A,{align:"bottom",content:"Please check your alert configuration",children:(0,i.jsx)(r.Icon,{color:"nodeBadgeColor",size:"small",name:"information"})})]});if("REMOVED"===b.status)return(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"Alert"}),(0,i.jsx)(y.A,{Component:g,as:T.N_,to:j,children:C}),(0,i.jsx)(r.Text,{children:"for"}),(0,i.jsx)(y.A,{Component:g,onClick:m,children:t.name}),(0,i.jsx)(r.Text,{children:"on"}),(0,i.jsx)(y.A,{Component:g,onClick:m,children:l}),(0,i.jsx)(r.Text,{children:"is no longer available, state can't be assessed"})]});const N=v[b.status]===v.CLEAR;return(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"Alert"}),(0,i.jsx)(y.A,{Component:g,as:T.N_,to:j,children:C}),(0,i.jsx)(r.Text,{children:"for"}),(0,i.jsx)(y.A,{Component:g,onClick:m,children:t.name}),(0,i.jsx)(r.Text,{children:"on"}),(0,i.jsx)(y.A,{Component:g,onClick:m,children:l}),N?(0,i.jsx)(r.Text,{children:"recovered"}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.Text,{strong:!0,children:v[A.status]===v.CRITICAL?"was demoted":v[A.status]===v.WARNING?"escalated":v[b.status]===v.UNDEFINED?"transitioned":"was raised"}),(0,i.jsx)(r.Text,{children:"to"}),(0,i.jsx)(p,{type:b.status}),v[b.status]===v.UNDEFINED&&(0,i.jsx)(r.Text,{children:"state"})]}),(0,i.jsx)(r.Text,{children:"with value"}),(0,i.jsx)(p,{type:b.status,text:b.value_string,hollow:!0,padding:[0]})]})},C=e=>{let{id:t,name:n}=e;const s=`/spaces/${(0,u.bq)()}/rooms/${(0,x.wz)(t,"slug")}/home`;return(0,i.jsx)(y.A,{Component:g,as:T.N_,to:s,children:n})},A=e=>{let{rooms:t}=e;return t.map(((e,n)=>(0,i.jsxs)(s.Fragment,{children:[n>0&&(n<t.length-1?", ":" and "),(0,i.jsx)(C,{...e})]},e.id)))},N=e=>{let{rooms:t}=e;if(!t.length)return null;const n=t.length>1?"rooms":"room";return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.Text,{children:["on ",n]}),(0,i.jsx)(A,{rooms:t})]})},I=e=>{let{contexts:t}=e;t.map(((e,n)=>(0,i.jsxs)(s.Fragment,{children:[n>0&&(n<t.length-1?", ":" and "),(0,i.jsx)(g,{children:e})]},e)))},k=e=>{let{contexts:t}=e;if(!t.length)return null;const n=t.length>1?"contexts":"context";return(0,i.jsxs)(r.Text,{children:["on ",n," ",(0,i.jsx)(I,{contexts:t})]})};var S=n(64587);const z={month:"2-digit",day:"2-digit",year:"numeric",hour:"numeric",minute:"numeric",long:!1,dateStyle:void 0},D=e=>{let{start:t,end:n}=e;const{localeDateString:s}=(0,S.$j)();if(!t||!n)return null;const a=s(new Date(t),z),l=s(new Date(n),z);return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(r.Text,{children:["(scheduled ",a," - ",l,")"]})})},O={"silencing-rule-created":"created","silencing-rule-deleted":"deleted","silencing-rule-changed":"changed"},F=e=>{let{rooms:t=[],contexts:n=[]}=e;return t.length||n.length?(0,i.jsxs)(i.Fragment,{children:[!!t.length&&(0,i.jsx)(N,{rooms:t}),!!t.length&&!!n.length&&(0,i.jsxs)(r.Text,{children:["and ",(0,i.jsx)(k,{contexts:n})]})]}):null},E=e=>{let{action:t,notification:n,user:s,room:a,context:l}=e;const o=(n?.silencing?.rule||[])[0],d=s?.name,c=l?.name||[];return(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"Silencing rule"}),(0,i.jsx)(g,{children:o.name}),(0,i.jsx)(F,{rooms:a,contexts:c}),(0,i.jsxs)(r.Text,{children:["was ",O[t]]}),(0,i.jsx)(j,{user:d}),(0,i.jsx)(D,{...o})]})};var L=n(16866);const $=(e,t)=>e.target?.[t]||e.target?.id||e[t]||e.id,V=(e,t)=>{if(e)return t=t||"name",Array.isArray(e)?e[0][t]:e[t]},_={"space-setting-created":()=>(0,i.jsxs)(r.Text,{children:["was ",(0,i.jsx)(r.Text,{strong:!0,children:"created"})]}),"space-setting-changed":()=>(0,i.jsxs)(r.Text,{children:["was ",(0,i.jsx)(r.Text,{strong:!0,children:"updated"})]}),"space-setting-removed":()=>(0,i.jsxs)(r.Text,{children:["was ",(0,i.jsx)(r.Text,{strong:!0,children:"deleted"})]})},P=function(){let{event:e={},user:t={},token:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"space-claiming-token-created"==e.action?(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"Claiming Token was created by user"}),(0,i.jsx)(j,{hide:!t.target,user:t.name})]}):"space-claiming-token-revoked"==e.action?(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"Claiming Token"}),(0,i.jsx)(r.Text,{strong:!0,children:n.prefix}),(0,i.jsx)(r.Text,{children:"was revoked by user"}),(0,i.jsx)(j,{hide:!t.target,user:t.name})]}):null},R=e=>{let{action:t,Netdata:n}=e;const s=_[t];return(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"Setting on"}),(0,i.jsx)(g,{children:V(n.settings,"type")}),s?(0,i.jsx)(s,{}):t,(0,i.jsxs)(r.Text,{children:["on ",V(n.space)]})]})},W=e=>{let{statistics:t}=e;const{live:n,stale:s,removed:a,total:l}=t?.nodes||{};return(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"Space statistics. Nodes:"}),(0,i.jsxs)(r.Text,{color:L.J4.live.statusTextColor,children:[n," live"]}),(0,i.jsx)(r.Text,{children:","}),(0,i.jsxs)(r.Text,{color:L.J4.stale.statusTextColor,children:[s," stale"]}),(0,i.jsx)(r.Text,{children:","}),(0,i.jsxs)(r.Text,{color:L.J4.offline.statusTextColor,children:[a," removed"]}),(0,i.jsx)(r.Text,{children:","}),(0,i.jsxs)(r.Text,{strong:!0,children:[l," total"]})]})};n(78898);var U=n(71341);const q=e=>{let{stateColor:t,state:n}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.Text,{children:"became"}),(0,i.jsx)(g,{color:t,children:n})]})},B=e=>{let{stateColor:t,state:n}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.Text,{children:"was"}),(0,i.jsx)(g,{color:t,children:n})]})},M={"node-created":B,"node-state-live":q,"node-state-stale":q,"node-state-offline":q,"node-removed":B,"node-deleted":B,"node-restored":B,default:B},Z=e=>{let{action:t,hosts:n=[]}=e;const{id:a,name:l}=n[0],o=(0,T.Zp)(),d=(0,w.Zl)(a),c=(0,s.useCallback)((()=>o(d)),[d]),u=M[t]||M.default,x=t.split("-").at(-1),h=U.P[x]?.statusTextColor;return(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"Node"}),(0,i.jsx)(y.A,{Component:g,onClick:c,children:l}),(0,i.jsx)(u,{stateColor:h,state:x})]})},G=e=>{let{room:t}=e;const n=(0,x.XA)("untouchable");return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.Text,{children:["was ",(0,i.jsx)(r.Text,{strong:!0,children:"added"})," to",n?" room":""]}),(0,i.jsx)(g,{children:n?V(t):"this room"})]})},X=()=>(0,i.jsxs)(r.Text,{children:["was ",(0,i.jsx)(r.Text,{strong:!0,children:"created"})]}),H=()=>(0,i.jsxs)(r.Text,{children:["was ",(0,i.jsx)(r.Text,{strong:!0,children:"deleted"})]}),J=e=>{let{room:t}=e;const n=(0,x.XA)("untouchable");return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.Text,{children:["was ",(0,i.jsx)(r.Text,{strong:!0,children:"removed"})," from",n?" room":""]}),(0,i.jsx)(g,{children:n?V(t):"this room"})]})},K=e=>{let{room:t}=e;const n=(0,x.XA)("untouchable");return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.Text,{children:n?"room":""}),(0,i.jsx)(g,{children:n?V(t):"this room"})]})},Y={"room-created":X,"room-deleted":H,"room-node-added":G,"room-node-removed":J,"room-user-added":G,"room-user-removed":J,"room-setting-created":X,"room-setting-changed":()=>(0,i.jsxs)(r.Text,{children:["was ",(0,i.jsx)(r.Text,{strong:!0,children:"updated"})]}),"room-setting-removed":H},Q=e=>{let{action:t,hosts:n=[],Netdata:s,user:a}=e;const l=Y[t],o=n[0]?.name;return(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"Node"}),(0,i.jsx)(g,{children:o}),l?(0,i.jsx)(l,{room:s.room}):t,(0,i.jsx)(j,{user:a?.name})]})},ee=e=>{let{action:t,Netdata:n,user:s}=e;const a=Y[t];return(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"User"}),(0,i.jsx)(g,{children:$(s,"name")}),a?(0,i.jsx)(a,{room:n.room}):t,(0,i.jsx)(j,{hide:!s.target,user:s.name})]})},te=e=>{let{action:t,Netdata:n}=e;const s=Y[t];return(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"Setting on"}),(0,i.jsx)(g,{children:V(n.settings,"type")}),s?(0,i.jsx)(s,{}):t,(0,i.jsx)(r.Text,{children:"on"}),(0,i.jsx)(K,{room:n.room})]})},ne=e=>{let{action:t,Netdata:n,user:s}=e;const a=Y[t];return(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"Room"}),(0,i.jsx)(g,{children:V(n.room)}),a?(0,i.jsx)(a,{}):t,(0,i.jsx)(j,{user:s.name})]})},se={"alert-node-transition":e=>{let{chart:t,hosts:n,alert:s,...r}=e;return n.map(((e,n)=>{let{id:a,name:l}=e;const o={...s,name:s.name[n],...s.current?{current:{...s.current,...s.current.status?{status:s.current.status[n]||s.current.status[0]}:{}}}:{}};return(0,i.jsx)(b,{chart:t,nodeId:a,nodeName:l,alert:o,...r},a)}))},"node-created":Z,"node-state-live":Z,"node-state-stale":Z,"node-state-offline":Z,"node-removed":Z,"node-deleted":Z,"node-restored":Z,"agent-connected":e=>{let{agentId:t}=e;return(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"Agent with claim ID"}),(0,i.jsx)(g,{children:t})," ",(0,i.jsxs)(r.Text,{children:["has ",(0,i.jsx)(r.Text,{strong:!0,children:"connected"})," to Netdata"]})]})},"agent-connection-initialized":e=>{let{agentId:t,reason:n}=e;return(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"Agent with claim ID"}),(0,i.jsx)(g,{children:t}),(0,i.jsxs)(r.Text,{children:["has ",(0,i.jsx)(r.Text,{strong:!0,children:"initialized"})," its connection to Netdata"]})]})},"agent-disconnected":e=>{let{agentId:t,reason:n}=e;return(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"Agent with claim ID"}),(0,i.jsx)(g,{children:t}),(0,i.jsxs)(r.Text,{children:["has ",(0,i.jsx)(r.Text,{strong:!0,children:"disconnected"})," from Netdata with reason: \u201c",n,"\u201d"]})]})},"agent-authenticated":e=>{let{agentId:t}=e;return(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"Agent with claim ID"}),(0,i.jsx)(g,{children:t}),(0,i.jsxs)(r.Text,{children:["has ",(0,i.jsx)(r.Text,{strong:!0,children:"successfully"})," authenticated"]})]})},"agent-authentication-failed":e=>{let{agentId:t}=e;return(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"Agent with claim ID"}),(0,i.jsx)(g,{children:t}),(0,i.jsxs)(r.Text,{children:["has ",(0,i.jsx)(r.Text,{strong:!0,children:"failed"})," to authenticate"]})]})},"room-created":ne,"room-deleted":ne,"room-node-added":Q,"room-node-removed":Q,"room-user-added":ee,"room-user-removed":ee,"space-created":e=>{let{Netdata:t,user:n}=e;return(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"Space"}),(0,i.jsx)(g,{children:V(t.space)}),(0,i.jsx)(r.Text,{children:"was created"}),(0,i.jsx)(j,{user:n.name})]})},"space-statistics":W,"space-user-added":e=>{let{Netdata:t,user:n}=e;const{name:s}=t?.inviter||{};return(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"User"}),(0,i.jsx)(g,{children:$(n,"name")}),(0,i.jsx)(r.Text,{children:"was added to this space"}),s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.Text,{children:"by invite of"}),(0,i.jsx)(g,{children:s})]})]})},"space-user-changed":e=>{let{user:t}=e;if(!!t.changes?.roles&&1===Object.keys(t.changes).length){const e=t.changes.roles.length>1,n=t.changes.roles.join(", ");return(0,i.jsxs)(f,{children:[(0,i.jsxs)(r.Text,{children:["User ",e?"roles":"role"," for"]}),(0,i.jsx)(g,{children:$(t,"name")}),(0,i.jsxs)(r.Text,{children:[e?"were":"was"," changed to"]}),(0,i.jsx)(g,{children:n}),(0,i.jsx)(j,{hide:!t.target,user:t.name})]})}return(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"User"}),(0,i.jsx)(g,{children:$(t,"name")}),(0,i.jsx)(r.Text,{children:"was modified"})]})},"space-user-invited":e=>{let{user:t}=e;return(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"User"}),(0,i.jsx)(g,{children:$(t,"email")}),(0,i.jsx)(r.Text,{children:"was invited to this space"}),(0,i.jsx)(j,{user:t.name})]})},"space-user-removed":e=>{let{user:t}=e;const{name:n}=t.target||{};return(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"User"}),(0,i.jsx)(g,{children:$(t,"name")}),(0,i.jsx)(r.Text,{children:"was removed from this space"}),n&&(0,i.jsx)(j,{user:t.name})]})},"space-user-uninvited":e=>{let{event:t,user:n}=e;return"space-invite-expired"===t.reason?(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"The invite for"}),(0,i.jsx)(g,{children:$(n,"email")}),(0,i.jsx)(r.Text,{children:"to this space has expired"})]}):(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"User"}),(0,i.jsx)(g,{children:$(n,"email")}),(0,i.jsx)(r.Text,{children:"was uninvited from this space"}),(0,i.jsx)(j,{hide:!n.target,user:n.name})]})},"space-claiming-token-created":P,"space-claiming-token-revoked":P,"silencing-rule-created":E,"silencing-rule-deleted":E,"silencing-rule-changed":E,"space-settings-created":R,"space-settings-removed":R,"space-settings-changed":R,"room-settings-created":te,"room-settings-removed":te,"room-settings-changed":te},re=e=>{let{data:t}=e;const{action:n,roomId:s,space:a}=t.source,l=(0,u.ns)(a.id,"slug"),o=(0,x.wz)(s,"slug"),d=se[n];return d?(0,i.jsx)(d,{...t.source,spaceSlug:l,roomSlug:o}):(0,i.jsxs)(f,{children:[(0,i.jsx)(r.Text,{children:"Event"})," ",(0,i.jsx)(r.Text,{strong:!0,children:n})," ",(0,i.jsx)(r.Text,{children:"emitted"})]})},ae=e=>{let{value:t,...n}=e;const s=new Date(t),{localeTimeString:r,localeDateString:l,utcOffset:o}=(0,S.$j)(),d=isNaN(s.valueOf())?"Missing date & time":`${l(s,{long:!1})} ${r(s,{secs:!0})}`;return(0,i.jsx)(a.Ay,{value:d,...n})},ie={bar:d,"bar-with-integer":d,duration:d,pill:c,number:a.Ay,string:a.Ay,feedTemplate:re,datetime:ae,value:a.Ay},le={bar:d,pill:c,value:a.Ay,richValue:l,feedTemplate:re,rowOptions:"skip"},oe=e=>{let{visualization:t,type:n,value:s,data:r,...a}=e;const l=le[t]||ie[n]||le.value;return l===le.rowOptions?null:(0,i.jsx)(l,{value:s,type:n,rowOptions:r?.rowOptions,data:r,...a})},de={sum:"sum",min:"min",max:"max",extent:"extent",mean:"mean",median:"median",unique:"unique",uniqueCount:"uniqueCount",count:"count"},ce=(e,t,n)=>{let{groupBy:a}=n;return(0,s.useMemo)((()=>(e||[]).reduce(((e,n)=>{const s=t[n];if(!s)return e;const{displayName:l,name:o,sortable:d,sticky:c,units:u,max:x,dummy:h,cellSize:m,valueOptions:j,summary:g,type:p,visualization:f,wrap:T=!1,...w}=s;return h?e:[...e,{...w,displayName:l,id:l,accessorFn:e=>e[n],cell:e=>{let{getValue:t,row:n,cell:s}=e;const r=s.getIsAggregated(),l=t(),d=r&&(de[g]===de.count||de[g]===de.uniqueCount||!de[g]);return(0,i.jsx)(oe,{description:o,data:n.original,maxValue:x,padding:n.depth>0?[0,0,0,2.5*n.depth]:[0],strong:r,value:d?`${l}x`:l,tooltipValue:d?`${l} ${1===l?"item":"items"} associated with ${a} grouping`:l,valueOptions:d?{...j,transform:"none"}:j,type:p,visualization:f,wrap:T})},header:(0,i.jsxs)(r.Flex,{column:!0,children:[(0,i.jsx)(r.TextSmall,{strong:!0,children:l}),u&&(0,i.jsxs)(r.TextMicro,{children:["(",u,")"]})]}),headerString:()=>`${l} ${u?`(${u})`:""}`,enableSorting:d,aggregationFn:de[g]||de.count,...m,meta:{...l!==o?{tooltip:o}:{}}}]}),[])),[e,t,a])}},65687:(e,t,n)=>{n.d(t,{$f:()=>h,Ay:()=>f,WT:()=>p,k4:()=>x});var s=n(96540),r=n(33185),a=n(16099),i=n.n(a),l=n(63766),o=n(45087),d=n(98830),c=n(74848);const u=(0,r.default)(l.Icon).attrs({color:"text",height:"16px",width:"16px"}).withConfig({displayName:"value__Arrow",componentId:"sc-1apuy8c-0"})(["rotate:",";transition:all 200ms ease;"],(e=>{let{rotate:t}=e;return t})),x=function(e){let{transform:t,decimalPoints:n=0,units:r,defaultValue:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const l=(0,d.py)();return(0,s.useMemo)((()=>{switch(t){case"number":return(0,d.iX)(e,{decimalPoints:n,units:r,defaultValue:a});case"duration":return(0,d.Sh)(e,{defaultValue:a});case"datetime":return l(e,{defaultValue:a});case"datetime_usec":return l(e,{defaultValue:a,usec:!0});case"xml":return i()(e||a||"");default:return null===e||"undefined"===typeof e?a:e}}),[e,r,l])},h=e=>{let{description:t="",value:n,units:s=""}=e;return t?(0,c.jsxs)(l.Flex,{column:!0,gap:1,justifyContent:"center",children:[(0,c.jsx)(l.TextSmall,{children:t}),(0,c.jsxs)(l.TextSmall,{strong:!0,textAlign:"center",children:[n," ",s]})]}):`${n} ${s}`},m=(0,r.default)(l.Flex).withConfig({displayName:"value__ValueContainer",componentId:"sc-1apuy8c-1"})(["",""],(e=>{let{overflowWrap:t}=e;return t&&"* {\n overflow-wrap: anywhere;\n white-space: pre-wrap;\n word-break: break-word;\n }\n "})),j={debug:{strong:!0,color:"textLite"},normal:{},notice:{strong:!0},warning:{strong:!0,color:"warningText"},critical:{strong:!0,color:"errorText"}},g=(0,r.default)(l.Text).attrs((e=>({...e,...j[e.severity]||j.normal}))).withConfig({displayName:"value__ValueLabel",componentId:"sc-1apuy8c-2"})([""]),p=e=>{let{icon:t,iconRotate:n,children:s,onClick:r,strong:a,testId:i="cell",textAlign:l,wrap:o,truncate:d=!0,rowOptions:x,ref:h,labelProps:j,...p}=e;return(0,c.jsxs)(m,{cursor:r?"pointer":"inherit",gap:.5,onClick:r,overflow:"hidden",ref:h,width:{max:"100%",base:"100%"},flexWrap:!0,overflowWrap:o,...p,children:[t&&(0,c.jsx)(u,{name:t,rotate:n}),(0,c.jsx)(g,{"data-testid":`${i}-value`,strong:a,textAlign:l,truncate:!o&&d,whiteSpace:o?"wrap":"nowrap",...j,...x,children:s})]})},f=e=>{let{description:t="",tooltipValue:n,value:s,valueOptions:r={},wrap:a,rowOptions:i,showRaw:d,...u}=e;const m=x(s,r);return d&&"xml"!==r?.transform?(0,c.jsxs)(l.Flex,{gap:3,justifyContent:"between",flex:!0,children:[(0,c.jsx)(p,{wrap:a,rowOptions:i,justifyContent:"start",labelProps:{strong:!0},children:m}),m!==s&&(0,c.jsx)(p,{wrap:a,rowOptions:i,justifyContent:"end",labelProps:{color:"textDescription"},title:"Raw value",children:s})]}):(0,c.jsx)(o.A,{content:!a&&(0,c.jsx)(h,{description:t,value:n||s,units:r.units}),"data-testid":"valueComponent",isBasic:!0,...u,children:(0,c.jsx)(p,{wrap:a,rowOptions:i,justifyContent:"number"===r.transform?"end":"start",children:m})})}}}]);