File: //opt/netdata/usr/local/local/share/netdata/web/v3/5178.c028847ffcc64f350b69.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:"b3c473d2ca33393fa546694d92302a2d960eb3e4"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="dc09a840-7d56-4d68-ae44-55f1de48ee55",e._sentryDebugIdIdentifier="sentry-dbid-dc09a840-7d56-4d68-ae44-55f1de48ee55")}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(99191),d=r(19075),c=r(81685),a=r(42849),i=r(50100),u=r(71870),p=r(91721),h=r(12339),f=r(24868),g=r(24155),b=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)(g.A,{height:"80px"}),(0,y.jsx)(g.A,{height:"80px"}),(0,y.jsx)(g.A,{height:"80px"}),(0,y.jsx)(g.A,{height:"80px"}),(0,y.jsx)(g.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:d}=(0,A.A)(),c=(0,l.useCallback)((()=>{o(t),d({feature:"AlertDetailsModal",description:"View full report button click",reportId:t})}),[t,o,d]);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)(b.A,{onClick:c,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)(),[d,,c]=(0,j.A)(),a=(0,u.A)({onSuccess:c}),{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 d?(0,y.jsx)(T,{}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(b.A,{Component:s.TextBig,onClick:n,children:"Request a new report"}),r?(0,y.jsx)(h.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,d.JL)(t),{loaded:l,reports:s}=(0,c.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,{})}}}]);