diff --git a/app/vmselect/vmui/asset-manifest.json b/app/vmselect/vmui/asset-manifest.json index 89167952b..42af29339 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.9a291a47.css", - "main.js": "./static/js/main.9d62d7df.js", + "main.js": "./static/js/main.e3ded72d.js", "static/js/27.c1ccfd29.chunk.js": "./static/js/27.c1ccfd29.chunk.js", "index.html": "./index.html" }, "entrypoints": [ "static/css/main.9a291a47.css", - "static/js/main.9d62d7df.js" + "static/js/main.e3ded72d.js" ] } \ No newline at end of file diff --git a/app/vmselect/vmui/index.html b/app/vmselect/vmui/index.html index b3afcba0a..5b1d42b0c 100644 --- a/app/vmselect/vmui/index.html +++ b/app/vmselect/vmui/index.html @@ -1 +1 @@ -
'+(n?e:Sf(e,!0))+"
\n":""+(n?e:Sf(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 i=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?""+Sf(e.message+"",!0)+"";throw e}try{var l=Zf.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(nd.walkTokens(l,t.walkTokens)).then((function(){return td.parse(l,t)})).catch(u);nd.walkTokens(l,t.walkTokens)}return td.parse(l,t)}catch(s){u(s)}}nd.options=nd.setOptions=function(e){var t;return jf(nd.defaults,e),t=nd.defaults,bf=t,nd},nd.getDefaults=_f,nd.defaults=bf,nd.use=function(){for(var e=nd.defaults.extensions||{renderers:{},childTokens:{}},t=arguments.length,n=new Array(t),r=0;r
"+Sf(s.message+"",!0)+"";throw s}},nd.Parser=td,nd.parser=td.parse,nd.Renderer=Kf,nd.TextRenderer=Xf,nd.Lexer=Zf,nd.lexer=Zf.lex,nd.Tokenizer=qf,nd.Slugger=ed,nd.parse=nd;nd.options,nd.setOptions,nd.use,nd.walkTokens,nd.parseInline,td.parse,Zf.lex;var rd=function(e){var t=e.title,n=e.description,r=e.unit,i=e.expr,o=e.showLegend,a=e.filename,u=e.alias,l=li(),c=l.period,s=l.duration,f=ci(),d=Hs(s),h=ie(null),p=At(ee(!0),2),v=p[0],m=p[1],g=At(ee(c.step||"1s"),2),_=g[0],b=g[1],D=At(ee({limits:{enable:!1,range:{1:[0,0]}}}),2),w=D[0],x=D[1],k=ae((function(){return Array.isArray(i)&&i.every((function(e){return e}))}),[i]),C=Zs({predefinedQuery:k?i:[],display:"chart",visible:v,customStep:_}),E=C.isLoading,S=C.graphData,A=C.error,F=C.warning,N=function(e){var t=or({},w);t.limits.range=e,x(t)};if(ne((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){return m(e.isIntersecting)}))}),{threshold:.1});return h.current&&e.observe(h.current),function(){h.current&&e.unobserve(h.current)}}),[]),ne((function(){s!==d&&d&&_&&b(c.step||"1s")}),[s,d]),!k)return wr(Eo,{variant:"error",children:[wr("code",{children:'"expr"'})," not found. Check the configuration file ",wr("b",{children:a}),"."]});var O=function(){return wr("div",{className:"vm-predefined-panel-header__description vm-default-styles",children:[n&&wr(y,{children:[wr("div",{children:[wr("span",{children:"Description:"}),wr("div",{dangerouslySetInnerHTML:{__html:nd.parse(n)}})]}),wr("hr",{})]}),wr("div",{children:[wr("span",{children:"Queries:"}),wr("div",{children:i.map((function(e,t){return wr("div",{children:e},"".concat(t,"_").concat(e))}))})]})]})};return wr("div",{className:"vm-predefined-panel",ref:h,children:[wr("div",{className:"vm-predefined-panel-header",children:[wr(Mo,{title:wr(O,{}),children:wr("div",{className:"vm-predefined-panel-header__info",children:wr(Di,{})})}),wr("h3",{className:"vm-predefined-panel-header__title",children:t||""}),wr("div",{className:"vm-predefined-panel-header__step",children:wr(zs,{defaultStep:c.step,value:_,setStep:b})}),wr(tf,{yaxis:w,setYaxisLimits:N,toggleEnableLimits:function(){var e=or({},w);e.limits.enable=!e.limits.enable,x(e)}})]}),wr("div",{className:"vm-predefined-panel-body",children:[E&&wr(nf,{}),A&&wr(Eo,{variant:"error",children:A}),F&&wr(Eo,{variant:"warning",children:F}),S&&wr(Is,{data:S,period:c,customStep:_,query:i,yaxis:w,unit:r,alias:u,showLegend:o,setYaxisLimits:N,setPeriod:function(e){var t=e.from,n=e.to;f({type:"SET_PERIOD",payload:{from:t,to:n}})},fullWidth:!1})]})]})},id=function(e){var t=e.index,n=e.title,r=e.panels,i=e.filename,o=Zi(document.body),a=ae((function(){return o.width/12}),[o]),u=At(ee(!t),2),l=u[0],c=u[1],s=At(ee([]),2),f=s[0],d=s[1];ne((function(){d(r&&r.map((function(e){return e.width||12})))}),[r]);var h=At(ee({start:0,target:0,enable:!1}),2),p=h[0],v=h[1],m=function(e){if(p.enable){var t=p.start,n=Math.ceil((t-e.clientX)/a);if(!(Math.abs(n)>=12)){var r=f.map((function(e,t){return e-(t===p.target?n:0)}));d(r)}}},y=function(){v(or(or({},p),{},{enable:!1}))},g=function(e){return function(t){!function(e,t){v({start:e.clientX,target:t,enable:!0})}(t,e)}};return ne((function(){return window.addEventListener("mousemove",m),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",y)}}),[p]),wr("div",{className:"vm-predefined-dashboard",children:wr(ea,{defaultExpanded:l,onChange:function(e){return c(e)},title:wr((function(){return wr("div",{className:Qi()({"vm-predefined-dashboard-header":!0,"vm-predefined-dashboard-header_open":l}),children:[(n||i)&&wr("span",{className:"vm-predefined-dashboard-header__title",children:n||"".concat(t+1,". ").concat(i)}),r&&wr("span",{className:"vm-predefined-dashboard-header__count",children:["(",r.length," panels)"]})]})}),{}),children:wr("div",{className:"vm-predefined-dashboard-panels",children:Array.isArray(r)&&r.length?r.map((function(e,t){return wr("div",{className:"vm-predefined-dashboard-panels-panel vm-block vm-block_empty-padding",style:{gridColumn:"span ".concat(f[t])},children:[wr(rd,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:i,showLegend:e.showLegend}),wr("button",{className:"vm-predefined-dashboard-panels-panel__resizer",onMouseDown:g(t)})]},t)})):wr("div",{className:"vm-predefined-dashboard-panels-panel__alert",children:wr(Eo,{variant:"error",children:[wr("code",{children:'"panels"'})," not found. Check the configuration file ",wr("b",{children:i}),"."]})})})})})},od=function(){!function(){var e=li(),t=e.duration,n=e.relativeTime,r=e.period,i=r.date,o=r.step,a=function(){var e,r=hf((rr(e={},"g0.range_input",t),rr(e,"g0.end_input",i),rr(e,"g0.step_input",o),rr(e,"g0.relative_time",n),e));yr(r)};ne(a,[t,n,i,o]),ne(a,[])}();var e=At(ee([]),2),t=e[0],n=e[1],r=At(ee("0"),2),i=r[0],o=r[1],a=ae((function(){return t.map((function(e,t){return{label:e.title||"",value:"".concat(t),className:"vm-predefined-panels-tabs__tab"}}))}),[t]),u=ae((function(){return t[+i]||{}}),[t,i]),l=ae((function(){return null===u||void 0===u?void 0:u.rows}),[u]),c=ae((function(){return u.title||u.filename||""}),[u]),s=ae((function(){return Array.isArray(l)&&!!l.length}),[l]);return ne((function(){gf().then((function(e){return e.length&&n(e)}))}),[]),wr("div",{className:"vm-predefined-panels",children:[!t.length&&wr(Eo,{variant:"info",children:"Dashboards not found"}),a.length>1&&wr("div",{className:"vm-predefined-panels-tabs vm-block vm-block_empty-padding",children:wr(Ki,{activeItem:i,items:a,onChange:function(e){o(e)}})}),wr("div",{className:"vm-predefined-panels__dashboards",children:[s&&l.map((function(e,t){return wr(id,{index:t,filename:c,title:e.title,panels:e.panels},"".concat(i,"_").concat(t))})),!!t.length&&!s&&wr(Eo,{variant:"error",children:[wr("code",{children:'"rows"'})," not found. Check the configuration file ",wr("b",{children:c}),"."]})]})]})},ad=function(e,t){var n=t.match?"&match[]="+encodeURIComponent(t.match):"",r=t.focusLabel?"&focusLabel="+encodeURIComponent(t.focusLabel):"";return"".concat(e,"/api/v1/status/tsdb?topN=").concat(t.topN,"&date=").concat(t.date).concat(n).concat(r)},ud=function(){function e(){Nt(this,e),this.tsdbStatus=void 0,this.tabsNames=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"]}return Bt(e,[{key:"tsdbStatusData",get:function(){return this.tsdbStatus},set:function(e){this.tsdbStatus=e}},{key:"defaultTSDBStatus",get:function(){return{totalSeries:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelName:[],seriesCountByFocusLabelValue:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]}}},{key:"keys",value:function(e){var t=[];return e&&(t=t.concat("seriesCountByFocusLabelValue")),t=t.concat("seriesCountByMetricName","seriesCountByLabelName","seriesCountByLabelValuePair","labelValueCountByLabelName"),t}},{key:"defaultState",get:function(){var e=this;return this.keys("job").reduce((function(t,n){return or(or({},t),{},{tabs:or(or({},t.tabs),{},rr({},n,e.tabsNames)),containerRefs:or(or({},t.containerRefs),{},rr({},n,ie(null))),defaultActiveTab:or(or({},t.defaultActiveTab),{},rr({},n,0))})}),{tabs:{},containerRefs:{},defaultActiveTab:{}})}},{key:"sectionsTitles",value:function(e){return{seriesCountByMetricName:"Metric names with the highest number of series",seriesCountByLabelName:"Labels with the highest number of series",seriesCountByFocusLabelValue:'Values for "'.concat(e,'" label with the highest number of series'),seriesCountByLabelValuePair:"Label=value pairs with the highest number of series",labelValueCountByLabelName:"Labels with the highest number of unique values"}}},{key:"tablesHeaders",get:function(){return{seriesCountByMetricName:ld,seriesCountByLabelName:cd,seriesCountByFocusLabelValue:sd,seriesCountByLabelValuePair:fd,labelValueCountByLabelName:dd}}},{key:"totalSeries",value:function(e){return"labelValueCountByLabelName"===e?-1:this.tsdbStatus.totalSeries}}]),e}(),ld=[{id:"name",label:"Metric name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],cd=[{id:"name",label:"Label name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],sd=[{id:"name",label:"Label value"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],fd=[{id:"name",label:"Label=value pair"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],dd=[{id:"name",label:"Label name"},{id:"value",label:"Number of unique values"},{id:"action",label:"Action"}],hd={seriesCountByMetricName:function(e,t){return pd("__name__",t)},seriesCountByLabelName:function(e,t){return"{".concat(t,'!=""}')},seriesCountByFocusLabelValue:function(e,t){return pd(e,t)},seriesCountByLabelValuePair:function(e,t){var n=t.split("="),r=n[0],i=n.slice(1).join("=");return pd(r,i)},labelValueCountByLabelName:function(e,t){return"{".concat(t,'!=""}')}},pd=function(e,t){return e?"{"+e+"="+JSON.stringify(t)+"}":""},vd=function(e){var t=e.topN,n=e.error,r=e.query,i=e.onSetHistory,o=e.onRunQuery,a=e.onSetQuery,u=e.onTopNChange,l=e.onFocusLabelChange,c=e.totalSeries,s=e.totalLabelValuePairs,f=e.date,d=e.match,h=e.focusLabel,p=pi().autocomplete,v=vi(),m=rf().queryOptions,y=ae((function(){return t<1?"Number must be bigger than zero":""}),[t]);return wr("div",{className:"vm-cardinality-configurator vm-block",children:[wr("div",{className:"vm-cardinality-configurator-controls",children:[wr("div",{className:"vm-cardinality-configurator-controls__query",children:wr(Ps,{value:r||d||"",autocomplete:p,options:m,error:n,onArrowUp:function(){i(-1)},onArrowDown:function(){i(1)},onEnter:o,onChange:a,label:"Time series selector"})}),wr("div",{className:"vm-cardinality-configurator-controls__item",children:wr(Qo,{label:"Number of entries per table",type:"number",value:t,error:y,onChange:u})}),wr("div",{className:"vm-cardinality-configurator-controls__item",children:wr(Qo,{label:"Focus label",type:"text",value:h||"",onChange:l})}),wr("div",{className:"vm-cardinality-configurator-controls__item",children:wr(Us,{label:"Autocomplete",value:p,onChange:function(){v({type:"TOGGLE_AUTOCOMPLETE"})}})})]}),wr("div",{className:"vm-cardinality-configurator-bottom",children:[wr("div",{className:"vm-cardinality-configurator-bottom__info",children:["Analyzed ",wr("b",{children:c})," series with ",wr("b",{children:s}),' "label=value" pairs at ',wr("b",{children:f}),d&&wr("span",{children:[" for series selector ",wr("b",{children:d})]}),". Show top ",t," entries per table."]}),wr(No,{startIcon:wr(Bi,{}),onClick:o,children:"Execute Query"})]})]})};function md(e){var t=e.order,n=e.orderBy,r=e.onRequestSort,i=e.headerCells;return wr("thead",{className:"vm-table-header",children:wr("tr",{className:"vm-table__row vm-table__row_header",children:i.map((function(e){return wr("th",{className:Qi()({"vm-table-cell vm-table-cell_header":!0,"vm-table-cell_sort":"action"!==e.id&&"percentage"!==e.id,"vm-table-cell_right":"action"===e.id}),onClick:(i=e.id,function(e){r(e,i)}),children:wr("div",{className:"vm-table-cell__content",children:[e.label,"action"!==e.id&&"percentage"!==e.id&&wr("div",{className:Qi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":n===e.id,"vm-table__sort-icon_desc":"desc"===t&&n===e.id}),children:wr(Si,{})})]})},e.id);var i}))})})}function yd(e,t,n){return t[n]
'+(n?e:Ef(e,!0))+"
\n":""+(n?e:Ef(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 i=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?""+Ef(e.message+"",!0)+"";throw e}try{var l=Gf.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(td.walkTokens(l,t.walkTokens)).then((function(){return ed.parse(l,t)})).catch(u);td.walkTokens(l,t.walkTokens)}return ed.parse(l,t)}catch(s){u(s)}}td.options=td.setOptions=function(e){var t;return $f(td.defaults,e),t=td.defaults,_f=t,td},td.getDefaults=gf,td.defaults=_f,td.use=function(){for(var e=td.defaults.extensions||{renderers:{},childTokens:{}},t=arguments.length,n=new Array(t),r=0;r
"+Ef(s.message+"",!0)+"";throw s}},td.Parser=ed,td.parser=ed.parse,td.Renderer=Zf,td.TextRenderer=Kf,td.Lexer=Gf,td.lexer=Gf.lex,td.Tokenizer=Vf,td.Slugger=Xf,td.parse=td;td.options,td.setOptions,td.use,td.walkTokens,td.parseInline,ed.parse,Gf.lex;var nd=function(e){var t=e.title,n=e.description,r=e.unit,i=e.expr,o=e.showLegend,a=e.filename,u=e.alias,l=li(),c=l.period,s=l.duration,f=ci(),d=Us(s),h=ie(null),p=At(ee(!0),2),v=p[0],m=p[1],g=At(ee(c.step||"1s"),2),_=g[0],b=g[1],D=At(ee({limits:{enable:!1,range:{1:[0,0]}}}),2),w=D[0],x=D[1],k=ae((function(){return Array.isArray(i)&&i.every((function(e){return e}))}),[i]),C=Gs({predefinedQuery:k?i:[],display:"chart",visible:v,customStep:_}),E=C.isLoading,S=C.graphData,A=C.error,F=C.warning,N=function(e){var t=or({},w);t.limits.range=e,x(t)};if(ne((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){return m(e.isIntersecting)}))}),{threshold:.1});return h.current&&e.observe(h.current),function(){h.current&&e.unobserve(h.current)}}),[]),ne((function(){s!==d&&d&&_&&b(c.step||"1s")}),[s,d]),!k)return wr(Eo,{variant:"error",children:[wr("code",{children:'"expr"'})," not found. Check the configuration file ",wr("b",{children:a}),"."]});var O=function(){return wr("div",{className:"vm-predefined-panel-header__description vm-default-styles",children:[n&&wr(y,{children:[wr("div",{children:[wr("span",{children:"Description:"}),wr("div",{dangerouslySetInnerHTML:{__html:td.parse(n)}})]}),wr("hr",{})]}),wr("div",{children:[wr("span",{children:"Queries:"}),wr("div",{children:i.map((function(e,t){return wr("div",{children:e},"".concat(t,"_").concat(e))}))})]})]})};return wr("div",{className:"vm-predefined-panel",ref:h,children:[wr("div",{className:"vm-predefined-panel-header",children:[wr(Mo,{title:wr(O,{}),children:wr("div",{className:"vm-predefined-panel-header__info",children:wr(Di,{})})}),wr("h3",{className:"vm-predefined-panel-header__title",children:t||""}),wr("div",{className:"vm-predefined-panel-header__step",children:wr(Ps,{defaultStep:c.step,value:_,setStep:b})}),wr(ef,{yaxis:w,setYaxisLimits:N,toggleEnableLimits:function(){var e=or({},w);e.limits.enable=!e.limits.enable,x(e)}})]}),wr("div",{className:"vm-predefined-panel-body",children:[E&&wr(tf,{}),A&&wr(Eo,{variant:"error",children:A}),F&&wr(Eo,{variant:"warning",children:F}),S&&wr(Bs,{data:S,period:c,customStep:_,query:i,yaxis:w,unit:r,alias:u,showLegend:o,setYaxisLimits:N,setPeriod:function(e){var t=e.from,n=e.to;f({type:"SET_PERIOD",payload:{from:t,to:n}})},fullWidth:!1})]})]})},rd=function(e){var t=e.index,n=e.title,r=e.panels,i=e.filename,o=Zi(document.body),a=ae((function(){return o.width/12}),[o]),u=At(ee(!t),2),l=u[0],c=u[1],s=At(ee([]),2),f=s[0],d=s[1];ne((function(){d(r&&r.map((function(e){return e.width||12})))}),[r]);var h=At(ee({start:0,target:0,enable:!1}),2),p=h[0],v=h[1],m=function(e){if(p.enable){var t=p.start,n=Math.ceil((t-e.clientX)/a);if(!(Math.abs(n)>=12)){var r=f.map((function(e,t){return e-(t===p.target?n:0)}));d(r)}}},y=function(){v(or(or({},p),{},{enable:!1}))},g=function(e){return function(t){!function(e,t){v({start:e.clientX,target:t,enable:!0})}(t,e)}};return ne((function(){return window.addEventListener("mousemove",m),window.addEventListener("mouseup",y),function(){window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",y)}}),[p]),wr("div",{className:"vm-predefined-dashboard",children:wr(ea,{defaultExpanded:l,onChange:function(e){return c(e)},title:wr((function(){return wr("div",{className:Qi()({"vm-predefined-dashboard-header":!0,"vm-predefined-dashboard-header_open":l}),children:[(n||i)&&wr("span",{className:"vm-predefined-dashboard-header__title",children:n||"".concat(t+1,". ").concat(i)}),r&&wr("span",{className:"vm-predefined-dashboard-header__count",children:["(",r.length," panels)"]})]})}),{}),children:wr("div",{className:"vm-predefined-dashboard-panels",children:Array.isArray(r)&&r.length?r.map((function(e,t){return wr("div",{className:"vm-predefined-dashboard-panels-panel vm-block vm-block_empty-padding",style:{gridColumn:"span ".concat(f[t])},children:[wr(nd,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:i,showLegend:e.showLegend}),wr("button",{className:"vm-predefined-dashboard-panels-panel__resizer",onMouseDown:g(t)})]},t)})):wr("div",{className:"vm-predefined-dashboard-panels-panel__alert",children:wr(Eo,{variant:"error",children:[wr("code",{children:'"panels"'})," not found. Check the configuration file ",wr("b",{children:i}),"."]})})})})})},id=function(){!function(){var e=li(),t=e.duration,n=e.relativeTime,r=e.period,i=r.date,o=r.step,a=function(){var e,r=df((rr(e={},"g0.range_input",t),rr(e,"g0.end_input",i),rr(e,"g0.step_input",o),rr(e,"g0.relative_time",n),e));yr(r)};ne(a,[t,n,i,o]),ne(a,[])}();var e=At(ee([]),2),t=e[0],n=e[1],r=At(ee("0"),2),i=r[0],o=r[1],a=ae((function(){return t.map((function(e,t){return{label:e.title||"",value:"".concat(t),className:"vm-predefined-panels-tabs__tab"}}))}),[t]),u=ae((function(){return t[+i]||{}}),[t,i]),l=ae((function(){return null===u||void 0===u?void 0:u.rows}),[u]),c=ae((function(){return u.title||u.filename||""}),[u]),s=ae((function(){return Array.isArray(l)&&!!l.length}),[l]);return ne((function(){yf().then((function(e){return e.length&&n(e)}))}),[]),wr("div",{className:"vm-predefined-panels",children:[!t.length&&wr(Eo,{variant:"info",children:"Dashboards not found"}),a.length>1&&wr("div",{className:"vm-predefined-panels-tabs vm-block vm-block_empty-padding",children:wr(Ki,{activeItem:i,items:a,onChange:function(e){o(e)}})}),wr("div",{className:"vm-predefined-panels__dashboards",children:[s&&l.map((function(e,t){return wr(rd,{index:t,filename:c,title:e.title,panels:e.panels},"".concat(i,"_").concat(t))})),!!t.length&&!s&&wr(Eo,{variant:"error",children:[wr("code",{children:'"rows"'})," not found. Check the configuration file ",wr("b",{children:c}),"."]})]})]})},od=function(e,t){var n=t.match?"&match[]="+encodeURIComponent(t.match):"",r=t.focusLabel?"&focusLabel="+encodeURIComponent(t.focusLabel):"";return"".concat(e,"/api/v1/status/tsdb?topN=").concat(t.topN,"&date=").concat(t.date).concat(n).concat(r)},ad=function(){function e(){Nt(this,e),this.tsdbStatus=void 0,this.tabsNames=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"]}return Bt(e,[{key:"tsdbStatusData",get:function(){return this.tsdbStatus},set:function(e){this.tsdbStatus=e}},{key:"defaultTSDBStatus",get:function(){return{totalSeries:0,totalLabelValuePairs:0,seriesCountByMetricName:[],seriesCountByLabelName:[],seriesCountByFocusLabelValue:[],seriesCountByLabelValuePair:[],labelValueCountByLabelName:[]}}},{key:"keys",value:function(e){var t=[];return e&&(t=t.concat("seriesCountByFocusLabelValue")),t=t.concat("seriesCountByMetricName","seriesCountByLabelName","seriesCountByLabelValuePair","labelValueCountByLabelName"),t}},{key:"defaultState",get:function(){var e=this;return this.keys("job").reduce((function(t,n){return or(or({},t),{},{tabs:or(or({},t.tabs),{},rr({},n,e.tabsNames)),containerRefs:or(or({},t.containerRefs),{},rr({},n,ie(null))),defaultActiveTab:or(or({},t.defaultActiveTab),{},rr({},n,0))})}),{tabs:{},containerRefs:{},defaultActiveTab:{}})}},{key:"sectionsTitles",value:function(e){return{seriesCountByMetricName:"Metric names with the highest number of series",seriesCountByLabelName:"Labels with the highest number of series",seriesCountByFocusLabelValue:'Values for "'.concat(e,'" label with the highest number of series'),seriesCountByLabelValuePair:"Label=value pairs with the highest number of series",labelValueCountByLabelName:"Labels with the highest number of unique values"}}},{key:"tablesHeaders",get:function(){return{seriesCountByMetricName:ud,seriesCountByLabelName:ld,seriesCountByFocusLabelValue:cd,seriesCountByLabelValuePair:sd,labelValueCountByLabelName:fd}}},{key:"totalSeries",value:function(e){return"labelValueCountByLabelName"===e?-1:this.tsdbStatus.totalSeries}}]),e}(),ud=[{id:"name",label:"Metric name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],ld=[{id:"name",label:"Label name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],cd=[{id:"name",label:"Label value"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{disablePadding:!1,id:"action",label:"Action",numeric:!1}],sd=[{id:"name",label:"Label=value pair"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],fd=[{id:"name",label:"Label name"},{id:"value",label:"Number of unique values"},{id:"action",label:"Action"}],dd={seriesCountByMetricName:function(e,t){return hd("__name__",t)},seriesCountByLabelName:function(e,t){return"{".concat(t,'!=""}')},seriesCountByFocusLabelValue:function(e,t){return hd(e,t)},seriesCountByLabelValuePair:function(e,t){var n=t.split("="),r=n[0],i=n.slice(1).join("=");return hd(r,i)},labelValueCountByLabelName:function(e,t){return"{".concat(t,'!=""}')}},hd=function(e,t){return e?"{"+e+"="+JSON.stringify(t)+"}":""},pd=function(e){var t=e.topN,n=e.error,r=e.query,i=e.onSetHistory,o=e.onRunQuery,a=e.onSetQuery,u=e.onTopNChange,l=e.onFocusLabelChange,c=e.totalSeries,s=e.totalLabelValuePairs,f=e.date,d=e.match,h=e.focusLabel,p=pi().autocomplete,v=vi(),m=nf().queryOptions,y=ae((function(){return t<1?"Number must be bigger than zero":""}),[t]);return wr("div",{className:"vm-cardinality-configurator vm-block",children:[wr("div",{className:"vm-cardinality-configurator-controls",children:[wr("div",{className:"vm-cardinality-configurator-controls__query",children:wr(Ls,{value:r||d||"",autocomplete:p,options:m,error:n,onArrowUp:function(){i(-1)},onArrowDown:function(){i(1)},onEnter:o,onChange:a,label:"Time series selector"})}),wr("div",{className:"vm-cardinality-configurator-controls__item",children:wr(Qo,{label:"Number of entries per table",type:"number",value:t,error:y,onChange:u})}),wr("div",{className:"vm-cardinality-configurator-controls__item",children:wr(Qo,{label:"Focus label",type:"text",value:h||"",onChange:l})}),wr("div",{className:"vm-cardinality-configurator-controls__item",children:wr(Rs,{label:"Autocomplete",value:p,onChange:function(){v({type:"TOGGLE_AUTOCOMPLETE"})}})})]}),wr("div",{className:"vm-cardinality-configurator-bottom",children:[wr("div",{className:"vm-cardinality-configurator-bottom__info",children:["Analyzed ",wr("b",{children:c})," series with ",wr("b",{children:s}),' "label=value" pairs at ',wr("b",{children:f}),d&&wr("span",{children:[" for series selector ",wr("b",{children:d})]}),". Show top ",t," entries per table."]}),wr(No,{startIcon:wr(Bi,{}),onClick:o,children:"Execute Query"})]})]})};function vd(e){var t=e.order,n=e.orderBy,r=e.onRequestSort,i=e.headerCells;return wr("thead",{className:"vm-table-header",children:wr("tr",{className:"vm-table__row vm-table__row_header",children:i.map((function(e){return wr("th",{className:Qi()({"vm-table-cell vm-table-cell_header":!0,"vm-table-cell_sort":"action"!==e.id&&"percentage"!==e.id,"vm-table-cell_right":"action"===e.id}),onClick:(i=e.id,function(e){r(e,i)}),children:wr("div",{className:"vm-table-cell__content",children:[e.label,"action"!==e.id&&"percentage"!==e.id&&wr("div",{className:Qi()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":n===e.id,"vm-table__sort-icon_desc":"desc"===t&&n===e.id}),children:wr(Si,{})})]})},e.id);var i}))})})}function md(e,t,n){return t[n]