diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-25 17:33:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-25 17:34:10 +0000 |
commit | 83ba6762cc43d9db581b979bb5e3445669e46cc2 (patch) | |
tree | 2e69833b43f791ed253a7a20318b767ebe56cdb8 /src/web/gui/v2/9473.4fd4742ffb6b5348bea8.chunk.js | |
parent | Releasing debian version 1.47.5-1. (diff) | |
download | netdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.tar.xz netdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.zip |
Merging upstream version 2.0.3+dfsg (Closes: #923993, #1042533, #1045145).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/web/gui/v2/9473.4fd4742ffb6b5348bea8.chunk.js')
-rw-r--r-- | src/web/gui/v2/9473.4fd4742ffb6b5348bea8.chunk.js | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/web/gui/v2/9473.4fd4742ffb6b5348bea8.chunk.js b/src/web/gui/v2/9473.4fd4742ffb6b5348bea8.chunk.js deleted file mode 100644 index ec6f0f2ae..000000000 --- a/src/web/gui/v2/9473.4fd4742ffb6b5348bea8.chunk.js +++ /dev/null @@ -1 +0,0 @@ -!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]="d8fef4ac-14dc-4d3b-bf8b-36c3bcc25e90",e._sentryDebugIdIdentifier="sentry-dbid-d8fef4ac-14dc-4d3b-bf8b-36c3bcc25e90")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"30b1ba65cc8722be7e184f4a401fb43e6b21634d"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[9473],{36196:(e,t,a)=>{a.d(t,{A:()=>y});var n=a(58168),o=a(96540),l=a(22332),r=a(10534),c=a(89380),s=a(25369),i=a(39360),d=a(95662),u=a(99891),m=a(49096),g=a(74487),p=a(64131);const h=(0,o.forwardRef)(((e,t)=>{let{width:a,height:l,...r}=e;return o.createElement(c.ChartWrapper,{width:a,height:l},o.createElement(p.N1,(0,n.A)({hasHeader:!1,hasFilters:!1,hasFooter:!1,width:a,height:l},r,{ref:t})))})),f=(0,r.default)(h,{tile:!0}),E={dygraph:p.Ay,easypiechart:u.Ay,gauge:i.Ay,number:m.Ay,groupBoxes:s.Ay,d3pie:d.Ay,bars:g.Ay},v=e=>{const t=(0,l.useChart)(),a=(0,l.useAttributeValue)("sparkline"),r=(0,l.useAttributeValue)("chartLibrary"),c=(0,o.useMemo)((()=>t?a?f:E[r]:null),[t,r,a]);return c?o.createElement(c,(0,n.A)({},e,{chart:t})):null},y=(0,l.withChartProvider)((0,o.memo)(v))},85686:(e,t,a)=>{a.d(t,{A:()=>d});var n=a(96540),o=a(8711),l=a(83199),r=a(6586),c=a(12602);const s=(0,o.default)(l.Flex).withConfig({displayName:"restrictedContentMessage__StyledBox",componentId:"sc-wbsw81-0"})(["transform:translate(-50%,-50%);"]),i={node:"This node is locked so you can't see the Single Node dashboard.",alert:"This node is locked so you can't see the full alert details. ",dashboard:"This dashboard is locked so you can't see it."},d=e=>{let{flavour:t="node"}=e;return n.createElement(s,{column:!0,width:"100%",gap:2,alignItems:"center",position:"absolute",top:"50%",left:"50%",padding:[4],round:2},n.createElement(l.TextBigger,null,i[t]||""),n.createElement(c.A,null,n.createElement(l.TextBig,{color:"primary"},"Upgrade for no limitations!")),n.createElement(l.TextBig,null,"or"),n.createElement(r.A,null,n.createElement(l.TextBig,{color:"primary"},"Change your active node selection to unlock it.")))}},40267:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(96540),o=a(83199);const l=e=>{let{flavour:t,icon:a,children:l}=e;return n.createElement(o.Pill,{icon:a,textProps:{textTransform:"capitalize"},flavour:t},l)}},4974:(e,t,a)=>{a.d(t,{A:()=>d});a(62953);var n=a(96540),o=a(83199),l=a(64118),r=(a(25440),a(26655));var c=a(4659),s=a(69765),i=a(51913);const d=e=>{let{alertId:t}=e;const a=(0,l.JL)(t),{name:d="unknown alert"}=a,[u,m]=(e=>{const[t,a]=(0,n.useState)(!0),o="".concat("https://community.netdata.cloud/t","/").concat(null===e||void 0===e?void 0:e.replace(/[._]/g,"-"));return(0,n.useEffect)((()=>{e&&r.A.get(o).then((()=>a(!1))).catch((()=>a(!0)))}),[e]),[o,t]})(d),g=(0,s.ID)(),[,p]=(0,i.bg)(),h=(0,n.useMemo)((()=>({alignSelf:"start",onClick:()=>p({roomId:g,alert:a})})),[u,m,p]);return n.createElement(c.A,h,"Learn more about this alert",!m&&n.createElement(o.Icon,{name:"arrow_left",rotate:2,size:"small",margin:[0,0,-.75,1],color:"success"}))}},43407:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(58168),o=a(96540),l=a(83199);const r=e=>{let{iconName:t,iconSize:a,children:r,...c}=e;return o.createElement(l.Flex,(0,n.A)({gap:2,alignItems:"center"},c),o.createElement(l.Icon,(0,n.A)({name:t,color:"textLite"},a&&{height:a,width:a})),o.createElement(l.Text,{strong:!0},r))}},7660:(e,t,a)=>{a.d(t,{A:()=>u});var n=a(58168),o=a(96540),l=a(83199),r=a(64118),c=a(21290),s=a(45976),i=a(52768);const d=e=>{let{label:t,testid:a,status:n,value:r,when:d,units:u}=e;const{localeTimeString:m,localeDateString:g}=(0,c.$j)(),p=(0,o.useMemo)((()=>{const e=new Date(1e3*d);return e&&"".concat(g(e,{long:!1})," ").concat(m(e,{secs:!0}))}),[d,g,m]),h=(0,i.J4)(r,u);return o.createElement(l.Flex,{gap:2,alignItems:"center"},o.createElement(l.Flex,{width:"100px"},o.createElement(l.TextSmall,null,t)),o.createElement(l.Flex,{gap:2,alignItems:"center"},o.createElement(l.TextSmall,{color:"text","data-testid":"".concat(a,"-dateTime")},p),o.createElement(s.A,{loaded:!0,status:n,valueWithUnit:h,"data-testid":"".concat(a,"-value")})))},u=e=>{let{alertId:t,...a}=e;const{fullyLoaded:c=!1,units:s,lastStatusChangeValue:i,lastStatusChange:u,status:m,lastUpdated:g,value:p,prevStatus:h,prevValue:f,prevDuration:E}=(0,r.JL)(t);return c?o.createElement(l.Flex,(0,n.A)({gap:2,column:!0,"data-testid":"alertValues"},a),g&&o.createElement(d,{label:"Latest",status:m,testid:"alertValues-latest",value:p,when:g,units:s}),u&&o.createElement(d,{label:"CLEAR"===m?"WARNING"===h||"CRITICAL"===h?"Cleared":"Initialized":"Triggered",status:m,testid:"alertValues-triggered",value:i,when:u,units:s})):null}},11164:(e,t,a)=>{a.d(t,{A:()=>E});var n=a(96540),o=a(36196),l=a(63950),r=a.n(l),c=a(83199),s=a(57605),i=a(28738),d=a(3914),u=a(69765),m=a(80925),g=a(47731),p=a(52768);const h=e=>t=>"alert-modal::".concat(e.getAttribute("id"),"::").concat(t),f={width:"108px",height:"77px"},E=e=>{let{instance:t,context:a,isFormattedValueLoaded:l,nodeId:E,status:v,lastStatusChange:y,formattedLastStatusChangeValue:b,lastUpdated:x,spaceId:w,roomId:A,setChartSelected:I=r()}=e;const k=(0,d.vt)();w=w||k;const C=(0,u.ID)();A=A||C;const S=(0,g.J)(),T=(0,m.e)(),N=(0,s.A)();(0,n.useEffect)((()=>(N(),N)),[]);const L=(0,d.dg)(),_=(0,n.useMemo)((()=>{if(!l)return;const e=T.makeChart({attributes:{nodeId:E,contextScope:[a],selectedInstances:t&&E?["".concat(t,"@").concat(E)]:[],id:t,roomId:A,enabledResetRange:!1,overlays:{proceeded:{type:"proceeded"},alarm:{type:"alarm",status:v,value:b,when:y}},host:L?"".concat(window.envSettings.agentApiUrl,"/api/v2"):"".concat(window.envSettings.apiUrl,"/api/v3/spaces/").concat(w,"/rooms/").concat(A),nodesScope:[E],toolboxElements:[],sparkline:S,hasToolbox:!S},makeTrack:h});return T.getRoot().appendChild(e),e}),[t,l]);return(0,p.Vt)({lastUpdated:x,lastStatusChange:y},l),(0,n.useEffect)((()=>(I((e=>({...e,..._}))),()=>{_&&_.destroy(),I(null)})),[_]),n.createElement(c.Flex,{flex:!1,width:"100%",height:75},l&&_?n.createElement(o.A,{"data-chartid":t,chart:_,hasHeader:!S,hasFooter:!S}):n.createElement(i.A,{iconProps:f,title:"Loading chart..."}))}},87815:(e,t,a)=>{a.d(t,{A:()=>i});var n=a(58168),o=(a(25440),a(96540)),l=a(8711),r=a(83199),c=a(52768);const s=l.default.div.withConfig({displayName:"timeCell__TimeBox",componentId:"sc-1k785pi-0"})(["display:flex;flex-direction:column;align-items:start;justify-content:center;"]),i=e=>{let{rawTime:t,secs:a,long:l,nowrap:i=!1,...d}=e;const{timeAgo:u,formattedDate:m=""}=(0,c.lT)({rawTime:t,secs:a,long:l});return o.createElement(s,d,o.createElement(r.TextSmall,null,u),o.createElement(r.TextMicro,(0,n.A)({color:"textLite"},i&&{whiteSpace:"nowrap"}),m?null===m||void 0===m?void 0:m.replace(/ /g," - "):""))}},5871:(e,t,a)=>{a.d(t,{A:()=>D});var n=a(96540),o=a(83199),l=a(64118),r=a(87292),c=a(8711);const s=c.default.div.withConfig({displayName:"styled__StyledAlertTypeIndicator",componentId:"sc-19nk935-0"})(["width:",";height:",";border-radius:",";background-color:",";"],(0,o.getSizeBy)(1),(0,o.getSizeBy)(1),(0,o.getSizeBy)(1),(e=>{let{critical:t,theme:a}=e;return(0,o.getColor)(t?"error":["yellow","sunglow"])({theme:a})})),i=c.default.a.withConfig({displayName:"styled__StyledLink",componentId:"sc-19nk935-1"})(["padding:",";text-decoration:none;color:",";&:visited{color:",";}&:hover{text-decoration:none;}"],(e=>{let{padding:t}=e;return null!==t&&void 0!==t?t:"0"}),(0,o.getColor)("success"),(0,o.getColor)("success"));var d=a(29217);const u=e=>{let{title:t,value:a,testId:l,status:c}=e;return a?n.createElement(n.Fragment,null,n.createElement(o.Flex,{justifyContent:"between"},n.createElement(o.Flex,{gap:1,alignItems:"center"},n.createElement(s,{critical:"critical"===c}),n.createElement(o.H6,{color:"textDescription"},t)),n.createElement(o.Flex,{gap:1,alignItems:"center"},n.createElement(o.TextSmall,{color:"textDescription"},"More details about"," ",n.createElement(o.TextSmall,{strong:!0,color:"textDescription"},"$this")," ","command"),n.createElement(d.A,{content:"The $this value comes from the DB Lookup or the Calculation above",isBasic:!0,plain:!0},n.createElement(o.Flex,{margin:[-.5,0,0]},n.createElement(o.Icon,{name:"informationPress",color:"textLite",width:"16px",height:"16px"}))))),n.createElement(r.Ay,{"data-testid":l},a)):null};var m=a(31826),g=a(93001),p=a(29708);const h=e=>{if("string"===typeof e&&(e=parseInt(e,10)),0===e)return"now";const t=new Date;return e<0?(0,m.k)((0,g.p)(t,e),t,{addSuffix:!0}):(0,m.k)((0,p.W)(t,e),t,{addSuffix:!0})},f=e=>{const{instance:t,lookupAfter:a,lookupBefore:o,lookupDimensions:r,lookupMethod:c,lookupOptions:s}=(0,l.JL)(e);return(0,n.useMemo)((()=>a?(e=>{let{lookupOptions:t,lookupDimensions:a,lookupMethod:n,lookupAfter:o,lookupBefore:l,instance:r}=e,c="of all values";if(a){const e=a.split(","),t=e.length>1?"of the sum of dimensions":"of all values of dimension";c="".concat(t," ").concat(e.join(", "))}const s=t?", with options ".concat(t):"";return"".concat(n," ").concat(c," of chart ").concat(r,", starting ").concat(h(o+l)," and up to ").concat(h(l)).concat(s)})({lookupOptions:s,lookupDimensions:r,lookupMethod:c,lookupAfter:a,lookupBefore:o,instance:t}):""),[a,t])};var E=a(43407);const v=e=>{let{heading:t,value:a,testId:l}=e;return a&&a.length?n.createElement(o.Flex,{column:!0,gap:3},t&&n.createElement(o.H6,{textTransform:"uppercase",color:"textDescription"},t),n.createElement(r.Ay,{"data-testid":l},a)):null},y=(0,n.memo)(v);var b=a(25232),x=a(58168);const w=e=>{let{iconName:t,category:a,iconSize:l="16px",value:r,testid:c}=e;return r?n.createElement(o.Flex,{alignItems:"center",gap:1},n.createElement(o.Flex,{alignItems:"center",gap:1,basis:"100px"},n.createElement(o.Icon,(0,x.A)({name:t,color:"textLite"},l&&{height:l,width:l})),n.createElement(o.TextSmall,{whiteSpace:"nowrap",color:"textDescription"},a,":")),n.createElement(o.TextSmall,{strong:!0,"data-testid":c},r)):null},A=e=>{let{id:t,testid:a}=e;const{calculation:r,warning:c,critical:i,updateEvery:d}=(0,l.JL)(t),m=f(t),g=(0,n.useMemo)((()=>(0,b.Ay)(r)),[r]);return n.createElement(o.Flex,{column:!0,gap:4},n.createElement(E.A,{iconName:"code"},"Configuration"),n.createElement(y,{heading:"DB lookup",value:m,testId:"".concat(a,"-lookup")}),n.createElement(y,{heading:"Calculation",value:g,testId:"".concat(a,"-calculation")}),n.createElement(o.H6,{textTransform:"uppercase",color:"textDescription"},"Severity Conditions"),n.createElement(o.Flex,{column:!0,gap:2},n.createElement(u,{title:"Warning when",value:c,testId:"".concat(a,"-warningWhen"),status:"warning"},n.createElement(s,{critical:!1})),n.createElement(u,{title:"Critical when",value:i,testId:"".concat(a,"-criticalWhen"),status:"critical"},n.createElement(s,{critical:!0}))),n.createElement(o.H6,{textTransform:"uppercase",color:"textDescription"},"Check"),n.createElement(w,{iconName:"clock_hollow",category:"Check every",value:"".concat(d," seconds"),testid:"".concat(a,"-checkEvery")}))},I=(0,n.memo)(A);var k=a(47762),C=a(92861),S=a(40267),T=a(87815),N=a(45976);const L=e=>{let{isHighlighted:t,lastStatusChangeValue:a,lastStatusChange:l,units:r,status:c,nodeName:s,...i}=e;return n.createElement(o.Flex,(0,x.A)({background:t&&"modalTabsBackground",border:{side:"all",color:"borderSecondary"},color:"textDescription",justifyContent:"between",padding:[4],round:!0},i),n.createElement(o.Flex,{column:!0,justifyContent:"between",gap:2},s&&n.createElement(o.Text,{strong:!0},s),n.createElement(T.A,{rawTime:l,secs:!0,"data-testid":"nodeItem-lastStatusChange"})),n.createElement(o.Flex,{height:5,gap:2,alignItems:"center",alignSelf:"start"},n.createElement(d.A,{content:"CLEAR"===c?"Cleared value":"Triggered value",align:"bottom"},n.createElement(o.Box,null,n.createElement(N.A,{loaded:!0,status:c,units:r,value:a,"data-testid":"nodeItem-alertValue"}))),n.createElement(S.A,{flavour:c,icon:"alarm_bell","data-testid":"alertView-alertPill-value"},c)))};var _=a(38966);const F=e=>{let{children:t}=e;return n.createElement(o.Flex,{gap:2,column:!0},t)},D=e=>{let{id:t,nodeName:a,testid:r="alertDetailsModal"}=e;const{class:c,instanceName:s,component:d,family:u,nodeId:m,type:g,lastStatusChangeValue:p,lastStatusChange:h,units:f,status:v,notificationType:y}=(0,l.JL)(t),b=(0,k.xY)(m,"name");return n.createElement(o.Flex,{column:!0,gap:4,padding:[0,0,4,0]},n.createElement(E.A,{iconName:"information",margin:[0,0,0,-.5]},"Alert Info"),n.createElement(F,null,n.createElement(w,{iconName:"nodes_hollow",category:"Node",value:a||b,testid:"".concat(r,"-hostname")}),n.createElement(w,{iconName:"charts_view",category:"Instance",value:s,testid:"".concat(r,"-chartId")}),n.createElement(w,{iconName:"data_retention",category:"Type",value:g,testid:"".concat(r,"-type")}),n.createElement(w,{iconName:"last_week",category:"Hostname"}),n.createElement(w,{iconName:"metrics",category:"Component",value:d,testid:"".concat(r,"-component")}),n.createElement(w,{iconName:"applications_hollow",category:"Family",value:u,testid:"".concat(r,"-family")}),n.createElement(w,{iconName:"networkingStack",category:"Class",value:c,testid:"".concat(r,"-class")}),n.createElement(w,{iconName:"incident_manager",category:"Event ID",testid:"".concat(r,"-eventId")})),n.createElement(I,{id:t,testid:r}),n.createElement(E.A,{iconName:"nodes_hollow",iconSize:"20px"},"Instance Values - Node Instances"),n.createElement(o.Flex,{column:!0,gap:2},"agent"!==y&&n.createElement(o.Text,{color:"textDescription"},"A node may be claimed through multiple instances on the cloud (streaming through parent) and Netdata aggregates the alerts from all the instances and displays a single Active alert based on the highest severity, latest change."),n.createElement(L,{lastStatusChangeValue:p,lastStatusChange:h,units:f,status:v,nodeName:b,isHighlighted:!0})),n.createElement(E.A,{iconName:"gear",iconSize:"20px"},"Edit Alert"),n.createElement(o.Flex,{gap:2},n.createElement(_.A,{alertId:t,nodeId:m,small:!0,"data-testid":"".concat(r,"-edit-alert-button-footer")}),n.createElement(i,{href:C.UW,target:"_blank",padding:"0 4px 0 0","data-testid":"".concat(r,"-editAlertConfig-link"),"data-ga":"alert-modal::click-edit::alerts-view"},"Visit the documentation",n.createElement(o.Icon,{name:"arrow_left",rotate:2,size:"small",margin:[0,0,-.75,1],color:"success"}))))}},45976:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(58168),o=a(96540),l=a(83199),r=a(20081);const c={critical:{background:"errorSemi",border:{side:"all",color:"error"},color:"error"},warning:{background:"warningSemi",border:{side:"all",color:"warning"},color:"warning"},cleared:{background:"successSemi",border:{side:"all",color:"success"},color:"success"},default:{background:"generic",border:{side:"all",color:"border"},color:"text"}},s=e=>{let{loaded:t,status:a,units:s,value:i,valueWithUnit:d,...u}=e;const{background:m,border:g,color:p}=c[a]||c.default,h=(0,o.useMemo)((()=>{if(d)return d;if(void 0===i)return"-";const e=(0,r.W)(i);return"".concat(e," ").concat(s||"-")}),[i,d,s]);return o.createElement(l.Flex,(0,n.A)({background:m,border:g,padding:[.5,2],round:9,width:{min:10},justifyContent:"center"},u),o.createElement(l.TextSmall,{color:p,strong:!0,whiteSpace:"nowrap",truncate:!0},t?h:"-"))}},51913:(e,t,a)=>{a.d(t,{ZV:()=>b,bg:()=>h,vQ:()=>p,Ws:()=>f,Gp:()=>y,MY:()=>v});a(17333),a(3064),a(41393),a(98992),a(54520),a(72577),a(81454),a(62953);var n=a(96540),o=a(47444),l=a(26655),r=a(49286);var c=a(3914),s=a(69765);const i=(0,o.eU)({key:"assistantAlert",default:null}),d=(0,o.eU)({key:"assistantAlertsAtom",default:[]}),u=(0,o.eU)({key:"assistantChatAtom",default:{open:!1,messages:[]}});var m=a(33829);const g=(0,o.K0)({key:"assistantAlertSelector",get:e=>{let{space:t,room:a,alert:n,node:o,chart:r}=e;return()=>(e=>{let{space:t,room:a,alert:n,node:o,chart:r}=e;return l.A.post("/api/v1/troubleshoot",{space:t,room:a,alarm:n,node:o,chart:r})})({space:t,room:a,alert:n,node:o||"dummy-node-id",chart:r||"dummy-chart-id"})},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),p=e=>{var t;let{alert:a,node:n,chart:l}=e;const r=(0,c.vt)(),i=(0,s.ID)(),d=(0,o.xf)(g({space:r,room:i,alert:a,node:n,chart:l}));return{loaded:"loading"!==d.state,value:null===(t=d.contents)||void 0===t?void 0:t.data,hasError:"hasError"===d.state}},h=()=>(0,o.L4)(i),f=()=>(0,o.L4)(d),E=()=>(0,o.L4)(u),v=()=>{const[e,t]=E(),a=(0,n.useCallback)((()=>t((e=>({...e,open:!0})))),[t]),o=(0,n.useCallback)((()=>t((e=>({...e,open:!1})))),[t]);return[null===e||void 0===e?void 0:e.open,a,o]},y=()=>{const[e,t]=E(),a=(0,n.useCallback)((e=>t((t=>({...t,messages:[...t.messages,e]})))),[t]),o=(0,n.useCallback)((()=>{t((e=>({...e,messages:[]})))}),[t]),l=(0,n.useMemo)((()=>e.open&&!!e.messages.find((e=>{let{pending:t}=e;return!!t}))),[e]);return{messages:null===e||void 0===e?void 0:e.messages,pending:l,addMessage:a,clear:o}},b=()=>{const e=(()=>{const{addMessage:e}=y();return(0,n.useCallback)((t=>{const a=(0,m.A)();return e({id:a,type:"question",value:t}),a}),[e])})(),t=(()=>{const{addMessage:e}=y();return(0,n.useCallback)((t=>{let{questionId:a,pending:n,answer:o}=t;return e({id:(0,m.A)(),questionId:a,type:"answer",value:o,pending:n})}),[e])})(),a=(()=>{const[,e]=E();return(0,n.useCallback)((t=>{let{questionId:a,value:n,additionalInfo:o,error:l}=t;e((e=>({...e,messages:e.messages.map((e=>e.questionId==a?{...e,pending:!1,value:n,additionalInfo:o,error:l}:e))})))}),[])})();return(0,n.useCallback)((n=>{const o=e(n);var c;t({questionId:o,pending:!0}),(c=n,l.A.post("/api/v1/chat",{messages:[{role:"user",content:c}]},{transform:e=>(0,r.bn)(e)})).then((function(){let{data:e={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{session:{messages:t},additionalInfo:n}=e,l=(t||[]).filter((e=>{let{role:t}=e;return"assistant"==t})),r=l.length?l[l.length-1]:null;null!==r&&void 0!==r&&r.content?a({questionId:o,value:r.content,additionalInfo:n}):a({questionId:o,error:"Something went wrong"})})).catch((e=>{a({questionId:o,error:e.message||"Something went wrong"})}))}),[e,a])}},38966:(e,t,a)=>{a.d(t,{A:()=>i});var n=a(58168),o=a(96540),l=a(83199),r=a(14125),c=a(47130);const s=(0,a(92155).A)((0,c.A)(l.Button)),i=e=>{let{alertId:t,nodeId:a,small:l=!1,isLoading:c,disabled:i,...d}=e;const{canEdit:u,goToEdit:m}=(0,r.q)({nodeId:a,alertId:t});return o.createElement(s,(0,n.A)({small:l,label:"Edit alert",onClick:m,flavour:"hollow",isLoading:c,disabled:c||!u||i,width:l?"112px":"150px","data-ga":"alert-modal::click-edit-congiguration::alerts-view",payload:{action:"Edit alert",alertId:t,nodeId:a},tooltip:u?null:"You cannot edit this alert."},d))}},14125:(e,t,a)=>{a.d(t,{l:()=>m,q:()=>u});a(62953);var n=a(96540),o=a(47767),l=a(27467),r=a(97054),c=a(3914),s=a(47762),i=a(64118),d=a(8239);const u=e=>{var t;let{alertId:a,alertName:l,nodeId:c,nodes:u}=e;const m=(0,o.Zp)(),{setState:g}=(0,d.L5)(),[p]=(0,r.Ay)(),{name:h}=(0,i.JL)(a),f=l||h,{isParent:E}=(0,s.xY)(c),{loaded:v,value:y,hasError:b,error:x}=(0,d.wd)({node:{value:c,isParent:E},path:"/health"}),w=!(null===y||void 0===y||null===(t=y.tree)||void 0===t||null===(t=t["/health/alerts/prototypes"])||void 0===t||!t["health:alert:prototype:".concat(f)]);return{canEdit:v&&!b&&w,goToEdit:(0,n.useCallback)((()=>{g({nodeId:c,alertName:f,nodeIds:u,isAlert:!0}),m("/spaces/".concat(p,"/settings/configurations"),{replace:!0})}),[g,m,p,c,f]),error:(null===x||void 0===x?void 0:x.errorMessage)||x}},m=()=>{const e=(0,o.Zp)(),{slug:t}=(0,c.ap)(),[,a]=(0,l.N9)();return(0,n.useCallback)((n=>{n&&(a({dyncfgSearchTerm:n}),e("/spaces/".concat(t,"/settings/configurations"),{replace:!0}))}),[e,a,t])}},97054:(e,t,a)=>{a.d(t,{Ay:()=>d,KI:()=>i,TP:()=>s});var n=a(96540),o=a(47767),l=a(69765),r=a(3914);const c=(e,t,a)=>{const o=t();(0,n.useLayoutEffect)((()=>{o!==e&&a(e)}),[o,e])},s=()=>{const{roomSlug:e}=(0,o.g)(),t=(0,l.A2)();return c(e,l.QW,t),e},i=()=>{const{spaceSlug:e}=(0,o.g)(),t=(0,r.hX)();return c(e,r.bq,t),e},d=()=>[i(),s()]}}]);
\ No newline at end of file |