This commit is contained in:
Mateusz Gruszczyński committed 2026-10-25 09:58:39 +01:00
1 parent 37c197c095
commit 5ac3617947
48 files changed
+1049 -255

No files matched your search

+7 -3
View File
@@ -160,15 +160,17 @@ window.rustProxyWebOverview = (() => {
histories.set("www_php_requests", values);
}
$(`www_php_requests-line`)?.setAttribute("points", smallPath(histories.get("www_php_requests") || []));
const phpSamples = histories.get("www_php_requests") || [];
window.rustProxyChartScale.axes("www_php_requests-line",
window.rustProxyChartScale.peak("web:php-small", "rate", [phpSamples]), "rate",
phpSamples.filter(value => value !== null).length, { top: 5 / 60, bottom: 55 / 60 });
const set = {
www_requests: r?.rps, www_latency: r?.latency, www_failures: r?.failures,
www_traffic: r?.traffic, www_status_trend: r?.status,
};
for (const [id, names] of Object.entries(seriesNames)) {
const series = histories.get(id) || names.map(() => []);
// A resumed/overdue interval has no rate; skipping that entire
// snapshot keeps existing paths connected without inventing 0/s.
// A genuinely unavailable series inside a valid interval stays null.
if (record && r) {
names.forEach((_, i) => { series[i].push(set[id]?.[i] ?? null); window.rustProxyOverviewSamples.trim(series[i]); });
histories.set(id, series);
@@ -182,6 +184,8 @@ window.rustProxyWebOverview = (() => {
show(`${id}-${name}-value`, label);
$(`${id}-${name}-line`)?.setAttribute("d", chartPath(series[i], peak));
});
window.rustProxyChartScale.axes(`${id}-${names[0]}-line`, peak, unit,
series[0].length, { top: 17 / 150, bottom: 137 / 150 });
const summary = id === "www_latency" ? (set[id]?.[0] == null ? "-" : `${fmt(set[id][0], 1)} ms`)
: id === "www_traffic" ? (set[id] ? `${fmtBytes(set[id][0] + set[id][1])}/s` : "-")
: fmtRate(set[id]?.[0]);