Skip to content

Commit

Permalink
Merge pull request #1122 from JohnDuprey/dev
Browse files Browse the repository at this point in the history
Fix alerts list
  • Loading branch information
JohnDuprey authored Sep 26, 2024
2 parents 6a974de + 898d329 commit 5d29d92
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ function Push-ExecAlertsListAllTenants {
[CmdletBinding()]
param($Item)

$domainName = $Item.defaultDomainName
$Tenant = Get-Tenants -TenantFilter $Item.customerId
$domainName = $Tenant.defaultDomainName
$Table = Get-CIPPTable -TableName 'cachealertsandincidents'

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ function Push-ExecIncidentsListAllTenants {
$Item
)

$domainName = $Item.defaultDomainName
$Tenant = Get-Tenants -TenantFilter $Item.customerId
$domainName = $Tenant.defaultDomainName
$Table = Get-CIPPTable -TableName 'cachealertsandincidents'

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ Function Invoke-ExecAlertsList {
TenantParams = @{
IncludeErrors = $true
}
DurableName = 'ExecAlertsAllTenants'
DurableName = 'ExecAlertsListAllTenants'
}
SkipLog = $true
} | ConvertTo-Json -Depth 10
Start-NewOrchestration -FunctionName CIPPOrchestrator -InputObject $InputObject

$InstanceId = Start-NewOrchestration -FunctionName CIPPOrchestrator -InputObject $InputObject
[PSCustomObject]@{
Waiting = $true
Waiting = $true
InstanceId = $InstanceId
}
} else {
$Alerts = $Rows
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Function Invoke-ExecIncidentsList {
IncludeErrors = $true
}
QueueId = $Queue.RowKey
DurableFunction = 'ExecIncidentListAllTenants'
DurableFunction = 'ExecIncidentsListAllTenants'
}
SkipLog = $true
}
Expand Down
4 changes: 2 additions & 2 deletions Modules/CIPPCore/Public/GraphHelper/New-GraphBulkRequest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ function New-GraphBulkRequest {
throw $Message
}

if ($Tenant.PSObject.Properties.Name -notcontains 'LastGraphErrror') {
$Tenant | Add-Member -MemberType NoteProperty -Name 'LastGraphError' -Value ''
if ($Tenant.PSObject.Properties.Name -notcontains 'LastGraphError') {
$Tenant | Add-Member -MemberType NoteProperty -Name 'LastGraphError' -Value '' -Force
} else {
$Tenant.LastGraphError = ''
}
Expand Down
4 changes: 2 additions & 2 deletions Modules/CIPPCore/Public/GraphHelper/New-GraphGetRequest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ function New-GraphGetRequest {
throw $Message
}
} until ([string]::IsNullOrEmpty($NextURL) -or $NextURL -is [object[]] -or ' ' -eq $NextURL)
if ($Tenant.PSObject.Properties.Name -notcontains 'LastGraphErrror') {
$Tenant | Add-Member -MemberType NoteProperty -Name 'LastGraphError' -Value ''
if ($Tenant.PSObject.Properties.Name -notcontains 'LastGraphError') {
$Tenant | Add-Member -MemberType NoteProperty -Name 'LastGraphError' -Value '' -Force
} else {
$Tenant.LastGraphError = ''
}
Expand Down

0 comments on commit 5d29d92

Please sign in to comment.