v0.33.3_hotfix
This commit is contained in:
1 parent
78ad28ef4d
commit
de090d20fa
7 files changed
+162
-11
No files matched your search
@@ -90,11 +90,16 @@ window.rustProxyWideOverview = (() => {
|
||||
: config.values(status).map(finite);
|
||||
const series = history.get(id) || config.names.map(() => []);
|
||||
if (record) {
|
||||
values.forEach((value, i) => {
|
||||
series[i].push(value);
|
||||
if (series[i].length > limit()) series[i].shift();
|
||||
});
|
||||
history.set(id, series);
|
||||
// Counter rates have no meaningful value on the first sample after a
|
||||
// paused tab. Do not add null to the path: it would split a live line.
|
||||
// Still show "-" above the chart until a fresh interval is sampled.
|
||||
if (!config.counters || values.every(value => value !== null)) {
|
||||
values.forEach((value, i) => {
|
||||
series[i].push(value);
|
||||
if (series[i].length > limit()) series[i].shift();
|
||||
});
|
||||
history.set(id, series);
|
||||
}
|
||||
last.set(id, values);
|
||||
}
|
||||
const peak = Math.max(config.unit === "percent" ? 100 : 1,
|
||||
|
||||
@@ -154,9 +154,9 @@ window.rustProxyWebOverview = (() => {
|
||||
meter("www_error_rate", r?.errorRate);
|
||||
show("www_error_rate-detail", t("webMetricErrorRateHelp"));
|
||||
show("www_php_requests-value", fmtRate(r?.phpRps));
|
||||
if (record) {
|
||||
if (record && r) {
|
||||
const values = histories.get("www_php_requests") || [];
|
||||
values.push(r?.phpRps ?? null); window.rustProxyOverviewSamples.trim(values);
|
||||
values.push(r.phpRps); window.rustProxyOverviewSamples.trim(values);
|
||||
histories.set("www_php_requests", values);
|
||||
}
|
||||
$(`www_php_requests-line`)?.setAttribute("points", smallPath(histories.get("www_php_requests") || []));
|
||||
@@ -166,7 +166,10 @@ window.rustProxyWebOverview = (() => {
|
||||
};
|
||||
for (const [id, names] of Object.entries(seriesNames)) {
|
||||
const series = histories.get(id) || names.map(() => []);
|
||||
if (record) {
|
||||
// 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);
|
||||
}
|
||||
|
||||
@@ -439,7 +439,8 @@
|
||||
const deltas = record ? sample.deltas : null;
|
||||
const rate = deltas ? deltas[0] / sample.seconds : null;
|
||||
const previous = serviceHistory.get(id) || [];
|
||||
if (record) { previous.push(rate); window.rustProxyOverviewSamples.trim(previous); serviceHistory.set(id, previous); }
|
||||
// An unavailable counter delta is not a 0/s measurement; do not plot it.
|
||||
if (record && rate !== null) { previous.push(rate); window.rustProxyOverviewSamples.trim(previous); serviceHistory.set(id, previous); }
|
||||
const peak = Math.max(1, ...previous.filter(x => x != null));
|
||||
const points = previous.map((value, i) => `${300 * i / Math.max(1, previous.length - 1)},${55 - (value || 0) / peak * 50}`).join(" ");
|
||||
panel.querySelector("polyline")?.setAttribute("points", points || "0,55 300,55");
|
||||
|
||||
Reference in new issue
Block a user