v0.33.5
This commit is contained in:
1 parent
c6486bfe85
commit
5dd802ae83
12 files changed
+295
-26
No files matched your search
@@ -85,14 +85,10 @@ window.rustProxyWideOverview = (() => {
|
||||
for (const [id, config] of Object.entries(configurations)) {
|
||||
const node = tile(id);
|
||||
if (!node) { baselines.delete(id); continue; }
|
||||
// Keep collecting while hidden so restoring a widget does not restart rates.
|
||||
const values = config.counters ? counterRates(id, config.counters(status), now, record)
|
||||
: config.values(status).map(finite);
|
||||
const series = history.get(id) || config.names.map(() => []);
|
||||
if (record) {
|
||||
// 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);
|
||||
@@ -102,8 +98,7 @@ window.rustProxyWideOverview = (() => {
|
||||
}
|
||||
last.set(id, values);
|
||||
}
|
||||
const peak = Math.max(config.unit === "percent" ? 100 : 1,
|
||||
...series.flat().filter(n => n !== null));
|
||||
const peak = Math.max(1, ...series.flat().filter(n => n !== null));
|
||||
config.names.forEach((key, i) => {
|
||||
const value = values[i];
|
||||
const field = $(`overview-wide-${id}-${key}-value`);
|
||||
|
||||
Reference in new issue
Block a user