(this.webpackJsonpimonitornextgen=this.webpackJsonpimonitornextgen||[]).push([[69],{1661:function(t,e){},1663:function(t,e){},1674:function(t,e){},1676:function(t,e){},1701:function(t,e){},1703:function(t,e){},1704:function(t,e){},1709:function(t,e){},1711:function(t,e){},1717:function(t,e){},1719:function(t,e){},1738:function(t,e){},1750:function(t,e){},1753:function(t,e){},2109:function(t,e,n){"use strict";n.r(e);var a=n(26),c=n(0),r=n.n(c),o=n(30),u=n(195),i=n(196),l=n(198),f=n(191),s=n(53),h=n(199),g=n(1652),m=n(194),b=n(17),d=function(t){t.filter;var e=t.chartId,n=t.height,o=t.width,u=t.baseURL,i=new g.a({baseUrl:u}),l=Object(c.useRef)(null),f=Object(c.useState)(!1),s=Object(a.a)(f,2),h=(s[0],s[1]),d=Object(c.useState)(i.createChart({chartId:e,showAttribution:!1,theme:"dark"})),j=Object(a.a)(d,1)[0];return Object(c.useEffect)((function(){j.render(l.current).then((function(){return h(!0)})).catch((function(t){var e={component:"Chart",method:"chart",error:t};Object(b.logError)(e)}))}),[j]),r.a.createElement(m.a,{sm:o,className:"my-2",style:{height:n},ref:l})},j=n(200);e.default=Object(o.b)((function(t){var e=t.communityData,n=t.selectedLang;return{UUID:e.communityId,languageId:n.languageId}}),null)((function(t){var e=t.UUID,n=t.languageId,o=Object(f.a)(),g=Object(a.a)(o,1)[0],m=Object(c.useState)(!0),b=Object(a.a)(m,2),O=b[0],p=b[1],I=Object(c.useState)(null),v=Object(a.a)(I,2),E=v[0],y=v[1],U=Object(c.useState)(""),w=Object(a.a)(U,2),C=w[0],x=w[1];return Object(c.useEffect)((function(){var t={communityId:e};h.a.post(s.getMongochartsConfiguration,t).then((function(t){var e=t.data;console.log(e);var a=e.data?e.data.mongochartsConfiguration:null;if(a){x(a.baseUrl?a.baseUrl:"");var c=(a.mongoChartsList||[]).map((function(t){var e=t.chartType,a=t.colWidth,c=t.languageChartId,r=c[n]?c[n]:null;return r?{chartid:r,colWidth:a,chartType:e}:r})).filter((function(t){return t}));y(c),console.clear(),console.log(c)}p(!1)})).catch((function(t){console.log(t),p(!1)}))}),[e]),r.a.createElement(r.a.Fragment,null,r.a.createElement(j.default,{isLoading:O}),O?r.a.createElement(l.a,{color:"warning",className:"text-center"},g("Please configure MongoDB charts")):r.a.createElement(u.a,null,r.a.createElement(i.a,null,(E||[]).map((function(t,e){return r.a.createElement(d,{key:e,chartId:t.chartid,width:t.colWidth,height:"counter"===t.chartType?"150px":"300px",baseURL:C})})))))}))}}]);
//# sourceMappingURL=69.9edf7481.chunk.js.map