fix: refcount StatsCache keys, keep registrations across config change, and tidy GPU/usage render paths
This commit is contained in:
@@ -87,7 +87,7 @@ export class GpuGraph extends SingletonAction<GpuSettings> {
|
||||
const combined = combineSeries(histories, metric);
|
||||
value = combined.value;
|
||||
history = combined.history;
|
||||
gpuName = `GPU ${ids.join("+")}`;
|
||||
gpuName = ids.length > 0 ? `GPU ${ids.join("+")}` : "NO GPUS";
|
||||
} else {
|
||||
const gpuId = state.settings.gpuId ?? "all";
|
||||
value = poller?.getValue(gpuId, metric);
|
||||
@@ -108,9 +108,6 @@ export class GpuGraph extends SingletonAction<GpuSettings> {
|
||||
}
|
||||
|
||||
function parseCombo(raw: string | undefined): string[] | undefined {
|
||||
const ids = (raw ?? "")
|
||||
.split(",")
|
||||
.map((s) => s.trim())
|
||||
.filter(Boolean);
|
||||
const ids = [...new Set((raw ?? "").split(",").map((s) => s.trim()).filter(Boolean))];
|
||||
return ids.length > 0 ? ids : undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user