mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-10-15 21:31:11 +00:00
fix(notifications): use real server name in remote threshold alerts
Server CPU/Memory threshold notifications for remote servers always showed "Server Name: Remote" instead of the actual server name, making it impossible to tell which server triggered the alert when more than one remote server is registered. The remote branch of receiveNotification already fetches the matching server row (looked up by its metrics token) but discarded it, hardcoding ServerName to the literal "Remote". Use the fetched row's name instead, falling back to "Remote" if it is somehow absent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -535,7 +535,7 @@ export const notificationRouter = createTRPCRouter({
|
||||
}
|
||||
|
||||
organizationId = result?.[0]?.organizationId;
|
||||
ServerName = "Remote";
|
||||
ServerName = result?.[0]?.name ?? "Remote";
|
||||
}
|
||||
|
||||
await sendServerThresholdNotifications(organizationId, {
|
||||
|
||||
Reference in New Issue
Block a user