MOON
Server: Apache
System: Linux server1.studioinfinity.com.br 2.6.32-954.3.5.lve1.4.90.el6.x86_64 #1 SMP Tue Feb 21 12:26:30 UTC 2023 x86_64
User: artinside (517)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/netdata/usr/local/local/share/netdata/web/v3/5178.5ec87060a062203e370f.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:"24dad2414db89a9e2209703b6e48226fc420eca1"};var r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="23ef34c9-f7dd-44dc-9516-289fe7292e9e",e._sentryDebugIdIdentifier="sentry-dbid-23ef34c9-f7dd-44dc-9516-289fe7292e9e")}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[5178],{5178(e,r,t){t.r(r),t.d(r,{default:()=>S});var n=t(64467),o=t(80045),s=(t(98992),t(54520),t(3949),t(81454),t(62953),t(96540)),l=t(42358),i=t(19075),c=t(81685),a=t(42849),d=t(50100),u=t(71870),p=t(91721),x=t(12339),j=t(24868),h=t(24155),g=t(79748),f=t(6304),b=t(41514),m=t(3319),y=t(74848);const O=["children"],w=["alertId"];function A(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function v(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?A(Object(t),!0).forEach((function(r){(0,n.A)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):A(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const I=e=>{let{children:r}=e,t=(0,o.A)(e,O);return(0,y.jsx)(l.Flex,v(v({column:!0,gap:3,padding:[4,0]},t),{},{children:r}))},P=()=>(0,y.jsxs)(I,{children:[(0,y.jsx)(h.A,{height:"80px"}),(0,y.jsx)(h.A,{height:"80px"}),(0,y.jsx)(h.A,{height:"80px"}),(0,y.jsx)(h.A,{height:"80px"}),(0,y.jsx)(h.A,{height:"80px"})]}),k=e=>{let{id:r,createdAt:t}=e;const n=(0,a.A)({reportDate:new Date(t),dateOptions:{long:!0}}),{goToReport:o}=(0,d.A)(),{sendLog:i}=(0,m.A)(),c=(0,s.useCallback)((()=>{o(r),i({feature:"AlertDetailsModal",description:"View full report button click",reportId:r})}),[r,o,i]);return(0,y.jsxs)(l.Flex,{column:!0,gap:2,background:"panelBg",round:!0,border:{side:"all",color:"border"},padding:[3,4],children:[(0,y.jsx)(l.TextBig,{strong:!0,color:"menuItem",children:n}),(0,y.jsx)(j.R,{id:r,limitCharacters:180}),(0,y.jsx)(l.Flex,{justifyContent:"end",children:(0,y.jsx)(g.A,{onClick:c,children:"View more"})})]})},D="alert-modal",T=()=>(0,y.jsxs)(l.Flex,{alignItems:"center",gap:2,children:[(0,y.jsx)(l.Icon,{name:"checkmark_s",color:"success"}),(0,y.jsx)(l.TextBig,{children:"Requested a report"})]}),C=e=>{let{alertId:r}=e;const[t,n,,o]=(0,f.A)(),[i,,c]=(0,f.A)(),a=(0,u.A)({onSuccess:c}),{sendLog:d}=(0,m.A)(),p=(0,s.useCallback)((()=>{a({alertId:r}),(0,b.H)("alert-troubleshooter","click-alert-troubleshooter-action-confirmation",D,{action:"request-report-alert",alertId:r},"user-clicked-cta"),d({feature:"AlertTroubleshooter",alertId:r,ui:D,description:"request-report-alert"})}),[r,a,d]);return i?(0,y.jsx)(T,{}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(g.A,{Component:l.TextBig,onClick:n,children:"Request a new report"}),t?(0,y.jsx)(x.A,{data:{id:r},handleAction:p,onClose:o}):null]})},S=e=>{let{alertId:r}=e,t=(0,o.A)(e,w);const{fullyLoaded:n}=(0,i.JL)(r),{loaded:s,reports:l}=(0,c.nX)({alertId:r});return n?s?(0,y.jsxs)(I,v(v({},t),{},{children:[(0,y.jsx)(C,{alertId:r}),l.map((e=>(0,y.jsx)(k,v({},e),e.id)))]})):(0,y.jsx)(P,{}):(0,y.jsx)(p.A,{})}},24868(e,r,t){t.d(r,{R:()=>L,A:()=>_});var n=t(64467),o=(t(26910),t(98992),t(54520),t(72577),t(3949),t(81454),t(62953),t(96540)),s=t(42358),l=t(79997),i=t(81685),c=t(80045),a=t(74848);const d=["containerProps"];function u(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function p(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?u(Object(t),!0).forEach((function(r){(0,n.A)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const x=e=>r=>{let{containerProps:t={}}=r,n=(0,c.A)(r,d);return(0,a.jsx)(s.Flex,p(p({alignItems:"center",justifyContent:"center",flex:"grow"},t),{},{children:(0,a.jsx)(e,p({},n))}))},j=x((()=>(0,a.jsx)(s.Text,{children:"Loading reports..."}))),h=x((e=>{let{error:r}=e;const t=(0,o.useMemo)((()=>(null===r||void 0===r?void 0:r.errorMessage)||"Something went wrong"),[r]);return(0,a.jsxs)(s.Flex,{alignItems:"center",gap:2,children:[(0,a.jsx)(s.Icon,{name:"warning_triangle",color:"warning"}),(0,a.jsx)(s.Text,{children:t})]})})),g=x((()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.Text,{children:"There are no recently generated reports."}),(0,a.jsx)(s.Text,{children:"Create the first one by selecting one of the definitions on the left."})]})));var f=t(24155),b=t(79748),m=t(83341),y=t(42849);t(8872);const O=["alertTransition"],w=e=>{let{variables:r={}}=e;return Object.entries(r).reduce(((e,r)=>{let[t,n]=r;if(!O.includes(t)){const r=Array.isArray(n)?"nodes"===t?"".concat(n.length,"-nodes"):n.join(","):n;return"".concat(e,"-").concat(r)}return e}),"")};var A=t(50100),v=t(64156);const I="(min-width: 1600px)",P="(max-width: 1599px)",k="(max-width: 1299px)",D="(max-width: 1128px)",T=()=>({isLarge:(0,v.A)(I),isMedium:(0,v.A)(P),isSmall:(0,v.A)(k),isSuoerSmall:(0,v.A)(D)});var C=t(6304),S=t(3319);function F(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function E(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?F(Object(t),!0).forEach((function(r){(0,n.A)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):F(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const M=()=>(0,a.jsxs)(s.Flex,{column:!0,gap:2,children:[(0,a.jsx)(f.A,{}),(0,a.jsx)(f.A,{width:"75%"})]}),L=e=>{let{id:r,limitCharacters:t=70}=e;const{loaded:n,report:l,error:c}=(0,i.ef)({id:r}),d=(0,o.useMemo)((()=>{var e,r;return n&&!c&&null!==(e=l.data)&&void 0!==e&&null!==(e=e.blocks)&&void 0!==e&&e.length?null===(r=l.data.blocks.find((e=>{let{type:r}=e;return"TEXT"===r})))||void 0===r||null===(r=r.data)||void 0===r?void 0:r.substring(0,t):""}),[n,l,c]);return n?c?null:(0,a.jsx)(s.Flex,{"data-testid":"insights-report-preview-container",children:(0,a.jsx)(m.A,{children:"".concat(d,"...")})}):(0,a.jsx)(M,{})},R=e=>{let{id:r,definitionId:t,createdAt:n,variables:c,itemsNum:d}=e;const{loaded:u,definition:p}=(0,i.fL)({id:t}),x=(0,y.A)({reportDate:new Date(n),dateOptions:{long:!0}}),j=w({variables:c}),{goToReport:h}=(0,A.A)(),{sendLog:g}=(0,S.A)(),f=(0,o.useCallback)((()=>{h(r),g({feature:"Insights",description:"View full report button click",reportId:r})}),[r,h,g]);return u?(0,a.jsxs)(l.oQ,{"data-testid":"insights-recent-report-preview",itemsNum:d,children:[(0,a.jsxs)(l.RB,{children:[(0,a.jsxs)(s.Flex,{column:!0,gap:1,children:[(0,a.jsx)(s.Text,{color:"menuItem",children:x}),(0,a.jsx)(s.TextBig,{strong:!0,children:p.name}),j?(0,a.jsxs)(s.TextSmall,{color:"menuItem",children:["(",j.substring(0,30),")"]}):null]}),(0,a.jsx)(L,{id:r}),(0,a.jsx)(l.jI,{})]}),(0,a.jsx)(s.Flex,{justifyContent:"end",children:(0,a.jsx)(b.A,{onClick:f,children:"View full report."})})]}):null},_=e=>{let{collapsed:r}=e;const[t,n]=(0,C.A)(r),{loaded:c,reports:d,error:u}=(0,i.rY)(),p=(()=>{const{isMedium:e,isSmall:r,isSuoerSmall:t}=T();return t?1:r?2:e?3:4})(),x=(0,o.useMemo)((()=>c?(d||[]).filter((e=>{let{status:r}=e;return"COMPLETED"===r})).slice(0,p).sort(((e,r)=>new Date(r.createdAt).getTime()-new Date(e.createdAt).getTime())):[]),[c,d,p]);return c?u?(0,a.jsx)(l.Mx,{collapsed:t,children:(0,a.jsx)(h,{error:u})}):x.length?(0,a.jsx)(l.Mx,{collapsed:t,children:(0,a.jsxs)(s.Flex,{"data-testid":"insights-recent-reports-container",width:"100%",column:!0,gap:4,padding:[4],children:[(0,a.jsxs)(s.Flex,{alignItems:"center",gap:2,onClick:n,cursor:"pointer",children:[(0,a.jsx)(s.Text,{color:"primary",children:"Recently generated reports"}),(0,a.jsx)(s.Icon,{name:"chevron_left",size:"small",color:"primary",rotate:t?3:1})]}),t?null:(0,a.jsx)(s.Flex,{gap:4,children:x.map((e=>(0,a.jsx)(R,E(E({},e),{},{itemsNum:p}),e.id)))})]})}):(0,a.jsx)(l.Mx,{collapsed:t,children:(0,a.jsx)(g,{containerProps:{column:!0,gap:2}})}):(0,a.jsx)(l.Mx,{collapsed:t,children:(0,a.jsx)(j,{})})}}}]);