Skip to content

Commit 8a401a5

Browse files
sherweb updates
1 parent 3e64ed9 commit 8a401a5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Modules/CIPPCore/Public/New-CIPPAlertTemplate.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ function New-CIPPAlertTemplate {
3939
$DataHTML = ($Data | ConvertTo-Html | Out-String).Replace('<table>', ' <table class="table-modern">')
4040
$IntroText = "<p>The following licenses have not been cancelled due to an API error at the old provider:</p>$dataHTML"
4141
}
42+
if ($InputObject -eq 'sherwebmigBuyFail') {
43+
$DataHTML = ($Data | ConvertTo-Html | Out-String).Replace('<table>', ' <table class="table-modern">')
44+
$IntroText = "<p>The following licenses have not been bought as we could not find a correctly matching license. Please login and buy the license:</p>$dataHTML"
45+
}
4246
if ($InputObject -eq 'table') {
4347
#data can be a array of strings or a string, if it is, we need to convert it to an object so it shows up nicely, that object will have one header: message.
4448

Modules/CippExtensions/Public/Sherweb/Test-SherwebMigrationAccounts.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ function Test-SherwebMigrationAccounts {
5050
}
5151
} catch {
5252
$Subject = "Sherweb Migration: $($TenantFilter) - Failed to buy licenses."
53-
$HTMLContent = New-CIPPAlertTemplate -Data $LicencesToMigrate -Format 'html' -InputObject 'sherwebmig'
54-
$JSONContent = New-CIPPAlertTemplate -Data $LicencesToMigrate -Format 'json' -InputObject 'sherwebmig'
53+
$HTMLContent = New-CIPPAlertTemplate -Data $LicencesToMigrate -Format 'html' -InputObject 'sherwebmigBuyFail'
54+
$JSONContent = New-CIPPAlertTemplate -Data $LicencesToMigrate -Format 'json' -InputObject 'sherwebmigBuyFail'
5555
Send-CIPPAlert -Type 'email' -Title $Subject -HTMLContent $HTMLContent.htmlcontent -TenantFilter $tenant -APIName 'Alerts'
5656
Send-CIPPAlert -Type 'psa' -Title $Subject -HTMLContent $HTMLContent.htmlcontent -TenantFilter $standardsTenant -APIName 'Alerts'
5757
Send-CIPPAlert -Type 'webhook' -JSONContent $JSONContent -TenantFilter $Tenant -APIName 'Alerts'

0 commit comments

Comments
 (0)