Table Length Help

Is there a way to adjust table length? It seems like my table maxes out at 21 rows then is cut off

Get-UDDashboard | Stop-UDDashboard
$LenelComDashboard = New-UDDashboard -Title “Lenel Communication Server Health” -Content {

New-UDSplitPane -Content {
New-UDCard -Title ‘’ -Content {
New-UDTable -Title “Service Status” -Headers @(‘Hostname’, ‘Service Status’) -AutoRefresh -RefreshInterval 5 -Endpoint {
$serverlist = get-content -path C:\temp\Serverlist.csv
foreach ($servername in $serverlist){
Get-Service -ComputerName $servername -Name ‘LS Communication Server’ | ForEach-Object {

        $BgColor = 'green'
        $FontColor = 'white'
        if ($_.Status -ne 'Running') {
            $BgColor = 'red'
            $FontColor = 'white'
        }

        [PSCustomObject]@{
            Name = $servername
            Status = New-UDElement -Tag 'div' -Attributes @{ style = @{ 'backgroundColor' = $BgColor; color = $fontColor } } -Content { $_.Status.ToString() }
        }
    } | Out-UDTableData -Property @("Name", "Status") 

}
}
}

New-UDCard -Title ‘’ -Content {
New-UDTable -Title “Service Status” -Headers @(‘Hostname’, ‘Service Status’) -AutoRefresh -RefreshInterval 5 -Endpoint {
$serverlist = get-content -path C:\temp\Serverlist2.csv
foreach ($servername in $serverlist){
Get-Service -ComputerName $servername -Name ‘LS Communication Server’ | ForEach-Object {

        $BgColor = 'green'
        $FontColor = 'white'
        if ($_.Status -ne 'Running') {
            $BgColor = 'red'
            $FontColor = 'white'
        }

        [PSCustomObject]@{
            Name = $servername
            Status = New-UDElement -Tag 'div' -Attributes @{ style = @{ 'backgroundColor' = $BgColor; color = $fontColor } } -Content { $_.Status.ToString() }
        }
    } | Out-UDTableData -Property @("Name", "Status") 

}
}
}
} -DefaultSize 850

}

Start-UDDashboard -Dashboard $LenelComDashboard -Port 8090 -AutoReload
#Get-UDDashboard | Stop-UDDashboard

Hey fella, whenever I have used tables (not very often) but never used the -DefaultSize tag…normally it displayed every record for me, which kind of made the page too long hence I haven’t used tables often as the data I am returning is in the 1000’s of rows. So I am guessing without trying that the -DefaultSize parameter is causing this behaviour. Peace

The default size flag is actuality an attribute of the split pane and not the table itself. It only specifies the width of the sections containing the tables. Either way, removing it did not seem to solve the issue :confused:


As mentioned I don’t really use tables…here is a snippet of a dashboard which has since been changed, but last time I did a table it was like:-

New-UDColumn -size 4 -Content {
New-UDTable -Title "Last 31 days wastage by weekending, by depot" -Headers @("DepotName","StockTypeName","Qty","WeekEnding") -Style bordered -BackgroundColor "#1c2331" -FontColor "#eef1ef" -Endpoint {
$Cache:Q1 | Out-UDTableData -Property @("DepotName","StockTypeName","Qty","WeekEnding")
   @("card2","card3") | Sync-UDElement
    }
}

The $Cache:Q1 was an SQL query. This did result in a super long page…hance I switched this to a grid. This did fit all the 100+ rows returned in single table.