From 5da14042f70711ea5cf66e034699730335462f66 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 5 May 2024 14:08:03 +0200 Subject: Merging upstream version 1.45.3+dfsg. Signed-off-by: Daniel Baumann --- src/web/gui/v2/3968.a5f7366160b7ac086dba.chunk.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/web/gui/v2/3968.a5f7366160b7ac086dba.chunk.js (limited to 'src/web/gui/v2/3968.a5f7366160b7ac086dba.chunk.js') diff --git a/src/web/gui/v2/3968.a5f7366160b7ac086dba.chunk.js b/src/web/gui/v2/3968.a5f7366160b7ac086dba.chunk.js new file mode 100644 index 000000000..9e8187f19 --- /dev/null +++ b/src/web/gui/v2/3968.a5f7366160b7ac086dba.chunk.js @@ -0,0 +1 @@ +!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2cc2cb61-d42c-4604-81a3-51f760d1ab73",e._sentryDebugIdIdentifier="sentry-dbid-2cc2cb61-d42c-4604-81a3-51f760d1ab73")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"08864407160b3973b9b88c5ae92687282b21e2f4"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[3968],{18686:(e,t,a)=>{a.d(t,{A:()=>o});var l=a(96540),n=a(10058),r=a(47731);const o=e=>{let{children:t}=e;return(0,r.J)()?l.createElement(n.Layer,{full:!0},l.createElement(n.Flex,{width:"100%",background:"mainBackground","data-testid":"alertView-mobileContainer"},t)):t}},41122:(e,t,a)=>{a.d(t,{A:()=>B});var l=a(96540),n=a(10058),r=a(64118),o=a(28738),d=a(47731),c=a(69765),i=a(11164),s=a(43407),m=a(5871),u=a(52768),g=a(47767),f=a(27467),p=a(47762),E=a(8711);const b=(0,E.default)(n.Flex).attrs({alignItems:"center"}).withConfig({displayName:"styled__StyledButtonContainer",componentId:"sc-1glv09p-0"})(["position:sticky;bottom:0;"]),h=e=>{let{disabled:t,nodeId:a,alertId:r,context:o,lastStatusChange:d,onClose:c,isLoading:i,small:s=!1,testid:m="alertDetailsModal"}=e;const u=(0,g.Zp)(),E=(0,p.Zl)(a),h=(0,l.useCallback)((()=>{c&&c(),u(E,r?{state:{alertId:r}}:{state:{contextToGo:o}})}),[E,r]),w=(0,f.rI)(),y=(0,l.useCallback)((()=>{const e=1e3*d;w({highlight:{after:e-6e4,before:e},correlation:!0}),h()}),[d,o,h,r]);return l.createElement(b,{justifyContent:"end",gap:2},l.createElement(n.Flex,{gap:2,justifyContent:"end"},l.createElement(n.Button,{small:s,label:"Run correlations",onClick:y,flavour:"hollow",isLoading:i,width:s?"112px":"170px","data-testid":"".concat(m,"-runCorrelations-button"),"data-ga":"alert-modal::click-run-correlations::alerts-view"}),l.createElement(n.Button,{small:s,label:"Go to chart",onClick:h,isLoading:i,disabled:i||t,width:s?"112px":"150px","data-testid":"".concat(m,"-goToNode-button"),"data-ga":"alert-modal::click-goto-chart::alerts-view"})))},w=(0,l.memo)(h);var y=a(7660),I=a(40267);const x=e=>{let{alertId:t,context:a,name:r,nodeId:o,status:c,lastStatusChange:i,fullyLoaded:s,isWebview:m}=e;const u=(0,d.J)(),g=u?n.H4:n.H0;return l.createElement(n.Flex,{column:!0,gap:4},l.createElement(n.Flex,{justifyContent:"between"},l.createElement(n.Flex,{alignItems:"center",gap:2},l.createElement(I.A,{margin:u?null:[.5,0,0],flavour:c,"data-testid":"alertView-statusPill"},c),l.createElement(g,{"data-testid":"alertView-alertName"},r)),!1),l.createElement(n.Flex,{justifyContent:"between",alignItems:"center"},l.createElement(y.A,{alertId:t}),!m&&s&&!u&&l.createElement(w,{lastStatusChange:i,alertId:t,context:a,name:r,nodeId:o,small:!0,testid:"alertView"})))};var C=a(68831),v=a(63314);const k=E.default.img.withConfig({displayName:"sc-404__Illustration",componentId:"sc-4w81fg-0"})(["height:35%;width:35%;"]),A=E.default.div.withConfig({displayName:"sc-404__ButtonContainer",componentId:"sc-4w81fg-1"})(["margin:",";"],(0,n.getSizeBy)(4)),L=()=>{const e="".concat(C.A.assetsBaseURL,"/img/no-nodes-room.svg");return l.createElement(v.DL,null,l.createElement(n.Flex,{column:!0,alignItems:"center",justifyItems:"center",justifyContent:"center",height:"100%",width:"100%",padding:[0,0,"10%"]},l.createElement(k,{src:e,alt:"Unreachable alert",title:"Unreachable alert"}),l.createElement(n.H3,null,"We couldn't find the alert"),l.createElement(n.Text,null,"This can be a temporary problem of that specific alert."),l.createElement(A,null,l.createElement(n.Button,{label:"Retry",icon:"reload"}))))};var S=a(4974),_=a(73865),V=a(85686);const F=e=>{let{children:t}=e;return l.createElement(n.Flex,{background:"modalHeaderBackground",height:12,flex:!1,gap:4,padding:[0,2,0,4],alignItems:"center"},l.createElement(n.Icon,{name:"logo_s",color:"success",width:"23px"}),t)},B=e=>{let{alertId:t,spaceId:a,roomId:g,isWebview:f,nodeName:p}=e;const E=(0,c.XA)("name"),{isNodeRestricted:b}=(0,_.A)(),{fullyLoaded:h=!1,fullyLoading:w=!0,info:y,units:I,lastStatusChangeValue:C,lastStatusChange:k,context:A,instance:B,name:N,nodeId:R,status:T,lastUpdated:D,value:J}=(0,r.JL)(t);(0,r.yk)(t,{spaceId:a,roomId:g});const j=(0,u.J4)(J,I),H=(0,u.J4)(C,I),U=(0,d.J)();return R&&b(R)?l.createElement(v.Ay,{feature:"AlertDetailsViewRestricted"},l.createElement(V.A,null)):l.createElement(v.Ay,{feature:"AlertDetailsView"},l.createElement(n.Flex,{column:!0,width:U?"100%":{max:280},padding:U?null:[0,0,10],background:U?"modalBackground":null},!f&&U&&l.createElement(F,null,l.createElement(n.Flex,{column:!0},l.createElement(n.H6,{color:"textLite"},"ROOM"),l.createElement(n.Text,{"data-testid":"alertView-mobile-roomName"},E))),l.createElement(n.Flex,{column:!0,padding:U?[3]:[0],overflow:U?"auto":"visible",gap:3},l.createElement(x,{alertId:t,context:A,status:T,name:N,nodeId:R,lastStatusChange:k,fullyLoaded:h,isWebview:f}),h?null:w?l.createElement(o.A,{title:"Loading alert..."}):l.createElement(L,null),h&&y&&l.createElement(l.Fragment,null,l.createElement(s.A,{iconName:"documentation"},"Alert Description"),l.createElement(n.Text,{"data-testid":"alertView-info"},y),l.createElement(S.A,{alertId:t})),h&&l.createElement(i.A,{id:t,context:A,instance:B,formattedLastValue:j,formattedLastStatusChangeValue:H,lastStatusChange:k,lastUpdated:D,isFormattedValueLoaded:h,nodeId:R,status:T,testid:"alertView",spaceId:a,roomId:g}),h&&l.createElement(m.A,{id:t,nodeName:p,testid:"alertView"})),U&&l.createElement(n.Box,{position:"sticky",padding:[4],background:"modalBackground",bottom:0,border:{side:"top",color:"border"}},l.createElement(n.TextSmall,null,"In order to ",l.createElement(n.TextSmall,{strong:!0},"Run Correlations")," or"," ",l.createElement(n.TextSmall,{strong:!0},"View the Chart")," you will have to visit this alert from its' dedicated page on a desktop device."))))}},73968:(e,t,a)=>{a.r(t),a.d(t,{default:()=>g});var l=a(96540),n=a(54621),r=a(64118),o=a(83084),d=a(28738),c=a(47767),i=a(45588),s=a(86663);var m=a(41122),u=a(18686);const g=()=>{const e=(()=>{const{alertId:e,...t}=(0,c.g)(),{search:a}=(0,c.zy)(),{transition:n}=s.parse(a),r=(0,l.useRef)(n||e),o=(0,c.Zp)();return(0,l.useEffect)((()=>{n&&n!==e&&o((0,i.tW)("/spaces/:spaceSlug/rooms/:roomSlug/alerts/".concat(n),t),{replace:!0})}),[e,n]),r.current})(),{name:t="unknown alert",fullyLoaded:a=!1}=(0,r.JL)(e),g=(0,r.x)();return(0,n.ZB)({title:t,id:e,destination:e,params:location.hash,type:"alerts",isReady:a}),g?l.createElement(o.A,{overflow:{vertical:"auto"},margin:[0,0,8],padding:[3]},g&&l.createElement(u.A,null,l.createElement(m.A,{alertId:e}))):l.createElement(d.A,{title:"Loading alert..."})}}}]); \ No newline at end of file -- cgit v1.2.3