fix: only return queried machines from an agent
This commit is contained in:
parent
f93acd8ef1
commit
8c01fcfe89
1 changed files with 10 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue