Search both teams and all dispositions in enrich-batch
Search NTS-AEO-STEAM and NTS-AEO-ACCESS-ENG across confirmed, unconfirmed, and candidate dispositions. Assets that are only candidates (not yet confirmed) were previously missed.
This commit is contained in:
@@ -586,10 +586,13 @@ function createCardApiRouter() {
|
|||||||
// Strategy: fetch team assets (paginated) and match against our target IPs.
|
// Strategy: fetch team assets (paginated) and match against our target IPs.
|
||||||
// The team assets endpoint returns the full enriched record with ncim_discovery,
|
// The team assets endpoint returns the full enriched record with ncim_discovery,
|
||||||
// card_flags, netops_granite_allips, etc.
|
// card_flags, netops_granite_allips, etc.
|
||||||
const teamName = team || 'NTS-AEO-STEAM';
|
const teams = team ? [team] : ['NTS-AEO-STEAM', 'NTS-AEO-ACCESS-ENG'];
|
||||||
const dispositions = ['confirmed', 'unconfirmed'];
|
const dispositions = ['confirmed', 'unconfirmed', 'candidate'];
|
||||||
let foundCount = 0;
|
let foundCount = 0;
|
||||||
|
|
||||||
|
for (const teamName of teams) {
|
||||||
|
if (foundCount >= targetIps.size) break;
|
||||||
|
|
||||||
for (const disposition of dispositions) {
|
for (const disposition of dispositions) {
|
||||||
if (foundCount >= targetIps.size) break;
|
if (foundCount >= targetIps.size) break;
|
||||||
|
|
||||||
@@ -635,6 +638,7 @@ function createCardApiRouter() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Build results array in the same order as input IPs
|
// Build results array in the same order as input IPs
|
||||||
const results = [];
|
const results = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user