File: //opt/netdata/usr/local/local/share/netdata/web/v3/4211.4ad8953d31c50d02533f.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]="0bf8da81-4aa2-452c-aae6-eb27bcb0cf27",e._sentryDebugIdIdentifier="sentry-dbid-0bf8da81-4aa2-452c-aae6-eb27bcb0cf27")}()}catch(e){}!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"65453070b30ecf3d4a1205a75b366baaa35aad52"}}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[4211,6026],{24211:(e,t,a)=>{a.r(t),a.d(t,{default:()=>r});var o=a(88934),l=a(87650),n=a(60959),d=a(74848);const r=e=>{let{spaceId:t,roomId:a,nodeName:r}=e;const{alertId:i}=(0,o.g)();return(0,d.jsx)(n.A,{children:(0,d.jsx)(l.A,{alertId:i,spaceId:t,roomId:a,nodeName:r,isWebview:!0})})}},52007:(e,t,a)=>{a.d(t,{A:()=>s});var o=a(63766),l=a(96026),n=a(74891),d=a(94404),r=a(74848);const i=(0,d.A)((0,n.A)(o.Button)),s=e=>{let{alertId:t,nodeId:a,small:o=!1,isLoading:n,disabled:d,...s}=e;const{canEdit:c,goToEdit:u}=(0,l.q)({nodeIds:[a],alertId:t});return(0,r.jsx)(i,{small:o,label:"Edit alert",onClick:()=>u(a),flavour:"hollow",isLoading:n,disabled:n||!c||d,width:o?"112px":"150px","data-ga":"alert-modal::click-edit-congiguration::alerts-view",payload:{action:"Edit alert",alertId:t,nodeId:a},tooltip:c?null:"You cannot edit this alert.",...s})}},60959:(e,t,a)=>{a.d(t,{A:()=>d});var o=a(63766),l=a(10444),n=a(74848);const d=e=>{let{children:t}=e;return(0,l.J)()?(0,n.jsx)(o.Layer,{full:!0,children:(0,n.jsx)(o.Flex,{width:"100%",background:"mainBackground","data-testid":"mobileContainer",children:t})}):t}},87650:(e,t,a)=>{a.d(t,{A:()=>N});var o=a(63766),l=a(19075),n=a(62718),d=a(10444),r=a(19186),i=a(96540),s=a(88934),c=a(42790),u=a(24013),g=a(33185);const h=(0,g.default)(o.Flex).attrs({alignItems:"center"}).withConfig({displayName:"styled__StyledButtonContainer",componentId:"sc-1glv09p-0"})(["position:sticky;bottom:0;"]);var p=a(52007),m=a(1390),f=a(74630),x=a(94404),b=a(74891),I=a(74848);const j=(0,x.A)((0,b.A)(o.Button)),y=e=>{let{disabled:t,nodeId:a,alertId:l,context:n,lastStatusChange:d,onClose:r,isLoading:g,small:x=!1,testid:b="alertDetailsModal"}=e;const y=(0,s.Zp)(),w=(0,u.Zl)(a),v=(0,i.useCallback)((()=>{r&&r(),y(w,l?{state:{alertId:l}}:{state:{contextToGo:n}})}),[w,l]),C=(0,c.rI)(),k=(0,i.useCallback)((()=>{const e=1e3*d,t=e-6e4;C((a=>({...a,highlight:{after:t,before:e},correlation:!0}))),v()}),[d,n,v,l]);return(0,I.jsx)(h,{justifyContent:"end",gap:2,children:(0,I.jsxs)(o.Flex,{gap:2,justifyContent:"end",children:[(0,I.jsx)(j,{small:x,onClick:k,flavour:"hollow",isLoading:g,icon:"correlation_inv",padding:[1,2],"data-testid":`${b}-runCorrelations-button`,"data-ga":"alert-modal::click-run-correlations::alerts-view",payload:{action:"Run correlations",alertId:l,nodeId:a},tooltip:"Run correlations",tooltipProps:{align:"bottom"},noWrapper:!0}),(0,I.jsx)(j,{small:x,onClick:v,flavour:"hollow",isLoading:g,disabled:g||t,padding:[1,2],icon:"metrics","data-testid":`${b}-goToNode-button`,"data-ga":"alert-modal::click-goto-chart::alerts-view",payload:{action:"Go to chart",alertId:l,nodeId:a},tooltip:"Go to chart",tooltipProps:{align:"bottom"},noWrapper:!0}),(0,I.jsx)(p.A,{alertId:l,nodeId:a,isLoading:g,small:x,"data-testid":`${b}-edit-alert-button`,icon:"pencilOutline",label:void 0,padding:[1,2],tooltip:"Edit alert configuration",tooltipProps:{align:"bottom"}}),(0,I.jsx)(m.A,{"data-testid":`${b}-troubleshoot-alert-button`,alertId:l,small:!0,flavour:"hollow",dropContainerProps:{iconContainerProps:{position:"relative",left:"45%"}},popoverProps:{localStorageKey:"dissmiss-ask-ai-popover-alert-page"},ui:"alert-page",padding:[1,2],label:void 0,tooltip:"Troubleshoot alert with AI",tooltipProps:{align:"bottom"},showPopover:!0}),(0,I.jsx)(f.A,{alertId:l,small:x,testid:b,padding:[1,2]})]})})},w=(0,i.memo)(y);var v=a(75894);const C=e=>{let{alertId:t,context:a,name:l,nodeId:n,status:r,lastStatusChange:i,fullyLoaded:s,isWebview:c}=e;const u=(0,d.J)();return(0,I.jsxs)(o.Flex,{justifyContent:"between",children:[(0,I.jsxs)(o.Flex,{alignItems:"center",gap:2,children:[(0,I.jsx)(o.TextBig,{color:"manuItem",children:l}),(0,I.jsx)(v.A,{margin:u?null:[.5,0,0],flavour:r,"data-testid":"alertView-statusPill",children:r})]}),!c&&s&&!u&&(0,I.jsx)(w,{lastStatusChange:i,alertId:t,context:a,name:l,nodeId:n,small:!0,testid:"alertView"})]})};var k=a(92318),A=a(60908);const T=g.default.img.withConfig({displayName:"sc-404__Illustration",componentId:"sc-4w81fg-0"})(["height:35%;width:35%;"]),L=g.default.div.withConfig({displayName:"sc-404__ButtonContainer",componentId:"sc-4w81fg-1"})(["margin:",";"],(0,o.getSizeBy)(4)),S=()=>{const e=`${k.A.assetsBaseURL}/img/no-nodes-room.svg`;return(0,I.jsx)(A.DL,{children:(0,I.jsxs)(o.Flex,{column:!0,alignItems:"center",justifyItems:"center",justifyContent:"center",height:"100%",width:"100%",padding:[0,0,"10%"],children:[(0,I.jsx)(T,{src:e,alt:"Unreachable alert",title:"Unreachable alert"}),(0,I.jsx)(o.H3,{children:"We couldn't find the alert"}),(0,I.jsx)(o.Text,{children:"This can be a temporary problem of that specific alert."}),(0,I.jsx)(L,{children:(0,I.jsx)(o.Button,{label:"Retry",icon:"reload"})})]})})};var _=a(81474),B=a(51262),E=a(12407);const P=e=>{let{children:t}=e;return(0,I.jsxs)(o.Flex,{background:"modalHeaderBackground",height:12,flex:!1,gap:4,padding:[0,2,0,4],alignItems:"center",children:[(0,I.jsx)(o.Icon,{name:"logo_s",color:"success",width:"23px"}),t]})},N=e=>{let{alertId:t,spaceId:a,roomId:i,isWebview:s}=e;const c=(0,r.XA)("name"),{isNodeRestricted:u}=(0,B.A)(),{fullyLoaded:g=!1,fullyLoading:h=!0,lastStatusChange:p,context:m,name:f,nodeId:x,status:b}=(0,l.JL)(t);(0,l.yk)(t,{spaceId:a,roomId:i});const j=(0,d.J)(),{restricted:y}=u(x);return y?(0,I.jsx)(A.Ay,{feature:"AlertDetailsViewRestricted",children:(0,I.jsx)(E.A,{})}):(0,I.jsx)(A.Ay,{feature:"AlertDetailsView",children:(0,I.jsxs)(o.Flex,{"data-testid":"alert-view-content",column:!0,padding:j?null:[0,0,10],background:j?"modalBackground":null,children:[!s&&j&&(0,I.jsx)(P,{children:(0,I.jsxs)(o.Flex,{column:!0,children:[(0,I.jsx)(o.H6,{color:"textLite",children:"ROOM"}),(0,I.jsx)(o.Text,{"data-testid":"alertView-mobile-roomName",children:c})]})}),(0,I.jsxs)(o.Flex,{column:!0,padding:[3],overflow:j?"auto":"visible",gap:3,children:[(0,I.jsx)(C,{alertId:t,context:m,status:b,name:f,nodeId:x,lastStatusChange:p,fullyLoaded:g,isWebview:s}),g?null:h?(0,I.jsx)(n.h4,{}):(0,I.jsx)(S,{}),g?(0,I.jsx)(_.A,{alertId:t,flavour:"alertPage"}):null]}),j&&(0,I.jsx)(o.Box,{position:"sticky",padding:[4],background:"modalBackground",bottom:0,border:{side:"top",color:"border"},children:(0,I.jsxs)(o.TextSmall,{children:["In order to ",(0,I.jsx)(o.TextSmall,{strong:!0,children:"Run Correlations"})," or"," ",(0,I.jsx)(o.TextSmall,{strong:!0,children:"View the Chart"})," you will have to visit this alert from its' dedicated page on a desktop device."]})})]})})}},96026:(e,t,a)=>{a.d(t,{l:()=>g,q:()=>u});a(25509),a(65223),a(60321),a(41927),a(11632),a(64377),a(66771),a(12516),a(68931),a(52514),a(35694),a(52774),a(49536),a(21926),a(94483),a(16215);var o=a(96540),l=a(88934),n=a(42790),d=a(61841),r=a(24609),i=a(24013),s=a(19075),c=a(91421);const u=e=>{let{alertId:t,alertName:a,nodeIds:n=[]}=e;const r=(0,l.Zp)(),{setState:u}=(0,c.$h)(),[g]=(0,d.Ay)(),{name:h}=(0,s.JL)(t),p=a||h,{isParent:m}=(0,i.xY)(n[0]),{loaded:f,value:x,hasError:b,error:I}=(0,c.wd)({node:{value:n[0],isParent:m},path:"/health"}),j=!!x?.tree?.["/health/alerts/prototypes"]?.[`health:alert:prototype:${p}`],[,y]=(0,c.PJ)();return{canEdit:f&&!b&&j,goToEdit:(0,o.useCallback)((e=>{n=e?Array.from(new Set([e,...n])):n,u({alertName:p,isAlert:!0}),y(!0,{nodeId:n[0]})}),[p,n,g,u,r]),error:I?.errorMessage||I}},g=()=>{const e=(0,l.Zp)(),{slug:t}=(0,r.ap)(),a=(0,n.rI)();return(0,o.useCallback)((o=>{o&&(a((e=>({...e,dyncfgSearchTerm:o}))),e(`/spaces/${t}/settings/configurations`,{replace:!0}))}),[e,a,t])}}}]);