mirror of
https://github.com/tale/headplane.git
synced 2026-07-27 16:18:57 +00:00
fix: only return queried machines from an agent
This commit is contained in:
+10
-1
@@ -252,7 +252,16 @@ class AgentManager {
|
||||
await this.requestData(missing);
|
||||
}
|
||||
|
||||
return entries;
|
||||
return Object.entries(entries).reduce<Record<string, HostInfo>>(
|
||||
(acc, [key, value]) => {
|
||||
if (nodeIds.includes(key)) {
|
||||
acc[key] = value;
|
||||
}
|
||||
|
||||
return acc;
|
||||
},
|
||||
{},
|
||||
);
|
||||
}
|
||||
|
||||
// Request data from the internal agent by sending a message to the process
|
||||
|
||||
Reference in New Issue
Block a user