app/vmui: show min, max and avg lines at Explore metrics graphs when instance is selected in the same way as when only the job is selected

This improves consistency of the graphs.

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3386
This commit is contained in:
Aliaksandr Valialkin 2022-12-23 23:18:47 -08:00
parent eaaae2fab8
commit 197e58f1f6
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1
5 changed files with 5 additions and 9 deletions

View file

@ -1,12 +1,12 @@
{
"files": {
"main.css": "./static/css/main.74a50bcc.css",
"main.js": "./static/js/main.73fe1bcf.js",
"main.js": "./static/js/main.2a5e72d0.js",
"static/js/27.c1ccfd29.chunk.js": "./static/js/27.c1ccfd29.chunk.js",
"index.html": "./index.html"
},
"entrypoints": [
"static/css/main.74a50bcc.css",
"static/js/main.73fe1bcf.js"
"static/js/main.2a5e72d0.js"
]
}

View file

@ -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"/><meta name="theme-color" content="#000000"/><meta name="description" content="VM-UI is a metric explorer for Victoria Metrics"/><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><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono&family=Lato:wght@300;400;700&display=swap" rel="stylesheet"><script src="./dashboards/index.js" type="module"></script><script defer="defer" src="./static/js/main.73fe1bcf.js"></script><link href="./static/css/main.74a50bcc.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"/><meta name="theme-color" content="#000000"/><meta name="description" content="VM-UI is a metric explorer for Victoria Metrics"/><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><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono&family=Lato:wght@300;400;700&display=swap" rel="stylesheet"><script src="./dashboards/index.js" type="module"></script><script defer="defer" src="./static/js/main.2a5e72d0.js"></script><link href="./static/css/main.74a50bcc.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

View file

@ -61,10 +61,6 @@ with (q = histogram_quantile(0.95, sum(rate(${base})) by (instance, vmrange, le)
alias(avg(q), "q95avg"),
)`;
}
if (instance) {
const queryBase = rateEnabled ? `label_match(rollup_rate(${base}), "rollup", "max")` : `max_over_time(${base})`;
return `alias(max(${queryBase}), "max")`;
}
const queryBase = rateEnabled ? `rollup_rate(${base})` : `rollup(${base})`;
return `
with (q = ${queryBase}) (