@Support ll start by saying this is probably not the best way of programming this section out but I am generating a table that has a status column. When a user clicks deploy I would like the status for each row one by one to update - first to a progress bar then to the completed or failed status. If completed it will move on, if not the process will stop.
$output = @(
[pscustomobject]@{
Details = 'Client Name'
Data= $LastResults.context.ClientsFullName
Status = "cn"
}
[pscustomobject]@{
Details = 'Clients FQDN'
Data= $LastResults.context.ClientsFQDN
Status = "cf"
}
[pscustomobject]@{
Details = 'Clients Production DNS Server'
Data= $LastResults.context.ClientsProductionDNSServer
Status = "cpd"
}
[pscustomobject]@{
Details = 'Clients Disaster Recovery DNS Server'
Data= $LastResults.context.ClientsDisasterRecoveryDNSServer
Status = "cdd"
}
)
New-UDGrid -Container -Content {
New-UDGrid -Item -ExtraSmallSize 12 -Content {
$columns = @(
New-UDTableColumn -Property Details -Title Details
New-UDTableColumn -Property Data -Title Data
New-UDTableColumn -Property Status -Title Status -Render {
New-UDDynamic -Id '$EventData.Status' -Content {
switch ( $session:process )
{
cn
{
switch ( $session:cn )
{
compleated
{
}
Failed
{
}
default
{
New-UDProgress -Circular
}
}
}
default
{
New-UDTypography -Text "Pending Deploy"
}
}
}
}
)
New-UDTable -data $output -Columns $Columns
}
New-UDButton -Icon (New-UDIcon -Icon rocket) -Text 'Deploy' -OnClick {
$session:process = cn
Sync-UDElement -Id "cn"
}
This is what I have so far but its not updating. Can anyone help me out or point me in the right direction.
thanks