File: //proc/self/root/opt/netdata/netdata-web-files/v3/5178.ad529f63fac55a4b035f.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:"aeeb2702d6a0b41e7dabfc313b63e720f0845c35"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="87f1a437-76ae-4716-bd2f-b8ec52c42005",e._sentryDebugIdIdentifier="sentry-dbid-87f1a437-76ae-4716-bd2f-b8ec52c42005")}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[5178],{5178(e,t,r){r.r(t),r.d(t,{default:()=>v});var n=r(64467),o=r(80045),l=(r(98992),r(54520),r(3949),r(81454),r(62953),r(96540)),s=r(68978),c=r(19075),d=r(81685),a=r(42849),i=r(50100),u=r(71870),p=r(91721),b=r(12339),f=r(24868),h=r(24155),g=r(79748),j=r(6304),x=r(41514),A=r(3319),y=r(74848);const O=["children"],m=["alertId"];function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?w(Object(r),!0).forEach((function(t){(0,n.A)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const k=e=>{let{children:t}=e,r=(0,o.A)(e,O);return(0,y.jsx)(s.Flex,I(I({column:!0,gap:3,padding:[4,0]},r),{},{children:t}))},D=()=>(0,y.jsxs)(k,{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"})]}),C=e=>{let{id:t,createdAt:r}=e;const n=(0,a.A)({reportDate:new Date(r),dateOptions:{long:!0}}),{goToReport:o}=(0,i.A)(),{sendLog:c}=(0,A.A)(),d=(0,l.useCallback)((()=>{o(t),c({feature:"AlertDetailsModal",description:"View full report button click",reportId:t})}),[t,o,c]);return(0,y.jsxs)(s.Flex,{column:!0,gap:2,background:"panelBg",round:!0,border:{side:"all",color:"border"},padding:[3,4],children:[(0,y.jsx)(s.TextBig,{strong:!0,color:"menuItem",children:n}),(0,y.jsx)(f.R,{id:t,limitCharacters:180}),(0,y.jsx)(s.Flex,{justifyContent:"end",children:(0,y.jsx)(g.A,{onClick:d,children:"View more"})})]})},P="alert-modal",T=()=>(0,y.jsxs)(s.Flex,{alignItems:"center",gap:2,children:[(0,y.jsx)(s.Icon,{name:"checkmark_s",color:"success"}),(0,y.jsx)(s.TextBig,{children:"Requested a report"})]}),_=e=>{let{alertId:t}=e;const[r,n,,o]=(0,j.A)(),[c,,d]=(0,j.A)(),a=(0,u.A)({onSuccess:d}),{sendLog:i}=(0,A.A)(),p=(0,l.useCallback)((()=>{a({alertId:t}),(0,x.H)("alert-troubleshooter","click-alert-troubleshooter-action-confirmation",P,{action:"request-report-alert",alertId:t},"user-clicked-cta"),i({feature:"AlertTroubleshooter",alertId:t,ui:P,description:"request-report-alert"})}),[t,a,i]);return c?(0,y.jsx)(T,{}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(g.A,{Component:s.TextBig,onClick:n,children:"Request a new report"}),r?(0,y.jsx)(b.A,{data:{id:t},handleAction:p,onClose:o}):null]})},v=e=>{let{alertId:t}=e,r=(0,o.A)(e,m);const{fullyLoaded:n}=(0,c.JL)(t),{loaded:l,reports:s}=(0,d.nX)({alertId:t});return n?l?(0,y.jsxs)(k,I(I({},r),{},{children:[(0,y.jsx)(_,{alertId:t}),s.map((e=>(0,y.jsx)(C,I({},e),e.id)))]})):(0,y.jsx)(D,{}):(0,y.jsx)(p.A,{})}}}]);