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: //proc/self/root/opt/netdata/netdata-web-files/v3/363.c9670a5be6ad9099de30.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]="207e812c-3fe5-48da-baa8-1b58c14e4e97",e._sentryDebugIdIdentifier="sentry-dbid-207e812c-3fe5-48da-baa8-1b58c14e4e97")}()}catch(e){}!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"211fba685705af0d3bd5f116a0eb09f7293a1656"}}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[363],{9618:(e,t,n)=>{n.d(t,{R:()=>o});var s=n(43329),l=n(52365);function o(e){const t=(0,l.A)(e?.in),n=t.getFullYear(),o=t.getMonth(),r=t.getDate(),i=(0,s.w)(e?.in,0);return i.setFullYear(n,o,r+1),i.setHours(0,0,0,0),i}},80696:(e,t,n)=>{n.d(t,{R:()=>l});var s=n(6463);function l(e){return(0,s.o)(Date.now(),e)}},95641:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ce});var s=n(17702),l=n(96540),o=n(32788),r=n(29263),i=n(60670),a=n(63766),c=n(79748),d=n(96905),u=n(74848);const x=e=>{let{onClose:t}=e;const[n,s]=(0,l.useState)(10),o=(0,d.A)();return(0,l.useEffect)((()=>{let e=!0,l=null;return e&&(n?l=setTimeout((()=>{s((e=>e-1))}),1e3):"function"===typeof t&&t()),()=>{e=!1,l&&(clearTimeout(l),l=null)}}),[n,s]),(0,u.jsxs)(a.Flex,{column:!0,justifyContent:"center",alignItems:"center",gap:6,margin:[13,0,0,0],padding:[0,8],children:[(0,u.jsx)(a.Icon,{name:"checkmark",width:"68px",height:"68px"}),(0,u.jsxs)(a.TextBigger,{textAlign:"center",lineHeight:1.5,color:"textLite",children:["Your report is being generated. This may take a few minutes. You will be notified when it is ready.",(0,u.jsx)("br",{}),"When the report is ready, you can view it in the"," ",(0,u.jsx)(c.A,{Component:a.TextBigger,onClick:o,cursor:"pointer",children:"insights page"}),"."]}),(0,u.jsxs)(a.Text,{color:"textLite",children:["Closing in ",n," sec.."]})]})};var g=n(62751),h=n(74891);const p=(0,h.A)(a.Pill),j=e=>t=>{let{tooltip:n,containerProps:s={},...l}=t;return(0,u.jsx)(p,{"data-testid":"troubleshooter-context-item-container",flavour:"neutral",hollow:!0,padding:[1,3],margin:[1,0],tooltip:n,tooltipProps:{align:"bottom"},...s,children:(0,u.jsx)(e,{...l})})},f=j((()=>{const{label:e}=(0,g.A)();return(0,u.jsxs)(a.TextSmall,{children:[(0,u.jsx)(a.TextSmall,{strong:!0,children:e})," tab"]})}));var m=n(19186);const b=j((()=>{const e=(0,m.XA)("name");return(0,u.jsxs)(a.TextSmall,{children:[(0,u.jsx)(a.TextSmall,{strong:!0,children:e})," room"]})}));var y=n(28998),A=n(76253);const v=j((()=>{const{startDate:e,endDate:t,isSameDate:n}=(0,A.A)();return(0,u.jsx)(a.Flex,{alignItems:"center",gap:1,children:(0,u.jsx)(y.A,{startDate:e,endDate:t,isSameDate:n})})}));var w=n(87083);const C=j((()=>{const e=(0,w.w7)(),t=(0,l.useMemo)((()=>e.length?1===e.length?"1 node":`${e.length} nodes`:"All nodes"),[e.length]);return(0,u.jsxs)(a.TextSmall,{children:[(0,u.jsx)(a.TextSmall,{strong:!0,children:t})," selected"]})}));n(98992),n(81454);const I={nodeLabels:"Node labels",nodeStatuses:"Node statuses",nodeVersions:"Node versions"},T=j((e=>{let{label:t,value:n}=e;return(0,u.jsxs)(a.Flex,{alignItems:"center",gap:1,children:[(0,u.jsx)(a.Icon,{name:"filterList",color:"textLite",width:"14px"}),(0,u.jsxs)(a.TextSmall,{children:[t,":"]}),(0,u.jsx)(a.TextSmall,{children:n})]})})),S=()=>{const[[e]]=(0,w._e)({merge:!1});return(0,u.jsx)(u.Fragment,{children:e.map((e=>{let[t,n]=e;const s=I[t]||t,l=Array.isArray(n)?n.length:0,o=`${l} selected ${s.toLowerCase()}`;return(0,u.jsx)(T,{label:s,value:l,tooltip:o},t)}))})};n(54520),n(8872);const F={hostLabels:"Host labels",nodeIds:"Nodes",nodeStatuses:"Statuses",nodeVersions:"Versions",alertStatuses:"Alert statuses",alertNames:"Alert names",alertContexts:"Alert contexts",alertClasses:"Alert classes",alertTypeComponents:"Alert type components",alertRoles:"Alert roles"},M=j((e=>{let{label:t,value:n}=e;return(0,u.jsxs)(a.Flex,{alignItems:"center",gap:1,children:[(0,u.jsx)(a.Icon,{name:"filterList",color:"textLite",width:"14px"}),(0,u.jsxs)(a.TextSmall,{children:[t,":"]}),(0,u.jsx)(a.TextSmall,{children:n})]})})),k=e=>{let{context:t}=e;const{filters:n,fn:s}=t||{},{fnValue:o,filters:r}=s||{},i=(0,l.useMemo)((()=>Object.entries(r||{}).reduce(((e,t)=>{let[n,s]=t;const l=F[n]||n;return[...e,...Array.isArray(s)&&s.length?[{label:l,value:"range"===o.columns[n]?.filter?s.join("-"):s.length,tooltip:`Function filter (${l})`}]:[]]}),[])),[o,r]),c=(0,l.useMemo)((()=>[...Object.entries(n||{}).reduce(((e,t)=>{let[n,s]=t;const l=F[n]||n;return[...e,...Array.isArray(s)&&s.length?[{label:l,value:s.length,tooltip:`${s.length} filtered ${l.toLowerCase()}`}]:[]]}),[]),...i]),[n,i]);return c.length?(0,u.jsx)(a.Flex,{alignItems:"center",gap:2,flexWrap:!0,children:c.map((e=>(0,u.jsx)(M,{...e},JSON.stringify({label:e.label,value:e.value}))))}):null},R=j((e=>{let{title:t}=e;return(0,u.jsxs)(a.Flex,{alignItems:"center",gap:2,children:[(0,u.jsx)(a.Icon,{name:"charts",color:"textLite",width:"12px"}),(0,u.jsx)(a.TextSmall,{strong:!0,children:t})]})})),D=e=>{let{context:t}=e;const{metrics:n}=t||{},{visibleItems:s}=n||{};return Array.isArray(s)&&s.length?(0,u.jsx)(a.Flex,{alignItems:"center",gap:2,flexWrap:!0,children:s.map((e=>(0,u.jsx)(R,{...e,tooltip:"Visible chart"},e.id)))}):null},L=e=>{let{context:t}=e;return(0,u.jsxs)(a.Flex,{column:!0,gap:2,children:[(0,u.jsx)(a.TextBig,{strong:!0,color:"menuItem",children:"Captured Context"}),(0,u.jsxs)(a.Flex,{column:!0,gap:1,padding:[0,0,0,2],children:[(0,u.jsxs)(a.Flex,{alignItems:"center",gap:2,flexWrap:!0,children:[(0,u.jsx)(f,{tooltip:"Active tab"}),(0,u.jsx)(b,{tooltip:"Current room"}),(0,u.jsx)(v,{tooltip:"Selected date / time"}),(0,u.jsx)(C,{tooltip:"Selected nodes"}),(0,u.jsx)(S,{})]}),(0,u.jsx)(k,{context:t}),(0,u.jsx)(D,{context:t})]})]})};var P=n(81685),N=n(4142),V=n(63950),_=n.n(V),O=n(21996),$=n(79997),E=n(5310);const W=()=>{const e=(0,l.useRef)();return(0,u.jsx)(a.Flex,{"data-testid":"insights-investigation-container",width:{base:"500px"},alignItems:"center",justifyContent:"center",column:!0,gap:2,padding:[2,0,0,0],children:(0,u.jsx)(a.Flex,{"data-testid":"insights-investigation-prompt-container",width:"100%",column:!0,gap:4,alignItems:"center",justifyContent:"center",children:(0,u.jsxs)(a.Flex,{"data-testid":"insights-investigation-prompt-input-container",width:"100%",position:"relative",children:[(0,u.jsx)(O.A,{ref:e,tabIndex:"0","data-testid":"insights-investigation-prompt-input",width:"100%",rows:3,placeholder:E.u.textPlaceHolder,value:"",onChange:_(),onBlur:_(),onKeyDown:_(),disabled:!0,round:"8px"}),(0,u.jsx)(a.Flex,{position:"absolute",right:"-45px",top:"50%",style:{transform:"translateY(-50%)"},children:(0,u.jsx)(a.Button,{onClick:_(),round:"50%",disabled:!0,children:(0,u.jsx)(a.Flex,{width:"19px",height:"19px",alignItems:"center",justifyContent:"center",children:(0,u.jsx)($.AQ,{name:"arrow_s_down",rotate:2})})})})]})})})};var Y=n(43252);const B=e=>t=>(0,u.jsx)(a.Flex,{"data-testid":"troubleshooter-modal-prompt-container",padding:[4,0,0,0],children:(0,u.jsx)(e,{...t})}),Q=B((e=>{let{parentRef:t}=e;const{query:n}=(0,P.g0)();return n?.definitionId?(0,u.jsx)(N.A,{flavour:Y.Rh.troubleshooter,variables:n?.variables,parentRef:t}):null})),q=B((()=>(0,u.jsx)(W,{flavour:Y.Rh.troubleshooter}))),z=e=>{let{parentRef:t,isPaid:n}=e;return n?(0,u.jsx)(Q,{parentRef:t}):(0,u.jsx)(q,{})};var H=n(51376),G=n(64463),J=n(70366);const K=()=>{const{play:e,pause:t}=(0,G.A)(),[n]=(0,P.W5)(),s=(0,J.A)();return(0,l.useEffect)((()=>(t(),()=>e())),[e,t]),{requestMessageVisible:n,context:s}};var X=n(60908),Z=n(4204);const U=e=>{let{isPaid:t,onClose:n}=e;const s=(0,l.useRef)(),{requestMessageVisible:a,context:c}=K();return(0,u.jsx)(o.GO,{onClose:n,closeOnClickOutside:!1,children:(0,u.jsxs)(X.Ay,{feature:"TroubleshooterModal",children:[(0,u.jsx)(r.z,{onClose:n,title:"Troubleshooting with AI"}),(0,u.jsx)(o.Yv,{ref:s,gap:4,children:a?(0,u.jsx)(x,{onClose:n}):(0,u.jsxs)(u.Fragment,{children:[Z.ei?(0,u.jsx)(H.A,{}):t?null:(0,u.jsx)(i.A,{size:"medium"}),(0,u.jsx)(L,{context:c}),(0,u.jsx)(z,{parentRef:s,isPaid:t})]})})]})})};var ee=n(76375),te=n(88934),ne=n(6304),se=n(99094);const le=()=>!(0,te.RQ)("/spaces/:spaceSlug/rooms/:roomSlug/insights"),oe=(0,h.A)(s.A),re=e=>{let{isVisible:t,isPaid:n,isModalOpen:s,toggleModal:l,closeModal:o}=e;return t?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(oe,{label:"Troubleshoot",small:!0,flavour:"hollow",onClick:l,tooltip:{title:"Troubleshoot / Analyze with AI",description:"Let Netdata's AI assistant analyze the data you are currently viewing."},tooltipProps:{align:"bottom"}}),s?(0,u.jsx)(U,{isPaid:n,onClose:o}):null]}):null},ie=()=>{const e=(()=>{const[e,t,,n]=(0,ne.A)(),{onNewQuery:s}=(0,P.g0)(),o=(0,P.fT)(),r=(0,J.A)(),[,,,i]=(0,P.W5)(),a=le(),c=(0,l.useCallback)((()=>{e?o():s(se.oG.investigation,{context:r}),i(),t()}),[e,r,t,i,s,o]),d=(0,l.useCallback)((()=>{n(),o(),i()}),[n,o,i]);return{isVisible:a,isModalOpen:e,toggleModal:c,closeModal:d}})();return(0,u.jsx)(re,{isPaid:!0,...e})},ae=()=>{const e=(()=>{const e=le(),[t,n,,s]=(0,ne.A)();return{isVisible:e,isModalOpen:t,toggleModal:n,closeModal:s}})();return(0,u.jsx)(re,{...e})},ce=()=>{const{loaded:e,isPaid:t}=(0,ee.A)();return e?t&&!Z.ei?(0,u.jsx)(ie,{}):(0,u.jsx)(ae,{}):null}},96905:(e,t,n)=>{n.d(t,{A:()=>c});var s=n(96540),l=n(88934),o=n(81685),r=n(96951),i=n(24609),a=n(19186);const c=function(){let{definitionId:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,l.Zp)(),{onNewQuery:n}=(0,o.g0)(),{reset:c}=(0,r.A)(),d=(0,i.bq)(),u=(0,a.QW)();return(0,s.useCallback)((()=>{c(),e&&n(e),t(`/spaces/${d}/rooms/${u}/insights`)}),[n,c,d,u])}}}]);