summaryrefslogtreecommitdiffstats
path: root/src/web/gui/v2/5598.99e492f7ae4d391df96f.chunk.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/gui/v2/5598.99e492f7ae4d391df96f.chunk.js')
-rw-r--r--src/web/gui/v2/5598.99e492f7ae4d391df96f.chunk.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/web/gui/v2/5598.99e492f7ae4d391df96f.chunk.js b/src/web/gui/v2/5598.99e492f7ae4d391df96f.chunk.js
new file mode 100644
index 0000000000..d1e94c3000
--- /dev/null
+++ b/src/web/gui/v2/5598.99e492f7ae4d391df96f.chunk.js
@@ -0,0 +1 @@
+!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ade1e9cc-7584-4619-bb83-539607fe6743",e._sentryDebugIdIdentifier="sentry-dbid-ade1e9cc-7584-4619-bb83-539607fe6743")}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([[5598],{99851:(e,n,t)=>{t.d(n,{A:()=>_e});var o=t(58168),i=(t(62953),t(96540)),a=t(45467),s=t(71600),r=t(51730),l=t(37519),c=t(10058),d=t(71847),m=t(87659),u=t(86723),h=(t(41393),t(81454),t(8711));const p=(0,h.default)(c.Flex).attrs((e=>({position:"relative",width:{min:200},height:{min:45},column:!0,background:"dropdown",color:"text",zIndex:60,round:!0,alignItems:"end",...e}))).withConfig({displayName:"styled__PickerBox",componentId:"sc-gwjt9o-0"})([""]),g=h.default.span.withConfig({displayName:"styled__StyledTimePeriod",componentId:"sc-gwjt9o-1"})(["margin-bottom:",";cursor:pointer;width:187px;height:",";&:last-of-type{margin-bottom:0;}& > span:hover{color:",";}"],(0,c.getSizeBy)(1.5),(0,c.getSizeBy)(2),(0,c.getColor)("textLite")),f=(0,h.default)(c.Flex).attrs((e=>{let{isSelected:n}=e;return{color:n?"primary":"text",margin:[2,6,0]}})).withConfig({displayName:"styled__StyledCustomTimePeriod",componentId:"sc-gwjt9o-2"})(["cursor:pointer;&:first-of-type{margin-top:0;}&:hover{color:",";}"],(0,c.getColor)("textLite")),y=(0,h.default)(c.Flex).attrs({alignItems:"center",border:{side:"all",color:"border"},color:"text",flexWrap:!1,height:8,justifyContent:"center",padding:[2,0],round:1,width:22}).withConfig({displayName:"styled__TimePeriodDropdownButton",componentId:"sc-gwjt9o-3"})([""]),b=(0,h.default)(c.Drop).attrs({background:"mainBackground",column:!0,overflow:{vertical:"auto"},margin:[.5,0,0],padding:[2,0],round:1}).withConfig({displayName:"styled__TimePeriodDrop",componentId:"sc-gwjt9o-4"})([""]),_=(0,h.default)(c.Icon).withConfig({displayName:"styled__DropdownIcon",componentId:"sc-gwjt9o-5"})(["fill:",";width:12px;height:12px;"],(0,c.getColor)("text")),w=h.default.input.withConfig({displayName:"styled__CustomInput",componentId:"sc-gwjt9o-6"})(["border:1px solid ",";background:",";box-sizing:border-box;border-radius:4px;color:",";height:32px;margin-left:10px;margin-right:10px;outline:none;padding:4px;width:32px;&:focus{border:1px solid ",";}"],(0,c.getColor)("border"),(0,c.getColor)("mainBackground"),(0,c.getColor)("text"),(0,c.getColor)("primary")),v=(0,h.default)(c.Drop).attrs({background:"dropdown",round:2,margin:[.5,0,0],border:{side:"all",color:"borderSecondary"},animation:!0}).withConfig({displayName:"styled__StyledDrop",componentId:"sc-gwjt9o-7"})([""]),T=(0,h.default)(c.TextInput).withConfig({displayName:"styled__StyledDateInput",componentId:"sc-gwjt9o-8"})(["width:100%;"]),k=h.default.div.withConfig({displayName:"styled__StyledCalendar",componentId:"sc-gwjt9o-9"})(["background:",";border:0;&.react-datepicker{background:",";border:0;}.react-datepicker{&__navigation{top:8px;&-icon::before{border-color:",";}}&__month-container{height:260px;}&__header{background:",";border:0;.react-datepicker__current-month{color:",";font-weight:normal;}.react-datepicker__day-name{color:",";}}&__day{color:",";&:hover{background:",";}&--disabled{color:",";&:hover{background:inherit;}}&--keyboard-selected,&--keyboard-selected:hover{color:",";background:inherit;border-radius:inherit;}&--selected,&--selected:hover{color:",";background:",";border-radius:8px;}&--in-selecting-range,&--in-range{color:",";background:",";border-radius:0;}&--selecting-range-start,&--range-start{color:",";background:",";border-top-left-radius:8px;border-bottom-left-radius:8px;&:hover{color:",";background:",";border-radius:0;border-top-left-radius:8px;border-bottom-left-radius:8px;}}&--selecting-range-end,&--range-end{color:",";background:",";border-top-right-radius:8px;border-bottom-right-radius:8px;&:hover{color:",";background:",";border-top-right-radius:8px;border-bottom-right-radius:8px;}}}}"],(0,c.getColor)("dropdown"),(0,c.getColor)("dropdown"),(0,c.getColor)("text"),(0,c.getColor)("dropdown"),(0,c.getColor)("main"),(0,c.getColor)("textLite"),(0,c.getColor)("main"),(0,c.getColor)("elementBackground"),(0,c.getColor)("textLite"),(0,c.getColor)("main"),(0,c.getColor)("bright"),(0,c.getColor)("primary"),(0,c.getColor)("primary"),(0,c.getColor)("elementBackground"),(0,c.getColor)("bright"),(0,c.getColor)("primary"),(0,c.getColor)("bright"),(0,c.getRgbColor)(["green","netdata"],.8),(0,c.getColor)("bright"),(0,c.getColor)("primary"),(0,c.getColor)("bright"),(0,c.getRgbColor)(["green","netdata"],.8)),x=e=>{let{value:n,period:t,resolution:o,isSelected:a,setTimeRange:s,tagging:r}=e;const l=(0,i.useCallback)((()=>s(n,o)),[n,o]);return i.createElement(g,{key:n,onClick:l,"data-ga":"date-picker::click-quick-selector::".concat(r,"::").concat(-n),"data-testid":"timePeriod-value"},i.createElement(c.Text,{color:a?"primary":"text"},t))},P=(0,i.memo)(x);var C=t(79897);const q=e=>{let{handleTimePeriodChange:n,selectedDate:t,tagging:o}=e;return i.createElement(c.Flex,{column:!0,justifyContent:"start",alignItems:"start",height:{max:"260px"},overflow:{vertical:"auto"},"data-testid":"timePeriods"},C.AE.map((e=>{let{period:a,value:s,resolution:r}=e;return i.createElement(P,{key:s,value:s,period:a,resolution:r,setTimeRange:n,isSelected:t===s,tagging:o})})))};var S=t(82526),D=t(16074),A=t(26010);const M=e=>{let{customTimePeriodRef:n,handleTimePeriodChange:t,value:o,resolution:a,tagging:s}=e;const r=()=>o<=0?(0,C.Mb)(-o,a):0,[l,d]=(0,i.useState)(r),[u,h,,p]=(0,m.A)(),g=(0,i.useRef)();(0,i.useEffect)((()=>d(r())),[o]);const v=(0,i.useCallback)((e=>d(e.target.value)),[]),T=(0,i.useCallback)((e=>{const n=Number(e.currentTarget.value),i=!Number.isNaN(n)&&Number.isInteger(n)&&n>0,s=(0,S.W)(new Date(0),{[a]:n});return i&&(0,D.f)(s)&&(0,A._)(s)<=C.So?t((0,C.zp)(n,a),a):d(o<=0?(0,C.Mb)(-o,a):0)}),[a,l]),k=(0,i.useCallback)((e=>()=>{t((0,C.zp)(l,e),e),p()}),[l]);return i.createElement(c.Flex,{justifyContent:"start",alignItems:"center",height:8,"data-ga":"date-picker::click-last-integer::".concat(s),"data-testid":"customTimePeriod"},i.createElement(c.Text,{"data-testid":"customTimePeriod-label"},"Last"),i.createElement(w,{value:l,onChange:v,onBlur:T,"data-ga":"date-picker::click-last-integer::".concat(s,"::").concat(l),"data-testid":"timePeriod-timeInput"}),i.createElement(y,{"data-testid":"timePeriodDropdown-button",onClick:h,ref:g},i.createElement(c.Text,{"data-testid":"timePeriodDropdown-buttonLabel",padding:[0,4,0,0]},a),i.createElement(_,{"data-testid":"timePeriodDropdown-buttonIcon",name:"triangle_down"})),g.current&&u&&i.createElement(b,{align:{top:"bottom",left:"left"},animation:!0,close:p,"data-testid":"timePeriodDropdown",onClickOutside:p,onEsc:p,ref:n,target:g.current},C.gt.map((e=>i.createElement(f,{key:e,onClick:k(e),"data-ga":"date-picker::click-last-time-".concat(e,"::").concat(s),"data-testid":"timePeriod-option"},e)))))};var E=t(72880),N=t(87991),H=t(21290),R=t(59386),I=t.n(R);t(30857);const O=e=>{let{selected:n,selectsStart:t=!1,selectsEnd:o=!1,startDate:a,endDate:s,onChange:r,minDate:l,maxDate:c,dateFormat:d="MM/dd/yyyy",open:m=!1,startOpen:u=!1,inline:h=!1,selectsRange:p=!1,monthsShown:g=1,showPopperArrow:f=!0,calendarContainer:y=null}=e;return i.createElement(I(),{selected:n,onChange:r,selectsStart:t,selectsEnd:o,startDate:a,endDate:s,minDate:l,maxDate:c,dateFormat:d,open:m,startOpen:u,inline:h,selectsRange:p,monthsShown:g,showPopperArrow:f,calendarContainer:y})},L=e=>{let{name:n="",value:t="",onDatesChange:o,onFocus:a,placeholderText:r=""}=e;const{utcOffset:l}=(0,H.$j)(),[c,d]=(0,i.useState)(""),m=(0,i.useCallback)((e=>{const n=e.target.value;d(n)}),[]),u=(0,i.useCallback)((e=>{if((0,D.f)(e)){const n=(0,N.GP)(e,"MMMM d yyyy, H:mm");d(n)}}),[]),h=(0,i.useCallback)((e=>{const n=(0,C.ii)(e.target.value,l);if((0,D.f)(n)&&(0,s.W)(n)>0){const e=(0,s.W)(n);o(e,(()=>u(t)))}else u(t)}),[t,l]);return(0,i.useEffect)((()=>u(t)),[t]),i.createElement(T,{type:"text",name:n,value:t?c:r,onChange:m,onBlur:h,onFocus:a,placeholder:r,"data-testid":"datePicker-input"})};var B=t(2642);const U=()=>{const{localeTimeString:e,localeDateString:n}=(0,H.$j)();return(0,i.useCallback)((t=>"".concat(n(t,{locale:"en-us",long:!1})," ").concat(e(t,{locale:"en-us",secs:!1}))),[e,n])},j=(e,n)=>e>0?(0,B.a)(new Date(n(e))):e||0===e?(0,B.a)(new Date(n((new Date).valueOf()+1e3*e))):null,G=e=>{const n=U();return(0,i.useMemo)((()=>j(e,n)),[e])},F=(e,n)=>[G(e),G(n)],z=e=>{let{startDate:n,setStartDate:t,endDate:a,setEndDate:r,singleDate:l,onDatesChange:d,onInputFocus:m,onlyDates:u,maxDate:h=new Date,minDate:p=new Date("1/1/2018"),isSinglePicker:g}=e;const[f,y]=F(n,a),b=G(l),{utcOffset:_}=(0,H.$j)(),w=U(),v=(0,i.useCallback)(((e,n)=>(0,E.Y)(j(e,w),y)?t(e):n()),[a,w]),T=(0,i.useCallback)(((e,n)=>(0,E.Y)(f,j(e,w))?r(e):n()),[n,w]),x=(0,i.useCallback)((e=>{const n=Array.isArray(e)?e[0]:e,t=Array.isArray(e)?e[1]:null,o=n?(0,C.ii)((0,N.GP)(n,"MMMM d yyyy, H:mm"),_):n,i=t?(0,C.ii)((0,N.GP)(t,"MMMM d yyyy, H:mm"),_):t,a=(0,s.W)(o)||null,r=(0,s.W)(i)||null;d({...g?{singleDate:a}:{startDate:a,endDate:r}})}),[_]);return i.createElement(c.Flex,{column:!0,justifyContent:"center",alignItems:"center",flex:!0,gap:3,"data-testid":"datePicker-wrapper"},i.createElement(O,(0,o.A)({selected:g?b:f,onChange:x},g?{}:{startDate:f,endDate:y},{maxDate:h,minDate:p,inline:!0,selectsRange:!0,monthsShown:g?1:2,dateFormat:"MMMM d yyyy, H:mm",showPopperArrow:!1,calendarContainer:k})),!u&&(g?i.createElement(L,{name:"date",value:b,onDatesChange:x,placeholderText:"Select a date"}):i.createElement(c.Flex,{justifyContent:"around",alignItems:"center",width:"100%",gap:2,padding:[0,10]},i.createElement(L,{name:"startDate",value:f,onDatesChange:v,onFocus:m,placeholderText:"Select a start date"}),i.createElement(L,{name:"endDate",value:y,onDatesChange:T,onFocus:m,placeholderText:"Select an end date"}))))},Y=e=>{let{startDate:n,endDate:t,onlyDates:o}=e;const[a,s]=F(n,t),{formattedStartDate:r,formattedEndDate:l}=(0,i.useMemo)((()=>(0,C.HA)(a,s,{onlyDates:o})),[a,s]),d=(0,i.useMemo)((()=>(0,C.jo)(a,s)),[a,s]);return i.createElement(c.Flex,{alignItems:"center",gap:2},i.createElement(c.Flex,{alignItems:"center",justifyContent:"center",gap:1.5},i.createElement(c.TextSmall,{strong:!0,whiteSpace:"nowrap"},"From"),i.createElement(c.TextSmall,{whiteSpace:"nowrap","data-testid":"periodIndication-from"},r)),i.createElement(c.Icon,{name:"arrow_left",size:"small",color:"textLite",rotate:2}),i.createElement(c.Flex,{alignItems:"center",justifyContent:"center",gap:1.5},i.createElement(c.TextSmall,{strong:!0,whiteSpace:"nowrap"},"To"),i.createElement(c.TextSmall,{whiteSpace:"nowrap","data-testid":"periodIndication-to"},l)),i.createElement(c.Flex,{alignItems:"center",justifyContent:"center",gap:2},i.createElement(c.TextSmall,{whiteSpace:"nowrap"},"/"),i.createElement(c.TextSmall,{color:"textLite",whiteSpace:"nowrap","data-testid":"periodIndication-period"},d)))};var X=t(51112),W=t(85551),K=t(6593);const $=36e5,V=24*$,Z=30*V,J=[{key:"years",value:31104e6,unit:"y"},{key:"months",value:Z,unit:"m"},{key:"days",value:V,unit:"d"},{key:"hours",value:$,unit:"h"},{key:"minutes",value:6e4,unit:"min"},{key:"seconds",value:1e3,unit:"s"}],Q=["hours","minutes","seconds"],ee=e=>{let{placeholder:n="No date"}=e;return i.createElement(c.TextSmall,null,n)},ne=e=>{let{isPlaying:n,startDate:t,endDate:o,isSameDate:a,color:s,onlyDates:r,isSinglePicker:l}=e;const{localeTimeString:d,localeDateString:m}=(0,H.$j)(),u=s||(n?"accent":"textFocus");return i.createElement(c.Flex,{gap:1},i.createElement(c.TextSmall,{color:s,whiteSpace:"nowrap"},m(t,{long:!1}),!r&&i.createElement(i.Fragment,null," ","\u2022"," ",i.createElement(c.TextSmall,{color:u,whiteSpace:"nowrap"},d(t,{secs:!1})))),!l&&i.createElement(i.Fragment,null,(!r||!a)&&i.createElement(c.Icon,{name:"arrow_left",color:u,size:"small",rotate:2}),i.createElement(c.TextSmall,{color:s,whiteSpace:"nowrap"},!a&&i.createElement(i.Fragment,null,m(o,{long:!1})," \u2022 "),!r&&i.createElement(c.TextSmall,{color:u,whiteSpace:"nowrap"},d(o,{secs:!1})))))},te=e=>{let{isPlaying:n,duration:t,color:o,fluid:a=!1,isSmall:s=!1}=e;return i.createElement(c.Flex,{gap:s?.2:1,align:"center"},!s&&i.createElement(c.TextSmall,{color:o},"\u2022"),i.createElement(c.Flex,{width:a?"auto":5},n&&i.createElement(c.TextSmall,{color:o},"last")),i.createElement(c.TextSmall,{color:o},t))};var oe=t(29217);const ie=(0,h.default)(c.Flex).withConfig({displayName:"styled__Container",componentId:"sc-1s7311w-0"})(["cursor:pointer;&:hover *{color:",";fill:",";}"],(0,c.getColor)("textLite"),(0,c.getColor)("textLite")),ae=(0,h.default)(oe.A).withConfig({displayName:"styled__StyledTooltip",componentId:"sc-1s7311w-1"})(["pointer-events:",";"],(e=>{let{isDisabled:n}=e;return n?"none":"auto"})),se=(0,i.forwardRef)(((e,n)=>{let{onClick:t,start:a,end:s,isPlaying:r,isPickerOpen:l,tagging:c,color:d,fluid:m,onlyDates:u,tooltipContent:h,isSinglePicker:p,noDateSelected:g,isSmall:f,...y}=e;const b=(0,X.yD)(),[_,w,v]=(0,i.useMemo)((()=>{if(g)return[];const e=(e=>e<0?(0,S.W)(new Date,{seconds:e}):new Date(e))(a),n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e?new Date(e):new Date}(s),t=((e,n)=>(0,W.r)(e,n))(e,n);return[e,n,t]}),[a,s,g]),T=(0,i.useMemo)((()=>g?0:function(e){let{withSeconds:n=!1,withTime:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=n||!!e.seconds;return J.reduce(((n,i)=>{let{key:a,unit:s}=i;return"seconds"!==a||o?!t&&Q.includes(a)?n:e[a]?n?"".concat(n," ").concat(e[a]).concat(s):"".concat(e[a]).concat(s):n:n}),"")}(((e,n)=>(0,K.F)({start:e,end:n}))(_,w),{withTime:!u})),[r,_,w,g]);return i.createElement(ae,{content:l?()=>{}:h||"Select a predefined or a custom timeframe",align:"bottom",isDisabled:!t||b,plain:!0},i.createElement(ie,(0,o.A)({alignItems:"center",justifyContent:"center",gap:1,height:"100%",onClick:t,padding:[0,1],ref:n,"data-ga":"date-picker::click-time::".concat(c),"data-testid":"datePicker-accessorElement"},y),f?null:p&&g?i.createElement(ee,null):i.createElement(ne,{isPlaying:r,endDate:w,startDate:_,isSameDate:v,color:d,onlyDates:u,isSinglePicker:p}),!u&&!p&&!g&&i.createElement(te,{isPlaying:r,duration:T,color:d,fluid:f||m,isSmall:f})))}));var re=t(27467),le=(t(17333),t(98992),t(54520),t(45123)),ce=t(80940);const de=(0,h.default)(c.Drop).attrs({align:{top:"bottom",left:"left"},animation:!0,background:"dropdown",column:!0,margin:[.5,0,0],overflow:{vertical:"auto"},padding:[2,0],round:1,width:80}).withConfig({displayName:"dropdown__Dropdown",componentId:"sc-pg99kg-0"})([""]),me=(0,h.default)(c.Flex).attrs({column:!0,padding:[2,0,0],overflow:{vertical:"auto"},height:{max:"320px"}}).withConfig({displayName:"container__Container",componentId:"sc-1gtygg6-0"})([""]),ue=(0,h.default)(c.Flex).attrs({justifyContent:"between",alignItems:"center",width:"100%",gap:2}).withConfig({displayName:"wrapper__Wrapper",componentId:"sc-1ehauu1-0"})([""]),he=e=>{let{name:n,offset:t,utc:o,onSelect:a}=e;const s=(0,i.useCallback)((()=>a(o,t,n)),[o,n]);return i.createElement(le.A,{round:1,onClick:s,Wrapper:ue,"data-ga":"timezone-picker::click-timezone::global-view::".concat(n)},i.createElement(c.Text,{color:"text"},n),i.createElement(c.Text,{color:"textLite",whiteSpace:"nowrap"},"UTC ",t))};var pe=t(82838);const ge=e=>{let{value:n,onChange:t,timezoneRef:o,timezoneName:a}=e;const[s,r]=(0,i.useState)(""),[l,d]=(0,m.A)(),u=(0,i.useRef)(),h=(0,i.useRef)();(0,i.useEffect)((()=>{h.current&&l&&h.current.focus()}),[l]);const p=(0,i.useMemo)((()=>s?pe.O.filter((e=>{let{text:n,offset:t}=e;return n.toUpperCase().includes(s.toUpperCase())||t.includes(s)})):pe.O),[s]),g=()=>{d(!1),r("")},f=(0,i.useCallback)(((e,n,o)=>{t(e,n,o),g()}),[]);return i.createElement(ce.A,{hasBorder:!1,testId:"timezone-picker"},i.createElement(le.A,{round:1,onClick:d,ref:u,Wrapper:ue,padding:[2],"data-ga":"timezone-picker::click-picker::global-view",selected:!0},i.createElement(c.Flex,{gap:1},i.createElement(c.Text,{color:"text",whiteSpace:"nowrap"},a," UTC ",n)),i.createElement(c.Icon,{name:"chevron_down",color:"text",width:"12px",height:"12px"})),u.current&&l&&i.createElement(de,{onClickOutside:g,onEsc:g,ref:o,target:u.current},i.createElement(c.Box,{padding:[0,2]},i.createElement(c.SearchInput,{value:s,onChange:r,ref:h,"data-ga":"timezone-picker::click-search::global-view"})),i.createElement(me,null,p.map((e=>{let{text:n,offset:t,utc:o}=e;return i.createElement(he,{key:n,name:n,offset:t,utc:o[0],onSelect:f})})))))},fe=e=>{let{timezoneRef:n}=e;const[{offset:t,timezoneName:o},a]=(0,re.N9)(),s=(0,i.useCallback)(((e,n,t)=>a({utc:e,offset:n,timezoneName:t})),[]);return i.createElement(ge,{timezoneRef:n,timezoneName:o,value:t,onChange:s})};t(74648),t(9920),t(23215),t(3949);const ye=["mousedown","touchstart"];var be=t(57605);const _e=e=>{let{onChange:n,isSinglePicker:t,values:{start:h,end:g,singleDate:f}={},defaultValue:y=-900,tagging:b="",isPlaying:_,onlyDates:w,accessorProps:T={},maxDate:k,minDate:x,accessorTooltipContent:P,isSmall:S,...D}=e;const[A,E]=(0,i.useState)(f),[N,H]=(0,i.useState)(h),[R,I]=(0,i.useState)(h),[O,L]=(0,u.A)("resolution","minutes"),[B,U]=(0,i.useState)("startDate"),[j,G,,F]=(0,m.A)(),X=(0,i.useRef)(),[W,K]=(0,i.useState)(null),[$,V]=(0,i.useState)(null),[Z,J]=(0,i.useState)(null),Q=(0,be.A)();!function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ye,t=arguments.length>2?arguments[2]:void 0;const o=(0,i.useRef)();(0,i.useEffect)((()=>{const i=n=>{Array.isArray(t)?t.every((e=>!e||!e.contains(n.target)))&&e():o.current&&!o.current.contains(n.target)&&e()};return n.forEach((e=>document.addEventListener(e,i))),()=>{n.forEach((e=>document.removeEventListener(e,i)))}}),[o,e,t])}(F,["mouseup","touchend"],[W,$,Z,X.current]),(0,a.A)((()=>{Q(!!j)}),[j]);const ee=(0,i.useCallback)((e=>{let{startDate:n,endDate:t}=e;H(n),I(t)}),[]);(0,i.useEffect)((()=>{ee({startDate:h,endDate:g})}),[h,g]);const ne=(0,i.useCallback)((()=>{t?(E(f),F()):ee({startDate:y,endDate:0})}),[t]),te=(0,i.useCallback)((e=>{e.target.name&&U(e.target.name)}),[]),oe=(0,i.useCallback)((e=>{e.stopPropagation(),G()}),[G]),ie=()=>{t?n(A):(n({start:N,end:R}),Q(!1)),F()},ae=(0,i.useMemo)((()=>(0,C.g$)(B)),[B]),re=!!t||null!==N&&null!==R&&N!==R,le=!t&&(N===h&&R===g),ce=(0,i.useMemo)((()=>y),[]),de=N===ce,me=(0,i.useCallback)(((e,n)=>{L(n),ee({startDate:e,endDate:0})}),[]),ue=e=>{let{startDate:o,endDate:i,singleDate:a}=e;if(t)E(a),n(a),(0,d.H)("date-picker","click-date-picker",b,String(a));else{ee(w?{startDate:o?(0,s.W)((0,r.o)(new Date(o))):o,endDate:i?(0,s.W)((0,l.D)(new Date(i))):i}:{startDate:o,endDate:i});const e="finish"===ae?i||o:o||i;(0,d.H)("date-picker","click-date-picker",b,String(e))}},he=(0,i.useMemo)((()=>X.current&&j?i.createElement(v,{backdrop:!0,target:X.current,canHideTarget:!1,align:{top:"bottom",left:"left"},onEsc:F},i.createElement(p,(0,o.A)({ref:V,"data-testid":"datePicker"},D),i.createElement(c.Flex,{alignItems:"center",width:"100%",padding:w?[4]:[0,6]},!w&&!t&&i.createElement(c.Flex,{column:!0,gap:3,margin:[0,4,0,0],padding:[6,0],border:{side:"right",color:"borderSecondary"}},i.createElement(q,{handleTimePeriodChange:me,selectedDate:N,tagging:b}),i.createElement(M,{handleTimePeriodChange:me,customTimePeriodRef:K,resolution:O,tagging:b,value:N})),i.createElement(z,{startDate:N,endDate:R,singleDate:A,setStartDate:H,setEndDate:I,onDatesChange:ue,onInputFocus:te,onlyDates:w,maxDate:k,minDate:x,isSinglePicker:t})),i.createElement(c.Flex,{column:!0,padding:[4,6,2],width:"100%",border:{side:"top",color:"borderSecondary"}},!w&&!t&&i.createElement(fe,{timezoneRef:J}),i.createElement(c.Flex,{gap:1,justifyContent:t?"end":w?"center":re?"between":"end",width:"100%"},!w&&!t&&re&&i.createElement(Y,{startDate:N,endDate:R,onlyDates:w}),i.createElement(c.Flex,{alignItems:"center",justifyContent:"center",gap:1},i.createElement(c.Button,{label:"Clear",flavour:"hollow",onClick:ne,disabled:de,"data-ga":"date-picker::click-clear::".concat(b,"-").concat(ae),"data-testid":"datePicker-clear",small:!0}),i.createElement(c.Button,{label:"Apply",onClick:ie,disabled:!re||le,"data-ga":"date-picker::click-apply::".concat(b,"-").concat(ae),"data-testid":"datePicker-apply",small:!0})))))):null),[N,b,O,R,re,de,ae,le,A,j]);return i.createElement(i.Fragment,null,i.createElement(se,(0,o.A)({onClick:oe,tagging:b,isPickerOpen:j,isPlaying:_,setRangeValues:n,start:t?A:h,end:t?A:g,ref:X,onlyDates:w,tooltipContent:P,isSinglePicker:t,noDateSelected:t&&!A,isSmall:S},T)),he)}},51112:(e,n,t)=>{t.d(n,{A_:()=>l,gC:()=>d,mQ:()=>c,yD:()=>r});var o=t(47767),i=t(50466),a=t(22332);const s={},r=()=>{const e=(0,o.RQ)("/spaces/:spaceSlug/rooms/:roomSlug/alerts"),n=(0,o.RQ)("/spaces/:spaceSlug/rooms/:roomSlug/alerts/:alertId"),t=(0,o.RQ)("/spaces/:spaceSlug/rooms/:roomSlug/home");return e||n||t},l=()=>{const e=(0,o.RQ)("/spaces/:spaceSlug/rooms/:roomSlug/top"),{hasHistory:n}=(0,i.Ol)({extraKey:"fn"})||s;return e&&!n},c=()=>(0,o.RQ)("/spaces/:spaceSlug/rooms/:roomSlug/events"),d=()=>{const e=c(),n=(0,a.useAttributeValue)("autofetch");return!(0,a.useAttributeValue)("paused")&&n&&!e}},79897:(e,n,t)=>{t.d(n,{AE:()=>w,HA:()=>v,Mb:()=>f,So:()=>h,d_:()=>u,g$:()=>_,gt:()=>p,ii:()=>T,jo:()=>k,zp:()=>y});var o=t(82526),i=t(26010),a=t(87991),s=t(84128),r=t(58380),l=t(31826),c=t(71600);const d=60,m=3600,u=86400,h=94694400,p=["minutes","hours","days","months"],g={minutes:d,hours:m,days:u,months:30*u},f=(e,n)=>Math.round(e/g[n]),y=(e,n)=>{const t=(0,o.W)(new Date(0),{[n]:e});return-(0,i._)(t)},b={startDate:"start",endDate:"finish"},_=e=>b[e],w=[{period:"Last 5 minutes",value:-300,resolution:"minutes"},{period:"Last 10 minutes",value:-600,resolution:"minutes"},{period:"Last 15 minutes",value:-900,resolution:"minutes"},{period:"Last 30 minutes",value:-1800,resolution:"minutes"},{period:"Last hour",value:-3600,resolution:"hours"},{period:"Last 2 hours",value:-7200,resolution:"hours"},{period:"Last 6 hours",value:-21600,resolution:"hours"},{period:"Last 12 hours",value:-43200,resolution:"hours"},{period:"Last day",value:-u,resolution:"days"},{period:"Last 2 days",value:-2*u,resolution:"days"},{period:"Last 7 days",value:-7*u,resolution:"days"}],v=function(e,n){let{onlyDates:t}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=t?"MMMM d yyyy":"MMMM d yyyy, H:mm:ss";return{formattedStartDate:(0,a.GP)(e,o),formattedEndDate:(0,a.GP)(n,o)}},T=(e,n)=>{const t=(0,s.u)(e,"MMMM d yyyy, H:mm")?e:(0,r.qg)(e,"MMMM d yyyy, H:mm",Date.now());return(0,r.qg)("".concat(t," ").concat((e=>{if(!e)return"+00:00";const n=e.toString().split("."),t=n[0]>0?"+":"-",o=Math.abs(n[0]).toString(),i="".concat(t).concat(o.padStart(2,0));return n.length>1?"".concat(i,":").concat(String(.6*n[1]).padEnd(2,0)):"".concat(i,":00")})(n)),"MMMM d yyyy, H:mm xxx",Date.now())},k=(e,n)=>(0,l.k)((0,c.W)(e),(0,c.W)(n))},71847:(e,n,t)=>{t.d(n,{H:()=>o});const o=function(e,n,t,o,i){var a;let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"gaCustomEvent";if(window.envSettings.tracking){if(window.dataLayer){const a={event:s,eventCategory:e,eventAction:n,eventLabel:t,eventValue:o,eventResults:i};window.dataLayer.push(a)}window.gtag&&window.gtag("event","gaCustomEvent",{eventCategory:e,eventAction:n,eventLabel:t,eventValue:o,eventResults:i}),null!==(a=window.posthog)&&void 0!==a&&a.__loaded&&window.posthog.capture(s,{eventCategory:e,eventAction:n,eventLabel:t,eventValue:o})}}},92155:(e,n,t)=>{t.d(n,{A:()=>l});var o=t(58168),i=t(96540),a=t(50876);const s=e=>(0,i.forwardRef)(((n,t)=>{let{callback:s,feature:r,isStart:l,isSuccess:c,isFailure:d,eventReason:m,payload:u={},...h}=n;const{sendLog:p,isReady:g}=(0,a.A)(),f=(0,i.useCallback)((()=>{const e=h[s],n={feature:r,isStart:l,isSuccess:c,isFailure:d,eventReason:m,...u,...h["data-ga"]?{dataGa:h["data-ga"]}:{},...h.dataGa?{dataGa:h.dataGa}:{},...h["data-track"]?{dataTrack:h["data-track"]}:{},...h.label?{label:h.label}:{}};"function"==typeof e&&e(),p(n,!0)}),[s,p,g,u,h]),y=(0,i.useMemo)((()=>({...h,[s]:f})),[h,s,f]);return i.createElement(e,(0,o.A)({ref:t},y))}));var r=t(67276);const l=e=>(0,i.forwardRef)(((n,t)=>{let{payload:a={},...l}=n;const c=s(e);return i.createElement(c,(0,o.A)({},l,{ref:t,callback:"onClick",payload:{...a,action:r.o1.buttonClicked}}))}))},93155:(e,n,t)=>{t.d(n,{Dm:()=>u,EM:()=>p,Mh:()=>d,bO:()=>m,tv:()=>h});const o="mobileAppNotifications",i="trialWarning",a="alertConfiguration",s="editAlertConfiguration",r="userCustomSettings",l=[i,a,o];function c(e){if(l.includes(e))return()=>!0;const n="true"===localStorage.getItem(e);return e=>e||n}const d=c(o)(),m=c(i)(),u=c(a)(),h=c(s)(),p=c(r)()},96083:(e,n,t)=>{t.d(n,{A:()=>l});var o=t(58168),i=t(68415),a=t(96540),s=t(20982),r=t(10058);const l=(0,a.forwardRef)(((e,n)=>{let{onClick:t,src:l,title:c="User avatar",width:d=8,height:m=8,...u}=e;return a.createElement(r.Flex,(0,o.A)({cursor:"pointer",round:"50%","data-testid":"userAvatar",title:c,alt:c,onClick:e=>t&&t(e),width:d,height:m},u,{ref:n,alignItems:"center",justifyContent:"center",background:"spaceIdle",color:"textLite",overflow:"hidden"}),l?a.createElement(r.Flex,{as:"img",src:l,alt:c,width:d,height:m}):a.createElement(s.g,{icon:i.yV,size:"lg",alt:c}))}))},5396:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(58168),i=t(96540),a=t(10058),s=t(29217);const r=e=>{let{children:n,background:t,testId:r,onClose:l,tooltipProps:c,...d}=e;const m=r||"header-banner";return i.createElement(a.Flex,(0,o.A)({background:t,"data-testid":m,height:{min:10},padding:[2,10,2,2],position:"sticky",zIndex:5},d),n,i.createElement(s.A,(0,o.A)({align:"bottom",content:"Dismiss message",isBasic:!0,plain:!0,stretch:"align"},c),l&&i.createElement(a.Box,{"data-testid":"".concat(m,"-close-button"),as:a.Icon,color:"text",cursor:"pointer",name:"x",position:"absolute",right:"8px",onClick:e=>{l&&(e.stopPropagation(),l())}})))}},76051:(e,n,t)=>{t.d(n,{Ay:()=>r,I1:()=>s});var o=t(96540),i=t(8711),a=t(10058);const s=(0,i.default)(a.Box).withConfig({displayName:"blur__BlurredBox",componentId:"sc-12emg8l-0"})(["position:absolute;top:0;bottom:0;left:0;right:0;backdrop-filter:blur(",");z-index:80;"],(e=>{let{value:n}=e;return n||"7px"})),r=e=>{let{children:n,...t}=e;return o.createElement(a.Box,{position:"relative"},n,o.createElement(s,t))}},40982:(e,n,t)=>{t.d(n,{A:()=>z});var o=t(58168),i=(t(62953),t(96540)),a=t(10058),s=t(67602),r=t(29217),l=t(15255),c=t(8711),d=t(87292),m=t(28738),u=(t(17333),t(41393),t(98992),t(54520),t(81454),t(37618)),h=t(87659),p=t(50105),g=t(3914),f=t(78862),y=t(76634),b=t(64754);const _=c.default.div.withConfig({displayName:"spaces__Separator",componentId:"sc-19p9rsp-0"})(["height:1px;width:",";background:",";"],(0,a.getSizeBy)(3),(0,a.getColor)("border")),w=e=>{let{selectedSpace:n,setSelectedSpace:t,column:s,showFullname:l,...c}=e;const d=(0,g.Pk)(),m=(0,i.useMemo)((()=>d.filter((e=>!(0,u.ES)(e)))),[d]),[w,,v,T]=(0,h.A)();return i.createElement(a.Flex,(0,o.A)({"data-testid":"workspaceBar",padding:[3,2],column:s,alignItems:"center",justifyContent:"center"},c),i.createElement(a.Flex,{column:!0,"data-testid":"workspaceBar-spaces-list",gap:4,alignItems:"center",overflow:"hidden"},i.createElement(a.Flex,{column:s,"data-testid":"workspaceBar-spacesList",gap:s?4:2,overflow:{vertical:"auto"},flexWrap:!s},m.map((e=>i.createElement(f.A,{testIdPrefix:"workspaceBar-space",key:e,spaceId:e,onClick:t,active:e===(null===n||void 0===n?void 0:n.id),background:"selected",showFullname:l})))),i.createElement(y.A,{permission:"user:CreateSpace"},i.createElement(_,{"data-testid":"workspaceBar-separator"}),i.createElement(r.A,{content:"Create a new Space",align:"right"},i.createElement(b.A,{permission:"user:CreateSpace",ifForbidden:"hide",icon:"plus",onClick:v,"data-testid":"workspaceBar-addSpace-button"})))),w&&i.createElement(p.A,{onClose:T,onDone:t}))};var v=t(79412),T=t(56915),k=t(46741),x=t(87633),P=t(14994),C=t(76999);const q=e=>{let{selectedSpace:n,selectedRoom:t,setSelectedRoom:o}=e;const s=n.id;(0,x.A)(s);const l=(0,k.JT)("room:Create",s),c=(0,k.JT)("room:Read",s),[d,,m,u]=(0,h.A)(!1),p=(0,i.useCallback)((e=>{e.stopPropagation(),l&&m()}),[l]),g=(0,P.CB)(s),f=(0,i.useMemo)((()=>g.filter((e=>{let{isMember:n}=e;return n}))),[g]);return(0,i.useEffect)((()=>{null!==f&&void 0!==f&&f.length&&(t||o(f[0]))}),[f,t]),i.createElement(i.Fragment,null,i.createElement(T.A,{"data-testid":"workspaceRooms-menuList",disabled:!c,headerTestId:"workspaceRooms-warRooms",isOpen:!0,label:i.createElement(a.Flex,{padding:[1,0],margin:[0,0,1],flex:!0,justifyContent:"between",alignItems:"center",height:"24px"},i.createElement(a.Flex,{alignItems:"center",gap:2},i.createElement(a.Icon,{name:"space_new",color:"textNoFocus",width:"14px",height:"14px"}),i.createElement(a.TextSmall,{color:"textNoFocus"},"Select a room")),i.createElement(a.Flex,{alignItems:"center",gap:2},i.createElement(r.A,{content:"Create a new room",align:"right"},i.createElement(b.A,{permission:"room:Create",tiny:!0,icon:"plus",onClick:p,"data-testid":"workspaceRooms-addWarRoom-button",spaceId:s}))))},i.createElement(a.Flex,{column:!0,"data-testid":"workspaceRooms-warRoomsList",padding:[0,0,1]},f.map((e=>{const{id:n}=e;return i.createElement(C.A,{key:n,id:n,hideAlerts:!0,Wrapper:a.TextSmall,isSidebar:!0,selectedId:null===t||void 0===t?void 0:t.id,onClick:()=>o(e)})})))),d&&i.createElement(v.n,{onClose:u,isSubmodal:!1}))};var S=t(63502),D=t(22292),A=t(71835),M=t(79731),E=t(3714),N=t(20378),H=t(78459),R=t(50876);var I=t(92155),O=t(63314);const L=(0,c.default)(a.ModalContent).attrs({width:{base:"80vw"},height:{base:"80vh",min:"80vh"}}).withConfig({displayName:"modal__ModalContent",componentId:"sc-4dwymj-0"})(["box-shadow:0 18px 28px rgba(0,0,0,0.5);"]),B=(0,I.A)(a.Button),U=e=>{let{claim:n,loading:t,error:o,privateKey:s,setPrivateKey:r,selectedSpace:l,setSelectedSpace:c,selectedRoom:u,keyFilename:h}=e;return l?u?i.createElement(i.Fragment,null,i.createElement(m.m,null),i.createElement(a.H3,{textAlign:"center"},'You are ready to connect your agent in "',u.name,'" of "',l.name,'"'),i.createElement(a.Text,{textAlign:"center"},"Last step is to ensure you're the admin of this agent ;)"),i.createElement(a.TextSmall,{textAlign:"center"},"We've created a file with a random key. Can you read it?"),i.createElement(d.Ay,{"data-testid":"key-filename-command",commandText:"sudo cat ".concat(h),width:"60%"},"$ sudo cat ",h),i.createElement(a.Flex,{column:!0,round:!0,background:"successSemi",border:"primary",padding:[2],width:"60%"},i.createElement(a.TextSmall,null,i.createElement(a.TextSmall,{strong:!0},"Tip:")," Run the command and paste here the key it will give you. If the command doesn't work out of the box, locate the ",h," file, open it in your favorite text editor, and copy it to your clipboard.")),i.createElement(a.TextInput,{value:s,placeholder:"Paste private key here",onChange:e=>r(e.target.value),containerStyles:{width:"60%"}}),i.createElement(B,{label:"Claim your agent",onClick:n,disabled:!s||t,isLoading:t,"data-ga":"claiming::claim-agent::modal",payload:{space:null===l||void 0===l?void 0:l.id,room:null===u||void 0===u?void 0:u.id,privateKey:s}})):i.createElement(i.Fragment,null,i.createElement(m.m,null),i.createElement(a.H3,{textAlign:"center"},'Select a room in "',l.name,'" for this agent'),i.createElement(a.TextBig,{color:"textDescription",textAlign:"center"},"or create a new one by hitting the [+] button.")):i.createElement(i.Fragment,null,i.createElement(m.m,null),i.createElement(a.H3,{textAlign:"center"},"Let's connect your agent"),i.createElement(a.TextBig,{color:"textDescription",textAlign:"center"},"Select the space you want this agent to join"),i.createElement(a.TextBig,{color:"textDescription",textAlign:"center"},"or create a new one by hitting the [+] button."),i.createElement(w,{column:!!l,selectedSpace:l,setSelectedSpace:c,showFullname:!0,width:"80%"}))},j=e=>{let{onClose:n,keyFilename:t}=e;const{claim:o,selectedSpace:s,setSelectedSpace:r,selectedRoom:c,setSelectedRoom:d,loading:m,error:u,privateKey:h,setPrivateKey:p}=(e=>{var n;const[t,o]=(0,i.useState)(),[a,s]=(0,i.useState)(),[r,c]=(0,i.useState)(""),d=(0,S.A)(null===t||void 0===t?void 0:t.id),m=(0,g.dg)(),u=null===(n=window.localNetdataRegistry)||void 0===n?void 0:n.mg,[{claiming:h,claimingError:p},f]=(0,l.RJ)(u),y=(0,D.uW)("isAnonymous"),[b,_]=(0,A.A)(),w=(0,l.OS)(),v=(0,N.OS)(),T=(0,H.OS)(),{sendLog:k,isReady:x}=(0,R.A)();return{claim:(0,i.useCallback)((()=>{var n;r&&!h&&d&&u&&m&&!y&&a&&(f({claiming:!0}),(0,E.j)({key:r,token:null===d||void 0===d||null===(n=d[0])||void 0===n?void 0:n.token,rooms:[a.id],url:window.envSettings.apiUrl}).then((n=>{let{data:o}=n;if(!o.success)return f({claiming:!1,claimingError:o.message,claimId:null}),_({message:o.message}),void k({feature:"claim-node",isFailure:!0,message:o.message});w(),v(),T(),f({claiming:!1,...o,claimingError:""}),e(),b({header:"Your agent got connected to Netdata",text:"You can see your agent in the room ".concat(a.name," of ").concat(t.name," space.")}),k({feature:"claim-node",isSuccess:!0})})).catch((e=>{var n;const t=null===e||void 0===e||null===(n=e.response)||void 0===n?void 0:n.data,o=(0,M.o)(null===t||void 0===t?void 0:t.errorMsgKey)||(null===t||void 0===t?void 0:t.errorMessage)||"Something went wrong";f({claiming:!1,claimingError:o,claimId:null}),_({message:o}),k({feature:"claim-node",isFailure:!0,message:o})})))}),[d,r,u,m,y,h,k,x]),selectedSpace:t,setSelectedSpace:o,selectedRoom:a,setSelectedRoom:s,loading:h,error:p,privateKey:r,setPrivateKey:c}})(n);return i.createElement(a.Modal,{zIndex:80,backdropProps:{backdropBlur:!0}},i.createElement(O.Ay,{feature:"ClaimModal"},i.createElement(a.Flex,{column:!0,alignItems:"end",gap:3},i.createElement(L,{tabIndex:0},i.createElement(a.ModalHeader,{justifyContent:"between"},i.createElement(a.Flex,{gap:2,alignItems:"center"},"Connect your agent to Netdata"),i.createElement(a.ModalCloseButton,{onClose:n,testId:"claim-modal-close-button","data-ga":"claiming::close-claim-modal::local"})),i.createElement(a.ModalBody,{overflow:{vertical:"auto"},padding:[0],height:"100%",column:!1},i.createElement(a.Collapsible,{background:"sideBar",open:!!s,direction:"horizontal"},i.createElement(w,{column:!0,selectedSpace:s,setSelectedSpace:r,background:"sideBarMini",height:"100%"})),i.createElement(a.Collapsible,{background:"sideBar",open:!!s,direction:"horizontal"},i.createElement(a.Flex,{flex:!0,width:56,column:!0,overflow:{vertical:"auto"},padding:[2,0]},!!s&&i.createElement(q,{selectedSpace:s,selectedRoom:c,setSelectedRoom:d}))),i.createElement(a.Flex,{alignItems:"center",column:!0,"data-testid":"claim-modal-body",flex:!0,gap:3,justifyContent:"center",padding:[4]},i.createElement(U,{selectedSpace:s,selectedRoom:c,setSelectedSpace:r,keyFilename:t,claim:o,loading:m,error:u,privateKey:h,setPrivateKey:p})))))))},G={unavailable:"Netdata is not available for this agent.",available:"Netdata is available. Click to claim it and gain the full benefits of Netdata!",disabled:"Netdata is available, but it is disabled, you can change the agent configuration to enable it.",banned:"The agent has been banned from cloud.",offline:"The agent tries to connect to Netdata, but it fails to do so.",online:"The agent is already connected to Netdata :)"},F=(0,I.A)(a.Button),z=e=>{const[n,,t,a]=(0,s.A)("claimModal"),[{canBeClaimed:c,cloudStatus:d,keyFilename:m}]=(0,l.RJ)();return i.createElement(i.Fragment,null,i.createElement(r.A,{plain:!0,content:G[d],isBasic:!0},i.createElement("div",null,i.createElement(F,(0,o.A)({label:"Connect to Netdata",onClick:t},e,{disabled:!c,"data-ga":"claiming::open-claim-modal::local"})))),n&&i.createElement(j,{onClose:a,keyFilename:m}))}},59778:(e,n,t)=>{t.d(n,{D:()=>o,d:()=>i});const o={Community:"nightly",default:"stable",EarlyBird:"nightly"},i={nightly:{description:"Released at most once every 24 hours with fully-tested code that fixes bugs or security flaws, or introduces new features to Netdata. Every nightly release is a candidate for then becoming a stable release.",title:"Nightly"},stable:{description:"Released when a major milestone is reached. Stable releases might be a better choice for those who run Netdata in mission-critical production systems, as updates will come more infrequently.",title:"Stable"}}},12740:(e,n,t)=>{t.d(n,{O1:()=>s,OV:()=>l,Yg:()=>r});var o=t(96540),i=t(8711),a=t(10058);const s=(0,i.default)(a.Box).attrs({border:{side:"all",color:"border"},padding:[1.75,7,1.75,3],round:!0}).withConfig({displayName:"styled__InfoBlock",componentId:"sc-1lice8m-0"})(["color:",";font-family:Courier New,monospace;font-size:14px;letter-spacing:0.09px;line-height:18px;max-height:34px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;"],(0,a.getColor)("textLite")),r=e=>{let{children:n}=e;return o.createElement(a.Flex,{column:!0,gap:4},n)},l=(0,i.default)(a.Button).withConfig({displayName:"styled__StyledButton",componentId:"sc-1lice8m-1"})(["&&{width:auto;min-width:auto;height:22px;background:",";border:1px solid ",";border-radius:4px;padding:0;&:hover{background:",";& > span{span{color:",";}svg{fill:",";}}}& > span{display:flex;align-items:center;gap:6px;margin:2px 8px 2px 4px;span{color:",";}svg{fill:",";}}}"],(e=>{let{active:n,theme:t}=e;return(0,a.getColor)(n?"primary":"modalBackground")({theme:t})}),(0,a.getColor)("primary"),(0,a.getColor)("primary"),(0,a.getColor)("modalBackground"),(0,a.getColor)("modalBackground"),(e=>{let{active:n,theme:t}=e;return(0,a.getColor)(n?"modalBackground":"primary")({theme:t})}),(e=>{let{active:n,theme:t}=e;return(0,a.getColor)(n?"modalBackground":"primary")({theme:t})}))},18682:(e,n,t)=>{t.d(n,{C:()=>s});var o=t(33436),i=t(78217),a=t(13871);const s=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return()=>{(0,o.A)(e);const t=(0,a.UI)({header:"Copied",text:"Command copied to your clipboard! Please run it on your node's terminal.",icon:"gear",...n,success:!0});i.A.success(t,{context:"copy"})}}},87292:(e,n,t)=>{t.d(n,{Ay:()=>m,R0:()=>d});var o=t(96540),i=t(8711),a=t(10058),s=t(18682);const r=(0,i.default)(a.Box).attrs((e=>({color:"textDescription",background:"modalTabsBackground",border:{side:"all",color:"borderSecondary"},padding:[4,10,4,4],position:"relative",width:"100%",...e}))).withConfig({displayName:"command__StyledTerminalCommand",componentId:"sc-wnwmk3-0"})(["color:",";border-radius:2px;overflow-wrap:anywhere;white-space:pre-wrap;font-family:Courier New,monospace;letter-spacing:0.09px;line-height:18px;font-size:14px;word-break:break-word;"],(0,a.getColor)("textDescription")),l=(0,i.default)(a.Icon).withConfig({displayName:"command__StyledIcon",componentId:"sc-wnwmk3-1"})(["display:flex;align-self:flex-end;cursor:pointer;"]),c=(0,i.default)(a.Box).attrs({color:"textDescription",border:{side:"all",color:"borderSecondary"},background:"modalTabsBackground",padding:[0,1]}).withConfig({displayName:"command__CodeText",componentId:"sc-wnwmk3-2"})(["display:inline-block;color:",";border-radius:2px;font-family:Courier New,monospace;letter-spacing:0.09px;line-height:16px;font-size:12px;font-weight:bold;word-break:break-word;"],(0,a.getColor)("textDescription")),d=e=>{let{children:n,...t}=e;return o.createElement(c,t,n)},m=e=>{let{children:n,confirmationText:t="Command copied to your clipboard.",commandText:i=n,...c}=e;return o.createElement(r,c,n,o.createElement(a.Box,{position:"absolute",bottom:"8px",right:"8px"},o.createElement(l,{name:"copy",size:"small",color:"primary",onClick:(0,s.C)(i||n,{text:t})})))}},94944:(e,n,t)=>{t.d(n,{A:()=>s});t(9920),t(98992),t(3949),t(62953);var o=t(96540),i=t(22332),a=t(27467);const s=()=>{const e=(0,i.useChart)(),[{after:n,before:t,forcePlay:s},r]=(0,a.N9)(),l=function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{autofetchOnWindowBlur:!1};return()=>{e.getNodes().forEach((e=>e.updateAttributes(o)));const i=n<0?n:-Math.floor((t-n)/1e3);r({after:i,before:0,forcePlay:!!o.autofetchOnWindowBlur})}};return{play:(0,o.useCallback)(l(),[t,n,s]),forcePlay:(0,o.useCallback)(l({autofetchOnWindowBlur:!0}),[t,n,s]),pause:(0,o.useCallback)((()=>{if(n>0)return;const e=Date.now();r({after:1e3*Math.floor(e/1e3+n),before:1e3*Math.floor(e/1e3),forcePlay:!1})}),[n,t,s])}}},80940:(e,n,t)=>{t.d(n,{A:()=>l});var o=t(58168),i=t(8711),a=t(96540),s=t(10058);const r=(0,i.default)(s.Flex).withConfig({displayName:"item__StyledFlex",componentId:"sc-1gby0f1-0"})(["&:hover{background:",";}"],(e=>{let{hasHoverBackground:n,theme:t,hoverBackground:o="borderSecondary"}=e;return n?(0,s.getColor)(o)({theme:t}):null})),l=(0,a.forwardRef)(((e,n)=>{let{background:t,children:i,cursor:l,hasBorder:c,hasHoverBackground:d,onClick:m,padding:u,testId:h,borderColor:p="selected",round:g,hoverBackground:f,...y}=e;return a.createElement(s.Flex,(0,o.A)({alignItems:"center",border:c&&{side:"right",color:p},cursor:l,"data-testid":h,onClick:m,ref:n},y),a.createElement(r,{round:g,alignItems:"center",background:t,hasHoverBackground:d,margin:c?[0,3,0,0]:void 0,padding:u,hoverBackground:f},i))}))},82230:(e,n,t)=>{t.d(n,{A:()=>s});var o=t(10058),i=t(96540);const a="node-status-indicator",s=e=>{let{statusText:n,selected:t,total:s,statusColor:r,isScreenSmall:l}=e;const{statusTextColor:c,indicatorWrapperColor:d,counterColor:m}=r;return i.createElement(o.Flex,{alignItems:"center",gap:2},!l&&i.createElement(o.TextSmall,{"data-testid":"".concat(a,"-text-").concat(n),color:c},n),i.createElement(o.Flex,{justifyContent:"center",alignItems:"center",padding:[0,1],width:{min:7.5},height:5,background:d,round:!0,gap:l?.2:1},t===s?i.createElement(o.TextSmall,{"data-testid":"".concat(a,"-total-").concat(n),color:m},s):i.createElement(i.Fragment,null,i.createElement(o.TextSmall,{strong:!0,"data-testid":"".concat(a,"-selected-").concat(n),color:m},t),i.createElement(o.TextSmall,{color:m},l?"/":"of"),i.createElement(o.TextSmall,{"data-testid":"".concat(a,"-total-").concat(n),color:m},s))))}},24398:(e,n,t)=>{t.d(n,{P:()=>o});const o={live:{statusTextColor:"live",indicatorWrapperColor:"live",counterColor:"bright"},stale:{statusTextColor:"stale",indicatorWrapperColor:"stale",counterColor:"bright"},offline:{statusTextColor:"textLite",indicatorWrapperColor:"offline",counterColor:"bright"},unseen:{statusTextColor:"unseen",indicatorWrapperColor:"unseen",counterColor:"bright"}}},11261:(e,n,t)=>{t.d(n,{A:()=>m,q:()=>d});t(41393),t(81454);var o=t(96540),i=t(8711),a=t(10058),s=t(82230),r=t(24398);const l=(0,i.default)(a.Flex).withConfig({displayName:"wrapper__NodesIndicatorWrapper",componentId:"sc-gy5ftg-0"})(["pointer-events:",";cursor:",";opacity:",";"],(e=>{let{disabled:n}=e;return n?"none":"auto"}),(e=>{let{disabled:n}=e;return n?"default":"pointer"}),(e=>{let{disabled:n}=e;return n?"0.7":"1"})),c={live:{counter:0,statusText:"Live"},stale:{counter:0,statusText:"Stale"},offline:{counter:0,statusText:"Offline"},unseen:{counter:0,statusText:"Unseen"}},d=e=>o.createElement(l,e,Object.keys(c).map((e=>o.createElement(s.A,{key:e,statusText:c[e].statusText,counter:c[e].counter,statusColor:r.P[e]})))),m=l},68741:(e,n,t)=>{t.d(n,{A:()=>c});var o=t(58168),i=t(96540),a=t(10058),s=t(22292),r=t(14550);const l=(0,t(92155).A)(a.Button),c=e=>{const n=(0,s.uW)("isAnonymous"),t=(0,r.A)();return n?i.createElement(l,(0,o.A)({label:"Sign In",isStart:!0,onClick:t,"data-ga":"click-sign-in::header",feature:"SignIn"},e)):null}},47431:(e,n,t)=>{t.d(n,{A:()=>p});var o=t(58168),i=(t(62953),t(96540)),a=t(10058),s=t(22292),r=t(46741),l=t(29217),c=t(92155),d=t(19673),m=t(42728),u=t(28061);const h=(0,c.A)(a.Button),p=e=>{let{tooltipProps:n={},...t}=e;const a=(0,s.uW)("isAnonymous"),{value:c}=(0,d.JN)(),{slug:p}=c||{},g=(0,m.Kj)(p),f=(0,r.JT)("billing:Manage"),y=(0,u.A)(),[b,_]=(0,i.useState)();return(0,i.useEffect)((()=>{_(!a&&g&&f)}),[a,g,f]),b?i.createElement(l.A,(0,o.A)({plain:!0,content:"Upgrade to business plan and experience the full power of Netdata!",isBasic:!0},n),i.createElement("div",null,i.createElement(h,(0,o.A)({label:"Upgrade Now!",isStart:!0,onClick:y,feature:"UpgradeToBusiness","data-testid":"upgradeToBusiness-header"},t)))):null}},95598:(e,n,t)=>{t.r(n),t.d(n,{default:()=>an});t(62953);var o=t(96540),i=t(39225),a=t(10058),s=t(22292),r=(t(9920),t(98992),t(3949),t(83957)),l=t(47444),c=t(7484),d=t(3914),m=t(46741);var u=t(90709),h=t(28738),p=t(87659),g=t(12938),f=t(45123),y=t(56915),b=t(69765),_=t(8711);const w=(0,_.default)(a.Drop).attrs({align:{top:"bottom",left:"left"},animation:!0,background:"dropdown",column:!0,margin:[2,0,0],overflow:{vertical:"auto"},padding:[2,0],round:1,width:64}).withConfig({displayName:"styled__Dropdown",componentId:"sc-1vwntsm-0"})([""]),v=(0,_.default)(a.H6).attrs({color:"text",padding:[2,4]}).withConfig({displayName:"styled__OtherRoomsHeader",componentId:"sc-1vwntsm-1"})([""]);var T=t(29217),k=t(80940),x=t(37944),P=t(64754),C=t(47731);const q=()=>{const e=(0,C.J)(),[n,t,,i]=(0,p.A)(),s=(0,o.useRef)(),r=(0,b.XA)(),{slug:l}=r,c=(0,d.ap)("name"),u=(0,x.A)({roomSlug:l}),h=(0,m.JT)("room:Read"),_=(0,d.dg)();return o.createElement(o.Fragment,null,o.createElement(a.Flex,{alignItems:"center",gap:1,"data-testid":"header-roomOptions"},o.createElement(f.A,{ref:s,testid:"roomDropdownMenu-roomOptions",icon:"space_new",onClick:t,padding:[2],round:1,width:"auto",disabled:!h||_,selected:n},!e&&r.name&&o.createElement(a.Flex,{alignItems:"center",gap:4},o.createElement(a.Text,null,r.name),o.createElement(a.Icon,{name:"chevron_down",size:"small",color:"text"}))),o.createElement(k.A,{borderColor:"borderSecondary",hasHoverBackground:!0},o.createElement(T.A,{align:"bottom",content:"Room settings"},o.createElement(P.A,{Component:a.IconButton,permission:"room:Leave","data-ga":"header::click-war-room-settings::global-view","data-testid":"header-manageWarRoom",onClick:u,icon:"gear"})))),s.current&&n&&o.createElement(w,{target:s.current,onEsc:i,onClickOutside:i},o.createElement(y.A,{isOpen:!0,label:"ROOMS IN ".concat(c.toUpperCase()),headerTestId:"roomDropdownMenu-otherRooms",Header:v},o.createElement(a.Flex,{onClick:i,column:!0,height:{max:100},overflow:{vertical:"auto"}},o.createElement(g.A,null)))))};var S=t(47762),D=t(49389);const A=e=>{let{description:n,title:t,testId:i,children:s}=e;return o.createElement(a.Flex,{"data-testid":i,column:!0,gap:2},o.createElement(a.H4,{color:"textDescription"},t),o.createElement(a.Flex,{column:!0,"data-testid":i,gap:2},o.createElement(a.Text,{color:"textDescription"},n),s))},M=e=>{let{children:n,testId:t,icon:i="nodes_update"}=e;return o.createElement(a.Flex,{"data-testid":t,padding:[6],round:1,width:"100%",background:"modalInfoBackground",gap:2},o.createElement(a.Box,{as:a.Icon,width:10,height:10,name:i}),n)},E=e=>{let{title:n,desciription:t}=e;return o.createElement(a.Flex,{column:!0,gap:3},o.createElement(a.Flex,{alignItems:"center",gap:2},o.createElement(a.Icon,{color:"main",name:"warning_triangle_hollow"}),o.createElement(a.H3,null,n)),o.createElement(a.Box,null,t))};var N=t(4659),H=t(47767),R=(t(8159),t(37550),t(33931)),I=t(82432),O=t(81881),L=t(55905);const B=[{id:"name",accessor:"name",header:"Name",cell:e=>{let{getValue:n,row:t}=e;return o.createElement(N.A,{disabled:!t.original.isLive&&"stale"!==t.original.state,color:"text",hoverColor:"primary",visitedColor:"accent",Component:a.TextSmall},n())},minSize:60},{id:"version",accessor:"version",header:"Version",cell:e=>{let{getValue:n}=e;return o.createElement(a.Pill,{color:"neutralPillColor",flavour:"neutral"},n())}},{id:"state",accessor:"state",header:"Status",cell:e=>{let{getValue:n}=e;return o.createElement(R.A,{state:n()})},sortingFn:(e,n)=>{return t=(0,I.GM)(e.original.state),o=(0,I.GM)(n.original.state),t===o?0:t>o?1:-1;var t,o},enableColumnFilter:!0,filterFn:(e,n,t)=>{const o=e.original;return t.length<1||t.some((e=>{let{value:n}=e;return"all"===n||n===(0,I.GM)(o.state)}))},meta:{tooltip:o.createElement(O.A,null),filter:{component:"select",isMulti:!0,options:[{value:"Offline",label:"Offline"},{value:"Live",label:"Live"},{value:"Stale",label:"Stale"}]}}},{id:"updateSeverity",accessor:"updateSeverity",header:"Severity",cell:e=>{let{getValue:n,row:t}=e;const i=t.original;return o.createElement(L.A,{name:i.name,os:i.os.id,container:i.hw.container,warningLevel:i.updateSeverity,labels:i.labels||{},version:i.version,text:n()})}}],U=(0,l.eU)({key:"notificationModal",default:!1}),j=function(){let{resetOnUnmount:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,l.E0)(U),[t,i]=(0,l.L4)(U),a=(0,o.useCallback)((()=>i(!0)),[]),s=(0,o.useCallback)((()=>i(!1)),[]);return(0,o.useEffect)((()=>()=>{e&&n()}),[]),{isModalVisible:t,openModal:a,closeModal:s,resetState:n}},G=[{id:"updateSeverity",desc:!1}],F=()=>{const{closeModal:e}=j(),n=(0,o.useMemo)((()=>({goto:{handleAction:e=>{const{_install_type:n=null}=(null===e||void 0===e?void 0:e.labels)||{},{hw:{container:t},os:{id:o},version:i}=e,a=(0,D.fe)({container:t,os:o,_install_type:n,version:i});window.open(a,"_blank","noopener,noreferrer")},tooltipText:"Go to documentation"}})),[]),t=(0,H.Zp)(),i=(0,S.Ux)();return{onClickRow:(0,o.useCallback)((n=>{let{data:o}=n;if(!o.isLive&&"stale"!==o.state)return;const a=i(o.id);t(a),e()}),[]),sortBy:G,rowActions:n,columns:B,disableClickRow:e=>{let{data:n}=e;return!n.isLive&&"stale"!==n.state}}};var z=t(60383);const Y={updateSeverity:!0,connectionToCloud:!1},X=e=>{let{data:n}=e;const{rowActions:t,onClickRow:i,disableClickRow:a,sortBy:s}=F();return o.createElement(z.A,{"data-testid":"nodesTable-layout",customSortBy:s,customNodes:n,showdDefaultRowActions:!1,showDefaultBulkActions:!1,columnVisibility:Y,customRowActions:t,enableSelection:!1,onClickRow:i,disableClickRow:a})},W=e=>{let{onClose:n}=e;const t=(0,S.Gn)(),i=(0,S.Gt)(t),s=t.length,r="Need update (".concat(t.length," ").concat((0,D.su)(t.length),")");return o.createElement(a.Modal,{backdropProps:{backdropBlur:!0}},o.createElement(a.ModalContent,{width:{min:200,base:270},height:200},o.createElement(a.ModalHeader,null,o.createElement(E,{title:"Nodes that need Attention",desciription:o.createElement(a.Text,null,"You have ",o.createElement(a.Text,{strong:!0},s)," ",(0,D.su)(s)," that should be upgraded to ensure experience using Netdata")}),o.createElement(a.ModalCloseButton,{onClose:n,testId:"close-button"})),o.createElement(a.ModalBody,{overflow:"hidden"},o.createElement(M,null,o.createElement(A,{title:r},o.createElement(a.Text,null,o.createElement(a.Flex,{column:!0},o.createElement(a.Text,null,"Please upgrade to ensure you get the latest security and bug fixes.")," ",o.createElement(a.Box,null,"To update your nodes to the latest version"," ",o.createElement(N.A,{href:D.sH.default,rel:"noopener noreferrer",strong:!0,target:"_blank"},"please read our documentation"," "),"and find direct links for each node depending on where it is running and/or how it was installed."))))),o.createElement(X,{data:i}))))};var K=t(45467),$=t(57605),V=t(51112),Z=t(22332),J=t(99851),Q=t(27467);const ee=e=>{let{tagging:n,isPlaying:t}=e;const i=(0,C.J)(),[{offset:a,after:s,before:r},l]=(0,Q.N9)(),c=(0,o.useCallback)((e=>{let{start:n=-900,end:t=0}=e;l({after:n,before:n<0?0:t})}),[]),d=(0,o.useMemo)((()=>({start:s<0?s:Math.floor(s),end:s<0?0:Math.ceil(r)})),[s,r]);return o.createElement(J.A,{values:d,utc:a,onChange:c,tagging:n,isPlaying:t,isSmall:i})},ne=(0,_.default)(a.Flex).withConfig({displayName:"container__Container",componentId:"sc-qc13l0-0"})(["background:",";"],(e=>{let{theme:n,isPlaying:t}=e;const{name:o}=n;return("Dark"===o?(0,a.getRgbColor)(t?["green","green40"]:["neutral","grey70"]):(0,a.getRgbColor)(t?["green","green190"]:["neutral","grey185"]))({theme:n})}));var te=t(94944);const oe=(0,_.default)(T.A).withConfig({displayName:"playPausePill__StyledTooltip",componentId:"sc-1umryvu-0"})(["pointer-events:",";"],(e=>{let{isDisabled:n}=e;return n?"none":"auto"})),ie=e=>{let{isPlaying:n,isForcePlaying:t,isDisabled:i}=e;const s=(0,C.J)(),{play:r,pause:l}=(0,te.A)(),c=(0,o.useMemo)((()=>((e,n)=>e?n?"forcePlay":"playSolid":"pauseSolid")(n,t)),[n,t]);return o.createElement(oe,{content:n?"Click to pause":"Click to play",align:"bottom",isDisabled:i},o.createElement(a.Box,{as:a.Pill,icon:c,onClick:n?l:r,isPlaying:n,"data-testid":"playPause-button",flavour:n?"success":"neutral",_hover:{background:n?"accent":"neutralPillColor"}},s?null:n?"Playing":"Paused"))},ae=(0,_.default)(a.Flex).attrs({padding:[1],role:"button"}).withConfig({displayName:"styled__MenuButton",componentId:"sc-3h0zgs-0"})(["cursor:pointer;"]),se=(0,_.default)(a.Drop).attrs({align:{top:"bottom",left:"left"},animation:!0,backdrop:!0,column:!0,padding:[2,0],background:"dropdown",round:1,overflow:{vertical:"auto"},margin:[.5,0,0],width:40}).withConfig({displayName:"styled__Dropdown",componentId:"sc-3h0zgs-1"})([""]),re=(0,_.default)(T.A).withConfig({displayName:"styled__StyledTooltip",componentId:"sc-3h0zgs-2"})(["pointer-events:",";"],(e=>{let{isDisabled:n}=e;return n?"none":"auto"})),le=e=>{let{target:n,isDisabled:t}=e;const[i,s,,r]=(0,p.A)(),{play:l,pause:c,forcePlay:d}=(0,te.A)();return o.createElement(o.Fragment,null,i?o.createElement(ae,{onClick:s,width:"auto","data-testid":"playOptions-picker"},o.createElement(a.Icon,{name:"chevron_down",color:"text",width:"12px",height:"12px"})):o.createElement(re,{content:"Play to refresh and have live content, pause to see historical, or force play to keep refreshing even when the tab loses focus at the expense of some system performance.",align:{bottom:"bottom",right:"right"},isDisabled:t,plain:!0},o.createElement(ae,{onClick:s,width:"auto","data-testid":"playOptions-picker"},o.createElement(a.Icon,{name:"chevron_down",color:"text",width:"12px",height:"12px"}))),n.current&&i&&!t&&o.createElement(se,{target:n.current,onEsc:r,onClickOutsid