diff --git a/app/vmselect/vmui/asset-manifest.json b/app/vmselect/vmui/asset-manifest.json index 3d603828e..337eb83c7 100644 --- a/app/vmselect/vmui/asset-manifest.json +++ b/app/vmselect/vmui/asset-manifest.json @@ -1,14 +1,14 @@ { "files": { - "main.css": "./static/css/main.08ded1c6.css", - "main.js": "./static/js/main.2aca3017.js", + "main.css": "./static/css/main.b9c2d13c.css", + "main.js": "./static/js/main.40a4969a.js", "static/js/27.c1ccfd29.chunk.js": "./static/js/27.c1ccfd29.chunk.js", "static/media/Lato-Regular.ttf": "./static/media/Lato-Regular.d714fec1633b69a9c2e9.ttf", "static/media/Lato-Bold.ttf": "./static/media/Lato-Bold.32360ba4b57802daa4d6.ttf", "index.html": "./index.html" }, "entrypoints": [ - "static/css/main.08ded1c6.css", - "static/js/main.2aca3017.js" + "static/css/main.b9c2d13c.css", + "static/js/main.40a4969a.js" ] } \ No newline at end of file diff --git a/app/vmselect/vmui/index.html b/app/vmselect/vmui/index.html index 0d0229309..edfdd286a 100644 --- a/app/vmselect/vmui/index.html +++ b/app/vmselect/vmui/index.html @@ -1 +1 @@ -
'+(n?e:vd(e,!0))+"
\n":""+(n?e:vd(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?""+vd(e.message+"",!0)+"";throw e}try{var l=zd.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(Yd.walkTokens(l,t.walkTokens)).then((function(){return Ud.parse(l,t)})).catch(u);Yd.walkTokens(l,t.walkTokens)}return Ud.parse(l,t)}catch(s){u(s)}}Yd.options=Yd.setOptions=function(e){var t;return Sd(Yd.defaults,e),t=Yd.defaults,ld=t,Yd},Yd.getDefaults=ud,Yd.defaults=ld,Yd.use=function(){for(var e=Yd.defaults.extensions||{renderers:{},childTokens:{}},t=arguments.length,n=new Array(t),r=0;r
"+vd(s.message+"",!0)+"";throw s}},Yd.Parser=Ud,Yd.parser=Ud.parse,Yd.Renderer=jd,Yd.TextRenderer=$d,Yd.Lexer=zd,Yd.lexer=zd.lex,Yd.Tokenizer=Bd,Yd.Slugger=Hd,Yd.parse=Yd;Yd.options,Yd.setOptions,Yd.use,Yd.walkTokens,Yd.parseInline,Ud.parse,zd.lex;var Vd=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=Si().period,c=Ho().customStep,s=Ni(),f=ie(null),d=Ft(ee(!1),2),h=d[0],p=d[1],v=Ft(ee({limits:{enable:!1,range:{1:[0,0]}}}),2),m=v[0],y=v[1],_=ae((function(){return Array.isArray(i)&&i.every((function(e){return e}))}),[i]),b=Hf({predefinedQuery:_?i:[],display:"chart",visible:h,customStep:c}),D=b.isLoading,w=b.graphData,x=b.error,k=b.warning,C=function(e){var t=mr({},m);t.limits.range=e,y(t)};if(ne((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){return p(e.isIntersecting)}))}),{threshold:.1});return f.current&&e.observe(f.current),function(){f.current&&e.unobserve(f.current)}}),[f]),!_)return Yr(ea,{variant:"error",children:[Yr("code",{children:'"expr"'})," not found. Check the configuration file ",Yr("b",{children:a}),"."]});var A=function(){return Yr("div",{className:"vm-predefined-panel-header__description vm-default-styles",children:[n&&Yr(g,{children:[Yr("div",{children:[Yr("span",{children:"Description:"}),Yr("div",{dangerouslySetInnerHTML:{__html:Yd.parse(n)}})]}),Yr("hr",{})]}),Yr("div",{children:[Yr("span",{children:"Queries:"}),Yr("div",{children:i.map((function(e,t){return Yr("div",{children:e},"".concat(t,"_").concat(e))}))})]})]})};return Yr("div",{className:"vm-predefined-panel",ref:f,children:[Yr("div",{className:"vm-predefined-panel-header",children:[Yr(pa,{title:Yr(A,{}),children:Yr("div",{className:"vm-predefined-panel-header__info",children:Yr($i,{})})}),Yr("h3",{className:"vm-predefined-panel-header__title",children:t||""}),Yr(qf,{yaxis:m,setYaxisLimits:C,toggleEnableLimits:function(){var e=mr({},m);e.limits.enable=!e.limits.enable,y(e)}})]}),Yr("div",{className:"vm-predefined-panel-body",children:[D&&Yr(Wf,{}),x&&Yr(ea,{variant:"error",children:x}),k&&Yr(ea,{variant:"warning",children:k}),w&&Yr(Nf,{data:w,period:l,customStep:c,query:i,yaxis:m,unit:r,alias:u,showLegend:o,setYaxisLimits:C,setPeriod:function(e){var t=e.from,n=e.to;s({type:"SET_PERIOD",payload:{from:t,to:n}})},fullWidth:!1})]})]})},qd=function(e){var t=e.index,n=e.title,r=e.panels,i=e.filename,o=Do(document.body),a=ae((function(){return o.width/12}),[o]),u=Ft(ee(!t),2),l=u[0],c=u[1],s=Ft(ee([]),2),f=s[0],d=s[1];ne((function(){d(r&&r.map((function(e){return e.width||12})))}),[r]);var h=Ft(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)}}},g=function(){v(mr(mr({},p),{},{enable:!1}))},y=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",g),function(){window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",g)}}),[p]),Yr("div",{className:"vm-predefined-dashboard",children:Yr(Ba,{defaultExpanded:l,onChange:function(e){return c(e)},title:Yr((function(){return Yr("div",{className:xo()({"vm-predefined-dashboard-header":!0,"vm-predefined-dashboard-header_open":l}),children:[(n||i)&&Yr("span",{className:"vm-predefined-dashboard-header__title",children:n||"".concat(t+1,". ").concat(i)}),r&&Yr("span",{className:"vm-predefined-dashboard-header__count",children:["(",r.length," panels)"]})]})}),{}),children:Yr("div",{className:"vm-predefined-dashboard-panels",children:Array.isArray(r)&&r.length?r.map((function(e,t){return Yr("div",{className:"vm-predefined-dashboard-panels-panel vm-block vm-block_empty-padding",style:{gridColumn:"span ".concat(f[t])},children:[Yr(Vd,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:i,showLegend:e.showLegend}),Yr("button",{className:"vm-predefined-dashboard-panels-panel__resizer",onMouseDown:y(t)})]},t)})):Yr("div",{className:"vm-predefined-dashboard-panels-panel__alert",children:Yr(ea,{variant:"error",children:[Yr("code",{children:'"panels"'})," not found. Check the configuration file ",Yr("b",{children:i}),"."]})})})})})},Wd=function(){!function(){var e=Si(),t=e.duration,n=e.relativeTime,r=e.period.date,i=Ho().customStep,o=function(){var e,o=rd((pr(e={},"g0.range_input",t),pr(e,"g0.end_input",r),pr(e,"g0.step_input",i),pr(e,"g0.relative_time",n),e));Or(o)};ne(o,[t,n,r,i]),ne(o,[])}();var e=aa(),t=e.dashboardsSettings,n=e.dashboardsLoading,r=e.dashboardsError,i=Ft(ee(0),2),o=i[0],a=i[1],u=ae((function(){return t.map((function(e,t){return{label:e.title||"",value:t}}))}),[t]),l=ae((function(){return t[o]||{}}),[t,o]),c=ae((function(){return null===l||void 0===l?void 0:l.rows}),[l]),s=ae((function(){return l.title||l.filename||""}),[l]),f=ae((function(){return Array.isArray(c)&&!!c.length}),[c]),d=function(e){return function(){!function(e){a(e)}(e)}};return Yr("div",{className:"vm-predefined-panels",children:[n&&Yr(Wf,{}),r&&Yr(ea,{variant:"error",children:r}),!t.length&&Yr(ea,{variant:"info",children:"Dashboards not found"}),u.length>1&&Yr("div",{className:"vm-predefined-panels-tabs vm-block",children:u.map((function(e){return Yr("div",{className:xo()({"vm-predefined-panels-tabs__tab":!0,"vm-predefined-panels-tabs__tab_active":e.value==o}),onClick:d(e.value),children:e.label},e.value)}))}),Yr("div",{className:"vm-predefined-panels__dashboards",children:[f&&c.map((function(e,t){return Yr(qd,{index:t,filename:s,title:e.title,panels:e.panels},"".concat(o,"_").concat(t))})),!!t.length&&!f&&Yr(ea,{variant:"error",children:[Yr("code",{children:'"rows"'})," not found. Check the configuration file ",Yr("b",{children:s}),"."]})]})]})},Qd=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)},Gd=function(){function e(){Mt(this,e),this.tsdbStatus=void 0,this.tabsNames=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"]}return Pt(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 mr(mr({},t),{},{tabs:mr(mr({},t.tabs),{},pr({},n,e.tabsNames)),containerRefs:mr(mr({},t.containerRefs),{},pr({},n,ie(null))),defaultActiveTab:mr(mr({},t.defaultActiveTab),{},pr({},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:Jd,seriesCountByLabelName:Zd,seriesCountByFocusLabelValue:Kd,seriesCountByLabelValuePair:Xd,labelValueCountByLabelName:eh}}},{key:"totalSeries",value:function(e){return"labelValueCountByLabelName"===e?-1:this.tsdbStatus.totalSeries}}]),e}(),Jd=[{id:"name",label:"Metric name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Zd=[{id:"name",label:"Label name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Kd=[{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}],Xd=[{id:"name",label:"Label=value pair"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],eh=[{id:"name",label:"Label name"},{id:"value",label:"Number of unique values"},{id:"action",label:"Action"}],th={seriesCountByMetricName:function(e,t){return nh("__name__",t)},seriesCountByLabelName:function(e,t){return"{".concat(t,'!=""}')},seriesCountByFocusLabelValue:function(e,t){return nh(e,t)},seriesCountByLabelValuePair:function(e,t){var n=t.split("="),r=n[0],i=n.slice(1).join("=");return nh(r,i)},labelValueCountByLabelName:function(e,t){return"{".concat(t,'!=""}')}},nh=function(e,t){return e?"{"+e+"="+JSON.stringify(t)+"}":""},rh=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=Bi().autocomplete,v=Li(),m=Qf().queryOptions,g=ae((function(){return t<1?"Number must be bigger than zero":""}),[t]);return Yr("div",{className:"vm-cardinality-configurator vm-block",children:[Yr("div",{className:"vm-cardinality-configurator-controls",children:[Yr("div",{className:"vm-cardinality-configurator-controls__query",children:Yr(Tf,{value:r,autocomplete:p,options:m,error:n,onArrowUp:function(){i(-1)},onArrowDown:function(){i(1)},onEnter:o,onChange:a,label:"Time series selector"})}),Yr("div",{className:"vm-cardinality-configurator-controls__item",children:Yr(Sa,{label:"Number of entries per table",type:"number",value:t,error:g,onChange:u})}),Yr("div",{className:"vm-cardinality-configurator-controls__item",children:Yr(Sa,{label:"Focus label",type:"text",value:h||"",onChange:l,endIcon:Yr(pa,{title:Yr("div",{children:[Yr("p",{children:"To identify values with the highest number of series for the selected label."}),Yr("p",{children:"Adds a table showing the series with the highest number of series."})]}),children:Yr($i,{})})})})]}),Yr("div",{className:"vm-cardinality-configurator-additional",children:Yr(Of,{label:"Autocomplete",value:p,onChange:function(){v({type:"TOGGLE_AUTOCOMPLETE"})}})}),Yr("div",{className:"vm-cardinality-configurator-bottom",children:[Yr("div",{className:"vm-cardinality-configurator-bottom__info",children:["Analyzed ",Yr("b",{children:c})," series with ",Yr("b",{children:s}),' "label=value" pairs at ',Yr("b",{children:f}),d&&Yr("span",{children:[" for series selector ",Yr("b",{children:d})]}),". Show top ",t," entries per table."]}),Yr("div",{className:"vm-cardinality-configurator-bottom__docs",children:[Yr("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/#cardinality-explorer",rel:"help noreferrer",children:[Yr(mo,{}),"Documentation"]}),Yr("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://victoriametrics.com/blog/cardinality-explorer/",rel:"help noreferrer",children:[Yr(yo,{}),"Example of using"]})]}),Yr(la,{startIcon:Yr(eo,{}),onClick:o,children:"Execute Query"})]})]})};function ih(e){var t=e.order,n=e.orderBy,r=e.onRequestSort,i=e.headerCells;return Yr("thead",{className:"vm-table-header",children:Yr("tr",{className:"vm-table__row vm-table__row_header",children:i.map((function(e){return Yr("th",{className:xo()({"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:Yr("div",{className:"vm-table-cell__content",children:[e.label,"action"!==e.id&&"percentage"!==e.id&&Yr("div",{className:xo()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":n===e.id,"vm-table__sort-icon_desc":"desc"===t&&n===e.id}),children:Yr(Wi,{})})]})},e.id);var i}))})})}function oh(e,t,n){return t[n]
'+(n?e:vd(e,!0))+"
\n":""+(n?e:vd(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?""+vd(e.message+"",!0)+"";throw e}try{var l=zd.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(Yd.walkTokens(l,t.walkTokens)).then((function(){return Ud.parse(l,t)})).catch(u);Yd.walkTokens(l,t.walkTokens)}return Ud.parse(l,t)}catch(s){u(s)}}Yd.options=Yd.setOptions=function(e){var t;return Sd(Yd.defaults,e),t=Yd.defaults,ld=t,Yd},Yd.getDefaults=ud,Yd.defaults=ld,Yd.use=function(){for(var e=Yd.defaults.extensions||{renderers:{},childTokens:{}},t=arguments.length,n=new Array(t),r=0;r
"+vd(s.message+"",!0)+"";throw s}},Yd.Parser=Ud,Yd.parser=Ud.parse,Yd.Renderer=jd,Yd.TextRenderer=$d,Yd.Lexer=zd,Yd.lexer=zd.lex,Yd.Tokenizer=Bd,Yd.Slugger=Hd,Yd.parse=Yd;Yd.options,Yd.setOptions,Yd.use,Yd.walkTokens,Yd.parseInline,Ud.parse,zd.lex;var Vd=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=Si().period,c=Ho().customStep,s=Ni(),f=ie(null),d=Ft(ee(!1),2),h=d[0],p=d[1],v=Ft(ee({limits:{enable:!1,range:{1:[0,0]}}}),2),m=v[0],y=v[1],_=ae((function(){return Array.isArray(i)&&i.every((function(e){return e}))}),[i]),b=Hf({predefinedQuery:_?i:[],display:"chart",visible:h,customStep:c}),D=b.isLoading,w=b.graphData,x=b.error,k=b.warning,C=function(e){var t=mr({},m);t.limits.range=e,y(t)};if(ne((function(){var e=new IntersectionObserver((function(e){e.forEach((function(e){return p(e.isIntersecting)}))}),{threshold:.1});return f.current&&e.observe(f.current),function(){f.current&&e.unobserve(f.current)}}),[f]),!_)return Yr(ea,{variant:"error",children:[Yr("code",{children:'"expr"'})," not found. Check the configuration file ",Yr("b",{children:a}),"."]});var A=function(){return Yr("div",{className:"vm-predefined-panel-header__description vm-default-styles",children:[n&&Yr(g,{children:[Yr("div",{children:[Yr("span",{children:"Description:"}),Yr("div",{dangerouslySetInnerHTML:{__html:Yd.parse(n)}})]}),Yr("hr",{})]}),Yr("div",{children:[Yr("span",{children:"Queries:"}),Yr("div",{children:i.map((function(e,t){return Yr("div",{children:e},"".concat(t,"_").concat(e))}))})]})]})};return Yr("div",{className:"vm-predefined-panel",ref:f,children:[Yr("div",{className:"vm-predefined-panel-header",children:[Yr(pa,{title:Yr(A,{}),children:Yr("div",{className:"vm-predefined-panel-header__info",children:Yr($i,{})})}),Yr("h3",{className:"vm-predefined-panel-header__title",children:t||""}),Yr(qf,{yaxis:m,setYaxisLimits:C,toggleEnableLimits:function(){var e=mr({},m);e.limits.enable=!e.limits.enable,y(e)}})]}),Yr("div",{className:"vm-predefined-panel-body",children:[D&&Yr(Wf,{}),x&&Yr(ea,{variant:"error",children:x}),k&&Yr(ea,{variant:"warning",children:k}),w&&Yr(Nf,{data:w,period:l,customStep:c,query:i,yaxis:m,unit:r,alias:u,showLegend:o,setYaxisLimits:C,setPeriod:function(e){var t=e.from,n=e.to;s({type:"SET_PERIOD",payload:{from:t,to:n}})},fullWidth:!1})]})]})},qd=function(e){var t=e.index,n=e.title,r=e.panels,i=e.filename,o=Do(document.body),a=ae((function(){return o.width/12}),[o]),u=Ft(ee(!t),2),l=u[0],c=u[1],s=Ft(ee([]),2),f=s[0],d=s[1];ne((function(){d(r&&r.map((function(e){return e.width||12})))}),[r]);var h=Ft(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)}}},g=function(){v(mr(mr({},p),{},{enable:!1}))},y=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",g),function(){window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",g)}}),[p]),Yr("div",{className:"vm-predefined-dashboard",children:Yr(Ba,{defaultExpanded:l,onChange:function(e){return c(e)},title:Yr((function(){return Yr("div",{className:xo()({"vm-predefined-dashboard-header":!0,"vm-predefined-dashboard-header_open":l}),children:[(n||i)&&Yr("span",{className:"vm-predefined-dashboard-header__title",children:n||"".concat(t+1,". ").concat(i)}),r&&Yr("span",{className:"vm-predefined-dashboard-header__count",children:["(",r.length," panels)"]})]})}),{}),children:Yr("div",{className:"vm-predefined-dashboard-panels",children:Array.isArray(r)&&r.length?r.map((function(e,t){return Yr("div",{className:"vm-predefined-dashboard-panels-panel vm-block vm-block_empty-padding",style:{gridColumn:"span ".concat(f[t])},children:[Yr(Vd,{title:e.title,description:e.description,unit:e.unit,expr:e.expr,alias:e.alias,filename:i,showLegend:e.showLegend}),Yr("button",{className:"vm-predefined-dashboard-panels-panel__resizer",onMouseDown:y(t)})]},t)})):Yr("div",{className:"vm-predefined-dashboard-panels-panel__alert",children:Yr(ea,{variant:"error",children:[Yr("code",{children:'"panels"'})," not found. Check the configuration file ",Yr("b",{children:i}),"."]})})})})})},Wd=function(){!function(){var e=Si(),t=e.duration,n=e.relativeTime,r=e.period.date,i=Ho().customStep,o=function(){var e,o=rd((pr(e={},"g0.range_input",t),pr(e,"g0.end_input",r),pr(e,"g0.step_input",i),pr(e,"g0.relative_time",n),e));Or(o)};ne(o,[t,n,r,i]),ne(o,[])}();var e=aa(),t=e.dashboardsSettings,n=e.dashboardsLoading,r=e.dashboardsError,i=Ft(ee(0),2),o=i[0],a=i[1],u=ae((function(){return t.map((function(e,t){return{label:e.title||"",value:t}}))}),[t]),l=ae((function(){return t[o]||{}}),[t,o]),c=ae((function(){return null===l||void 0===l?void 0:l.rows}),[l]),s=ae((function(){return l.title||l.filename||""}),[l]),f=ae((function(){return Array.isArray(c)&&!!c.length}),[c]),d=function(e){return function(){!function(e){a(e)}(e)}};return Yr("div",{className:"vm-predefined-panels",children:[n&&Yr(Wf,{}),r&&Yr(ea,{variant:"error",children:r}),!t.length&&Yr(ea,{variant:"info",children:"Dashboards not found"}),u.length>1&&Yr("div",{className:"vm-predefined-panels-tabs vm-block",children:u.map((function(e){return Yr("div",{className:xo()({"vm-predefined-panels-tabs__tab":!0,"vm-predefined-panels-tabs__tab_active":e.value==o}),onClick:d(e.value),children:e.label},e.value)}))}),Yr("div",{className:"vm-predefined-panels__dashboards",children:[f&&c.map((function(e,t){return Yr(qd,{index:t,filename:s,title:e.title,panels:e.panels},"".concat(o,"_").concat(t))})),!!t.length&&!f&&Yr(ea,{variant:"error",children:[Yr("code",{children:'"rows"'})," not found. Check the configuration file ",Yr("b",{children:s}),"."]})]})]})},Qd=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)},Gd=function(){function e(){Mt(this,e),this.tsdbStatus=void 0,this.tabsNames=void 0,this.tsdbStatus=this.defaultTSDBStatus,this.tabsNames=["table","graph"]}return Pt(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 mr(mr({},t),{},{tabs:mr(mr({},t.tabs),{},pr({},n,e.tabsNames)),containerRefs:mr(mr({},t.containerRefs),{},pr({},n,ie(null))),defaultActiveTab:mr(mr({},t.defaultActiveTab),{},pr({},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:Jd,seriesCountByLabelName:Zd,seriesCountByFocusLabelValue:Kd,seriesCountByLabelValuePair:Xd,labelValueCountByLabelName:eh}}},{key:"totalSeries",value:function(e){return"labelValueCountByLabelName"===e?-1:this.tsdbStatus.totalSeries}}]),e}(),Jd=[{id:"name",label:"Metric name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Zd=[{id:"name",label:"Label name"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],Kd=[{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}],Xd=[{id:"name",label:"Label=value pair"},{id:"value",label:"Number of series"},{id:"percentage",label:"Percent of series"},{id:"action",label:"Action"}],eh=[{id:"name",label:"Label name"},{id:"value",label:"Number of unique values"},{id:"action",label:"Action"}],th={seriesCountByMetricName:function(e,t){return nh("__name__",t)},seriesCountByLabelName:function(e,t){return"{".concat(t,'!=""}')},seriesCountByFocusLabelValue:function(e,t){return nh(e,t)},seriesCountByLabelValuePair:function(e,t){var n=t.split("="),r=n[0],i=n.slice(1).join("=");return nh(r,i)},labelValueCountByLabelName:function(e,t){return"{".concat(t,'!=""}')}},nh=function(e,t){return e?"{"+e+"="+JSON.stringify(t)+"}":""},rh=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=Bi().autocomplete,v=Li(),m=Qf().queryOptions,g=ae((function(){return t<1?"Number must be bigger than zero":""}),[t]);return Yr("div",{className:"vm-cardinality-configurator vm-block",children:[Yr("div",{className:"vm-cardinality-configurator-controls",children:[Yr("div",{className:"vm-cardinality-configurator-controls__query",children:Yr(Tf,{value:r,autocomplete:p,options:m,error:n,onArrowUp:function(){i(-1)},onArrowDown:function(){i(1)},onEnter:o,onChange:a,label:"Time series selector"})}),Yr("div",{className:"vm-cardinality-configurator-controls__item",children:Yr(Sa,{label:"Number of entries per table",type:"number",value:t,error:g,onChange:u})}),Yr("div",{className:"vm-cardinality-configurator-controls__item",children:Yr(Sa,{label:"Focus label",type:"text",value:h||"",onChange:l,endIcon:Yr(pa,{title:Yr("div",{children:[Yr("p",{children:"To identify values with the highest number of series for the selected label."}),Yr("p",{children:"Adds a table showing the series with the highest number of series."})]}),children:Yr($i,{})})})})]}),Yr("div",{className:"vm-cardinality-configurator-additional",children:Yr(Of,{label:"Autocomplete",value:p,onChange:function(){v({type:"TOGGLE_AUTOCOMPLETE"})}})}),Yr("div",{className:"vm-cardinality-configurator-bottom",children:[Yr("div",{className:"vm-cardinality-configurator-bottom__info",children:["Analyzed ",Yr("b",{children:c})," series with ",Yr("b",{children:s}),' "label=value" pairs at ',Yr("b",{children:f}),d&&Yr("span",{children:[" for series selector ",Yr("b",{children:d})]}),". Show top ",t," entries per table."]}),Yr("div",{className:"vm-cardinality-configurator-bottom__docs",children:[Yr("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://docs.victoriametrics.com/#cardinality-explorer",rel:"help noreferrer",children:[Yr(mo,{}),"Documentation"]}),Yr("a",{className:"vm-link vm-link_with-icon",target:"_blank",href:"https://victoriametrics.com/blog/cardinality-explorer/",rel:"help noreferrer",children:[Yr(yo,{}),"Example of using"]})]}),Yr(la,{startIcon:Yr(eo,{}),onClick:o,children:"Execute Query"})]})]})};function ih(e){var t=e.order,n=e.orderBy,r=e.onRequestSort,i=e.headerCells;return Yr("thead",{className:"vm-table-header",children:Yr("tr",{className:"vm-table__row vm-table__row_header",children:i.map((function(e){return Yr("th",{className:xo()({"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:Yr("div",{className:"vm-table-cell__content",children:[e.label,"action"!==e.id&&"percentage"!==e.id&&Yr("div",{className:xo()({"vm-table__sort-icon":!0,"vm-table__sort-icon_active":n===e.id,"vm-table__sort-icon_desc":"desc"===t&&n===e.id}),children:Yr(Wi,{})})]})},e.id);var i}))})})}function oh(e,t,n){return t[n]
- {calculations.last !== undefined && ( -