diff --git a/app/vmselect/vmui/asset-manifest.json b/app/vmselect/vmui/asset-manifest.json index 554486907..5361b31d2 100644 --- a/app/vmselect/vmui/asset-manifest.json +++ b/app/vmselect/vmui/asset-manifest.json @@ -1,12 +1,12 @@ { "files": { - "main.css": "./static/css/main.d8362c27.css", - "main.js": "./static/js/main.105dbc4f.js", + "main.css": "./static/css/main.7e6d0c89.css", + "main.js": "./static/js/main.42cb1c78.js", "static/js/27.939f971b.chunk.js": "./static/js/27.939f971b.chunk.js", "index.html": "./index.html" }, "entrypoints": [ - "static/css/main.d8362c27.css", - "static/js/main.105dbc4f.js" + "static/css/main.7e6d0c89.css", + "static/js/main.42cb1c78.js" ] } \ No newline at end of file diff --git a/app/vmselect/vmui/index.html b/app/vmselect/vmui/index.html index 55e9c2552..96f426a35 100644 --- a/app/vmselect/vmui/index.html +++ b/app/vmselect/vmui/index.html @@ -1 +1 @@ -
'+(n?e:Zk(e,!0))+"
\n":""+(n?e:Zk(e,!0))+"
\n"}},{key:"blockquote",value:function(e){return"\n".concat(e,"\n")}},{key:"html",value:function(e){return e}},{key:"heading",value:function(e,t,n,r){if(this.options.headerIds){var o=this.options.headerPrefix+r.slug(n);return"
".concat(e,"
\n")}},{key:"table",value:function(e,t){return t&&(t="".concat(t,"")),"".concat(e,"
")}},{key:"br",value:function(){return this.options.xhtml?""+Zk(l.message+"",!0)+"";throw l}}Gk.options=Gk.setOptions=function(e){var t;return Fk(Gk.defaults,e),t=Gk.defaults,hk=t,Gk},Gk.getDefaults=pk,Gk.defaults=hk,Gk.use=function(){for(var e=arguments.length,t=new Array(e),n=0;n
"+Zk(r.message+"",!0)+"";throw r}},Gk.Parser=Xk,Gk.parser=Xk.parse,Gk.Renderer=Yk,Gk.TextRenderer=Uk,Gk.Lexer=Vk,Gk.lexer=Vk.lex,Gk.Tokenizer=zk,Gk.Slugger=qk,Gk.parse=Gk;Gk.options,Gk.setOptions,Gk.use,Gk.walkTokens,Gk.parseInline,Xk.parse,Vk.lex;var Kk,Qk,Jk,eS,tS,nS,rS,oS,iS=function(e){var n=e.title,o=e.description,i=e.unit,a=e.expr,u=e.showLegend,l=e.filename,s=e.alias,c=ao().time.period,d=uo(),f=(0,t.useRef)(null),p=(0,t.useState)(!0),h=(0,r.Z)(p,2),m=h[0],v=h[1],g=(0,t.useState)({enable:!1,value:c.step||1}),y=(0,r.Z)(g,2),b=y[0],x=y[1],Z=(0,t.useState)({limits:{enable:!1,range:{1:[0,0]}}}),w=(0,r.Z)(Z,2),D=w[0],k=w[1],S=(0,t.useMemo)((function(){return Array.isArray(a)&&a.every((function(e){return e}))}),[a]),C=Hv({predefinedQuery:S?a:[],display:"chart",visible:m,customStep:b}),_=C.isLoading,E=C.graphData,M=C.error,A=function(e){var t=vn({},D);t.limits.range=e,k(t)};return(0,t.useEffect)((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){return v(e.isIntersecting)}))}),{threshold:.1});return f.current&&e.observe(f.current),function(){f.current&&e.unobserve(f.current)}}),[]),S?(0,ie.BX)(fi,{border:"1px solid",borderRadius:"2px",borderColor:"divider",width:"100%",height:"100%",ref:f,children:[(0,ie.BX)(fi,{px:2,py:1,display:"flex",flexWrap:"wrap",width:"100%",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid",borderColor:"divider",children:[(0,ie.tZ)(xd,{arrow:!0,componentsProps:{tooltip:{sx:{maxWidth:"100%"}}},title:(0,ie.BX)(fi,{sx:{p:1},children:[o&&(0,ie.BX)(fi,{mb:2,children:[(0,ie.tZ)(cv,{fontWeight:"500",sx:{mb:.5,textDecoration:"underline"},children:"Description:"}),(0,ie.tZ)("div",{className:"panelDescription",dangerouslySetInnerHTML:{__html:Gk.parse(o)}})]}),(0,ie.BX)(fi,{children:[(0,ie.tZ)(cv,{fontWeight:"500",sx:{mb:.5,textDecoration:"underline"},children:"Queries:"}),(0,ie.tZ)("div",{children:a.map((function(e,t){return(0,ie.tZ)(fi,{mb:.5,children:e},"".concat(t,"_").concat(e))}))})]})]}),children:(0,ie.tZ)(fk.Z,{color:"info",sx:{mr:1}})}),(0,ie.tZ)(cv,{component:"div",variant:"subtitle1",fontWeight:500,sx:{mr:2,py:1,flexGrow:"1"},children:n||""}),(0,ie.tZ)(fi,{mr:2,py:1,children:(0,ie.tZ)(Rv,{defaultStep:c.step,customStepEnable:b.enable,setStep:function(e){return x(vn(vn({},b),{},{value:e}))},toggleEnableStep:function(){return x(vn(vn({},b),{},{enable:!b.enable}))}})}),(0,ie.tZ)(cg,{yaxis:D,setYaxisLimits:A,toggleEnableLimits:function(){var e=vn({},D);e.limits.enable=!e.limits.enable,k(e)}})]}),(0,ie.BX)(fi,{px:2,pb:2,children:[_&&(0,ie.tZ)(Ag,{isLoading:!0,height:"500px"}),M&&(0,ie.tZ)(_t,{color:"error",severity:"error",sx:{whiteSpace:"pre-wrap",mt:2},children:M}),E&&(0,ie.tZ)(Ed,{data:E,period:c,customStep:b,query:a,yaxis:D,unit:i,alias:s,showLegend:u,setYaxisLimits:A,setPeriod:function(e){var t=e.from,n=e.to;d({type:"SET_PERIOD",payload:{from:t,to:n}})}})]})]}):(0,ie.BX)(_t,{color:"error",severity:"error",sx:{m:4},children:[(0,ie.tZ)("code",{children:'"expr"'})," not found. Check the configuration file ",(0,ie.tZ)("b",{children:l}),"."]})},aS={position:"absolute",top:0,bottom:0,width:"10px",opacity:0,cursor:"ew-resize"},uS=function(e){var n=e.index,o=e.title,i=e.panels,a=e.filename,u=Ss(document.body),l=(0,t.useMemo)((function(){return u.width/12}),[u]),s=(0,t.useState)([]),c=(0,r.Z)(s,2),d=c[0],f=c[1];(0,t.useEffect)((function(){f(i.map((function(e){return e.width||12})))}),[i]);var p=(0,t.useState)({start:0,target:0,enable:!1}),h=(0,r.Z)(p,2),m=h[0],v=h[1],g=function(e){if(m.enable){var t=m.start,n=Math.ceil((t-e.clientX)/l);if(!(Math.abs(n)>=12)){var r=d.map((function(e,t){return e-(t===m.target?n:0)}));f(r)}}},y=function(){v(vn(vn({},m),{},{enable:!1}))};return(0,t.useEffect)((function(){return window.addEventListener("mousemove",g),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",y)}}),[m]),(0,ie.BX)(KD,{defaultExpanded:!n,sx:{boxShadow:"none"},children:[(0,ie.tZ)(ik,{sx:{px:3,bgcolor:"rgba(227, 242, 253, 0.6)"},"aria-controls":"panel".concat(n,"-content"),id:"panel".concat(n,"-header"),expandIcon:(0,ie.tZ)(dk.Z,{}),children:(0,ie.BX)(fi,{display:"flex",alignItems:"center",width:"100%",children:[o&&(0,ie.tZ)(cv,{variant:"h6",fontWeight:"bold",sx:{mr:2},children:o}),i&&(0,ie.BX)(cv,{variant:"body2",fontStyle:"italic",children:["(",i.length," panels)"]})]})}),(0,ie.tZ)(ck,{sx:{display:"grid",gridGap:"10px"},children:(0,ie.tZ)(rb,{container:!0,spacing:2,children:Array.isArray(i)&&i.length?i.map((function(e,t){return(0,ie.tZ)(rb,{item:!0,xs:d[t],sx:{transition:"200ms"},children:(0,ie.BX)(fi,{position:"relative",height:"100%",children:[(0,ie.tZ)(iS,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:a,showLegend:e.showLegend}),(0,ie.tZ)("button",{style:vn(vn({},aS),{},{right:0}),onMouseDown:function(e){return function(e,t){v({start:e.clientX,target:t,enable:!0})}(e,t)}})]})},t)})):(0,ie.BX)(_t,{color:"error",severity:"error",sx:{m:4},children:[(0,ie.tZ)("code",{children:'"panels"'})," not found. Check the configuration file ",(0,ie.tZ)("b",{children:a}),"."]})})})]})},lS=function(){var e=(0,t.useState)(),n=(0,r.Z)(e,2),o=n[0],i=n[1],a=(0,t.useState)(0),u=(0,r.Z)(a,2),l=u[0],s=u[1],c=(0,t.useMemo)((function(){return br()(o,[l,"filename"],"")}),[o,l]),d=(0,t.useMemo)((function(){return br()(o,[l,"rows"],[])}),[o,l]);return(0,t.useEffect)((function(){RD().then((function(e){return e.length&&i(e)}))}),[]),(0,ie.BX)(ie.HY,{children:[!o&&(0,ie.tZ)(_t,{color:"info",severity:"info",sx:{m:4},children:"Dashboards not found"}),o&&(0,ie.BX)(ie.HY,{children:[(0,ie.tZ)(fi,{sx:{borderBottom:1,borderColor:"divider"},children:(0,ie.tZ)(Jn,{value:l,onChange:function(e,t){return s(t)},"aria-label":"dashboard-tabs",children:o&&o.map((function(e,t){return(0,ie.tZ)(ur,{label:e.title||e.filename,id:"tab-".concat(t),"aria-controls":"tabpanel-".concat(t)},t)}))})}),(0,ie.tZ)(fi,{children:Array.isArray(d)&&d.length?d.map((function(e,t){return(0,ie.tZ)(uS,{index:t,filename:c,title:e.title,panels:e.panels},"".concat(l,"_").concat(t))})):(0,ie.BX)(_t,{color:"error",severity:"error",sx:{m:4},children:[(0,ie.tZ)("code",{children:'"rows"'})," not found. Check the configuration file ",(0,ie.tZ)("b",{children:c}),"."]})})]})]})},sS=function(e,t){var n=t.match?"&match[]=".concat(t.match):"";return"".concat(e,"/api/v1/status/tsdb?topN=").concat(t.topN,"&date=").concat(t.date).concat(n)},cS=jv(),dS=zv().serverURL,fS={totalSeries:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]},pS=(0,ht.Z)((0,ie.tZ)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),hS=(0,ht.Z)((0,ie.tZ)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),mS=["backIconButtonProps","count","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton"],vS=t.forwardRef((function(e,t){var n=e.backIconButtonProps,r=e.count,i=e.getItemAriaLabel,a=e.nextIconButtonProps,u=e.onPageChange,l=e.page,s=e.rowsPerPage,c=e.showFirstButton,d=e.showLastButton,f=(0,X.Z)(e,mS),p=Ot();return(0,ie.BX)("div",(0,o.Z)({ref:t},f,{children:[c&&(0,ie.tZ)(pt,{onClick:function(e){u(e,0)},disabled:0===l,"aria-label":i("first",l),title:i("first",l),children:"rtl"===p.direction?Kk||(Kk=(0,ie.tZ)(pS,{})):Qk||(Qk=(0,ie.tZ)(hS,{}))}),(0,ie.tZ)(pt,(0,o.Z)({onClick:function(e){u(e,l-1)},disabled:0===l,color:"inherit","aria-label":i("previous",l),title:i("previous",l)},n,{children:"rtl"===p.direction?Jk||(Jk=(0,ie.tZ)(An,{})):eS||(eS=(0,ie.tZ)(Mn,{}))})),(0,ie.tZ)(pt,(0,o.Z)({onClick:function(e){u(e,l+1)},disabled:-1!==r&&l>=Math.ceil(r/s)-1,color:"inherit","aria-label":i("next",l),title:i("next",l)},a,{children:"rtl"===p.direction?tS||(tS=(0,ie.tZ)(Mn,{})):nS||(nS=(0,ie.tZ)(An,{}))})),d&&(0,ie.tZ)(pt,{onClick:function(e){u(e,Math.max(0,Math.ceil(r/s)-1))},disabled:l>=Math.ceil(r/s)-1,"aria-label":i("last",l),title:i("last",l),children:"rtl"===p.direction?rS||(rS=(0,ie.tZ)(hS,{})):oS||(oS=(0,ie.tZ)(pS,{}))})]}))})),gS=vS;function yS(e){return(0,ne.Z)("MuiTablePagination",e)}var bS,xS=(0,re.Z)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]),ZS=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton"],wS=(0,J.ZP)(Xd,{name:"MuiTablePagination",slot:"Root",overridesResolver:function(e,t){return t.root}})((function(e){var t=e.theme;return{overflow:"auto",color:t.palette.text.primary,fontSize:t.typography.pxToRem(14),"&:last-child":{padding:0}}})),DS=(0,J.ZP)(Qg,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:function(e,t){return(0,o.Z)((0,q.Z)({},"& .".concat(xS.actions),t.actions),t.toolbar)}})((function(e){var t,n=e.theme;return t={minHeight:52,paddingRight:2},(0,q.Z)(t,"".concat(n.breakpoints.up("xs")," and (orientation: landscape)"),{minHeight:52}),(0,q.Z)(t,n.breakpoints.up("sm"),{minHeight:52,paddingRight:2}),(0,q.Z)(t,"& .".concat(xS.actions),{flexShrink:0,marginLeft:20}),t})),kS=(0,J.ZP)("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:function(e,t){return t.spacer}})({flex:"1 1 100%"}),SS=(0,J.ZP)("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:function(e,t){return t.selectLabel}})((function(e){var t=e.theme;return(0,o.Z)({},t.typography.body2,{flexShrink:0})})),CS=(0,J.ZP)(Bm,{name:"MuiTablePagination",slot:"Select",overridesResolver:function(e,t){var n;return(0,o.Z)((n={},(0,q.Z)(n,"& .".concat(xS.selectIcon),t.selectIcon),(0,q.Z)(n,"& .".concat(xS.select),t.select),n),t.input,t.selectRoot)}})((0,q.Z)({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8},"& .".concat(xS.select),{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"})),_S=(0,J.ZP)(Jm,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:function(e,t){return t.menuItem}})({}),ES=(0,J.ZP)("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:function(e,t){return t.displayedRows}})((function(e){var t=e.theme;return(0,o.Z)({},t.typography.body2,{flexShrink:0})}));function MS(e){var t=e.from,n=e.to,r=e.count;return"".concat(t,"\u2013").concat(n," of ").concat(-1!==r?r:"more than ".concat(n))}function AS(e){return"Go to ".concat(e," page")}var PS=t.forwardRef((function(e,n){var r,i=(0,ee.Z)({props:e,name:"MuiTablePagination"}),a=i.ActionsComponent,u=void 0===a?gS:a,l=i.backIconButtonProps,s=i.className,c=i.colSpan,d=i.component,f=void 0===d?Xd:d,p=i.count,h=i.getItemAriaLabel,m=void 0===h?AS:h,v=i.labelDisplayedRows,g=void 0===v?MS:v,y=i.labelRowsPerPage,b=void 0===y?"Rows per page:":y,x=i.nextIconButtonProps,Z=i.onPageChange,w=i.onRowsPerPageChange,D=i.page,k=i.rowsPerPage,S=i.rowsPerPageOptions,C=void 0===S?[10,25,50,100]:S,_=i.SelectProps,E=void 0===_?{}:_,M=i.showFirstButton,A=void 0!==M&&M,P=i.showLastButton,T=void 0!==P&&P,R=(0,X.Z)(i,ZS),F=i,O=function(e){var t=e.classes;return(0,K.Z)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},yS,t)}(F),B=E.native?"option":_S;f!==Xd&&"td"!==f||(r=c||1e3);var I=(0,ld.Z)(E.id),L=(0,ld.Z)(E.labelId);return(0,ie.tZ)(wS,(0,o.Z)({colSpan:r,ref:n,as:f,ownerState:F,className:(0,G.Z)(O.root,s)},R,{children:(0,ie.BX)(DS,{className:O.toolbar,children:[(0,ie.tZ)(kS,{className:O.spacer}),C.length>1&&(0,ie.tZ)(SS,{className:O.selectLabel,id:L,children:b}),C.length>1&&(0,ie.tZ)(CS,(0,o.Z)({variant:"standard",input:bS||(bS=(0,ie.tZ)(qf,{})),value:k,onChange:w,id:I,labelId:L},E,{classes:(0,o.Z)({},E.classes,{root:(0,G.Z)(O.input,O.selectRoot,(E.classes||{}).root),select:(0,G.Z)(O.select,(E.classes||{}).select),icon:(0,G.Z)(O.selectIcon,(E.classes||{}).icon)}),children:C.map((function(e){return(0,t.createElement)(B,(0,o.Z)({},!Ps(B)&&{ownerState:F},{className:O.menuItem,key:e.label?e.label:e,value:e.value?e.value:e}),e.label?e.label:e)}))})),(0,ie.tZ)(ES,{className:O.displayedRows,children:g({from:0===p?0:D*k+1,to:-1===p?(D+1)*k:-1===k?p:Math.min(p,(D+1)*k),count:-1===p?-1:p,page:D})}),(0,ie.tZ)(u,{className:O.actions,backIconButtonProps:l,count:p,nextIconButtonProps:x,onPageChange:Z,page:D,rowsPerPage:k,showFirstButton:A,showLastButton:T,getItemAriaLabel:m})]})}))})),TS=PS,RS={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function FS(e){var t=e.order,n=e.orderBy,r=e.onRequestSort,o=e.headerCells;return(0,ie.tZ)(lf,{children:(0,ie.tZ)(hf,{children:o.map((function(e){return(0,ie.tZ)(Xd,{align:e.numeric?"right":"left",sortDirection:n===e.id&&t,children:(0,ie.BX)(wf,{active:n===e.id,direction:n===e.id?t:"asc",onClick:(o=e.id,function(e){r(e,o)}),children:[e.label,n===e.id?(0,ie.tZ)(fi,{component:"span",sx:RS,children:"desc"===t?"sorted descending":"sorted ascending"}):null]})},e.id);var o}))})})}function OS(e,t,n){return t[n]
'+(n?e:Zk(e,!0))+"
\n":""+(n?e:Zk(e,!0))+"
\n"}},{key:"blockquote",value:function(e){return"\n".concat(e,"\n")}},{key:"html",value:function(e){return e}},{key:"heading",value:function(e,t,n,r){if(this.options.headerIds){var o=this.options.headerPrefix+r.slug(n);return"
".concat(e,"
\n")}},{key:"table",value:function(e,t){return t&&(t="".concat(t,"")),"".concat(e,"
")}},{key:"br",value:function(){return this.options.xhtml?""+Zk(l.message+"",!0)+"";throw l}}Gk.options=Gk.setOptions=function(e){var t;return Fk(Gk.defaults,e),t=Gk.defaults,hk=t,Gk},Gk.getDefaults=pk,Gk.defaults=hk,Gk.use=function(){for(var e=arguments.length,t=new Array(e),n=0;n
"+Zk(r.message+"",!0)+"";throw r}},Gk.Parser=Xk,Gk.parser=Xk.parse,Gk.Renderer=Yk,Gk.TextRenderer=Uk,Gk.Lexer=Vk,Gk.lexer=Vk.lex,Gk.Tokenizer=zk,Gk.Slugger=qk,Gk.parse=Gk;Gk.options,Gk.setOptions,Gk.use,Gk.walkTokens,Gk.parseInline,Xk.parse,Vk.lex;var Kk,Qk,Jk,eS,tS,nS,rS,oS,iS=function(e){var n=e.title,o=e.description,i=e.unit,a=e.expr,u=e.showLegend,l=e.filename,s=e.alias,c=ao().time.period,d=uo(),f=(0,t.useRef)(null),p=(0,t.useState)(!0),h=(0,r.Z)(p,2),m=h[0],v=h[1],g=(0,t.useState)({enable:!1,value:c.step||1}),y=(0,r.Z)(g,2),b=y[0],x=y[1],Z=(0,t.useState)({limits:{enable:!1,range:{1:[0,0]}}}),w=(0,r.Z)(Z,2),D=w[0],k=w[1],S=(0,t.useMemo)((function(){return Array.isArray(a)&&a.every((function(e){return e}))}),[a]),C=Yv({predefinedQuery:S?a:[],display:"chart",visible:m,customStep:b}),_=C.isLoading,E=C.graphData,M=C.error,A=function(e){var t=vn({},D);t.limits.range=e,k(t)};return(0,t.useEffect)((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){return v(e.isIntersecting)}))}),{threshold:.1});return f.current&&e.observe(f.current),function(){f.current&&e.unobserve(f.current)}}),[]),S?(0,ie.BX)(fi,{border:"1px solid",borderRadius:"2px",borderColor:"divider",width:"100%",height:"100%",ref:f,children:[(0,ie.BX)(fi,{px:2,py:1,display:"flex",flexWrap:"wrap",width:"100%",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid",borderColor:"divider",children:[(0,ie.tZ)(xd,{arrow:!0,componentsProps:{tooltip:{sx:{maxWidth:"100%"}}},title:(0,ie.BX)(fi,{sx:{p:1},children:[o&&(0,ie.BX)(fi,{mb:2,children:[(0,ie.tZ)(cv,{fontWeight:"500",sx:{mb:.5,textDecoration:"underline"},children:"Description:"}),(0,ie.tZ)("div",{className:"panelDescription",dangerouslySetInnerHTML:{__html:Gk.parse(o)}})]}),(0,ie.BX)(fi,{children:[(0,ie.tZ)(cv,{fontWeight:"500",sx:{mb:.5,textDecoration:"underline"},children:"Queries:"}),(0,ie.tZ)("div",{children:a.map((function(e,t){return(0,ie.tZ)(fi,{mb:.5,children:e},"".concat(t,"_").concat(e))}))})]})]}),children:(0,ie.tZ)(fk.Z,{color:"info",sx:{mr:1}})}),(0,ie.tZ)(cv,{component:"div",variant:"subtitle1",fontWeight:500,sx:{mr:2,py:1,flexGrow:"1"},children:n||""}),(0,ie.tZ)(fi,{mr:2,py:1,children:(0,ie.tZ)(Rv,{defaultStep:c.step,customStepEnable:b.enable,setStep:function(e){return x(vn(vn({},b),{},{value:e}))},toggleEnableStep:function(){return x(vn(vn({},b),{},{enable:!b.enable}))}})}),(0,ie.tZ)(cg,{yaxis:D,setYaxisLimits:A,toggleEnableLimits:function(){var e=vn({},D);e.limits.enable=!e.limits.enable,k(e)}})]}),(0,ie.BX)(fi,{px:2,pb:2,children:[_&&(0,ie.tZ)(Ag,{isLoading:!0,height:"500px"}),M&&(0,ie.tZ)(_t,{color:"error",severity:"error",sx:{whiteSpace:"pre-wrap",mt:2},children:M}),E&&(0,ie.tZ)(Ed,{data:E,period:c,customStep:b,query:a,yaxis:D,unit:i,alias:s,showLegend:u,setYaxisLimits:A,setPeriod:function(e){var t=e.from,n=e.to;d({type:"SET_PERIOD",payload:{from:t,to:n}})}})]})]}):(0,ie.BX)(_t,{color:"error",severity:"error",sx:{m:4},children:[(0,ie.tZ)("code",{children:'"expr"'})," not found. Check the configuration file ",(0,ie.tZ)("b",{children:l}),"."]})},aS={position:"absolute",top:0,bottom:0,width:"10px",opacity:0,cursor:"ew-resize"},uS=function(e){var n=e.index,o=e.title,i=e.panels,a=e.filename,u=Ss(document.body),l=(0,t.useMemo)((function(){return u.width/12}),[u]),s=(0,t.useState)([]),c=(0,r.Z)(s,2),d=c[0],f=c[1];(0,t.useEffect)((function(){f(i.map((function(e){return e.width||12})))}),[i]);var p=(0,t.useState)({start:0,target:0,enable:!1}),h=(0,r.Z)(p,2),m=h[0],v=h[1],g=function(e){if(m.enable){var t=m.start,n=Math.ceil((t-e.clientX)/l);if(!(Math.abs(n)>=12)){var r=d.map((function(e,t){return e-(t===m.target?n:0)}));f(r)}}},y=function(){v(vn(vn({},m),{},{enable:!1}))};return(0,t.useEffect)((function(){return window.addEventListener("mousemove",g),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",y)}}),[m]),(0,ie.BX)(KD,{defaultExpanded:!n,sx:{boxShadow:"none"},children:[(0,ie.tZ)(ik,{sx:{px:3,bgcolor:"rgba(227, 242, 253, 0.6)"},"aria-controls":"panel".concat(n,"-content"),id:"panel".concat(n,"-header"),expandIcon:(0,ie.tZ)(dk.Z,{}),children:(0,ie.BX)(fi,{display:"flex",alignItems:"center",width:"100%",children:[o&&(0,ie.tZ)(cv,{variant:"h6",fontWeight:"bold",sx:{mr:2},children:o}),i&&(0,ie.BX)(cv,{variant:"body2",fontStyle:"italic",children:["(",i.length," panels)"]})]})}),(0,ie.tZ)(ck,{sx:{display:"grid",gridGap:"10px"},children:(0,ie.tZ)(rb,{container:!0,spacing:2,children:Array.isArray(i)&&i.length?i.map((function(e,t){return(0,ie.tZ)(rb,{item:!0,xs:d[t],sx:{transition:"200ms"},children:(0,ie.BX)(fi,{position:"relative",height:"100%",children:[(0,ie.tZ)(iS,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:a,showLegend:e.showLegend}),(0,ie.tZ)("button",{style:vn(vn({},aS),{},{right:0}),onMouseDown:function(e){return function(e,t){v({start:e.clientX,target:t,enable:!0})}(e,t)}})]})},t)})):(0,ie.BX)(_t,{color:"error",severity:"error",sx:{m:4},children:[(0,ie.tZ)("code",{children:'"panels"'})," not found. Check the configuration file ",(0,ie.tZ)("b",{children:a}),"."]})})})]})},lS=function(){var e=(0,t.useState)(),n=(0,r.Z)(e,2),o=n[0],i=n[1],a=(0,t.useState)(0),u=(0,r.Z)(a,2),l=u[0],s=u[1],c=(0,t.useMemo)((function(){return br()(o,[l,"filename"],"")}),[o,l]),d=(0,t.useMemo)((function(){return br()(o,[l,"rows"],[])}),[o,l]);return(0,t.useEffect)((function(){RD().then((function(e){return e.length&&i(e)}))}),[]),(0,ie.BX)(ie.HY,{children:[!o&&(0,ie.tZ)(_t,{color:"info",severity:"info",sx:{m:4},children:"Dashboards not found"}),o&&(0,ie.BX)(ie.HY,{children:[(0,ie.tZ)(fi,{sx:{borderBottom:1,borderColor:"divider"},children:(0,ie.tZ)(Jn,{value:l,onChange:function(e,t){return s(t)},"aria-label":"dashboard-tabs",children:o&&o.map((function(e,t){return(0,ie.tZ)(ur,{label:e.title||e.filename,id:"tab-".concat(t),"aria-controls":"tabpanel-".concat(t)},t)}))})}),(0,ie.tZ)(fi,{children:Array.isArray(d)&&d.length?d.map((function(e,t){return(0,ie.tZ)(uS,{index:t,filename:c,title:e.title,panels:e.panels},"".concat(l,"_").concat(t))})):(0,ie.BX)(_t,{color:"error",severity:"error",sx:{m:4},children:[(0,ie.tZ)("code",{children:'"rows"'})," not found. Check the configuration file ",(0,ie.tZ)("b",{children:c}),"."]})})]})]})},sS=function(e,t){var n=t.match?"&match[]=".concat(t.match):"";return"".concat(e,"/api/v1/status/tsdb?topN=").concat(t.topN,"&date=").concat(t.date).concat(n)},cS=jv(),dS=zv().serverURL,fS={totalSeries:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]},pS=(0,ht.Z)((0,ie.tZ)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),hS=(0,ht.Z)((0,ie.tZ)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),mS=["backIconButtonProps","count","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton"],vS=t.forwardRef((function(e,t){var n=e.backIconButtonProps,r=e.count,i=e.getItemAriaLabel,a=e.nextIconButtonProps,u=e.onPageChange,l=e.page,s=e.rowsPerPage,c=e.showFirstButton,d=e.showLastButton,f=(0,X.Z)(e,mS),p=Ot();return(0,ie.BX)("div",(0,o.Z)({ref:t},f,{children:[c&&(0,ie.tZ)(pt,{onClick:function(e){u(e,0)},disabled:0===l,"aria-label":i("first",l),title:i("first",l),children:"rtl"===p.direction?Kk||(Kk=(0,ie.tZ)(pS,{})):Qk||(Qk=(0,ie.tZ)(hS,{}))}),(0,ie.tZ)(pt,(0,o.Z)({onClick:function(e){u(e,l-1)},disabled:0===l,color:"inherit","aria-label":i("previous",l),title:i("previous",l)},n,{children:"rtl"===p.direction?Jk||(Jk=(0,ie.tZ)(An,{})):eS||(eS=(0,ie.tZ)(Mn,{}))})),(0,ie.tZ)(pt,(0,o.Z)({onClick:function(e){u(e,l+1)},disabled:-1!==r&&l>=Math.ceil(r/s)-1,color:"inherit","aria-label":i("next",l),title:i("next",l)},a,{children:"rtl"===p.direction?tS||(tS=(0,ie.tZ)(Mn,{})):nS||(nS=(0,ie.tZ)(An,{}))})),d&&(0,ie.tZ)(pt,{onClick:function(e){u(e,Math.max(0,Math.ceil(r/s)-1))},disabled:l>=Math.ceil(r/s)-1,"aria-label":i("last",l),title:i("last",l),children:"rtl"===p.direction?rS||(rS=(0,ie.tZ)(hS,{})):oS||(oS=(0,ie.tZ)(pS,{}))})]}))})),gS=vS;function yS(e){return(0,ne.Z)("MuiTablePagination",e)}var bS,xS=(0,re.Z)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]),ZS=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton"],wS=(0,J.ZP)(Xd,{name:"MuiTablePagination",slot:"Root",overridesResolver:function(e,t){return t.root}})((function(e){var t=e.theme;return{overflow:"auto",color:t.palette.text.primary,fontSize:t.typography.pxToRem(14),"&:last-child":{padding:0}}})),DS=(0,J.ZP)(Qg,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:function(e,t){return(0,o.Z)((0,q.Z)({},"& .".concat(xS.actions),t.actions),t.toolbar)}})((function(e){var t,n=e.theme;return t={minHeight:52,paddingRight:2},(0,q.Z)(t,"".concat(n.breakpoints.up("xs")," and (orientation: landscape)"),{minHeight:52}),(0,q.Z)(t,n.breakpoints.up("sm"),{minHeight:52,paddingRight:2}),(0,q.Z)(t,"& .".concat(xS.actions),{flexShrink:0,marginLeft:20}),t})),kS=(0,J.ZP)("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:function(e,t){return t.spacer}})({flex:"1 1 100%"}),SS=(0,J.ZP)("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:function(e,t){return t.selectLabel}})((function(e){var t=e.theme;return(0,o.Z)({},t.typography.body2,{flexShrink:0})})),CS=(0,J.ZP)(Bm,{name:"MuiTablePagination",slot:"Select",overridesResolver:function(e,t){var n;return(0,o.Z)((n={},(0,q.Z)(n,"& .".concat(xS.selectIcon),t.selectIcon),(0,q.Z)(n,"& .".concat(xS.select),t.select),n),t.input,t.selectRoot)}})((0,q.Z)({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8},"& .".concat(xS.select),{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"})),_S=(0,J.ZP)(Jm,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:function(e,t){return t.menuItem}})({}),ES=(0,J.ZP)("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:function(e,t){return t.displayedRows}})((function(e){var t=e.theme;return(0,o.Z)({},t.typography.body2,{flexShrink:0})}));function MS(e){var t=e.from,n=e.to,r=e.count;return"".concat(t,"\u2013").concat(n," of ").concat(-1!==r?r:"more than ".concat(n))}function AS(e){return"Go to ".concat(e," page")}var PS=t.forwardRef((function(e,n){var r,i=(0,ee.Z)({props:e,name:"MuiTablePagination"}),a=i.ActionsComponent,u=void 0===a?gS:a,l=i.backIconButtonProps,s=i.className,c=i.colSpan,d=i.component,f=void 0===d?Xd:d,p=i.count,h=i.getItemAriaLabel,m=void 0===h?AS:h,v=i.labelDisplayedRows,g=void 0===v?MS:v,y=i.labelRowsPerPage,b=void 0===y?"Rows per page:":y,x=i.nextIconButtonProps,Z=i.onPageChange,w=i.onRowsPerPageChange,D=i.page,k=i.rowsPerPage,S=i.rowsPerPageOptions,C=void 0===S?[10,25,50,100]:S,_=i.SelectProps,E=void 0===_?{}:_,M=i.showFirstButton,A=void 0!==M&&M,P=i.showLastButton,T=void 0!==P&&P,R=(0,X.Z)(i,ZS),F=i,O=function(e){var t=e.classes;return(0,K.Z)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},yS,t)}(F),B=E.native?"option":_S;f!==Xd&&"td"!==f||(r=c||1e3);var I=(0,ld.Z)(E.id),L=(0,ld.Z)(E.labelId);return(0,ie.tZ)(wS,(0,o.Z)({colSpan:r,ref:n,as:f,ownerState:F,className:(0,G.Z)(O.root,s)},R,{children:(0,ie.BX)(DS,{className:O.toolbar,children:[(0,ie.tZ)(kS,{className:O.spacer}),C.length>1&&(0,ie.tZ)(SS,{className:O.selectLabel,id:L,children:b}),C.length>1&&(0,ie.tZ)(CS,(0,o.Z)({variant:"standard",input:bS||(bS=(0,ie.tZ)(qf,{})),value:k,onChange:w,id:I,labelId:L},E,{classes:(0,o.Z)({},E.classes,{root:(0,G.Z)(O.input,O.selectRoot,(E.classes||{}).root),select:(0,G.Z)(O.select,(E.classes||{}).select),icon:(0,G.Z)(O.selectIcon,(E.classes||{}).icon)}),children:C.map((function(e){return(0,t.createElement)(B,(0,o.Z)({},!Ps(B)&&{ownerState:F},{className:O.menuItem,key:e.label?e.label:e,value:e.value?e.value:e}),e.label?e.label:e)}))})),(0,ie.tZ)(ES,{className:O.displayedRows,children:g({from:0===p?0:D*k+1,to:-1===p?(D+1)*k:-1===k?p:Math.min(p,(D+1)*k),count:-1===p?-1:p,page:D})}),(0,ie.tZ)(u,{className:O.actions,backIconButtonProps:l,count:p,nextIconButtonProps:x,onPageChange:Z,page:D,rowsPerPage:k,showFirstButton:A,showLastButton:T,getItemAriaLabel:m})]})}))})),TS=PS,RS={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function FS(e){var t=e.order,n=e.orderBy,r=e.onRequestSort,o=e.headerCells;return(0,ie.tZ)(lf,{children:(0,ie.tZ)(hf,{children:o.map((function(e){return(0,ie.tZ)(Xd,{align:e.numeric?"right":"left",sortDirection:n===e.id&&t,children:(0,ie.BX)(wf,{active:n===e.id,direction:n===e.id?t:"asc",onClick:(o=e.id,function(e){r(e,o)}),children:[e.label,n===e.id?(0,ie.tZ)(fi,{component:"span",sx:RS,children:"desc"===t?"sorted descending":"sorted ascending"}):null]})},e.id);var o}))})})}function OS(e,t,n){return t[n]