Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix alerts list #1122

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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