From 517a443636daa1e8085cb4e5325524a54e8a8fd7 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 17 Oct 2023 11:30:23 +0200 Subject: Merging upstream version 1.43.0. Signed-off-by: Daniel Baumann --- web/gui/v2/4193.f5c9a2d9750a5bd2762d.chunk.js | 1 - 1 file changed, 1 deletion(-) delete mode 100644 web/gui/v2/4193.f5c9a2d9750a5bd2762d.chunk.js (limited to 'web/gui/v2/4193.f5c9a2d9750a5bd2762d.chunk.js') diff --git a/web/gui/v2/4193.f5c9a2d9750a5bd2762d.chunk.js b/web/gui/v2/4193.f5c9a2d9750a5bd2762d.chunk.js deleted file mode 100644 index 6148afb2..00000000 --- a/web/gui/v2/4193.f5c9a2d9750a5bd2762d.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]="5f03c766-aa1a-4272-91dd-5b1362c139d5",e._sentryDebugIdIdentifier="sentry-dbid-5f03c766-aa1a-4272-91dd-5b1362c139d5")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"6845f9ce010d5a446e5d4a40f17204cb8341a07a"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[4193],{16512:function(e,t,n){n.d(t,{Q0:function(){return o},R4:function(){return m},TT:function(){return i},WL:function(){return d},Y:function(){return c},by:function(){return u},qY:function(){return l},rU:function(){return f},xL:function(){return s}});var a=n(71893),r=n(64969),o=a.default.img.withConfig({displayName:"styled__Illustration",componentId:"sc-1yhntgl-0"})(["margin:0 auto;"]),l=(0,a.default)(r.Text).withConfig({displayName:"styled__StyledText",componentId:"sc-1yhntgl-1"})(["display:block;"]),c=a.default.div.withConfig({displayName:"styled__TextHeader",componentId:"sc-1yhntgl-2"})(["margin-bottom:",";font-weight:700;"],(0,r.getSizeBy)(2)),d=a.default.div.withConfig({displayName:"styled__StaticCheckmarks",componentId:"sc-1yhntgl-3"})(["margin-top:",";margin-bottom:",";"],(0,r.getSizeBy)(2),(0,r.getSizeBy)(5)),i=a.default.div.withConfig({displayName:"styled__CheckmarkLine",componentId:"sc-1yhntgl-4"})(["display:flex;align-items:center;"]),s=(0,a.default)(r.Icon).withConfig({displayName:"styled__StyledIcon",componentId:"sc-1yhntgl-5"})(["margin-right:4px;height:18px;> use{fill:",";}"],(0,r.getColor)("primary")),u=(0,a.default)(s).withConfig({displayName:"styled__HelpIcon",componentId:"sc-1yhntgl-6"})(["vertical-align:middle;"]),m=a.default.div.withConfig({displayName:"styled__LearnMoreSection",componentId:"sc-1yhntgl-7"})(["margin-top:",";"],(0,r.getSizeBy)(4)),f=a.default.a.withConfig({displayName:"styled__Link",componentId:"sc-1yhntgl-8"})(["text-decoration:underline;color:",";&:visited{color:",";}"],(0,r.getColor)("success"),(0,r.getColor)("success"))},4193:function(e,t,n){n.r(t),n.d(t,{default:function(){return dt}});var a=n(67294),r=n(89250),o=n(39878),l=n(4474),c=n(74059),d=n(29748),i=n(37518),s=n(5934),u=n(47133),m=n(54227),f=n(79619),h=n(78266),g=function(){return a.createElement(h.Z,{title:"Loading charts...","data-testid":"dashboardLoading"})},p=n(29439),b=n(61152),v=n(87462),E=n(45987),y=n(64969),C=n(87574),x=n(97945),w=["compact"],I=function(e){var t=e.compact,n=(0,E.Z)(e,w),r=(0,b.Z)("addChartModal"),o=(0,p.Z)(r,2)[1],l=(0,x.Mm)().length>0;return a.createElement(y.Flex,(0,v.Z)({column:!0,alignItems:"center",justifyContent:"center",overflow:{vertical:"auto"},flex:!0,basis:0,"data-testid":"dashboardBlankSlate"},n),!t&&a.createElement(y.Flex,{as:"img",src:C.X,height:"35%"}),a.createElement(y.H3,{margin:[6,0,2]},"Empty Dashboard"),l?a.createElement(a.Fragment,null,a.createElement(y.Text,{textAlign:"center"},"Let\u2019s fill your dashboard."),a.createElement(y.Text,{textAlign:"center"},"Go to a node view or node list and add one chart to this Dashboard or just use")):a.createElement(a.Fragment,null,a.createElement(y.Text,{textAlign:"center"},"You don't have any available node to retrieve charts from."),a.createElement(y.Text,{textAlign:"center"},"Please verify your nodes' state and/or connect a new node to Netdata")),!t&&a.createElement(y.Button,{margin:[8,0,0,0],onClick:o,disabled:!l,label:"Add chart","data-testid":"dashboardBlankSlate-addChart"}))},k=n(93433),O=(n(92222),n(21249),n(57640),n(9924),n(69826),n(41539),n(31672),n(2490),n(59461),n(2707),n(47941),n(16645)),D=n(7693),Z=n(92903),S=n(96929),T=n(40970),_=n(89479),j=n(91128),N=n(97723),M=n(4942),P=(n(15581),n(34514),n(54747),n(82526),n(57327),n(88449),n(59849),n(38880),n(49337),n(33321),n(69070),n(89692)),F=n(16978),L=n(9058),B=n(82351),A=function(){return a.createElement(y.Flex,{column:!0,width:"300px",gap:1},a.createElement(y.TextSmall,{strong:!0,color:"white"},"Not finding a chart?"),a.createElement(y.TextSmall,{color:"white"},"When selecting",a.createElement(y.TextSmall,{strong:!0,color:"white",margin:[0,1]},"All Nodes"),"you search and add charts using their context. The outcome will be a composite chart over All Nodes, like on the Overview tab."),a.createElement(y.TextSmall,{color:"white"},"When you select a",a.createElement(y.TextSmall,{strong:!0,color:"white",margin:[0,1]},"specific Node"),"you search and add charts using their name. The result is a specific chart over the node selected, like on Single Node tab."))},H=function(){return a.createElement(B.Z,{isBasic:!0,plain:!0,content:A,align:"bottom"},a.createElement(y.Icon,{name:"question",color:"textDescription",size:"small"}))};function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function R(e){for(var t=1;t0,f=(0,S.fD)(),h=(0,x.Ne)(s),g=(0,N.jN)(t),b=m?z:J,v=(0,a.useState)(b.value),E=(0,p.Z)(v,2),C=E[0],w=E[1],I=(0,a.useState)(null),M=(0,p.Z)(I,2),P=M[0],F=M[1],B=(0,a.useMemo)((function(){return[b].concat((0,k.Z)(h.map(Y)))}),[h]),A=(0,a.useMemo)((function(){return B.find((function(e){return e.value===C}))}),[B,C]),H=(0,a.useCallback)((function(e){w((null===e||void 0===e?void 0:e.value)||b.value),F(null)}),[]),U=(0,a.useMemo)((function(){return C===b.value?[]:[C]}),[C]),R=(0,T.Z)(o,U,{spaceId:r});if(R)throw R;var V=(0,_.Cd)(o),K=(0,a.useMemo)((function(){return Object.keys(V).sort((function(e,t){return e.localeCompare(t,void 0,{sensitivity:"accent"})})).map(q)}),[V]);(0,a.useEffect)((function(){K.length&&A&&F((function(e){return e||K[0].value}))}),[P,K,A]);var Q=(0,a.useMemo)((function(){return P&&q(P)}),[P]),X=(0,a.useCallback)((function(e){return F(null===e||void 0===e?void 0:e.value)}),[]),G=V[P],$=(0,L.e)(),ee=(0,a.useCallback)((function(){var e=$.getNode({id:"newDashboardChart"}).getAttributes(),t=e.aggregationMethod,a=e.selectedDimensions,r=e.groupBy,o=e.groupByLabel,l=e.groupingMethod,c=e.chartType,d=e.selectedLabels,i=e.selectedNodes,s=e.selectedInstances,u=e.nodesScope,m=e.contextScope;g(m,{aggregationMethod:t,selectedDimensions:a,groupBy:r,groupByLabel:o,groupingMethod:l,chartType:c,selectedLabels:d,selectedNodes:i,selectedInstances:s,nodesScope:u},(function(){return setTimeout(n)}))}),[C,G]),te=!P,ne=(0,j.Z)();return(0,a.useEffect)((function(){return ne(!0),function(){return ne(!1)}})),a.createElement(O.u6,{right:!0,closeOnEsc:!0,closeOnOverlayClick:!0,onClose:n,overflow:"visible"},a.createElement(D.x,{onClose:n,title:"Add Chart to Dashboard"},a.createElement(y.Button,{label:"Add chart",icon:"plus",onClick:ee,disabled:te,"data-testid":"addChartModal-addChart-button"})),a.createElement(Z.B,null,"Add Charts to ",l),a.createElement(O.TZ,{overflow:"visible"},a.createElement(y.Flex,{gap:6,column:!0},a.createElement(y.Flex,{gap:2,column:!0,"data-testid":"addChartModal-selectNodes"},a.createElement(y.H5,null,"Nodes in ",d),a.createElement(y.Select,{options:B,value:A,onChange:H,isLoading:!f,isClearable:!0,form:"addChartModal-selectNodes"})),Q&&a.createElement(W,{id:t,spaceId:r,roomId:o,value:Q,onChange:X,options:K,testid:"addChartModal-selectChart",selectedNodeIds:U}))))},K=n(91268),Q=["text","TextComponent"],X=function(e){var t=e.text,n=e.TextComponent,r=void 0===n?y.Text:n,o=(0,E.Z)(e,Q),l=(0,a.useRef)(),c=(0,a.useState)(!1),d=(0,p.Z)(c,2),i=d[0],s=d[1];(0,a.useEffect)((function(){if(l.current){var e=l.current.offsetWidth0?a.createElement(y.Button,{neutral:!0,flavour:"hollow",label:"Add chart",icon:"chart_added",onClick:t,"data-testid":"dashboardHeaderActionBar-addChart-button","data-ga":"action-bar::click-add-chart::cust-dashboard"}):null},ee=function(e){var t=e.id,n=(0,N.Kq)(t);return a.createElement(y.Button,{neutral:!0,flavour:"hollow",label:"Add text",icon:"text_add",onClick:n,"data-testid":"dashboardHeaderActionBar-addText-button","data-ga":"action-bar::click-add-text::cust-dashboard"})},te=n(93017),ne=n(67336),ae=n(14428),re=function(e){var t=e.id,n=(0,te.Z)(),r=(0,p.Z)(n,2)[1],o=(0,ne.O9)(t,{onFail:r}),l=(0,u.LJ)(t,"processing"),c=(0,u.LJ)(t,"isOwner"),d=(0,u.DS)(t);return a.createElement(ae.Z,{permission:c?"dashboard:Update":"dashboard:UpdateSelf",flavour:"hollow",label:"Save",icon:"save",onClick:o,disabled:d,isLoading:l,"data-testid":"dashboardHeaderActionBar-save-button","data-ga":"action-bar::click-save::cust-dashboard"})},oe=function(e){var t=e.id;return a.createElement(y.Flex,{gap:2},a.createElement($,null),a.createElement(ee,{id:t}),a.createElement(re,{id:t}))},le=(0,a.memo)(oe),ce=n(71992),de=n(46667),ie=n(62200),se=n(59112),ue=n(16512),me=function(e){var t=e.close,n=(0,a.useState)(!0),o=(0,p.Z)(n,2),l=o[0],c=o[1],d=(0,u.r0)(),s=(0,u.HI)({id:d,key:"name"}),f=(0,p.Z)(s,2),h=f[0],g=f[1],b=(0,a.useState)(h),v=(0,p.Z)(b,2),E=v[0],x=v[1],w=(0,ne.O9)(d),I=(0,m.UK)(),k=(0,r.s0)(),S=(0,i.A3)(),T=E.length>0,_=l&&T&&E!==h,j=(0,a.useCallback)((function(){g(E),w().then((function(e){var n=e.data.slug,a="".concat(S,"/dashboards/").concat(n);I({id:d,slug:n,path:a}),k(a,{replace:!0}),t()}))}),[t,E,d,S]);return a.createElement(O.u6,{right:!0,closeOnEsc:!0,closeOnOverlayClick:!0,onClose:t,"data-testid":"renameDashboard-modal"},a.createElement(D.x,{onClose:t,title:"Rename Dashboard"},a.createElement(y.Button,{label:"Save Changes",onClick:j,disabled:!_})),a.createElement(Z.B,{"data-testid":"renameDashboard-title"},"Rename dashboard ",h),a.createElement(O.TZ,null,a.createElement(se.Z,{value:E,label:"Name",onChange:function(e){x(e.target.value)},isValid:l,setIsValid:c,isDirty:T,instantFeedback:"all",onKeyDown:function(e){return e.keyCode===ie.DV&&_&&j()},"data-testid":"renameDashboard-input"}),a.createElement(y.Flex,{column:!0,justifyContent:"between",height:"100%",margin:[8,0,16],"data-testid":"renameDashboard-learnMoreSection"},a.createElement(ue.R4,null,a.createElement(ue.by,{name:"help"}),a.createElement(y.Text,null,"Learn more about Dashboards")," ",a.createElement(ue.rU,{href:"https://learn.netdata.cloud/docs/cloud/visualize/dashboards",target:"_blank",rel:"noopener noreferrer"},"In our documentation")),a.createElement(ue.Q0,{src:C.X,alt:"No nodes",title:"No nodes"}))))},fe=function(){var e=(0,r.s0)(),t=(0,c.uk)(),n=(0,i.vf)(),o=(0,u.r0)(),l=(0,u.LJ)(o).name,d=(0,i.Hm)("name"),s=(0,de.Z)(),m=(0,p.Z)(s,4),f=m[0],h=m[2],g=m[3],b=(0,de.Z)(),v=(0,p.Z)(b,4),E=v[0],C=v[2],x=v[3],w=(0,a.useCallback)((function(){e("/spaces/".concat(t,"/rooms/").concat(n,"/dashboards"))}),[t,n]),I=(0,N.CO)(o,{onSuccess:w});return a.createElement(a.Fragment,null,a.createElement(ce.Z,{category:"dashboard",context:"title",testId:"dashboardDropdown"},(function(e){var t=e.close;return a.createElement(a.Fragment,null,a.createElement(ce.h,{icon:"pencilOutline",onClick:function(){t(),C()},"data-testid":"renameDashboard-option","data-ga":"dropdown-item::click-rename-dashboard::cust-dashboard"},"Rename Dashboard"),a.createElement(ce.h,{icon:"trashcan",color:"errorText",onClick:function(){t(),h()},"data-testid":"removeDashboard-option","data-ga":"dropdown-item::click-remove-dashboard::cust-dashboard"},"Delete Dashboard"))})),E&&a.createElement(me,{close:x}),f&&a.createElement(y.ConfirmationDialog,{confirmLabel:"Yes, delete","data-ga":"delete-dashboard-dialog","data-testid":"deleteDashboardDialog",handleConfirm:I,handleDecline:g,message:a.createElement(a.Fragment,null,"You are about to delete ",a.createElement("strong",null,l)," from ",a.createElement("strong",null,d),".",a.createElement("br",null),"Are you sure you want to continue?"),title:"Delete ".concat(l)}))},he=function(e){var t=e.id;return a.createElement(y.Flex,{justifyContent:"between",padding:[3,2.5],"data-testid":"dashboardHeader"},a.createElement(y.Flex,{alignItems:"center"},a.createElement(fe,null),a.createElement(G,{id:t})),a.createElement(le,{id:t}))},ge=(0,a.memo)(he),pe=n(69968),be=n.n(pe),ve=(n(48564),n(79424),n(6811)),Ee=["style","className","onMouseDown","onMouseUp","onTouchEnd","children"],ye=["id","Component"],Ce=(0,pe.WidthProvider)(be()),xe=(0,a.forwardRef)((function(e,t){var n=e.style,r=e.className,o=e.onMouseDown,l=e.onMouseUp,c=e.onTouchEnd,d=e.children,i=(0,E.Z)(e,Ee);return a.createElement("div",(0,v.Z)({style:n,className:r,ref:t,onMouseDown:o,onMouseUp:l,onTouchEnd:c},i),d.map((function(e){return"function"===typeof e?e({onMouseDown:o,onMouseUp:l,onTouchEnd:c}):e})))})),we=function(e){return{i:e.i,x:e.x,y:e.y,w:e.w,h:e.h,minW:e.minW,minH:e.minH}},Ie=function(e){var t=e.id,n=e.Component,r=(0,E.Z)(e,ye),o=(0,ve.ZL)(t),l=(0,p.Z)(o,2),c=l[0],d=l[1],i=(0,a.useCallback)((function(e){var t=e.map(we);d(t)}),[]),s=(0,a.useMemo)((function(){return c.map((function(e){var r=e.i;return a.createElement(xe,{key:r},(function(e){return a.createElement(n,(0,v.Z)({key:r,id:t,cardId:r},e))}))}))}),[c]);return a.createElement(y.Flex,{column:!0,gap:2,width:"100%",overflow:"auto"},a.createElement(Ce,(0,v.Z)({},r,{layout:c,onLayoutChange:i,measureBeforeMount:!0,useCSSTransforms:!0,preventCollision:!1,isDroppable:!0}),s))};Ie.defaultProps={rowHeight:30,cols:12};var ke=Ie,Oe=n(45215),De=n(22841),Ze=n(71893),Se=(0,Ze.default)(y.Flex).attrs({height:"100%",background:"mainBackground",round:!0,cursor:"move"}).withConfig({displayName:"container__Card",componentId:"sc-esi601-0"})(["box-shadow:0px 0px 1px rgba(0,0,0,0.04),0px 2px 6px rgba(0,0,0,0.04),0px 10px 20px rgba(0,0,0,0.04);"]),Te=(0,Ze.default)(y.Flex).attrs({column:!0,cursor:"default",height:{max:"100%"},overflow:"hidden",onMouseDown:function(e){return e.stopPropagation()}}).withConfig({displayName:"content__CardContent",componentId:"sc-1x8kdiw-0"})([""]),_e=function(e){var t=e.chart;return a.createElement(Te,{flex:!0,"data-testid":"chartContent"},a.createElement(F.Z,{chart:t}))},je=["id","cardId","onMouseDown","onMouseUp","onTouchEnd"],Ne=["nodeId"];function Me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Pe(e){for(var t=1;t1&&void 0!==arguments[1])||arguments[1];!function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=(0,a.useContext)(r.Us).navigator,o=(0,r.TH)();(0,a.useEffect)((function(){if(t){var a=n.block((function(t){var n=ot(ot({},t),{},{retry:function(){a(),t.retry()}});e(n)}));return a}}),[n,e,t,o])}((0,a.useCallback)((function(t){"REPLACE"!==t.action?window.confirm(e)&&t.retry():t.retry()}),[e]),t)},ct=function(e){var t=e.id,n=(0,b.Z)("addChartModal"),r=(0,p.Z)(n,4),o=r[0],l=r[3],c=(0,u.LJ)(t),d=c.fullyLoaded,i=c.cardIds;return function(e){var t=(0,u.DS)(e);lt("Are you sure you want to leave this dashboard?\nChanges will be lost.",!t)}(t),a.createElement(K.Z,{padding:[3],margin:[0,0,8,0]},a.createElement(ge,{id:t}),d&&i.length>0&&a.createElement(at,{id:t}),d&&0===i.length&&a.createElement(I,null),o&&a.createElement(V,{id:t,onClose:l}))},dt=(0,a.memo)((function(){(0,d.Z)(),function(){var e=(0,r.UO)().dashboardSlug,t=(0,o.Jh)(),n=(0,o.FP)();(0,a.useEffect)((function(){n!==e&&t(e)}),[n,e]),(0,a.useEffect)((function(){return function(){return t(null)}}),[])}(),(0,l.Pf)();var e=(0,c.th)(),t=(0,c.uk)(),n=(0,i.UL)(),h=(0,i.vf)(),p=(0,u.r0)(),b=(0,u.FV)("slug");(0,m.bV)({title:b,id:p,destination:b,type:"dashboards"});var v=(0,s.L)();return(0,f.Z)(v&&p,{spaceId:e,spaceSlug:t,roomId:n,roomSlug:h})?a.createElement(g,null):a.createElement(ct,{id:p})}))}}]); \ No newline at end of file -- cgit v1.2.3