mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-20 23:32:19 +00:00
fix(notifications): stop embedding Local in janitor alerts (#1631)
Fleet-aggregated reclaim alerts showed Node Local in the body while the badge already named the remote. Use a node-neutral message so identity comes from the hub badge; leave stored rows unchanged.
This commit is contained in:
@@ -439,15 +439,14 @@ export class MonitorService {
|
||||
const MIN_RECLAIMABLE_GB = 0.1;
|
||||
|
||||
if (reclaimGb >= janitorLimitGb && reclaimGb >= MIN_RECLAIMABLE_GB) {
|
||||
const registry = NodeRegistry.getInstance();
|
||||
const localNode = registry.getNode(registry.getDefaultNodeId());
|
||||
const nodeLabel = localNode?.name ?? 'this node';
|
||||
// Node-neutral body: the hub bell badge attributes remotes.
|
||||
// Embedding the local seed name ("Local") made fleet alerts look wrong.
|
||||
await this.dispatchWithCooldown(
|
||||
HOST_ALERT_KEYS.janitor,
|
||||
JANITOR_COOLDOWN_MS,
|
||||
'info',
|
||||
'system',
|
||||
`Node "${nodeLabel}" has accumulated ${reclaimGb.toFixed(1)} GB of unused Docker data. Open Resources to reclaim space, or set up a Prune Node Resources schedule.`,
|
||||
`This node has accumulated ${reclaimGb.toFixed(1)} GB of unused Docker data. Open Resources to reclaim space, or set up a Prune Node Resources schedule.`,
|
||||
);
|
||||
}
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user