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/5178.d0b517d4926455d4db92.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 r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="cef4e5fa-b854-439c-82b4-4763b0d4ba82",e._sentryDebugIdIdentifier="sentry-dbid-cef4e5fa-b854-439c-82b4-4763b0d4ba82")}catch(e){}}(),(globalThis.webpackChunkcloud_frontend=globalThis.webpackChunkcloud_frontend||[]).push([[5178],{5178(e,r,t){t.r(r),t.d(r,{default:()=>k});t(98992),t(81454);var n=t(96540),s=t(78904),l=t(19075),i=t(81685),o=t(42849),d=t(50100),a=t(71870),c=t(91721),x=t(12339),u=t(24868),h=t(24155),p=t(79748),g=t(6304),j=t(41514),m=t(3319),f=t(74848);const b=e=>{let{children:r,...t}=e;return(0,f.jsx)(s.Flex,{column:!0,gap:3,padding:[4,0],...t,children:r})},A=()=>(0,f.jsxs)(b,{children:[(0,f.jsx)(h.A,{height:"80px"}),(0,f.jsx)(h.A,{height:"80px"}),(0,f.jsx)(h.A,{height:"80px"}),(0,f.jsx)(h.A,{height:"80px"}),(0,f.jsx)(h.A,{height:"80px"})]}),w=e=>{let{id:r,createdAt:t}=e;const l=(0,o.A)({reportDate:new Date(t),dateOptions:{long:!0}}),{goToReport:i}=(0,d.A)(),{sendLog:a}=(0,m.A)(),c=(0,n.useCallback)(()=>{i(r),a({feature:"AlertDetailsModal",description:"View full report button click",reportId:r})},[r,i,a]);return(0,f.jsxs)(s.Flex,{"data-testid":"alert-details-modal-tab-reports",column:!0,gap:2,background:"panelBg",round:!0,border:{side:"all",color:"border"},padding:[3,4],children:[(0,f.jsx)(s.TextBig,{strong:!0,color:"menuItem",children:l}),(0,f.jsx)(u.R,{id:r,limitCharacters:180}),(0,f.jsx)(s.Flex,{justifyContent:"end",children:(0,f.jsx)(p.A,{onClick:c,children:"View more"})})]})},I="alert-modal",T=()=>(0,f.jsxs)(s.Flex,{alignItems:"center",gap:2,children:[(0,f.jsx)(s.Icon,{name:"checkmark_s",color:"success"}),(0,f.jsx)(s.TextBig,{children:"Requested a report"})]}),y=e=>{let{alertId:r}=e;const[t,l,,i]=(0,g.A)(),[o,,d]=(0,g.A)(),c=(0,a.A)({onSuccess:d}),{sendLog:u}=(0,m.A)(),h=(0,n.useCallback)(()=>{c({alertId:r}),(0,j.H)("alert-troubleshooter","click-alert-troubleshooter-action-confirmation",I,{action:"request-report-alert",alertId:r},"user-clicked-cta"),u({feature:"AlertTroubleshooter",alertId:r,ui:I,description:"request-report-alert"})},[r,c,u]);return o?(0,f.jsx)(T,{}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(p.A,{Component:s.TextBig,onClick:l,children:"Request a new report"}),t?(0,f.jsx)(x.A,{data:{id:r},handleAction:h,onClose:i}):null]})},k=e=>{let{alertId:r,...t}=e;const{fullyLoaded:n}=(0,l.JL)(r),{loaded:s,reports:o}=(0,i.nX)({alertId:r});return n?s?(0,f.jsxs)(b,{...t,children:[(0,f.jsx)(y,{alertId:r}),o.map(e=>(0,f.jsx)(w,{...e},e.id))]}):(0,f.jsx)(A,{}):(0,f.jsx)(c.A,{})}},24868(e,r,t){t.d(r,{R:()=>v,A:()=>M});t(98992),t(54520),t(72577),t(81454);var n=t(96540),s=t(78904),l=t(79997),i=t(81685),o=t(74848);const d=e=>r=>{let{containerProps:t={},...n}=r;return(0,o.jsx)(s.Flex,{alignItems:"center",justifyContent:"center",flex:"grow",...t,children:(0,o.jsx)(e,{...n})})},a=d(()=>(0,o.jsx)(s.Text,{children:"Loading reports..."})),c=d(e=>{let{error:r}=e;const t=(0,n.useMemo)(()=>r?.errorMessage||"Something went wrong",[r]);return(0,o.jsxs)(s.Flex,{alignItems:"center",gap:2,children:[(0,o.jsx)(s.Icon,{name:"warning_triangle",color:"warning"}),(0,o.jsx)(s.Text,{children:t})]})}),x=d(()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.Text,{children:"There are no recently generated reports."}),(0,o.jsx)(s.Text,{children:"Create the first one by selecting one of the definitions on the left."})]}));var u=t(24155),h=t(79748),p=t(83341),g=t(42849);t(74423),t(8872);const j=["alertTransition"],m=e=>{let{variables:r={}}=e;return Object.entries(r).reduce((e,r)=>{let[t,n]=r;if(!j.includes(t)){return`${e}-${Array.isArray(n)?"nodes"===t?`${n.length}-nodes`:n.join(","):n}`}return e},"")};var f=t(50100),b=t(64156);const A="(min-width: 1600px)",w="(max-width: 1599px)",I="(max-width: 1299px)",T="(max-width: 1128px)",y=()=>({isLarge:(0,b.A)(A),isMedium:(0,b.A)(w),isSmall:(0,b.A)(I),isSuoerSmall:(0,b.A)(T)});var k=t(6304),C=t(3319);const F=()=>(0,o.jsxs)(s.Flex,{column:!0,gap:2,children:[(0,o.jsx)(u.A,{}),(0,o.jsx)(u.A,{width:"75%"})]}),v=e=>{let{id:r,limitCharacters:t=70}=e;const{loaded:l,report:d,error:a}=(0,i.ef)({id:r}),c=(0,n.useMemo)(()=>l&&!a&&d.data?.blocks?.length?d.data.blocks.find(e=>{let{type:r}=e;return"TEXT"===r})?.data?.substring(0,t):"",[l,d,a]);return l?a?null:(0,o.jsx)(s.Flex,{"data-testid":"insights-report-preview-container",children:(0,o.jsx)(p.A,{children:`${c}...`})}):(0,o.jsx)(F,{})},D=e=>{let{id:r,definitionId:t,createdAt:d,variables:a,itemsNum:c}=e;const{loaded:x,definition:u}=(0,i.fL)({id:t}),p=(0,g.A)({reportDate:new Date(d),dateOptions:{long:!0}}),j=m({variables:a}),{goToReport:b}=(0,f.A)(),{sendLog:A}=(0,C.A)(),w=(0,n.useCallback)(()=>{b(r),A({feature:"Insights",description:"View full report button click",reportId:r})},[r,b,A]);return x?(0,o.jsxs)(l.oQ,{"data-testid":"insights-recent-report-preview",itemsNum:c,children:[(0,o.jsxs)(l.RB,{children:[(0,o.jsxs)(s.Flex,{column:!0,gap:1,children:[(0,o.jsx)(s.Text,{color:"menuItem",children:p}),(0,o.jsx)(s.TextBig,{strong:!0,children:u.name}),j?(0,o.jsxs)(s.TextSmall,{color:"menuItem",children:["(",j.substring(0,30),")"]}):null]}),(0,o.jsx)(v,{id:r}),(0,o.jsx)(l.jI,{})]}),(0,o.jsx)(s.Flex,{justifyContent:"end",children:(0,o.jsx)(h.A,{onClick:w,children:"View full report."})})]}):null},M=e=>{let{collapsed:r}=e;const[t,d]=(0,k.A)(r),{loaded:u,reports:h,error:p}=(0,i.rY)(),g=(()=>{const{isMedium:e,isSmall:r,isSuoerSmall:t}=y();return t?1:r?2:e?3:4})(),j=(0,n.useMemo)(()=>u?(h||[]).filter(e=>{let{status:r}=e;return"COMPLETED"===r}).slice(0,g).sort((e,r)=>new Date(r.createdAt).getTime()-new Date(e.createdAt).getTime()):[],[u,h,g]);return u?p?(0,o.jsx)(l.Mx,{collapsed:t,children:(0,o.jsx)(c,{error:p})}):j.length?(0,o.jsx)(l.Mx,{collapsed:t,children:(0,o.jsxs)(s.Flex,{"data-testid":"insights-recent-reports-container",width:"100%",column:!0,gap:4,padding:[4],children:[(0,o.jsxs)(s.Flex,{alignItems:"center",gap:2,onClick:d,cursor:"pointer",children:[(0,o.jsx)(s.Text,{color:"primary",children:"Recently generated reports"}),(0,o.jsx)(s.Icon,{name:"chevron_left",size:"small",color:"primary",rotate:t?3:1})]}),t?null:(0,o.jsx)(s.Flex,{gap:4,children:j.map(e=>(0,o.jsx)(D,{...e,itemsNum:g},e.id))})]})}):(0,o.jsx)(l.Mx,{collapsed:t,children:(0,o.jsx)(x,{containerProps:{column:!0,gap:2}})}):(0,o.jsx)(l.Mx,{collapsed:t,children:(0,o.jsx)(a,{})})}}}]);