mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmselect: return stats.seriesFetched as string instead of number
vmalert expects string value for stats.seriesFetched, so it is impossible switching to number without breaking compatibility with old vmalert releases :( It is still unclear why stats.seriesFetched has string type in the first place...
This commit is contained in:
parent
b44b74d118
commit
b8739bc00b
8 changed files with 17 additions and 9 deletions
|
@ -29,7 +29,11 @@ See https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries
|
|||
]
|
||||
},
|
||||
"stats":{
|
||||
"seriesFetched": {%dl qs.SeriesFetched %},
|
||||
{% code
|
||||
// seriesFetched is string instead of int because of historical reasons.
|
||||
// It cannot be converted to int without breaking backwards compatibility at vmalert :(
|
||||
%}
|
||||
"seriesFetched": "{%dl qs.SeriesFetched %}",
|
||||
"executionTimeMsec": {%dl qs.ExecutionTimeMsec %}
|
||||
}
|
||||
{% code
|
||||
|
|
|
@ -31,7 +31,11 @@ See https://prometheus.io/docs/prometheus/latest/querying/api/#instant-queries
|
|||
]
|
||||
},
|
||||
"stats":{
|
||||
"seriesFetched": {%dl qs.SeriesFetched %},
|
||||
{% code
|
||||
// seriesFetched is string instead of int because of historical reasons.
|
||||
// It cannot be converted to int without breaking backwards compatibility at vmalert :(
|
||||
%}
|
||||
"seriesFetched": "{%dl qs.SeriesFetched %}",
|
||||
"executionTimeMsec": {%dl qs.ExecutionTimeMsec %}
|
||||
}
|
||||
{% code
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"files": {
|
||||
"main.css": "./static/css/main.b863450b.css",
|
||||
"main.js": "./static/js/main.0c55974f.js",
|
||||
"main.js": "./static/js/main.5566464c.js",
|
||||
"static/js/522.da77e7b3.chunk.js": "./static/js/522.da77e7b3.chunk.js",
|
||||
"static/media/MetricsQL.md": "./static/media/MetricsQL.8644fd7c964802dd34a9.md",
|
||||
"index.html": "./index.html"
|
||||
},
|
||||
"entrypoints": [
|
||||
"static/css/main.b863450b.css",
|
||||
"static/js/main.0c55974f.js"
|
||||
"static/js/main.5566464c.js"
|
||||
]
|
||||
}
|
|
@ -1 +1 @@
|
|||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=5"/><meta name="theme-color" content="#000000"/><meta name="description" content="UI for VictoriaMetrics"/><link rel="apple-touch-icon" href="./apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="./favicon-32x32.png"><link rel="manifest" href="./manifest.json"/><title>VM UI</title><script src="./dashboards/index.js" type="module"></script><meta name="twitter:card" content="summary_large_image"><meta name="twitter:image" content="./preview.jpg"><meta name="twitter:title" content="UI for VictoriaMetrics"><meta name="twitter:description" content="Explore and troubleshoot your VictoriaMetrics data"><meta name="twitter:site" content="@VictoriaMetrics"><meta property="og:title" content="Metric explorer for VictoriaMetrics"><meta property="og:description" content="Explore and troubleshoot your VictoriaMetrics data"><meta property="og:image" content="./preview.jpg"><meta property="og:type" content="website"><script defer="defer" src="./static/js/main.0c55974f.js"></script><link href="./static/css/main.b863450b.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=5"/><meta name="theme-color" content="#000000"/><meta name="description" content="UI for VictoriaMetrics"/><link rel="apple-touch-icon" href="./apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="./favicon-32x32.png"><link rel="manifest" href="./manifest.json"/><title>VM UI</title><script src="./dashboards/index.js" type="module"></script><meta name="twitter:card" content="summary_large_image"><meta name="twitter:image" content="./preview.jpg"><meta name="twitter:title" content="UI for VictoriaMetrics"><meta name="twitter:description" content="Explore and troubleshoot your VictoriaMetrics data"><meta name="twitter:site" content="@VictoriaMetrics"><meta property="og:title" content="Metric explorer for VictoriaMetrics"><meta property="og:description" content="Explore and troubleshoot your VictoriaMetrics data"><meta property="og:image" content="./preview.jpg"><meta property="og:type" content="website"><script defer="defer" src="./static/js/main.5566464c.js"></script><link href="./static/css/main.b863450b.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
File diff suppressed because one or more lines are too long
|
@ -22,7 +22,7 @@ export interface TracingData {
|
|||
}
|
||||
|
||||
export interface QueryStats {
|
||||
seriesFetched?: number;
|
||||
seriesFetched?: string;
|
||||
executionTimeMsec?: number;
|
||||
resultLength?: number;
|
||||
isPartial?: boolean;
|
||||
|
|
|
@ -41,7 +41,7 @@ const QueryEditor: FC<QueryEditorProps> = ({
|
|||
|
||||
const warning = [
|
||||
{
|
||||
show: stats?.seriesFetched == 0 && !stats.resultLength,
|
||||
show: stats?.seriesFetched === "0" && !stats.resultLength,
|
||||
text: seriesFetchedWarning
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue