diff options
Diffstat (limited to 'src/web/gui/v2/9473.3693c06a873280f11bd6.chunk.js')
-rw-r--r-- | src/web/gui/v2/9473.3693c06a873280f11bd6.chunk.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/web/gui/v2/9473.3693c06a873280f11bd6.chunk.js b/src/web/gui/v2/9473.3693c06a873280f11bd6.chunk.js new file mode 100644 index 000000000..1f2ccbd0a --- /dev/null +++ b/src/web/gui/v2/9473.3693c06a873280f11bd6.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]="9a39c2ea-6885-4e4d-a33c-b8b274ec8cf7",e._sentryDebugIdIdentifier="sentry-dbid-9a39c2ea-6885-4e4d-a33c-b8b274ec8cf7")}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([[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(10058),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(10058);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(10058),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(10058);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(10058),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(10058),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:x,lastUpdated:w,spaceId:b,roomId:A,setChartSelected:k=r()}=e;const I=(0,d.vt)();b=b||I;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 _=(0,d.dg)(),F=(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:x,when:y}},host:_?"".concat(window.envSettings.agentApiUrl,"/api/v2"):"".concat(window.envSettings.apiUrl,"/api/v3/spaces/").concat(b,"/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:w,lastStatusChange:y},l),(0,n.useEffect)((()=>(k((e=>({...e,...F}))),()=>{F&&F.destroy(),k(null)})),[F]),n.createElement(c.Flex,{flex:!1,width:"100%",height:75},l&&F?n.createElement(o.A,{"data-chartid":t,chart:F,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(10058),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(10058),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 x=a(25232),w=a(58168);const b=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,w.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,x.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(b,{iconName:"clock_hollow",category:"Check every",value:"".concat(d," seconds"),testid:"".concat(a,"-checkEvery")}))},k=(0,n.memo)(A);var I=a(47762),C=a(92861),S=a(40267),T=a(87815),N=a(45976);const _=e=>{let{isHighlighted:t,lastStatusChangeValue:a,lastStatusChange:l,units:r,status:c,nodeName:s,...i}=e;return n.createElement(o.Flex,(0,w.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)))},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),x=(0,I.xY)(m,"name");return n.createElement(o.Flex,{column:!0,gap:4},n.createElement(E.A,{iconName:"information",margin:[0,0,0,-.5]},"Alert Info"),n.createElement(F,null,n.createElement(b,{iconName:"nodes_hollow",category:"Node",value:a||x,testid:"".concat(r,"-hostname")}),n.createElement(b,{iconName:"charts_view",category:"Instance",value:s,testid:"".concat(r,"-chartId")}),n.createElement(b,{iconName:"data_retention",category:"Type",value:g,testid:"".concat(r,"-type")}),n.createElement(b,{iconName:"last_week",category:"Hostname"}),n.createElement(b,{iconName:"metrics",category:"Component",value:d,testid:"".concat(r,"-component")}),n.createElement(b,{iconName:"applications_hollow",category:"Family",value:u,testid:"".concat(r,"-family")}),n.createElement(b,{iconName:"networkingStack",category:"Class",value:c,testid:"".concat(r,"-class")}),n.createElement(b,{iconName:"incident_manager",category:"Event ID",testid:"".concat(r,"-eventId")})),n.createElement(k,{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(_,{lastStatusChangeValue:p,lastStatusChange:h,units:f,status:v,nodeName:x,isHighlighted:!0})),n.createElement(E.A,{iconName:"gear",iconSize:"20px"},"Edit Alert"),n.createElement(o.Text,{"data-testid":"".concat(r,"-edit-info")},"If you wish to edit and configure this alert, please:"),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(10058),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:()=>x,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}},x=()=>{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])}}}]);
\ No newline at end of file |