Upgraded from 1.5.19 to 2.1.2 tonight. When submitting various forms on pages I’m seeing this pop up at the bottom of the page whenever I click ‘Submit’.
Anyone else seeing this? I am running the IIS version, and this dashboard is configured like so:
New-PSUDashboard -Name "DashboardName" -FilePath "DashboardName.ps1" -BaseUrl "/Dashboard" -Framework "UniversalDashboard:Latest" -Environment "7.1.3" -Authenticated -Role @('Role1', 'Role2') -GrantAppToken -DisableAutoStart -SessionTimeout 0
And this is code for one of the forms where I am seeing the problem
$PageGetUserInfo = New-UDPage -Name 'Get User Information' -Content {
New-UDTypography -Text 'Enter username to retrieve information from Active Directory'
New-UDForm -Content {
New-UDTextbox -Id 'Username' -Placeholder 'AD Username'
New-UDRadioGroup -Id 'RadioValue' -Content {
New-UDRadio -Label 'Account Expiration Date' -Value 'AccountExpirationDate'
New-UDRadio -Label 'Account Lockout Status' -Value 'LockedOut'
New-UDRadio -Label 'Password Last Set' -Value 'PasswordLastSet'
} -Value 'PasswordLastSet'
} -OnSubmit {
$UserList = ($EventData.UserName).Trim()
$Script = Get-UAScript -Name 'Get User Info.ps1'
$InvokeParams = @{
Script = $Script
Identity = $UserList
UserProperty = $EventData.RadioValue
}
Invoke-UAScript @InvokeParams | Tee-Object -Variable job | Wait-UAJob
$Data = Get-UAJobPipelineOutput -Job $Job
Set-UDElement -Id 'ElementJobOutput' -Content {
New-UDCard -Id 'CardJobOutput' -Title "Results" -Content {
$Columns = @(
New-UDTableColumn -Property SamAccountName -Title 'SamAccountName' -Width 10 -IncludeInExport
New-UDTableColumn -Property $EventData.RadioValue -Title $EventData.RadioValue -Width 25 -IncludeInExport
)
If($EventData.RadioValue -eq 'LockedOut'){
$Columns += New-UDTableColumn -Property Unlock -Title Unlock -Width 10 -Render {
$Item = $EventData
If($Item.LockedOut -eq $true){
New-UDButton -Id "btn$($Item.SamAccountName)" -Text "Unlock" -OnClick {
Show-UDToast -Message "Unlocking AD User [$($Item.SamAccountName)]" -Duration 2500
$Credential = Get-UAVariable -Name '<UserName>'
$Script = Get-UAScript -Name 'Unlock AD User.ps1'
$InvokeParams = @{ # Parameters for Invoke-UAScript command
Script = $Script
SamAccountName = $Item.SamAccountName
Credential = $Credential
}
Invoke-UAScript @InvokeParams | Tee-Object -Variable job | Wait-UAJob # Waits for completion and stores job info in '$Job' var
$Job = Get-UAJob -Id $Job.Id
$Data = Get-UAJobPipelineOutput -Job $Job
If ($Job.Status -eq 'Completed' -and $Data -match 'Success'){
$SuccessToastParams = @{
Message = "Completed unlock for user $($Item.SamAccountName)"
Duration = "5000"
Position = 'center'
}
Show-UDToast @SuccessToastParams
} else {
$Output = Get-UAJobOutput -JobId $Job.Id | Select-Object -Expand Message
$FailedToastParams = @{
Message = "Failed to restore user. $($Output -join "`n")"
BackgroundColor = 'red'
MessageColor = 'white'
Duration = "5000"
Position = 'center'
}
Show-UDToast @FailedToastParams
}
}
} Else {
New-UDTypography -Text 'Not Locked'
New-UDIcon -Id "icon$($Item.SamAccountName)" -Icon CheckCircle
}
}
}
New-UDTable -Id 'TableUserInfo' -Data $Data -Columns $Columns -Export
}
}
}
New-UDElement -Id 'ElementJobOutput' -Tag 'div' # New empty element to be updated/displayed after user clicks 'Submit'
} -NavigationLayout permanent -Navigation $CustomNav -Url '/customURL'
Product: PowerShell Universal
Version: 2.1.2