From 58daab21cd043e1dc37024a7f99b396788372918 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 9 Mar 2024 14:19:48 +0100 Subject: Merging upstream version 1.44.3. Signed-off-by: Daniel Baumann --- web/gui/v2/4814.4aa06ec12491f116137a.chunk.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 web/gui/v2/4814.4aa06ec12491f116137a.chunk.js (limited to 'web/gui/v2/4814.4aa06ec12491f116137a.chunk.js') diff --git a/web/gui/v2/4814.4aa06ec12491f116137a.chunk.js b/web/gui/v2/4814.4aa06ec12491f116137a.chunk.js new file mode 100644 index 00000000..05815337 --- /dev/null +++ b/web/gui/v2/4814.4aa06ec12491f116137a.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]="1eae1454-93df-4ebe-93db-149489ae54d1",e._sentryDebugIdIdentifier="sentry-dbid-1eae1454-93df-4ebe-93db-149489ae54d1")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"8b7b01b6c705cf50f8050ce0fb8fc6b58fe68567"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[4814],{52428:function(e,t,n){n.d(t,{J:function(){return d}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(58206),a=n(52631),l=n(74855);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};return function(){(0,o.Z)(e);var n=(0,l.sc)(c(c({header:"Copied",text:"Command copied to your clipboard! Please run it on your node's terminal.",icon:"gear"},t),{},{success:!0}));a.Z.success(n,{context:"copy"})}}},57387:function(e,t,n){n.d(t,{ZM:function(){return b}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(45987),o=n(4942),a=n(67294),l=n(71893),i=n(93416),c=n(52428),d=["children"],s=["children","confirmationText","commandText"];function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var m=(0,l.default)(i.Box).attrs((function(e){return function(e){for(var t=1;t1&&o.createElement(s.Box,{margin:[0,0,2,0]},o.createElement(s.Select,{"data-testid":"".concat(t,"-assistant-modal-alerts-select"),onChange:function(e){var t=e.value;return p({roomId:d,alert:{name:t}})},styles:{size:"tiny"},menuPlacement:"auto",options:c,value:{value:t,label:t}})),1==c.length&&o.createElement(f,{label:"Alert",value:t}),b&&o.createElement(f,{label:"Node",value:b}),i&&o.createElement(f,{label:"Chart id",value:i}))},b=n(87462),g=function(e){return o.createElement(s.Box,(0,b.Z)({as:"hr",height:"1px",width:"100%",sx:{borderWidth:"1px 0px 0px 0px",borderColor:"borderSecondary",borderStyle:"solid"}},e))},h=n(45987),v=(n(9653),n(91008)),x=n(57387),y=n(46189),E=["level"],w=["children"],C=["children","href"],Z=["content"],k=["content"],O=["ordered","children"],I=i.default.ol.withConfig({displayName:"markdocSchema__OrderedList",componentId:"sc-1maymd4-0"})(["list-style:roman;padding-left:14px;"]),S=i.default.ul.withConfig({displayName:"markdocSchema__UnorderedList",componentId:"sc-1maymd4-1"})(['list-style-image:url("','/img/list-style-image.svg");padding-left:14px;'],y.Z.assetsBaseURL),_={heading:{render:function(e){var t=e.level,n=void 0===t?1:t,r=(0,h.Z)(e,E),a=s.H1;switch(n){case 2:a=s.H2;break;case 3:a=s.H3;break;case 4:a=s.H4;break;case 5:a=s.H5;break;case 6:a=s.H6}return o.createElement(a,(0,b.Z)({margin:[2,0]},r))},attributes:{id:{type:String},level:{type:Number}}},paragraph:{render:function(e){var t=e.children,n=(0,h.Z)(e,w);return o.createElement(s.Flex,(0,b.Z)({padding:[2,0]},n),o.createElement(s.Text,null,t))}},link:{render:function(e){var t=e.children,n=e.href,r=(0,h.Z)(e,C);return o.createElement(v.Z,(0,b.Z)({href:n,rel:"noopener noreferrer",target:"_blank"},r),t)},attributes:{href:{type:String}}},code:{render:function(e){var t=e.content,n=(0,h.Z)(e,Z);return o.createElement(x.ZM,n,t)},attributes:{content:{type:String}}},fence:{render:function(e){var t=e.content,n=(0,h.Z)(e,k);return o.createElement(x.ZP,n,t)},attributes:{content:{type:String}}},list:{render:function(e){var t=e.ordered,n=e.children,r=(0,h.Z)(e,O),a=t?I:S;return o.createElement(a,r,n)},attributes:{ordered:{type:Boolean}}}},P=function(e){var t=e.selectedAlert,n=(0,l.Nu)(),a=(0,r.Z)(n,1)[0],i=t.name,c=t.nodeId,d=t.chartId,m=(0,l.UD)({alarm:i,node:c,chart:d}),f=m.loaded,b=m.value,h=m.hasError,v=a.reduce((function(e,t){var n={value:t.name,label:t.name};return e.find((function(e){return e.label==n.label}))||e.push(n),e}),[]);return f?h?o.createElement(s.Text,null,"Something went wrong"):null!==b&&void 0!==b&&b.result?o.createElement(s.Flex,{column:!0,gap:3},o.createElement(p,{name:i,nodeId:c,chartId:d,alertOptions:v}),o.createElement(g,null),o.createElement(u.Z,{transformConfiguration:{nodes:_}},b.result)):o.createElement(s.Text,null,"No data"):o.createElement(s.Text,null,"Loading...")},M=n(27856),j=n(46667),z=n(82351),N=n(54244),T=n(50308),D=n.n(T),F=(0,i.default)(s.Flex).withConfig({displayName:"minimizedModal__ElevatedContent",componentId:"sc-9ix42v-0"})(["box-shadow:0 18px 28px rgba(0,0,0,0.5);"]),B=(0,i.default)(s.Icon).withConfig({displayName:"minimizedModal__IconAbsolute",componentId:"sc-9ix42v-1"})(["position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);"]),A=function(e){var t=e.onModalClose,n=void 0===t?D():t;return o.createElement(z.Z,{content:"Close assistant"},o.createElement(F,{position:"absolute",bottom:"37px",right:"-10px",background:"mainBackground",sx:{borderRadius:"100%"},border:{side:"all",color:"primary",size:"1px",type:"solid"},width:"28px",height:"28px",onClick:n,cursor:"pointer"},o.createElement(B,{name:"x",color:"text",size:"sm"})))},L=function(e){var t=e.alert,n=e.onClick,r=void 0===n?D():n;return o.createElement(z.Z,{content:"Show assistant"},o.createElement(F,{position:"absolute",top:"0",right:"0",onClick:r,cursor:"pointer"},o.createElement(N.Z,{flavour:(null===t||void 0===t?void 0:t.status)||"neutral"},null===t||void 0===t?void 0:t.name)))},R=function(e){var t=e.alert,n=e.isMinimized,a=e.maximize,l=void 0===a?D():a,i=e.onModalClose,c=void 0===i?D():i,d=(0,o.useState)(!1),u=(0,r.Z)(d,2),m=u[0],f=u[1];return o.createElement(s.Flex,{position:"relative",width:"56px",height:n?"95px":"56px",onMouseEnter:function(){return f(n)},onMouseLeave:function(){return f(!1)}},o.createElement(F,{position:"absolute",bottom:"0",background:"primary",sx:{borderRadius:"100%"},width:"56px",height:"56px",cursor:"move"},o.createElement(B,{name:"netdataAssistant",size:"large"})),m&&o.createElement(o.Fragment,null,o.createElement(L,{alert:t,onClick:function(){n&&(l(),f(!1))}}),o.createElement(A,{onModalClose:c})))},U=i.default.ul.withConfig({displayName:"helpTooltipContent__List",componentId:"sc-uh9315-0"})(["width:350px;padding-left:16px;list-style:disc outside none;"]),H=function(){return o.createElement(U,null,o.createElement("li",null,"You can drag around the assistant window and navigate to other tabs within the same room, and the assistant window won't go away."),o.createElement("li",null,"Use the buttons at the right to expand, or minimize the assistant window."),o.createElement("li",null,"Hold down the ",o.createElement(s.TextSmall,{strong:!0},"Shift")," button in order to select any text inside the assistant window."))},J=n(22648),K=(0,i.default)(s.ModalContent).attrs((function(e){var t=e.expanded,n=e.isMobile;return{width:n?{base:"95vw"}:t?{base:"80vw"}:{base:150,max:150,min:70},height:n?{base:"80vh",max:"80vh",min:"10vh"}:t?{base:"80vh",min:"80vh"}:{base:150,max:150,min:150},padding:[0,0,4,0]}})).withConfig({displayName:"assistantModal__ModalContent",componentId:"sc-nobbii-0"})(["box-shadow:0 18px 28px rgba(0,0,0,0.5);"]),V=function(){var e=(0,j.Z)(),t=(0,r.Z)(e,2),n=t[0],a=t[1],i=(0,o.useState)(!1),c=(0,r.Z)(i,2),u=c[0],m=c[1],f=(0,o.useState)(!1),p=(0,r.Z)(f,2),b=p[0],g=p[1],h=(0,j.Z)(),v=(0,r.Z)(h,4),x=v[0],y=v[1],E=v[3],w=(0,l.R3)(),C=(0,r.Z)(w,2),Z=C[0],k=C[1],O=(null===Z||void 0===Z?void 0:Z.alert)||{},I=(0,J.m)(),S=(0,M.D)(300,(function(e){var t=e.target;return g(t.scrollTop>150&&!(null===O||void 0===O||!O.name))})),_=function(){return k(null)};return o.createElement(s.Modal,{zIndex:80,backdrop:!1},o.createElement(d(),{disabled:u||I},o.createElement(s.Flex,{column:!0,alignItems:"end",gap:3},!x&&o.createElement(K,{expanded:n,cursor:u?"text":"move",tabIndex:0,onKeyDown:function(e){"Shift"==e.key&&m(!0)},onKeyUp:function(){return m(!1)},isMobile:I},o.createElement(s.ModalHeader,{justifyContent:"between"},o.createElement(s.Flex,{gap:2,alignItems:"center"},o.createElement(s.Icon,{name:"netdataAssistant",color:"text"}),b?o.createElement(N.Z,{flavour:(null===O||void 0===O?void 0:O.status)||"neutral"},null===O||void 0===O?void 0:O.name):o.createElement(s.H4,null,"Netdata Assistant"),o.createElement(z.Z,{plain:!0,isBasic:!0,align:"top",content:H},o.createElement(s.Flex,null,o.createElement(s.Icon,{name:"question",color:"textLite",width:"16px",height:"16px"})))),o.createElement(s.Flex,{gap:2,alignItems:"baseline"},!I&&o.createElement(o.Fragment,null,o.createElement(z.Z,{align:"bottom",content:"Minimize window"},o.createElement(s.Flex,null,o.createElement(s.ModalButton,{iconName:"minimize_s",onClick:y,testId:"assistant-modal-minimize-button"}))),o.createElement(z.Z,{align:"bottom",content:n?"Reduce window size":"Expand window"},o.createElement(s.Flex,null,o.createElement(s.ModalButton,{iconName:n?"reduceSize":"fullScreen",onClick:a,testId:"assistant-modal-expand-collapse-button"})))),o.createElement(z.Z,{align:"bottom",content:"Close window"},o.createElement(s.Flex,null,o.createElement(s.ModalCloseButton,{onClose:_,testId:"assistant-modal-close-button"}))))),o.createElement(s.ModalBody,{overflow:{vertical:"auto"},onScroll:S,cursor:u?"text":"default"},o.createElement(P,{selectedAlert:O}))),o.createElement(R,{isMinimized:x,maximize:E,alert:O,onModalClose:_}))))},Y=function(){var e=(0,a.UL)(),t=(0,l.R3)(),n=(0,r.Z)(t,2),i=n[0],c=n[1],d=i||{},s=d.roomId,u=d.alert;return(0,o.useEffect)((function(){s!=e&&c(null)}),[s,e]),u&&s==e?o.createElement(V,null):null}},12899:function(e,t,n){n.d(t,{R3:function(){return u},Nu:function(){return m},UD:function(){return s}});var r=n(4480),o=n(26398),a=n(74059),l=n(37518),i=(0,r.cn)({key:"assistantAlert",default:null}),c=(0,r.cn)({key:"assistantAlertsAtom",default:[]}),d=(0,r.CG)({key:"assistantSelector",get:function(e){var t=e.space,n=e.room,r=e.alarm,a=e.node,l=e.chart;return function(){return function(e){var t=e.space,n=e.room,r=e.alarm,a=e.node,l=e.chart;return o.Z.post("/api/v1/troubleshoot",{space:t,room:n,alarm:r,node:a,chart:l})}({space:t,room:n,alarm:r,node:a||"dummy-node-id",chart:l||"dummy-chart-id"})}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),s=function(e){var t,n=e.alarm,o=e.node,i=e.chart,c=(0,a.th)(),s=(0,l.UL)(),u=(0,r.$P)(d({space:c,room:s,alarm:n,node:o,chart:i}));return{loaded:"loading"!==u.state,value:null===(t=u.contents)||void 0===t?void 0:t.data,hasError:"hasError"===u.state}},u=function(){return(0,r.FV)(i)},m=function(){return(0,r.FV)(c)}}}]); \ No newline at end of file -- cgit v1.2.3