Add: Agent v2.1.2, WebSocket Live Shell, WebRTC Remote Desktop (Beta), Announcement Push
- Agent v2.1.2: WebSocket ShellService, ACK nach WS-Ankündigungen, shown_announcements Fix - Backend: shellServer.js mit WebSocket-Server (Shell + Announcement Push + RTC Signaling) - Backend: patch.controller.js Fix (command_id=0 Falsy-Bug beim Auto-Update) - Frontend: Remote Desktop Tab (WebRTC Beta) in AgentDetailPage für super_admin/admin - Frontend: PatchManagementPage auf v2.1.2 aktualisiert - WPF Notification: AllowsTransparency=False + kein DropShadowEffect (Dispatcher-Crash Fix) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -421,14 +421,20 @@ const AssetsPage = () => {
|
||||
);
|
||||
});
|
||||
|
||||
/* ── Agent lookup: by serial, IP or hostname ── */
|
||||
/* ── Agent lookup: by serial (primary) or hostname (fallback) — NOT by IP (not unique with DHCP) ── */
|
||||
const getAgent = (asset) => {
|
||||
if (!asset || !agents.length) return null;
|
||||
return agents.find(ag =>
|
||||
(asset.serial_number && ag.hardware_serial && ag.hardware_serial.toLowerCase() === asset.serial_number.toLowerCase()) ||
|
||||
(asset.ip_address && ag.ip_address && ag.ip_address === asset.ip_address) ||
|
||||
(asset.name && ag.hostname && ag.hostname.toLowerCase() === asset.name.toLowerCase())
|
||||
) || null;
|
||||
// Seriennummer ist eindeutig — erste Priorität
|
||||
if (asset.serial_number) {
|
||||
const bySerial = agents.find(ag => ag.hardware_serial && ag.hardware_serial.toLowerCase() === asset.serial_number.toLowerCase());
|
||||
if (bySerial) return bySerial;
|
||||
}
|
||||
// Hostname als Fallback
|
||||
if (asset.name) {
|
||||
const byHost = agents.find(ag => ag.hostname && ag.hostname.toLowerCase() === asset.name.toLowerCase());
|
||||
if (byHost) return byHost;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
/* ── PDF öffnen mit Auth-Token ── */
|
||||
|
||||
Reference in New Issue
Block a user