Update VMware.Skyline.InsightsApi.psm1
I accidentally committed a version with a query problem in Get-SkylineAffectedObject. This version does not contain that search problem. Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
This commit is contained in:
@@ -297,7 +297,7 @@ Function Get-SkylineAffectedObject {
|
|||||||
{
|
{
|
||||||
activeFindings(
|
activeFindings(
|
||||||
filter: {
|
filter: {
|
||||||
findingId: "$findingId",
|
findingId: "",
|
||||||
product: "",
|
product: "",
|
||||||
}) {
|
}) {
|
||||||
findings {
|
findings {
|
||||||
@@ -322,15 +322,15 @@ Function Get-SkylineAffectedObject {
|
|||||||
"@
|
"@
|
||||||
|
|
||||||
# Try to get results the first time
|
# Try to get results the first time
|
||||||
$results = @()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
process {
|
process {
|
||||||
|
$thisQueryBody = $queryBody -Replace 'findingId: "",', "findingId: `"$findingId`","
|
||||||
foreach ( $thisProduct in $products ) {
|
foreach ( $thisProduct in $products ) {
|
||||||
$thisIteration = 0
|
$thisIteration = 0
|
||||||
$results = @() # reset results variable between products
|
$results = @() # reset results variable between products
|
||||||
do {
|
do {
|
||||||
$thisQueryBody = $queryBody -Replace 'product: "",', "product: `"$thisProduct`","
|
$thisQueryBody = $thisQueryBody -Replace 'product: "",', "product: `"$thisProduct`","
|
||||||
$thisQueryBody = $thisQueryBody -Replace 'start: 0', "start: $thisIteration"
|
$thisQueryBody = $thisQueryBody -Replace 'start: 0', "start: $thisIteration"
|
||||||
Write-Debug $thisQueryBody
|
Write-Debug $thisQueryBody
|
||||||
$thisResult = Invoke-SkylineInsightsApi -queryBody (@{'query' = $thisQueryBody} | ConvertTo-Json -Compress)
|
$thisResult = Invoke-SkylineInsightsApi -queryBody (@{'query' = $thisQueryBody} | ConvertTo-Json -Compress)
|
||||||
|
|||||||
Reference in New Issue
Block a user